1 #include <Carbon/Carbon.h>
4 static AEEventHandlerUPP appleEventProcessorUPP
= 0;
7 appleEventProcessor(const AppleEvent
*ae
, AppleEvent
*, long /*handlerRefCon*/)
9 OSType aeID
= typeWildCard
;
10 OSType aeClass
= typeWildCard
;
11 AEGetAttributePtr(ae
, keyEventClassAttr
, typeType
, 0, &aeClass
, sizeof(aeClass
), 0);
12 AEGetAttributePtr(ae
, keyEventIDAttr
, typeType
, 0, &aeID
, sizeof(aeID
), 0);
14 if(aeClass
== kCoreEventClass
)
16 if(aeID
== kAEReopenApplication
)
19 if( PlaylistWindow::self() )
20 PlaylistWindow::self()->show();
25 return eventNotHandledErr
;
29 setupEventHandler_mac(long handlerRef
)
31 appleEventProcessorUPP
= AEEventHandlerUPP(appleEventProcessor
);
32 AEInstallEventHandler(kCoreEventClass
, kAEReopenApplication
, appleEventProcessorUPP
, handlerRef
, true);