diff options
| author | Dave DeLong | 2010-02-24 14:30:10 -0600 |
|---|---|---|
| committer | Dave DeLong | 2010-02-24 14:30:10 -0600 |
| commit | d12d318af02d8f21909781a8cd63e0fbc86261dc (patch) | |
| tree | 0f9c4c3dfadb58d2ef55fdff54061be2cfba2ffb /DDHotKeyCenter.h | |
| parent | 1be892856d6c86e6def980d8987cfea3c40e267f (diff) | |
| download | DDHotKey-d12d318af02d8f21909781a8cd63e0fbc86261dc.tar.bz2 | |
Adding DDHotKeyCenter, with three example uses
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 |
