From 14d386b499c8495b3725469cc0cd3393e0c613e6 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Wed, 29 Sep 2010 23:37:56 +0000 Subject: [Author: aharper] GTMHotKeyTextField on 10.4 again, properties are too new, so write custom accessors. DELTA=47 (29 added, 18 deleted, 0 changed) R=dmaclach --- AppKit/GTMHotKeyTextField.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'AppKit/GTMHotKeyTextField.h') diff --git a/AppKit/GTMHotKeyTextField.h b/AppKit/GTMHotKeyTextField.h index cd671f0..cdd7830 100644 --- a/AppKit/GTMHotKeyTextField.h +++ b/AppKit/GTMHotKeyTextField.h @@ -33,16 +33,6 @@ BOOL doubledModifier_; } -// Modifier flags are stored using Cocoa constants (same as NSEvent) you will -// need to translate them to Carbon modifier flags for use with -// RegisterEventHotKey() -@property (readonly) NSUInteger modifiers; -// Virtual keycode. For double-modifier hotkeys this value is ignored. -@property (readonly) NSUInteger keyCode; -//Double-tap modifier keys cannot be used with RegisterEventHotKey(), you must -// implement your own Carbon event handler. -@property (readonly) BOOL doubledModifier; - + (id)hotKeyWithKeyCode:(NSUInteger)keyCode modifiers:(NSUInteger)modifiers useDoubledModifier:(BOOL)doubledModifier; @@ -50,6 +40,12 @@ - (id)initWithKeyCode:(NSUInteger)keyCode modifiers:(NSUInteger)modifiers useDoubledModifier:(BOOL)doubledModifier; + +// Custom accessors (readonly, nonatomic) +- (NSUInteger)modifiers; +- (NSUInteger)keyCode; +- (BOOL)doubledModifier; + @end // Notes: @@ -111,9 +107,10 @@ GTMHotKeyTextFieldCell *cell_; } -@property (retain) GTMHotKeyTextFieldCell *cell; - // Get the shared field editor for all hot key fields + (GTMHotKeyFieldEditor *)sharedHotKeyFieldEditor; +// Custom accessors (retain, nonatomic) +- (GTMHotKeyTextFieldCell *)cell; + @end -- cgit v1.2.3