comparison dwt/internal/cocoa/NSApplication.d @ 45:d8635bb48c7c

Merge with SWT 3.5
author Jacob Carlborg <doob@me.com>
date Mon, 01 Dec 2008 17:07:00 +0100
parents f565d3a95c0a
children
comparison
equal deleted inserted replaced
44:ca5e494f2bbf 45:d8635bb48c7c
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2007 IBM Corporation and others. 2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 * 10 *
11 * Port to the D programming language: 11 * Port to the D programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <doob@me.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSApplication; 14 module dwt.internal.cocoa.NSApplication;
15 15
16 import dwt.internal.cocoa.id; 16 import dwt.dwthelper.utils;
17 import cocoa = dwt.internal.cocoa.id;
17 import dwt.internal.cocoa.NSArray; 18 import dwt.internal.cocoa.NSArray;
18 import dwt.internal.cocoa.NSDate; 19 import dwt.internal.cocoa.NSDate;
19 import dwt.internal.cocoa.NSDictionary;
20 import dwt.internal.cocoa.NSDockTile;
21 import dwt.internal.cocoa.NSEvent; 20 import dwt.internal.cocoa.NSEvent;
22 import dwt.internal.cocoa.NSException;
23 import dwt.internal.cocoa.NSGraphicsContext;
24 import dwt.internal.cocoa.NSImage; 21 import dwt.internal.cocoa.NSImage;
25 import dwt.internal.cocoa.NSInteger;
26 import dwt.internal.cocoa.NSMenu; 22 import dwt.internal.cocoa.NSMenu;
27 import dwt.internal.cocoa.NSResponder; 23 import dwt.internal.cocoa.NSResponder;
28 import dwt.internal.cocoa.NSString; 24 import dwt.internal.cocoa.NSString;
29 import dwt.internal.cocoa.NSWindow; 25 import dwt.internal.cocoa.NSWindow;
30 import dwt.internal.cocoa.OS; 26 import dwt.internal.cocoa.OS;
27 import dwt.internal.objc.cocoa.Cocoa;
31 import objc = dwt.internal.objc.runtime; 28 import objc = dwt.internal.objc.runtime;
32 29
33 public class NSApplication : NSResponder 30 public class NSApplication : NSResponder {
34 {
35 public this ()
36 {
37 super();
38 }
39 31
40 public this (objc.id id) 32 public this() {
41 { 33 super();
42 super(id); 34 }
43 }
44 35
45 public void abortModal () 36 public this(objc.id id) {
46 { 37 super(id);
47 OS.objc_msgSend(this.id_, OS.sel_abortModal); 38 }
48 }
49 39
50 public void activateContextHelpMode (id sender) 40 public this(cocoa.id id) {
51 { 41 super(id);
52 OS.objc_msgSend(this.id_, OS.sel_activateContextHelpMode_1, sender !is null ? sender.id_ : null); 42 }
53 }
54 43
55 public void activateIgnoringOtherApps (bool flag) 44 public void activateIgnoringOtherApps(bool flag) {
56 { 45 OS.objc_msgSend(this.id, OS.sel_activateIgnoringOtherApps_, flag);
57 OS.objc_msgSend(this.id_, OS.sel_activateIgnoringOtherApps_1, flag); 46 }
58 }
59 47
60 public void addWindowsItem (NSWindow win, NSString aString, bool isFilename) 48 public NSEvent currentEvent() {
61 { 49 objc.id result = OS.objc_msgSend(this.id, OS.sel_currentEvent);
62 OS.objc_msgSend(this.id_, OS.sel_addWindowsItem_1title_1filename_1, win !is null ? win.id_ : null, aString !is null ? aString.id_ : null, 50 return result !is null ? new NSEvent(result) : null;
63 isFilename); 51 }
64 }
65 52
66 public NSImage applicationIconImage () 53 public void finishLaunching() {
67 { 54 OS.objc_msgSend(this.id, OS.sel_finishLaunching);
68 objc.id result = OS.objc_msgSend(this.id_, OS.sel_applicationIconImage); 55 }
69 return result !is null ? new NSImage(result) : null;
70 }
71 56
72 public void arrangeInFront (id sender) 57 public void hide(cocoa.id sender) {
73 { 58 OS.objc_msgSend(this.id, OS.sel_hide_, sender !is null ? sender.id : null);
74 OS.objc_msgSend(this.id_, OS.sel_arrangeInFront_1, sender !is null ? sender.id_ : null); 59 }
75 }
76 60
77 public objc.id beginModalSessionForWindow_ (NSWindow theWindow) 61 public void hideOtherApplications(cocoa.id sender) {
78 { 62 OS.objc_msgSend(this.id, OS.sel_hideOtherApplications_, sender !is null ? sender.id : null);
79 return OS.objc_msgSend(this.id_, OS.sel_beginModalSessionForWindow_1, theWindow !is null ? theWindow.id_ : null); 63 }
80 }
81 64
82 public objc.id beginModalSessionForWindow_relativeToWindow_ (NSWindow theWindow, NSWindow docWindow) 65 public bool isRunning() {
83 { 66 return OS.objc_msgSend_bool(this.id, OS.sel_isRunning);
84 return OS.objc_msgSend(this.id_, OS.sel_beginModalSessionForWindow_1relativeToWindow_1, theWindow !is null ? theWindow.id_ : null, 67 }
85 docWindow !is null ? docWindow.id_ : null);
86 }
87 68
88 public void beginSheet (NSWindow sheet, NSWindow docWindow, id modalDelegate, objc.id didEndSelector, objc.id contextInfo) 69 public NSWindow keyWindow() {
89 { 70 objc.id result = OS.objc_msgSend(this.id, OS.sel_keyWindow);
90 OS.objc_msgSend(this.id_, OS.sel_beginSheet_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, sheet !is null ? sheet.id_ : null, 71 return result !is null ? new NSWindow(result) : null;
91 docWindow !is null ? docWindow.id_ : null, modalDelegate !is null ? modalDelegate.id_ : null, didEndSelector, contextInfo); 72 }
92 }
93 73
94 public void cancelUserAttentionRequest (objc.id request) 74 public NSMenu mainMenu() {
95 { 75 objc.id result = OS.objc_msgSend(this.id, OS.sel_mainMenu);
96 OS.objc_msgSend(this.id_, OS.sel_cancelUserAttentionRequest_1, request); 76 return result !is null ? new NSMenu(result) : null;
97 } 77 }
98 78
99 public void changeWindowsItem (NSWindow win, NSString aString, bool isFilename) 79 public NSEvent nextEventMatchingMask(NSUInteger mask, NSDate expiration, NSString mode, bool deqFlag) {
100 { 80 objc.id result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_, mask, expiration !is null ? expiration.id : null, mode !is null ? mode.id : null, deqFlag);
101 OS.objc_msgSend(this.id_, OS.sel_changeWindowsItem_1title_1filename_1, win !is null ? win.id_ : null, aString !is null ? aString.id_ : null, 81 return result !is null ? new NSEvent(result) : null;
102 isFilename); 82 }
103 }
104 83
105 public NSGraphicsContext context () 84 public void orderFrontStandardAboutPanel(cocoa.id sender) {
106 { 85 OS.objc_msgSend(this.id, OS.sel_orderFrontStandardAboutPanel_, sender !is null ? sender.id : null);
107 objc.id result = OS.objc_msgSend(this.id_, OS.sel_context); 86 }
108 return result !is null ? new NSGraphicsContext(result) : null;
109 }
110 87
111 public NSEvent currentEvent () 88 public NSArray orderedWindows() {
112 { 89 objc.id result = OS.objc_msgSend(this.id, OS.sel_orderedWindows);
113 objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentEvent); 90 return result !is null ? new NSArray(result) : null;
114 return result !is null ? new NSEvent(result) : null; 91 }
115 }
116 92
117 public void deactivate () 93 public void run() {
118 { 94 OS.objc_msgSend(this.id, OS.sel_run);
119 OS.objc_msgSend(this.id_, OS.sel_deactivate); 95 }
120 }
121 96
122 public id delegatee () 97 public NSInteger runModalForWindow(NSWindow theWindow) {
123 { 98 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_runModalForWindow_, theWindow !is null ? theWindow.id : null);
124 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); 99 }
125 return result !is null ? new id(result) : null;
126 }
127 100
128 public static void detachDrawingThread (objc.id selector, id target, id argument) 101 public void sendEvent(NSEvent theEvent) {
129 { 102 OS.objc_msgSend(this.id, OS.sel_sendEvent_, theEvent !is null ? theEvent.id : null);
130 OS.objc_msgSend(OS.class_NSApplication, OS.sel_detachDrawingThread_1toTarget_1withObject_1, selector, target !is null ? target.id_ : null, 103 }
131 argument !is null ? argument.id_ : null);
132 }
133 104
134 public void discardEventsMatchingMask (NSUInteger mask, NSEvent lastEvent) 105 public void setApplicationIconImage(NSImage image) {
135 { 106 OS.objc_msgSend(this.id, OS.sel_setApplicationIconImage_, image !is null ? image.id : null);
136 OS.objc_msgSend(this.id_, OS.sel_discardEventsMatchingMask_1beforeEvent_1, mask, lastEvent !is null ? lastEvent.id_ : null); 107 }
137 }
138 108
139 public NSDockTile dockTile () 109 public void setDelegate(cocoa.id anObject) {
140 { 110 OS.objc_msgSend(this.id, OS.sel_setDelegate_, anObject !is null ? anObject.id : null);
141 objc.id result = OS.objc_msgSend(this.id_, OS.sel_dockTile); 111 }
142 return result !is null ? new NSDockTile(result) : null;
143 }
144 112
145 public void endModalSession (objc.id session) 113 public static NSApplication sharedApplication() {
146 { 114 objc.id result = OS.objc_msgSend(OS.class_NSApplication, OS.sel_sharedApplication);
147 OS.objc_msgSend(this.id_, OS.sel_endModalSession_1, session); 115 return result !is null ? new NSApplication(result) : null;
148 } 116 }
149 117
150 public void endSheet_ (NSWindow sheet) 118 public void stop(cocoa.id sender) {
151 { 119 OS.objc_msgSend(this.id, OS.sel_stop_, sender !is null ? sender.id : null);
152 OS.objc_msgSend(this.id_, OS.sel_endSheet_1, sheet !is null ? sheet.id_ : null); 120 }
153 }
154 121
155 public void endSheet_returnCode_ (NSWindow sheet, NSInteger returnCode) 122 public void terminate(cocoa.id sender) {
156 { 123 OS.objc_msgSend(this.id, OS.sel_terminate_, sender !is null ? sender.id : null);
157 OS.objc_msgSend(this.id_, OS.sel_endSheet_1returnCode_1, sheet !is null ? sheet.id_ : null, returnCode); 124 }
158 }
159 125
160 public void finishLaunching () 126 public void unhideAllApplications(cocoa.id sender) {
161 { 127 OS.objc_msgSend(this.id, OS.sel_unhideAllApplications_, sender !is null ? sender.id : null);
162 OS.objc_msgSend(this.id_, OS.sel_finishLaunching); 128 }
163 }
164 129
165 public void hide (id sender) 130 public NSArray windows() {
166 { 131 objc.id result = OS.objc_msgSend(this.id, OS.sel_windows);
167 OS.objc_msgSend(this.id_, OS.sel_hide_1, sender !is null ? sender.id_ : null); 132 return result !is null ? new NSArray(result) : null;
168 } 133 }
169
170 public void hideOtherApplications (id sender)
171 {
172 OS.objc_msgSend(this.id_, OS.sel_hideOtherApplications_1, sender !is null ? sender.id_ : null);
173 }
174
175 public bool isActive ()
176 {
177 return OS.objc_msgSend(this.id_, OS.sel_isActive) !is null;
178 }
179
180 public bool isHidden ()
181 {
182 return OS.objc_msgSend(this.id_, OS.sel_isHidden) !is null;
183 }
184
185 public bool isRunning ()
186 {
187 return OS.objc_msgSend(this.id_, OS.sel_isRunning) !is null;
188 }
189
190 public NSWindow keyWindow ()
191 {
192 objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyWindow);
193 return result !is null ? new NSWindow(result) : null;
194 }
195
196 public NSMenu mainMenu ()
197 {
198 objc.id result = OS.objc_msgSend(this.id_, OS.sel_mainMenu);
199 return result !is null ? new NSMenu(result) : null;
200 }
201
202 public NSWindow mainWindow ()
203 {
204 objc.id result = OS.objc_msgSend(this.id_, OS.sel_mainWindow);
205 return result !is null ? new NSWindow(result) : null;
206 }
207
208 public NSWindow makeWindowsPerform (objc.id aSelector, bool flag)
209 {
210 objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeWindowsPerform_1inOrder_1, aSelector, flag);
211 return result !is null ? new NSWindow(result) : null;
212 }
213
214 public void miniaturizeAll (id sender)
215 {
216 OS.objc_msgSend(this.id_, OS.sel_miniaturizeAll_1, sender !is null ? sender.id_ : null);
217 }
218
219 public NSWindow modalWindow ()
220 {
221 objc.id result = OS.objc_msgSend(this.id_, OS.sel_modalWindow);
222 return result !is null ? new NSWindow(result) : null;
223 }
224
225 public NSEvent nextEventMatchingMask (NSUInteger mask, NSDate expiration, NSString mode, bool deqFlag)
226 {
227 objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1, mask,
228 expiration !is null ? expiration.id_ : null, mode !is null ? mode.id_ : null, deqFlag);
229 return result !is null ? new NSEvent(result) : null;
230 }
231
232 public void orderFrontCharacterPalette (id sender)
233 {
234 OS.objc_msgSend(this.id_, OS.sel_orderFrontCharacterPalette_1, sender !is null ? sender.id_ : null);
235 }
236
237 public void orderFrontColorPanel (id sender)
238 {
239 OS.objc_msgSend(this.id_, OS.sel_orderFrontColorPanel_1, sender !is null ? sender.id_ : null);
240 }
241
242 public void orderFrontStandardAboutPanel (id sender)
243 {
244 OS.objc_msgSend(this.id_, OS.sel_orderFrontStandardAboutPanel_1, sender !is null ? sender.id_ : null);
245 }
246
247 public void orderFrontStandardAboutPanelWithOptions (NSDictionary optionsDictionary)
248 {
249 OS.objc_msgSend(this.id_, OS.sel_orderFrontStandardAboutPanelWithOptions_1, optionsDictionary !is null ? optionsDictionary.id_ : null);
250 }
251
252 public NSArray orderedDocuments ()
253 {
254 objc.id result = OS.objc_msgSend(this.id_, OS.sel_orderedDocuments);
255 return result !is null ? new NSArray(result) : null;
256 }
257
258 public NSArray orderedWindows ()
259 {
260 objc.id result = OS.objc_msgSend(this.id_, OS.sel_orderedWindows);
261 return result !is null ? new NSArray(result) : null;
262 }
263
264 public void postEvent (NSEvent event, bool flag)
265 {
266 OS.objc_msgSend(this.id_, OS.sel_postEvent_1atStart_1, event !is null ? event.id_ : null, flag);
267 }
268
269 public void preventWindowOrdering ()
270 {
271 OS.objc_msgSend(this.id_, OS.sel_preventWindowOrdering);
272 }
273
274 public void registerServicesMenuSendTypes (NSArray sendTypes, NSArray returnTypes)
275 {
276 OS.objc_msgSend(this.id_, OS.sel_registerServicesMenuSendTypes_1returnTypes_1, sendTypes !is null ? sendTypes.id_ : null,
277 returnTypes !is null ? returnTypes.id_ : null);
278 }
279
280 public void removeWindowsItem (NSWindow win)
281 {
282 OS.objc_msgSend(this.id_, OS.sel_removeWindowsItem_1, win !is null ? win.id_ : null);
283 }
284
285 public void replyToApplicationShouldTerminate (bool shouldTerminate)
286 {
287 OS.objc_msgSend(this.id_, OS.sel_replyToApplicationShouldTerminate_1, shouldTerminate);
288 }
289
290 public void replyToOpenOrPrint (objc.id reply)
291 {
292 OS.objc_msgSend(this.id_, OS.sel_replyToOpenOrPrint_1, reply);
293 }
294
295 public void reportException (NSException theException)
296 {
297 OS.objc_msgSend(this.id_, OS.sel_reportException_1, theException !is null ? theException.id_ : null);
298 }
299
300 public NSInteger requestUserAttention (objc.id requestType)
301 {
302 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_requestUserAttention_1, requestType);
303 }
304
305 public void run ()
306 {
307 OS.objc_msgSend(this.id_, OS.sel_run);
308 }
309
310 public objc.id runModalForWindow_ (NSWindow theWindow)
311 {
312 return OS.objc_msgSend(this.id_, OS.sel_runModalForWindow_1, theWindow !is null ? theWindow.id_ : null);
313 }
314
315 public objc.id runModalForWindow_relativeToWindow_ (NSWindow theWindow, NSWindow docWindow)
316 {
317 return OS.objc_msgSend(this.id_, OS.sel_runModalForWindow_1relativeToWindow_1, theWindow !is null ? theWindow.id_ : null,
318 docWindow !is null ? docWindow.id_ : null);
319 }
320
321 public objc.id runModalSession (objc.id session)
322 {
323 return OS.objc_msgSend(this.id_, OS.sel_runModalSession_1, session);
324 }
325
326 public void runPageLayout (id sender)
327 {
328 OS.objc_msgSend(this.id_, OS.sel_runPageLayout_1, sender !is null ? sender.id_ : null);
329 }
330
331 public bool sendAction (objc.id theAction, id theTarget, id sender)
332 {
333 return OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1from_1, theAction, theTarget !is null ? theTarget.id_ : null,
334 sender !is null ? sender.id_ : null) !is null;
335 }
336
337 public void sendEvent (NSEvent theEvent)
338 {
339 OS.objc_msgSend(this.id_, OS.sel_sendEvent_1, theEvent !is null ? theEvent.id_ : null);
340 }
341
342 public NSMenu servicesMenu ()
343 {
344 objc.id result = OS.objc_msgSend(this.id_, OS.sel_servicesMenu);
345 return result !is null ? new NSMenu(result) : null;
346 }
347
348 public id servicesProvider ()
349 {
350 objc.id result = OS.objc_msgSend(this.id_, OS.sel_servicesProvider);
351 return result !is null ? new id(result) : null;
352 }
353
354 public void setApplicationIconImage (NSImage image)
355 {
356 OS.objc_msgSend(this.id_, OS.sel_setApplicationIconImage_1, image !is null ? image.id_ : null);
357 }
358
359 public void setDelegate (id anObject)
360 {
361 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
362 }
363
364 public void setMainMenu (NSMenu aMenu)
365 {
366 OS.objc_msgSend(this.id_, OS.sel_setMainMenu_1, aMenu !is null ? aMenu.id_ : null);
367 }
368
369 public void setServicesMenu (NSMenu aMenu)
370 {
371 OS.objc_msgSend(this.id_, OS.sel_setServicesMenu_1, aMenu !is null ? aMenu.id_ : null);
372 }
373
374 public void setServicesProvider (id provider)
375 {
376 OS.objc_msgSend(this.id_, OS.sel_setServicesProvider_1, provider !is null ? provider.id_ : null);
377 }
378
379 public void setWindowsMenu (NSMenu aMenu)
380 {
381 OS.objc_msgSend(this.id_, OS.sel_setWindowsMenu_1, aMenu !is null ? aMenu.id_ : null);
382 }
383
384 public void setWindowsNeedUpdate (bool needUpdate)
385 {
386 OS.objc_msgSend(this.id_, OS.sel_setWindowsNeedUpdate_1, needUpdate);
387 }
388
389 public static NSApplication sharedApplication ()
390 {
391 objc.id result = OS.objc_msgSend(OS.class_NSApplication, OS.sel_sharedApplication);
392 return result !is null ? new NSApplication(result) : null;
393 }
394
395 public void showHelp (id sender)
396 {
397 OS.objc_msgSend(this.id_, OS.sel_showHelp_1, sender !is null ? sender.id_ : null);
398 }
399
400 public void stop (id sender)
401 {
402 OS.objc_msgSend(this.id_, OS.sel_stop_1, sender !is null ? sender.id_ : null);
403 }
404
405 public void stopModal ()
406 {
407 OS.objc_msgSend(this.id_, OS.sel_stopModal);
408 }
409
410 public void stopModalWithCode (NSInteger returnCode)
411 {
412 OS.objc_msgSend(this.id_, OS.sel_stopModalWithCode_1, returnCode);
413 }
414
415 public id targetForAction_ (objc.SEL theAction)
416 {
417 objc.id result = OS.objc_msgSend(this.id_, OS.sel_targetForAction_1, theAction);
418 return result !is null ? new id(result) : null;
419 }
420
421 public id targetForAction_to_from_ (objc.SEL theAction, id theTarget, id sender)
422 {
423 objc.id result = OS.objc_msgSend(this.id_, OS.sel_targetForAction_1to_1from_1, theAction, theTarget !is null ? theTarget.id_ : null,
424 sender !is null ? sender.id_ : null);
425 return result !is null ? new id(result) : null;
426 }
427
428 public void terminate (id sender)
429 {
430 OS.objc_msgSend(this.id_, OS.sel_terminate_1, sender !is null ? sender.id_ : null);
431 }
432
433 public bool tryToPerform (objc.SEL anAction, id anObject)
434 {
435 return OS.objc_msgSend(this.id_, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id_ : null) !is null;
436 }
437
438 public void unhide (id sender)
439 {
440 OS.objc_msgSend(this.id_, OS.sel_unhide_1, sender !is null ? sender.id_ : null);
441 }
442
443 public void unhideAllApplications (id sender)
444 {
445 OS.objc_msgSend(this.id_, OS.sel_unhideAllApplications_1, sender !is null ? sender.id_ : null);
446 }
447
448 public void unhideWithoutActivation ()
449 {
450 OS.objc_msgSend(this.id_, OS.sel_unhideWithoutActivation);
451 }
452
453 public void updateWindows ()
454 {
455 OS.objc_msgSend(this.id_, OS.sel_updateWindows);
456 }
457
458 public void updateWindowsItem (NSWindow win)
459 {
460 OS.objc_msgSend(this.id_, OS.sel_updateWindowsItem_1, win !is null ? win.id_ : null);
461 }
462
463 public id validRequestorForSendType (NSString sendType, NSString returnType)
464 {
465 objc.id result = OS.objc_msgSend(this.id_, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id_ : null,
466 returnType !is null ? returnType.id_ : null);
467 return result !is null ? new id(result) : null;
468 }
469
470 public NSWindow windowWithWindowNumber (NSInteger windowNum)
471 {
472 objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowWithWindowNumber_1, windowNum);
473 return result !is null ? new NSWindow(result) : null;
474 }
475
476 public NSArray windows ()
477 {
478 objc.id result = OS.objc_msgSend(this.id_, OS.sel_windows);
479 return result !is null ? new NSArray(result) : null;
480 }
481
482 public NSMenu windowsMenu ()
483 {
484 objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowsMenu);
485 return result !is null ? new NSMenu(result) : null;
486 }
487 134
488 } 135 }