summaryrefslogtreecommitdiffstats
path: root/DDHotKeyCenter.h
diff options
context:
space:
mode:
authorDave DeLong2010-02-24 14:30:10 -0600
committerDave DeLong2010-02-24 14:30:10 -0600
commitd12d318af02d8f21909781a8cd63e0fbc86261dc (patch)
tree0f9c4c3dfadb58d2ef55fdff54061be2cfba2ffb /DDHotKeyCenter.h
parent1be892856d6c86e6def980d8987cfea3c40e267f (diff)
downloadDDHotKey-d12d318af02d8f21909781a8cd63e0fbc86261dc.tar.bz2
Adding DDHotKeyCenter, with three example uses
Diffstat (limited to 'DDHotKeyCenter.h')
-rw-r--r--DDHotKeyCenter.h32
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