1 #include <Carbon/Carbon.h>
3 #include "dynamicmode.h"
5 static AEEventHandlerUPP appleEventProcessorUPP
= 0;
8 appleEventProcessor(const AppleEvent
*ae
, AppleEvent
*, long /*handlerRefCon*/)
10 OSType aeID
= typeWildCard
;
11 OSType aeClass
= typeWildCard
;
12 AEGetAttributePtr(ae
, keyEventClassAttr
, typeType
, 0, &aeClass
, sizeof(aeClass
), 0);
13 AEGetAttributePtr(ae
, keyEventIDAttr
, typeType
, 0, &aeID
, sizeof(aeID
), 0);
15 if(aeClass
== kCoreEventClass
)
17 if(aeID
== kAEReopenApplication
)
20 if( PlaylistWindow::self() )
21 PlaylistWindow::self()->show();
26 return eventNotHandledErr
;
30 setupEventHandler_mac(long handlerRef
)
32 appleEventProcessorUPP
= AEEventHandlerUPP(appleEventProcessor
);
33 AEInstallEventHandler(kCoreEventClass
, kAEReopenApplication
, appleEventProcessorUPP
, handlerRef
, true);