diff options
Diffstat (limited to 'DDHotKeyCenter.h')
| -rw-r--r-- | DDHotKeyCenter.h | 32 | 
1 files changed, 32 insertions, 0 deletions
| diff --git a/DDHotKeyCenter.h b/DDHotKeyCenter.h new file mode 100644 index 0000000..e1cd603 --- /dev/null +++ b/DDHotKeyCenter.h @@ -0,0 +1,32 @@ +// +//  DDHotKeyManager.h +//  EmptyAppKit +// +//  Created by Dave DeLong on 2/20/10. +//  Copyright 2010 Home. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +#define BUILD_FOR_SNOWLEOPARD (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + +#if BUILD_FOR_SNOWLEOPARD +typedef void (^DDHotKeyTask)(NSEvent*); +#endif + +@interface DDHotKeyCenter : NSObject { + +} + +- (BOOL) registerHotKeyWithTarget:(id)target action:(SEL)action object:(id)object keyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags; + +#if BUILD_FOR_SNOWLEOPARD +- (BOOL) registerHotKeyWithBlock:(DDHotKeyTask)task keyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags; +#endif + +- (BOOL) hasRegisteredHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags; +- (void) unregisterHotKeysWithTarget:(id)target; +- (void) unregisterHotKeyWithTarget:(id)target action:(SEL)action; +- (void) unregisterHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags; + +@end | 
