Files
ShadowsocksX-NG/Pods/MASShortcut/Framework/MASShortcutMonitor.h
2017-03-10 22:35:50 +08:00

28 lines
820 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#import "MASShortcut.h"
/**
Executes action when a shortcut is pressed.
There can only be one instance of this class, otherwise things
will probably not work. (Theres 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;
/**
Register a shortcut along with an action.
Attempting to insert an already registered shortcut probably wont work.
It may burn your house or cut your fingers. You have been warned.
*/
- (BOOL) registerShortcut: (MASShortcut*) shortcut withAction: (dispatch_block_t) action;
- (BOOL) isShortcutRegistered: (MASShortcut*) shortcut;
- (void) unregisterShortcut: (MASShortcut*) shortcut;
- (void) unregisterAllShortcuts;
@end