diff options
| author | Dave DeLong | 2010-02-24 15:23:04 -0700 |
|---|---|---|
| committer | Dave DeLong | 2010-02-24 15:23:04 -0700 |
| commit | 440f01bce0858f48df4f13333b40afaecbf1d094 (patch) | |
| tree | 95974b4417bc0a8a196ac9f48ff8743a50fcae40 /DDHotKeyCenter.m | |
| parent | 2080059c4803bdb7fc045715533ea4b33f8ee6b1 (diff) | |
| download | DDHotKey-440f01bce0858f48df4f13333b40afaecbf1d094.tar.bz2 | |
Modified the order of the parameters to follow conventsion (suggested by Quinn Taylor)
Diffstat (limited to 'DDHotKeyCenter.m')
| -rw-r--r-- | DDHotKeyCenter.m | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/DDHotKeyCenter.m b/DDHotKeyCenter.m index 8cd465e..b190cf9 100644 --- a/DDHotKeyCenter.m +++ b/DDHotKeyCenter.m @@ -1,10 +1,12 @@ -// -// DDHotKeyManager.m -// EmptyAppKit -// -// Created by Dave DeLong on 2/20/10. -// Copyright 2010 Home. All rights reserved. -// +/* + DDHotKey -- DDHotKeyCenter.m + + Copyright (c) 2010, Dave DeLong <http://www.davedelong.com> + + Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + + The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the author(s) or copyright holder(s) be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software. + */ #import "DDHotKeyCenter.h" #import <Carbon/Carbon.h> @@ -132,7 +134,7 @@ NSUInteger dd_translateModifierFlags(NSUInteger flags); } #if BUILD_FOR_SNOWLEOPARD -- (BOOL) registerHotKeyWithBlock:(DDHotKeyTask)task keyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags { +- (BOOL) registerHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags block:(DDHotKeyTask)task { //we can't add a new hotkey if something already has this combo if ([self hasRegisteredHotKeyWithKeyCode:keyCode modifierFlags:flags]) { return NO; } @@ -154,7 +156,7 @@ NSUInteger dd_translateModifierFlags(NSUInteger flags); } #endif -- (BOOL) registerHotKeyWithTarget:(id)target action:(SEL)action object:(id)object keyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags { +- (BOOL) registerHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags target:(id)target action:(SEL)action object:(id)object { //we can't add a new hotkey if something already has this combo if ([self hasRegisteredHotKeyWithKeyCode:keyCode modifierFlags:flags]) { return NO; } @@ -193,7 +195,7 @@ NSUInteger dd_translateModifierFlags(NSUInteger flags); [self unregisterHotKeysMatchingPredicate:predicate]; } -- (void) unregisterHotKeyWithTarget:(id)target action:(SEL)action { +- (void) unregisterHotKeysWithTarget:(id)target action:(SEL)action { NSPredicate * predicate = [NSPredicate predicateWithFormat:@"target = %@ AND actionString = %@", target, NSStringFromSelector(action)]; [self unregisterHotKeysMatchingPredicate:predicate]; } |
