some more work on collabsible albums. I think I will need to optimize the playlist...
[amarok.git] / src / app_mac.cpp
blobae548bdf52d2ade1d957c23e2b265c151c24fab5
1 #include <Carbon/Carbon.h>
2 #include <QStringList>
3 #include "dynamicmode.h"
5 static AEEventHandlerUPP appleEventProcessorUPP = 0;
7 OSStatus
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)
19 #if 0
20 if( PlaylistWindow::self() )
21 PlaylistWindow::self()->show();
22 #endif
24 return noErr;
26 return eventNotHandledErr;
29 void
30 setupEventHandler_mac(long handlerRef)
32 appleEventProcessorUPP = AEEventHandlerUPP(appleEventProcessor);
33 AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, appleEventProcessorUPP, handlerRef, true);