9 #import <Cocoa/Cocoa.h> 20 - (
void) applicationWillBecomeActive:(NSNotification*)notif
22 printf(
"WillBecomeActive\n");
27 - (
void) applicationWillTerminate:(NSNotification*)notif
30 printf(
"WillTerminate\n");
31 FXApp::instance()->exit();
34 - (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*)sender
37 printf(
"ShouldTerminate\n");
41 - (
void) applicationWillHide:(NSNotification*)notif
47 - (
void) handleQuitEvent:(NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent
49 printf(
"QuitEvent\n");
50 FXApp::instance()->exit();
62 [[NSApplication sharedApplication] setDelegate:d];
67 NSAppleEventManager *aem = [NSAppleEventManager sharedAppleEventManager];
68 [aem setEventHandler:d
69 andSelector:@selector(handleQuitEvent:withReplyEvent:)
70 forEventClass:kCoreEventClass andEventID:kAEQuitApplication];
76 NSApplication *app = [NSApplication sharedApplication];
78 NSAutoreleasePool *pool = [NSAutoreleasePool new];
80 NSEvent*
event = [NSApp nextEventMatchingMask:NSAnyEventMask
82 inMode:NSDefaultRunLoopMode
88 [app sendEvent: event];
void check_apple_events()
FXMainWindow * g_main_window
void init_apple_message_system()
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 SDL_AssertionHandler void SDL_SpinLock SDL_atomic_t int int return SDL_atomic_t return void void void return void return int return SDL_AudioSpec SDL_AudioSpec return int int return return int SDL_RWops int SDL_AudioSpec Uint8 ** d
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void