PageRenderTime 227ms CodeModel.GetById 120ms app.highlight 13ms RepoModel.GetById 88ms app.codeStats 1ms

/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
 1#ifndef MACDELEGATE_H
 2#define MACDELEGATE_H
 3
 4// This file inspired by clementine's MacDelegate.h
 5
 6#import <AppKit/NSApplication.h>
 7
 8#include "SPMediaKeyTap.h"
 9
10namespace Tomahawk {
11    class MacShortcutHandler;
12    class PlatformInterface;
13}
14
15#if ( defined MAC_OS_X_VERSION_10_7 || defined SNOW_LEOPARD )
16@interface AppDelegate :NSObject <NSApplicationDelegate> {
17#else
18@interface AppDelegate :NSObject {
19#endif
20  Tomahawk::PlatformInterface* application_handler_;
21  NSMenu* dock_menu_;
22  SPMediaKeyTap* key_tap_;
23  Tomahawk::MacShortcutHandler* shortcut_handler_;
24}
25
26- (id) initWithHandler: (Tomahawk::PlatformInterface*)handler;
27// NSApplicationDelegate
28- (BOOL) applicationShouldHandleReopen: (NSApplication*)app hasVisibleWindows:(BOOL)flag;
29- (NSMenu*) applicationDockMenu: (NSApplication*)sender;
30- (void) setDockMenu: (NSMenu*)menu;
31- (Tomahawk::MacShortcutHandler*) shortcutHandler;
32- (void) setShortcutHandler: (Tomahawk::MacShortcutHandler*)backend;
33- (void)applicationDidFinishLaunching:(NSNotification*)aNotification;
34- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*)sender;
35- (void) mediaKeyTap: (SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)event;
36@end
37
38
39
40#endif // MACDELEGATE_H