Will the madness ever end? Will I ever actually do something usefull? Oh well......
[amarok.git] / src / app_mac.cpp
blob053bffd1416b141a8b48bee0616b4915e9c8e11e
1 #include <Carbon/Carbon.h>
2 #include <QStringList>
4 static AEEventHandlerUPP appleEventProcessorUPP = 0;
6 OSStatus
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)
18 #if 0
19 if( PlaylistWindow::self() )
20 PlaylistWindow::self()->show();
21 #endif
23 return noErr;
25 return eventNotHandledErr;
28 void
29 setupEventHandler_mac(long handlerRef)
31 appleEventProcessorUPP = AEEventHandlerUPP(appleEventProcessor);
32 AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, appleEventProcessorUPP, handlerRef, true);