equal
deleted
inserted
replaced
16 @interface NSApplication(SDL_Missing_Methods) |
16 @interface NSApplication(SDL_Missing_Methods) |
17 - (void)setAppleMenu:(NSMenu *)menu; |
17 - (void)setAppleMenu:(NSMenu *)menu; |
18 @end |
18 @end |
19 |
19 |
20 /* Use this flag to determine whether we use SDLMain.nib or not */ |
20 /* Use this flag to determine whether we use SDLMain.nib or not */ |
21 #define SDL_USE_NIB_FILE 0 |
21 #define SDL_USE_NIB_FILE 0 |
22 |
22 |
23 /* Use this flag to determine whether we use CPS (docking) or not */ |
23 /* Use this flag to determine whether we use CPS (docking) or not */ |
24 #define SDL_USE_CPS 1 |
24 #define SDL_USE_CPS 1 |
25 #ifdef SDL_USE_CPS |
25 #ifdef SDL_USE_CPS |
26 /* Portions of CPS.h */ |
26 /* Portions of CPS.h */ |
27 typedef struct CPSProcessSerNum |
27 typedef struct CPSProcessSerNum |
28 { |
28 { |
29 UInt32 lo; |
29 UInt32 lo; |
30 UInt32 hi; |
30 UInt32 hi; |
31 } CPSProcessSerNum; |
31 } CPSProcessSerNum; |
32 |
32 |
33 extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); |
33 extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); |
34 extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); |
34 extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); |
35 extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn); |
35 extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn); |
36 |
36 |
37 #endif /* SDL_USE_CPS */ |
37 #endif /* SDL_USE_CPS */ |
38 |
38 |
39 static int gArgc; |
39 static int gArgc; |
40 static char **gArgv; |
40 static char **gArgv; |
196 } |
196 } |
197 |
197 |
198 /* Replacement for NSApplicationMain */ |
198 /* Replacement for NSApplicationMain */ |
199 static void CustomApplicationMain (int argc, char **argv) |
199 static void CustomApplicationMain (int argc, char **argv) |
200 { |
200 { |
201 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
201 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
202 SDLMain *sdlMain; |
202 SDLMain *sdlMain; |
203 |
203 |
204 /* Ensure the application object is initialised */ |
204 /* Ensure the application object is initialised */ |
205 [SDLApplication sharedApplication]; |
205 [SDLApplication sharedApplication]; |
206 |
206 |
207 #ifdef SDL_USE_CPS |
207 #ifdef SDL_USE_CPS |