|
18 | 18 | #define COMPILING_FOR_10_10
|
19 | 19 | #endif
|
20 | 20 |
|
| 21 | +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200 |
| 22 | +/* A lot of symbols were renamed in Sierra and cause deprecation warnings |
| 23 | + so define macros for the new names if we are compiling on an older SDK */ |
| 24 | +#define NSEventMaskAny NSAnyEventMask |
| 25 | +#define NSEventTypeApplicationDefined NSApplicationDefined |
| 26 | +#define NSEventModifierFlagCommand NSCommandKeyMask |
| 27 | +#define NSEventModifierFlagControl NSControlKeyMask |
| 28 | +#define NSEventModifierFlagOption NSAlternateKeyMask |
| 29 | +#define NSEventModifierFlagShift NSShiftKeyMask |
| 30 | +#define NSEventTypeKeyUp NSKeyUp |
| 31 | +#define NSEventTypeKeyDown NSKeyDown |
| 32 | +#define NSEventTypeMouseMoved NSMouseMoved |
| 33 | +#define NSEventTypeLeftMouseDown NSLeftMouseDown |
| 34 | +#define NSEventTypeRightMouseDown NSRightMouseDown |
| 35 | +#define NSEventTypeOtherMouseDown NSOtherMouseDown |
| 36 | +#define NSEventTypeLeftMouseDragged NSLeftMouseDragged |
| 37 | +#define NSEventTypeRightMouseDragged NSRightMouseDragged |
| 38 | +#define NSEventTypeOtherMouseDragged NSOtherMouseDragged |
| 39 | +#define NSEventTypeLeftMouseUp NSLeftMouseUp |
| 40 | +#define NSEventTypeRightMouseUp NSRightMouseUp |
| 41 | +#define NSEventTypeOtherMouseUp NSOtherMouseUp |
| 42 | +#define NSWindowStyleMaskClosable NSClosableWindowMask |
| 43 | +#define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask |
| 44 | +#define NSWindowStyleMaskResizable NSResizableWindowMask |
| 45 | +#define NSWindowStyleMaskTitled NSTitledWindowMask |
| 46 | +#endif |
| 47 | + |
| 48 | +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101400 |
| 49 | +/* A few more deprecations in Mojave */ |
| 50 | +#define NSButtonTypeMomentaryLight NSMomentaryLightButton |
| 51 | +#define NSButtonTypePushOnPushOff NSPushOnPushOffButton |
| 52 | +#define NSBezelStyleShadowlessSquare NSShadowlessSquareBezelStyle |
| 53 | +#define CGContext graphicsPort |
| 54 | +#endif |
21 | 55 |
|
22 | 56 | /* CGFloat was defined in Mac OS X 10.5 */
|
23 | 57 | #ifndef CGFLOAT_DEFINED
|
|
0 commit comments