00001
00002
00003 #import <Cocoa/Cocoa.h>
00004 #import <Carbon/Carbon.h>
00005
00012
00013 @class GDCarbonEventManager;
00014
00024 @interface GDCarbonEvent : NSObject <NSCoding> {
00025
00026 int keyCode;
00027 int modifierFlags;
00028 id target;
00029 SEL action;
00030 NSString * notificationName;
00031 NSString * keyChar;
00032 NSDictionary * userInfo;
00033 NSNotificationCenter * notificationCenter;
00034
00038 Boolean isInstalled;
00039
00043 NSString * sigString;
00044
00048 EventHandlerRef eventRef;
00049
00053 EventHandlerUPP handlerUPP;
00054
00058 EventTypeSpec eventSpec;
00059
00063 EventHotKeyRef hotKeyRef;
00064
00068 EventHotKeyID hotKeyId;
00069
00070 }
00071
00075 @property (copy) NSString * keyChar;
00076
00081 @property (copy) NSString * notificationName;
00082
00086 @property (assign) NSNotificationCenter * notificationCenter;
00087
00092 @property (assign) SEL action;
00093
00097 @property (retain) id target;
00098
00102 @property (assign) int keyCode;
00103
00108 @property (assign) int modifierFlags;
00109
00114 @property (retain) NSDictionary * userInfo;
00115
00125 - (id) initWithCoder:(NSCoder *) coder;
00126
00133 - (void) encodeWithCoder:(NSCoder *) coder;
00134
00143 + (void) disposeOfLookupManager;
00144
00151 - (void) setHotKeySignature:(NSString *) signature;
00152
00158 - (void) setHotKeyId:(int) kid;
00159
00163 - (int) hotKeyId;
00164
00170 - (void) setEventClass:(FourCharCode) eventClass;
00171
00177 - (void) setEventKind:(NSUInteger) eventKind;
00178
00185 - (void) setEventClass:(FourCharCode) eventClass andEventKind:(NSUInteger) eventKind;
00186
00190 - (NSUInteger) cocoaModifierKeys;
00191
00195 - (void) install;
00196
00200 - (void) uninstall;
00201
00207 - (void) invoke;
00208
00215 - (id) initWithEventClass:(FourCharCode) eventClass andEventKind:(NSUInteger) eventKind;
00216
00224 - (void) setNotificationName:(NSString *) name andNotificationCenter:(NSNotificationCenter *) center;
00225
00233 - (void) setAction:(SEL) action andTarget:(id) target;
00234
00244 - (void) setKeyCode:(NSUInteger) code andFlags:(NSUInteger) flags areFlagsCocoa:(Boolean) cocoaFlags;
00245
00250 - (NSString *) keyString;
00251
00252 @end