From be9358bf32dc402f3bc77c6cc20957047ab363af Mon Sep 17 00:00:00 2001 From: Tomáš Znamenáček Date: Thu, 7 Aug 2014 10:10:08 +0200 Subject: 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. --- Framework/MASShortcutMonitor.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Framework/MASShortcutMonitor.h') 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 -- cgit v1.2.3