45 {
46#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
47
48 return EXIT_FAILURE;
49#endif
50
51 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc]
init];
52 [NSApplication sharedApplication];
53
54 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
55
56
57 NSMenu* menuBar=[[NSMenu alloc] initWithTitle:@"AMainMenu"];
58 [NSApp setMainMenu:menuBar];
59
60 NSMenuItem* item;
61 NSMenu* subMenu;
62
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];
67 [item release];
68 item=[[NSMenuItem alloc] initWithTitle:
@"Quit" action:
@selector(terminate:) keyEquivalent:
@"q"];
69 [subMenu addItem:item];
70 [item release];
71 [subMenu release];
72
73
75 [NSApp setDelegate:appDelegate];
76
78
79
81
82
83 while (![appDelegate
done]) {
85 do {
86 event = [NSApp nextEventMatchingMask:NSAnyEventMask
87 untilDate:[NSDate distantPast]
88 inMode:NSDefaultRunLoopMode
89 dequeue:YES];
90 [NSApp sendEvent:
event];
91 }
while (
event != nil);
92
94 pool = [[NSAutoreleasePool alloc]
init];
95
96
97
98
99 Window_mac::PaintWindows();
100
102 }
103
105
106 [NSApp setDelegate:nil];
107 [appDelegate release];
108
109 [menuBar release];
111
112 return EXIT_SUCCESS;
113}
static void done(const char *config, const char *src, const char *srcOptions, const char *name)
static sk_sp< Effect > Create()