comparison src/video/uikit/SDL_uikitappdelegate.m @ 3685:64ce267332c6

Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 21 Jan 2010 06:21:52 +0000
parents ec4db979dddb
children 8b03a20b320f
comparison
equal deleted inserted replaced
3684:cc564f08884f 3685:64ce267332c6
54 } 54 }
55 55
56 @implementation SDLUIKitDelegate 56 @implementation SDLUIKitDelegate
57 57
58 @synthesize window; 58 @synthesize window;
59 @synthesize windowID; 59 @synthesize uiwindow;
60 60
61 /* convenience method */ 61 /* convenience method */
62 +(SDLUIKitDelegate *)sharedAppDelegate { 62 +(SDLUIKitDelegate *)sharedAppDelegate {
63 /* the delegate is set in UIApplicationMain(), which is garaunteed to be called before this method */ 63 /* the delegate is set in UIApplicationMain(), which is garaunteed to be called before this method */
64 return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate]; 64 return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate];
65 } 65 }
66 66
67 - (id)init { 67 - (id)init {
68 self = [super init]; 68 self = [super init];
69 window = nil; 69 window = NULL;
70 windowID = 0; 70 uiwindow = nil;
71 return self; 71 return self;
72 } 72 }
73 73
74 - (void)postFinishLaunch { 74 - (void)postFinishLaunch {
75 75
105 } 105 }
106 106
107 - (void) applicationWillResignActive:(UIApplication*)application 107 - (void) applicationWillResignActive:(UIApplication*)application
108 { 108 {
109 // NSLog(@"%@", NSStringFromSelector(_cmd)); 109 // NSLog(@"%@", NSStringFromSelector(_cmd));
110 SDL_SendWindowEvent(self.windowID, SDL_WINDOWEVENT_MINIMIZED, 0, 0); 110 SDL_SendWindowEvent(self.window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
111 } 111 }
112 112
113 - (void) applicationDidBecomeActive:(UIApplication*)application 113 - (void) applicationDidBecomeActive:(UIApplication*)application
114 { 114 {
115 // NSLog(@"%@", NSStringFromSelector(_cmd)); 115 // NSLog(@"%@", NSStringFromSelector(_cmd));
116 SDL_SendWindowEvent(self.windowID, SDL_WINDOWEVENT_RESTORED, 0, 0); 116 SDL_SendWindowEvent(self.window, SDL_WINDOWEVENT_RESTORED, 0, 0);
117 } 117 }
118 118
119 119
120 120
121 -(void)dealloc { 121 -(void)dealloc {
122 [window release]; 122 [uiwindow release];
123 [super dealloc]; 123 [super dealloc];
124 } 124 }
125 125
126 @end 126 @end