X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76adcbf2d1e2a0b47abec763e327ed716c97950d..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/cocoa/NSMenu.mm diff --git a/src/cocoa/NSMenu.mm b/src/cocoa/NSMenu.mm index 819cc1f136..635b2ee96e 100644 --- a/src/cocoa/NSMenu.mm +++ b/src/cocoa/NSMenu.mm @@ -35,6 +35,7 @@ } @end // WXNSMenu +WX_IMPLEMENT_GET_OBJC_CLASS(WXNSMenu,NSMenu) // ============================================================================ // @class wxNSMenuNotificationObserver @@ -43,14 +44,13 @@ { } -struct objc_object *wxCocoaNSMenu::sm_cocoaObserver = [[wxNSMenuNotificationObserver alloc] init]; - - (void)menuDidAddItem: (NSNotification *)notification; - (void)menuDidChangeItem: (NSNotification *)notification; - (void)menuDidRemoveItem: (NSNotification *)notification; - (void)menuDidSendAction: (NSNotification *)notification; - (void)menuWillSendAction: (NSNotification *)notification; @end // interface wxNSMenuNotificationObserver +WX_DECLARE_GET_OBJC_CLASS(wxNSMenuNotificationObserver,NSObject) @implementation wxNSMenuNotificationObserver : NSObject @@ -90,12 +90,15 @@ struct objc_object *wxCocoaNSMenu::sm_cocoaObserver = [[wxNSMenuNotificationObse } @end // implementation wxNSMenuNotificationObserver +WX_IMPLEMENT_GET_OBJC_CLASS(wxNSMenuNotificationObserver,NSObject) // ======================================================================== // wxCocoaNSMenu // ======================================================================== WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSMenu) +struct objc_object *wxCocoaNSMenu::sm_cocoaObserver = [[WX_GET_OBJC_CLASS(wxNSMenuNotificationObserver) alloc] init]; + void wxCocoaNSMenu::AssociateNSMenu(WX_NSMenu cocoaNSMenu, unsigned int flags) { if(cocoaNSMenu)