diff options
| author | Tomáš Znamenáček | 2014-08-05 15:34:46 +0200 | 
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-07 15:05:12 +0100 | 
| commit | 1c801726d35e56d3bbf4a33279213bc60935c244 (patch) | |
| tree | fad9932f1542e10daa6a1d27c1e34fe8157577a4 /Framework/MASShortcut.h | |
| parent | 88392d1a6963cca5009b9b0c20b054ad9e911b6c (diff) | |
| download | MASShortcut-1c801726d35e56d3bbf4a33279213bc60935c244.tar.bz2 | |
Converted keycode macros to plain functions.
Plain functions are less prone to bugs, the compiler understands
them better and can offer better error messages, and plain functions
can be refactored more easily.
Diffstat (limited to 'Framework/MASShortcut.h')
| -rw-r--r-- | Framework/MASShortcut.h | 10 | 
1 files changed, 0 insertions, 10 deletions
| diff --git a/Framework/MASShortcut.h b/Framework/MASShortcut.h index f1e489c..b7ed55c 100644 --- a/Framework/MASShortcut.h +++ b/Framework/MASShortcut.h @@ -1,14 +1,4 @@  #import "MASKeyCodes.h" -#import <AppKit/AppKit.h> - -#define MASShortcutChar(char) [NSString stringWithFormat:@"%C", (unsigned short)(char)] -#define MASShortcutClear(flags) (flags & (NSControlKeyMask | NSShiftKeyMask | NSAlternateKeyMask | NSCommandKeyMask)) -#define MASShortcutCarbonFlags(cocoaFlags) (\ -    (cocoaFlags & NSCommandKeyMask ? cmdKey : 0) | \ -    (cocoaFlags & NSAlternateKeyMask ? optionKey : 0) | \ -    (cocoaFlags & NSControlKeyMask ? controlKey : 0) | \ -    (cocoaFlags & NSShiftKeyMask ? shiftKey : 0)) -  @interface MASShortcut : NSObject <NSSecureCoding> | 
