/src/mac/macdelegate.h
http://github.com/tomahawk-player/tomahawk · C Header · 40 lines · 29 code · 9 blank · 2 comment · 1 complexity · 8c3abc9a226ee12e91703ab40fd35c36 MD5 · raw file
- #ifndef MACDELEGATE_H
- #define MACDELEGATE_H
- // This file inspired by clementine's MacDelegate.h
- #import <AppKit/NSApplication.h>
- #include "SPMediaKeyTap.h"
- namespace Tomahawk {
- class MacShortcutHandler;
- class PlatformInterface;
- }
- #if ( defined MAC_OS_X_VERSION_10_7 || defined SNOW_LEOPARD )
- @interface AppDelegate :NSObject <NSApplicationDelegate> {
- #else
- @interface AppDelegate :NSObject {
- #endif
- Tomahawk::PlatformInterface* application_handler_;
- NSMenu* dock_menu_;
- SPMediaKeyTap* key_tap_;
- Tomahawk::MacShortcutHandler* shortcut_handler_;
- }
- - (id) initWithHandler: (Tomahawk::PlatformInterface*)handler;
- // NSApplicationDelegate
- - (BOOL) applicationShouldHandleReopen: (NSApplication*)app hasVisibleWindows:(BOOL)flag;
- - (NSMenu*) applicationDockMenu: (NSApplication*)sender;
- - (void) setDockMenu: (NSMenu*)menu;
- - (Tomahawk::MacShortcutHandler*) shortcutHandler;
- - (void) setShortcutHandler: (Tomahawk::MacShortcutHandler*)backend;
- - (void)applicationDidFinishLaunching:(NSNotification*)aNotification;
- - (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*)sender;
- - (void) mediaKeyTap: (SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)event;
- @end
- #endif // MACDELEGATE_H