2018-02-27 18:06:05 +01:00
|
|
|
#import <AppKit/NSApplication.h>
|
|
|
|
|
|
|
|
#include "config.h"
|
2019-01-02 00:32:36 +01:00
|
|
|
#include "globalshortcuts/globalshortcutbackend-macos.h"
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
class PlatformInterface;
|
|
|
|
|
|
|
|
@interface AppDelegate : NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate> {
|
|
|
|
PlatformInterface* application_handler_;
|
|
|
|
NSMenu* dock_menu_;
|
2019-01-02 00:32:36 +01:00
|
|
|
GlobalShortcutBackendMacOS* shortcut_handler_;
|
2018-10-02 00:38:52 +02:00
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
- (id) initWithHandler: (PlatformInterface*)handler;
|
|
|
|
|
|
|
|
// NSApplicationDelegate
|
|
|
|
- (BOOL) applicationShouldHandleReopen: (NSApplication*)app hasVisibleWindows:(BOOL)flag;
|
|
|
|
- (NSMenu*) applicationDockMenu: (NSApplication*)sender;
|
|
|
|
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification;
|
|
|
|
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*)sender;
|
|
|
|
|
|
|
|
// NSUserNotificationCenterDelegate
|
|
|
|
- (BOOL) userNotificationCenter: (id)center
|
|
|
|
shouldPresentNotification: (id)notification;
|
|
|
|
|
|
|
|
- (void) setDockMenu: (NSMenu*)menu;
|
2019-01-02 00:32:36 +01:00
|
|
|
- (GlobalShortcutBackendMacOS*) shortcut_handler;
|
|
|
|
- (void) setShortcutHandler: (GlobalShortcutBackendMacOS*)backend;
|
2018-02-27 18:06:05 +01:00
|
|
|
@end
|