diff options
| author | Tomáš Znamenáček | 2014-08-07 10:10:08 +0200 | 
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-07 15:42:21 +0100 | 
| commit | be9358bf32dc402f3bc77c6cc20957047ab363af (patch) | |
| tree | 48edbf8bed4603fbb4ba5d4b6857dc7e4c6d2c0c /Framework/MASShortcutMonitor.h | |
| parent | f9f48f5ca83f7723eabdd16d0c95195092a8a514 (diff) | |
| download | MASShortcut-be9358bf32dc402f3bc77c6cc20957047ab363af.tar.bz2 | |
Turned MASShortcutMonitor into a singleton.
There can only be one Carbon event handler, so it doesn’t make sense
to create multiple instances of the shortcut monitor.
Diffstat (limited to 'Framework/MASShortcutMonitor.h')
| -rw-r--r-- | Framework/MASShortcutMonitor.h | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/Framework/MASShortcutMonitor.h b/Framework/MASShortcutMonitor.h index c29747c..5c0daa2 100644 --- a/Framework/MASShortcutMonitor.h +++ b/Framework/MASShortcutMonitor.h @@ -2,8 +2,13 @@  @interface MASShortcutMonitor : NSObject +- (instancetype) init __unavailable; ++ (instancetype) sharedMonitor; +  - (void) registerShortcut: (MASShortcut*) shortcut withAction: (dispatch_block_t) action;  - (BOOL) isShortcutRegistered: (MASShortcut*) shortcut; +  - (void) unregisterShortcut: (MASShortcut*) shortcut; +- (void) unregisterAllShortcuts;  @end | 
