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