Mercurial > sdl-ios-xcode
comparison src/video/quartz/SDL_QuartzVideo.m @ 4049:60f677630282 SDL-1.2
Added key composition support, courtesy of Kuon
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 11 Jul 2007 07:53:12 +0000 |
parents | c5c3c772f5aa |
children | 0c76e6d1c3d6 |
comparison
equal
deleted
inserted
replaced
4048:3e380b8247aa | 4049:60f677630282 |
---|---|
167 SDL_free (device); | 167 SDL_free (device); |
168 } | 168 } |
169 | 169 |
170 static int QZ_VideoInit (_THIS, SDL_PixelFormat *video_format) { | 170 static int QZ_VideoInit (_THIS, SDL_PixelFormat *video_format) { |
171 | 171 |
172 NSRect r = NSMakeRect(0.0, 0.0, 0.0, 0.0); | |
172 const char *env = NULL; | 173 const char *env = NULL; |
173 | 174 |
174 /* Initialize the video settings; this data persists between mode switches */ | 175 /* Initialize the video settings; this data persists between mode switches */ |
175 display_id = kCGDirectMainDisplay; | 176 display_id = kCGDirectMainDisplay; |
176 save_mode = CGDisplayCurrentMode (display_id); | 177 save_mode = CGDisplayCurrentMode (display_id); |
200 /* Set misc globals */ | 201 /* Set misc globals */ |
201 current_grab_mode = SDL_GRAB_OFF; | 202 current_grab_mode = SDL_GRAB_OFF; |
202 cursor_should_be_visible = YES; | 203 cursor_should_be_visible = YES; |
203 cursor_visible = YES; | 204 cursor_visible = YES; |
204 current_mods = 0; | 205 current_mods = 0; |
206 field_edit = [[NSTextView alloc] initWithFrame:r]; | |
205 | 207 |
206 if ( Gestalt(gestaltSystemVersion, &system_version) != noErr ) | 208 if ( Gestalt(gestaltSystemVersion, &system_version) != noErr ) |
207 system_version = 0; | 209 system_version = 0; |
208 | 210 |
209 /* register for sleep notifications so wake from sleep generates SDL_VIDEOEXPOSE */ | 211 /* register for sleep notifications so wake from sleep generates SDL_VIDEOEXPOSE */ |
1454 if (opengl_library) { | 1456 if (opengl_library) { |
1455 SDL_UnloadObject(opengl_library); | 1457 SDL_UnloadObject(opengl_library); |
1456 opengl_library = NULL; | 1458 opengl_library = NULL; |
1457 } | 1459 } |
1458 this->gl_config.driver_loaded = 0; | 1460 this->gl_config.driver_loaded = 0; |
1461 | |
1462 if (field_edit) { | |
1463 [field_edit release]; | |
1464 field_edit = NULL; | |
1465 } | |
1459 } | 1466 } |
1460 | 1467 |
1461 #if 0 /* Not used (apparently, it's really slow) */ | 1468 #if 0 /* Not used (apparently, it's really slow) */ |
1462 static int QZ_FillHWRect (_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color) { | 1469 static int QZ_FillHWRect (_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color) { |
1463 | 1470 |