45int main(
int argc,
char * argv[]) {
46#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
51 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
52 [NSApplication sharedApplication];
54 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
57 NSMenu* menuBar=[[NSMenu alloc] initWithTitle:@"AMainMenu"];
58 [NSApp setMainMenu:menuBar];
63 item=[[NSMenuItem alloc] initWithTitle:@"Apple" action:nil keyEquivalent:@""];
64 [menuBar addItem:item];
65 subMenu=[[NSMenu alloc] initWithTitle:@"Apple"];
66 [menuBar setSubmenu:subMenu forItem:item];
68 item=[[NSMenuItem alloc] initWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@"q"];
69 [subMenu addItem:item];
75 [NSApp setDelegate:appDelegate];
83 while (![appDelegate
done]) {
86 event = [NSApp nextEventMatchingMask:NSAnyEventMask
87 untilDate:[NSDate distantPast]
88 inMode:NSDefaultRunLoopMode
90 [NSApp sendEvent:event];
91 }
while (
event != nil);
94 pool = [[NSAutoreleasePool alloc] init];
99 Window_mac::PaintWindows();
106 [NSApp setDelegate:nil];
107 [appDelegate release];