diff options
| author | Tomáš Znamenáček | 2014-08-07 18:20:37 +0200 |
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-07 15:43:26 +0100 |
| commit | 1094fd9a612a3d02109b04346ee17da75c701449 (patch) | |
| tree | 298aab533ad8a881cd6248bae11b96f203d1ce6c /Framework/MASShortcutMonitor.h | |
| parent | 4df3b54b3886f086bdeeae67f7824d548778905a (diff) | |
| download | MASShortcut-1094fd9a612a3d02109b04346ee17da75c701449.tar.bz2 | |
Added header documentation.
Diffstat (limited to 'Framework/MASShortcutMonitor.h')
| -rw-r--r-- | Framework/MASShortcutMonitor.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Framework/MASShortcutMonitor.h b/Framework/MASShortcutMonitor.h index 5c0daa2..609686a 100644 --- a/Framework/MASShortcutMonitor.h +++ b/Framework/MASShortcutMonitor.h @@ -1,10 +1,23 @@ #import "MASShortcut.h" +/** + @brief Executes action when a shortcut is pressed. + + There can only be one instance of this class, otherwise things + will probably not work. (There’s a Carbon event handler inside + and there can only be one Carbon event handler of a given type.) +*/ @interface MASShortcutMonitor : NSObject - (instancetype) init __unavailable; + (instancetype) sharedMonitor; +/** + @brief Register a shortcut along with an action. + + Attempting to insert an already registered shortcut probably won’t work. + It may burn your house or cut your fingers. You have been warned. +*/ - (void) registerShortcut: (MASShortcut*) shortcut withAction: (dispatch_block_t) action; - (BOOL) isShortcutRegistered: (MASShortcut*) shortcut; |
