Advertisement
Guest User

PPH

a guest
Oct 23rd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. //
  2. // WDAppDelegate.mm
  3. //
  4. // Created by PPH on 23/10/2014.
  5. // Copyright PCSOFT 2014. All rights reserved.
  6. //
  7.  
  8. #import "WDAppDelegate.h"
  9.  
  10. void InitInstance();
  11. void InitModule(const struct _stMyModuleInfo* pstModule);
  12. void LoadWDLFile(NSString*);
  13. void InitExec();
  14. void TermExec();
  15. void InitInternalLanguage(int);
  16. void InitNativeCall(const struct STNativeCall*,int);
  17. extern struct STNativeCall NativeCalls[];
  18. extern const struct _stMyModuleInfo gstMyModuleInfo1;
  19. void OBJ_InitIOS(UIWindow *pclWindow, NSDictionary *launchOptions, BOOL moveControls);
  20. void OBJ_SendApplicationWillResignActive(void);
  21. void OBJ_SendApplicationDidBecomeActive(void);
  22. extern const struct _stMyModuleInfo gstMyModuleInfo3;
  23. extern const struct _stMyModuleInfo gstMyModuleInfo4;
  24. extern const struct _stMyModuleInfo gstMyModuleInfo8;
  25. extern const struct _stMyModuleInfo gstMyModuleInfo61;
  26. extern const struct _stMyModuleInfo gstMyModuleInfo68;
  27. extern const struct _stMyModuleInfo gstMyModuleInfo70;
  28.  
  29.  
  30. @implementation WDAppDelegate
  31.  
  32. @synthesize window;
  33.  
  34. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  35. {
  36. CGRect screenBounds = [ [ UIScreen mainScreen ] bounds ];
  37. window = [ [ UIWindow alloc ] initWithFrame: screenBounds ];
  38.  
  39. #ifdef __IPHONE_7_0
  40. OBJ_InitIOS(window, launchOptions, YES);
  41. #else
  42. OBJ_InitIOS(window, launchOptions, NO);
  43. #endif //__IPHONE_7_0
  44. InitInstance();
  45. InitInternalLanguage(12);
  46. InitModule(&gstMyModuleInfo1);
  47. InitModule(&gstMyModuleInfo3);
  48. InitModule(&gstMyModuleInfo4);
  49. InitModule(&gstMyModuleInfo8);
  50. InitModule(&gstMyModuleInfo61);
  51. InitModule(&gstMyModuleInfo68);
  52. InitModule(&gstMyModuleInfo70);
  53. InitExec();
  54. InitNativeCall(NativeCalls,2);
  55. LoadWDLFile(@"appDidEnterBackground");
  56.  
  57.  
  58. [window makeKeyAndVisible];
  59. return YES;
  60. }
  61.  
  62.  
  63. - (void)applicationWillResignActive:(UIApplication *)application {
  64. NSLog(@">> applicationWillResignActive");
  65.  
  66. OBJ_SendApplicationWillResignActive();
  67.  
  68. }
  69.  
  70.  
  71. - (void)applicationDidEnterBackground:(UIApplication *)application {
  72. NSLog(@">> applicationDidEnterBackground");
  73. /*
  74. Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
  75. If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
  76. */
  77. }
  78.  
  79.  
  80. - (void)applicationWillEnterForeground:(UIApplication *)application {
  81. NSLog(@">> applicationWillEnterForeground");
  82. /*
  83. Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
  84. */
  85. }
  86.  
  87.  
  88. - (void)applicationDidBecomeActive:(UIApplication *)application {
  89. OBJ_SendApplicationDidBecomeActive();
  90.  
  91. }
  92.  
  93.  
  94. - (void)applicationWillTerminate:(UIApplication *)application {
  95. TermExec();
  96. }
  97.  
  98.  
  99. #pragma mark -
  100. #pragma mark Memory management
  101.  
  102. - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
  103. /*
  104. Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
  105. */
  106. }
  107.  
  108.  
  109. - (void)dealloc {
  110. [window release];
  111. [super dealloc];
  112. }
  113.  
  114.  
  115. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement