OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include <crt_externs.h> | 9 #include <crt_externs.h> |
10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 options:0 | 83 options:0 |
84 metrics:nil | 84 metrics:nil |
85 views:views]]; | 85 views:views]]; |
86 | 86 |
87 [customView begin]; | 87 [customView begin]; |
88 [customView release]; | 88 [customView release]; |
89 | 89 |
90 [window makeKeyAndOrderFront:NSApp]; | 90 [window makeKeyAndOrderFront:NSApp]; |
91 | 91 |
92 AppDelegate * appDelegate = [[[AppDelegate alloc] init] autorelease]; | 92 AppDelegate * appDelegate = [[[AppDelegate alloc] init] autorelease]; |
93 | 93 |
94 app.delegate = appDelegate; | 94 app.delegate = appDelegate; |
95 | 95 |
96 NSMenu* menu=[[NSMenu alloc] initWithTitle:@"AMainMenu"]; | 96 NSMenu* menu=[[NSMenu alloc] initWithTitle:@"AMainMenu"]; |
97 NSMenuItem* item; | 97 NSMenuItem* item; |
98 NSMenu* subMenu; | 98 NSMenu* subMenu; |
99 | 99 |
100 //Create the application menu. | 100 //Create the application menu. |
101 item=[[NSMenuItem alloc] initWithTitle:@"Apple" action:NULL keyEquivalent:@"
"]; | 101 item=[[NSMenuItem alloc] initWithTitle:@"Apple" action:NULL keyEquivalent:@"
"]; |
102 [menu addItem:item]; | 102 [menu addItem:item]; |
103 subMenu=[[NSMenu alloc] initWithTitle:@"Apple"]; | 103 subMenu=[[NSMenu alloc] initWithTitle:@"Apple"]; |
(...skipping 11 matching lines...) Expand all Loading... |
115 | 115 |
116 [app run]; | 116 [app run]; |
117 | 117 |
118 [menu release]; | 118 [menu release]; |
119 [appDelegate release]; | 119 [appDelegate release]; |
120 [window release]; | 120 [window release]; |
121 [pool release]; | 121 [pool release]; |
122 | 122 |
123 return EXIT_SUCCESS; | 123 return EXIT_SUCCESS; |
124 } | 124 } |
OLD | NEW |