Mercurial > projects > dwt-mac
diff dwt/internal/cocoa/NSApplication.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSApplication.d Sat Aug 09 17:00:02 2008 +0200 +++ b/dwt/internal/cocoa/NSApplication.d Tue Aug 19 17:35:17 2008 +0200 @@ -13,6 +13,7 @@ *******************************************************************************/ module dwt.internal.cocoa.NSApplication; +import dwt.internal.cocoa.id; import dwt.internal.cocoa.NSArray; import dwt.internal.cocoa.NSDate; import dwt.internal.cocoa.NSDictionary; @@ -43,346 +44,346 @@ public void abortModal () { - OS.objc_msgSend(this.id, OS.sel_abortModal); + OS.objc_msgSend(this.id_, OS.sel_abortModal); } public void activateContextHelpMode (id sender) { - OS.objc_msgSend(this.id, OS.sel_activateContextHelpMode_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_activateContextHelpMode_1, sender !is null ? sender.id_ : null); } public void activateIgnoringOtherApps (bool flag) { - OS.objc_msgSend(this.id, OS.sel_activateIgnoringOtherApps_1, flag); + OS.objc_msgSend(this.id_, OS.sel_activateIgnoringOtherApps_1, flag); } public void addWindowsItem (NSWindow win, NSString aString, bool isFilename) { - OS.objc_msgSend(this.id, OS.sel_addWindowsItem_1title_1filename_1, win !is null ? win.id : null, aString !is null ? aString.id : null, + OS.objc_msgSend(this.id_, OS.sel_addWindowsItem_1title_1filename_1, win !is null ? win.id_ : null, aString !is null ? aString.id_ : null, isFilename); } public NSImage applicationIconImage () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_applicationIconImage); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_applicationIconImage); return result !is null ? new NSImage(result) : null; } public void arrangeInFront (id sender) { - OS.objc_msgSend(this.id, OS.sel_arrangeInFront_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_arrangeInFront_1, sender !is null ? sender.id_ : null); } public objc.id beginModalSessionForWindow_ (NSWindow theWindow) { - return OS.objc_msgSend(this.id, OS.sel_beginModalSessionForWindow_1, theWindow !is null ? theWindow.id : null); + return OS.objc_msgSend(this.id_, OS.sel_beginModalSessionForWindow_1, theWindow !is null ? theWindow.id_ : null); } public objc.id beginModalSessionForWindow_relativeToWindow_ (NSWindow theWindow, NSWindow docWindow) { - return OS.objc_msgSend(this.id, OS.sel_beginModalSessionForWindow_1relativeToWindow_1, theWindow !is null ? theWindow.id : null, - docWindow !is null ? docWindow.id : null); + return OS.objc_msgSend(this.id_, OS.sel_beginModalSessionForWindow_1relativeToWindow_1, theWindow !is null ? theWindow.id_ : null, + docWindow !is null ? docWindow.id_ : null); } public void beginSheet (NSWindow sheet, NSWindow docWindow, id modalDelegate, objc.id didEndSelector, objc.id contextInfo) { - OS.objc_msgSend(this.id, OS.sel_beginSheet_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, sheet !is null ? sheet.id : null, - docWindow !is null ? docWindow.id : null, modalDelegate !is null ? modalDelegate.id : null, didEndSelector, contextInfo); + OS.objc_msgSend(this.id_, OS.sel_beginSheet_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, sheet !is null ? sheet.id_ : null, + docWindow !is null ? docWindow.id_ : null, modalDelegate !is null ? modalDelegate.id_ : null, didEndSelector, contextInfo); } public void cancelUserAttentionRequest (objc.id request) { - OS.objc_msgSend(this.id, OS.sel_cancelUserAttentionRequest_1, request); + OS.objc_msgSend(this.id_, OS.sel_cancelUserAttentionRequest_1, request); } public void changeWindowsItem (NSWindow win, NSString aString, bool isFilename) { - OS.objc_msgSend(this.id, OS.sel_changeWindowsItem_1title_1filename_1, win !is null ? win.id : null, aString !is null ? aString.id : null, + OS.objc_msgSend(this.id_, OS.sel_changeWindowsItem_1title_1filename_1, win !is null ? win.id_ : null, aString !is null ? aString.id_ : null, isFilename); } public NSGraphicsContext context () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_context); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_context); return result !is null ? new NSGraphicsContext(result) : null; } public NSEvent currentEvent () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_currentEvent); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentEvent); return result !is null ? new NSEvent(result) : null; } public void deactivate () { - OS.objc_msgSend(this.id, OS.sel_deactivate); + OS.objc_msgSend(this.id_, OS.sel_deactivate); } public id delegatee () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); return result !is null ? new id(result) : null; } public static void detachDrawingThread (objc.id selector, id target, id argument) { - OS.objc_msgSend(OS.class_NSApplication, OS.sel_detachDrawingThread_1toTarget_1withObject_1, selector, target !is null ? target.id : null, - argument !is null ? argument.id : null); + OS.objc_msgSend(OS.class_NSApplication, OS.sel_detachDrawingThread_1toTarget_1withObject_1, selector, target !is null ? target.id_ : null, + argument !is null ? argument.id_ : null); } public void discardEventsMatchingMask (NSUInteger mask, NSEvent lastEvent) { - OS.objc_msgSend(this.id, OS.sel_discardEventsMatchingMask_1beforeEvent_1, mask, lastEvent !is null ? lastEvent.id : null); + OS.objc_msgSend(this.id_, OS.sel_discardEventsMatchingMask_1beforeEvent_1, mask, lastEvent !is null ? lastEvent.id_ : null); } public NSDockTile dockTile () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_dockTile); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_dockTile); return result !is null ? new NSDockTile(result) : null; } public void endModalSession (objc.id session) { - OS.objc_msgSend(this.id, OS.sel_endModalSession_1, session); + OS.objc_msgSend(this.id_, OS.sel_endModalSession_1, session); } public void endSheet_ (NSWindow sheet) { - OS.objc_msgSend(this.id, OS.sel_endSheet_1, sheet !is null ? sheet.id : null); + OS.objc_msgSend(this.id_, OS.sel_endSheet_1, sheet !is null ? sheet.id_ : null); } public void endSheet_returnCode_ (NSWindow sheet, NSInteger returnCode) { - OS.objc_msgSend(this.id, OS.sel_endSheet_1returnCode_1, sheet !is null ? sheet.id : null, returnCode); + OS.objc_msgSend(this.id_, OS.sel_endSheet_1returnCode_1, sheet !is null ? sheet.id_ : null, returnCode); } public void finishLaunching () { - OS.objc_msgSend(this.id, OS.sel_finishLaunching); + OS.objc_msgSend(this.id_, OS.sel_finishLaunching); } public void hide (id sender) { - OS.objc_msgSend(this.id, OS.sel_hide_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_hide_1, sender !is null ? sender.id_ : null); } public void hideOtherApplications (id sender) { - OS.objc_msgSend(this.id, OS.sel_hideOtherApplications_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_hideOtherApplications_1, sender !is null ? sender.id_ : null); } public bool isActive () { - return OS.objc_msgSend(this.id, OS.sel_isActive) !is null; + return OS.objc_msgSend(this.id_, OS.sel_isActive) !is null; } public bool isHidden () { - return OS.objc_msgSend(this.id, OS.sel_isHidden) !is null; + return OS.objc_msgSend(this.id_, OS.sel_isHidden) !is null; } public bool isRunning () { - return OS.objc_msgSend(this.id, OS.sel_isRunning) !is null; + return OS.objc_msgSend(this.id_, OS.sel_isRunning) !is null; } public NSWindow keyWindow () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_keyWindow); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyWindow); return result !is null ? new NSWindow(result) : null; } public NSMenu mainMenu () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_mainMenu); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_mainMenu); return result !is null ? new NSMenu(result) : null; } public NSWindow mainWindow () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_mainWindow); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_mainWindow); return result !is null ? new NSWindow(result) : null; } public NSWindow makeWindowsPerform (objc.id aSelector, bool flag) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_makeWindowsPerform_1inOrder_1, aSelector, flag); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeWindowsPerform_1inOrder_1, aSelector, flag); return result !is null ? new NSWindow(result) : null; } public void miniaturizeAll (id sender) { - OS.objc_msgSend(this.id, OS.sel_miniaturizeAll_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_miniaturizeAll_1, sender !is null ? sender.id_ : null); } public NSWindow modalWindow () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_modalWindow); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_modalWindow); return result !is null ? new NSWindow(result) : null; } public NSEvent nextEventMatchingMask (NSUInteger mask, NSDate expiration, NSString mode, bool deqFlag) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1, mask, - expiration !is null ? expiration.id : null, mode !is null ? mode.id : null, deqFlag); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1, mask, + expiration !is null ? expiration.id_ : null, mode !is null ? mode.id_ : null, deqFlag); return result !is null ? new NSEvent(result) : null; } public void orderFrontCharacterPalette (id sender) { - OS.objc_msgSend(this.id, OS.sel_orderFrontCharacterPalette_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_orderFrontCharacterPalette_1, sender !is null ? sender.id_ : null); } public void orderFrontColorPanel (id sender) { - OS.objc_msgSend(this.id, OS.sel_orderFrontColorPanel_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_orderFrontColorPanel_1, sender !is null ? sender.id_ : null); } public void orderFrontStandardAboutPanel (id sender) { - OS.objc_msgSend(this.id, OS.sel_orderFrontStandardAboutPanel_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_orderFrontStandardAboutPanel_1, sender !is null ? sender.id_ : null); } public void orderFrontStandardAboutPanelWithOptions (NSDictionary optionsDictionary) { - OS.objc_msgSend(this.id, OS.sel_orderFrontStandardAboutPanelWithOptions_1, optionsDictionary !is null ? optionsDictionary.id : null); + OS.objc_msgSend(this.id_, OS.sel_orderFrontStandardAboutPanelWithOptions_1, optionsDictionary !is null ? optionsDictionary.id_ : null); } public NSArray orderedDocuments () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_orderedDocuments); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_orderedDocuments); return result !is null ? new NSArray(result) : null; } public NSArray orderedWindows () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_orderedWindows); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_orderedWindows); return result !is null ? new NSArray(result) : null; } public void postEvent (NSEvent event, bool flag) { - OS.objc_msgSend(this.id, OS.sel_postEvent_1atStart_1, event !is null ? event.id : null, flag); + OS.objc_msgSend(this.id_, OS.sel_postEvent_1atStart_1, event !is null ? event.id_ : null, flag); } public void preventWindowOrdering () { - OS.objc_msgSend(this.id, OS.sel_preventWindowOrdering); + OS.objc_msgSend(this.id_, OS.sel_preventWindowOrdering); } public void registerServicesMenuSendTypes (NSArray sendTypes, NSArray returnTypes) { - OS.objc_msgSend(this.id, OS.sel_registerServicesMenuSendTypes_1returnTypes_1, sendTypes !is null ? sendTypes.id : null, - returnTypes !is null ? returnTypes.id : null); + OS.objc_msgSend(this.id_, OS.sel_registerServicesMenuSendTypes_1returnTypes_1, sendTypes !is null ? sendTypes.id_ : null, + returnTypes !is null ? returnTypes.id_ : null); } public void removeWindowsItem (NSWindow win) { - OS.objc_msgSend(this.id, OS.sel_removeWindowsItem_1, win !is null ? win.id : null); + OS.objc_msgSend(this.id_, OS.sel_removeWindowsItem_1, win !is null ? win.id_ : null); } public void replyToApplicationShouldTerminate (bool shouldTerminate) { - OS.objc_msgSend(this.id, OS.sel_replyToApplicationShouldTerminate_1, shouldTerminate); + OS.objc_msgSend(this.id_, OS.sel_replyToApplicationShouldTerminate_1, shouldTerminate); } public void replyToOpenOrPrint (objc.id reply) { - OS.objc_msgSend(this.id, OS.sel_replyToOpenOrPrint_1, reply); + OS.objc_msgSend(this.id_, OS.sel_replyToOpenOrPrint_1, reply); } public void reportException (NSException theException) { - OS.objc_msgSend(this.id, OS.sel_reportException_1, theException !is null ? theException.id : null); + OS.objc_msgSend(this.id_, OS.sel_reportException_1, theException !is null ? theException.id_ : null); } public NSInteger requestUserAttention (objc.id requestType) { - return OS.objc_msgSend(this.id, OS.sel_requestUserAttention_1, requestType); + return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_requestUserAttention_1, requestType); } public void run () { - OS.objc_msgSend(this.id, OS.sel_run); + OS.objc_msgSend(this.id_, OS.sel_run); } public objc.id runModalForWindow_ (NSWindow theWindow) { - return OS.objc_msgSend(this.id, OS.sel_runModalForWindow_1, theWindow !is null ? theWindow.id : null); + return OS.objc_msgSend(this.id_, OS.sel_runModalForWindow_1, theWindow !is null ? theWindow.id_ : null); } public objc.id runModalForWindow_relativeToWindow_ (NSWindow theWindow, NSWindow docWindow) { - return OS.objc_msgSend(this.id, OS.sel_runModalForWindow_1relativeToWindow_1, theWindow !is null ? theWindow.id : null, - docWindow !is null ? docWindow.id : null); + return OS.objc_msgSend(this.id_, OS.sel_runModalForWindow_1relativeToWindow_1, theWindow !is null ? theWindow.id_ : null, + docWindow !is null ? docWindow.id_ : null); } public objc.id runModalSession (objc.id session) { - return OS.objc_msgSend(this.id, OS.sel_runModalSession_1, session); + return OS.objc_msgSend(this.id_, OS.sel_runModalSession_1, session); } public void runPageLayout (id sender) { - OS.objc_msgSend(this.id, OS.sel_runPageLayout_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_runPageLayout_1, sender !is null ? sender.id_ : null); } public bool sendAction (objc.id theAction, id theTarget, id sender) { - return OS.objc_msgSend(this.id, OS.sel_sendAction_1to_1from_1, theAction, theTarget !is null ? theTarget.id : null, - sender !is null ? sender.id : null) !is null; + return OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1from_1, theAction, theTarget !is null ? theTarget.id_ : null, + sender !is null ? sender.id_ : null) !is null; } public void sendEvent (NSEvent theEvent) { - OS.objc_msgSend(this.id, OS.sel_sendEvent_1, theEvent !is null ? theEvent.id : null); + OS.objc_msgSend(this.id_, OS.sel_sendEvent_1, theEvent !is null ? theEvent.id_ : null); } public NSMenu servicesMenu () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_servicesMenu); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_servicesMenu); return result !is null ? new NSMenu(result) : null; } public id servicesProvider () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_servicesProvider); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_servicesProvider); return result !is null ? new id(result) : null; } public void setApplicationIconImage (NSImage image) { - OS.objc_msgSend(this.id, OS.sel_setApplicationIconImage_1, image !is null ? image.id : null); + OS.objc_msgSend(this.id_, OS.sel_setApplicationIconImage_1, image !is null ? image.id_ : null); } public void setDelegate (id anObject) { - OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); + OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null); } public void setMainMenu (NSMenu aMenu) { - OS.objc_msgSend(this.id, OS.sel_setMainMenu_1, aMenu !is null ? aMenu.id : null); + OS.objc_msgSend(this.id_, OS.sel_setMainMenu_1, aMenu !is null ? aMenu.id_ : null); } public void setServicesMenu (NSMenu aMenu) { - OS.objc_msgSend(this.id, OS.sel_setServicesMenu_1, aMenu !is null ? aMenu.id : null); + OS.objc_msgSend(this.id_, OS.sel_setServicesMenu_1, aMenu !is null ? aMenu.id_ : null); } public void setServicesProvider (id provider) { - OS.objc_msgSend(this.id, OS.sel_setServicesProvider_1, provider !is null ? provider.id : null); + OS.objc_msgSend(this.id_, OS.sel_setServicesProvider_1, provider !is null ? provider.id_ : null); } public void setWindowsMenu (NSMenu aMenu) { - OS.objc_msgSend(this.id, OS.sel_setWindowsMenu_1, aMenu !is null ? aMenu.id : null); + OS.objc_msgSend(this.id_, OS.sel_setWindowsMenu_1, aMenu !is null ? aMenu.id_ : null); } public void setWindowsNeedUpdate (bool needUpdate) { - OS.objc_msgSend(this.id, OS.sel_setWindowsNeedUpdate_1, needUpdate); + OS.objc_msgSend(this.id_, OS.sel_setWindowsNeedUpdate_1, needUpdate); } public static NSApplication sharedApplication () @@ -393,94 +394,94 @@ public void showHelp (id sender) { - OS.objc_msgSend(this.id, OS.sel_showHelp_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_showHelp_1, sender !is null ? sender.id_ : null); } public void stop (id sender) { - OS.objc_msgSend(this.id, OS.sel_stop_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_stop_1, sender !is null ? sender.id_ : null); } public void stopModal () { - OS.objc_msgSend(this.id, OS.sel_stopModal); + OS.objc_msgSend(this.id_, OS.sel_stopModal); } public void stopModalWithCode (NSInteger returnCode) { - OS.objc_msgSend(this.id, OS.sel_stopModalWithCode_1, returnCode); + OS.objc_msgSend(this.id_, OS.sel_stopModalWithCode_1, returnCode); } public id targetForAction_ (objc.SEL theAction) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_targetForAction_1, theAction); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_targetForAction_1, theAction); return result !is null ? new id(result) : null; } public id targetForAction_to_from_ (objc.SEL theAction, id theTarget, id sender) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_targetForAction_1to_1from_1, theAction, theTarget !is null ? theTarget.id : null, - sender !is null ? sender.id : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_targetForAction_1to_1from_1, theAction, theTarget !is null ? theTarget.id_ : null, + sender !is null ? sender.id_ : null); return result !is null ? new id(result) : null; } public void terminate (id sender) { - OS.objc_msgSend(this.id, OS.sel_terminate_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_terminate_1, sender !is null ? sender.id_ : null); } public bool tryToPerform (objc.SEL anAction, id anObject) { - return OS.objc_msgSend(this.id, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id : null) !is null; + return OS.objc_msgSend(this.id_, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id_ : null) !is null; } public void unhide (id sender) { - OS.objc_msgSend(this.id, OS.sel_unhide_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_unhide_1, sender !is null ? sender.id_ : null); } public void unhideAllApplications (id sender) { - OS.objc_msgSend(this.id, OS.sel_unhideAllApplications_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_unhideAllApplications_1, sender !is null ? sender.id_ : null); } public void unhideWithoutActivation () { - OS.objc_msgSend(this.id, OS.sel_unhideWithoutActivation); + OS.objc_msgSend(this.id_, OS.sel_unhideWithoutActivation); } public void updateWindows () { - OS.objc_msgSend(this.id, OS.sel_updateWindows); + OS.objc_msgSend(this.id_, OS.sel_updateWindows); } public void updateWindowsItem (NSWindow win) { - OS.objc_msgSend(this.id, OS.sel_updateWindowsItem_1, win !is null ? win.id : null); + OS.objc_msgSend(this.id_, OS.sel_updateWindowsItem_1, win !is null ? win.id_ : null); } public id validRequestorForSendType (NSString sendType, NSString returnType) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id : null, - returnType !is null ? returnType.id : null); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id_ : null, + returnType !is null ? returnType.id_ : null); return result !is null ? new id(result) : null; } public NSWindow windowWithWindowNumber (NSInteger windowNum) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_windowWithWindowNumber_1, windowNum); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowWithWindowNumber_1, windowNum); return result !is null ? new NSWindow(result) : null; } public NSArray windows () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_windows); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_windows); return result !is null ? new NSArray(result) : null; } public NSMenu windowsMenu () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_windowsMenu); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowsMenu); return result !is null ? new NSMenu(result) : null; }