diff options
author | Akemi <der.richter@gmx.de> | 2016-09-20 23:30:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-22 13:46:27 +0200 |
commit | 9df797575fc771f87dc6bedf89b46aab3236a21f (patch) | |
tree | 2a011c2ee32d34030973144f259398120e69dd2b /osdep/macosx_compat.h | |
parent | 78b3852f7ec7b4c8df72646e313535acacae1fd9 (diff) | |
download | mpv-9df797575fc771f87dc6bedf89b46aab3236a21f.tar.bz2 mpv-9df797575fc771f87dc6bedf89b46aab3236a21f.tar.xz |
cocoa: fix macOS 10.12 deprecation warnings
Diffstat (limited to 'osdep/macosx_compat.h')
-rw-r--r-- | osdep/macosx_compat.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/osdep/macosx_compat.h b/osdep/macosx_compat.h index 9775529bc6..76308c6f98 100644 --- a/osdep/macosx_compat.h +++ b/osdep/macosx_compat.h @@ -24,6 +24,31 @@ #import <Cocoa/Cocoa.h> #include "osdep/macosx_versions.h" +#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12) +typedef NSUInteger NSWindowStyleMask; +static const NSWindowStyleMask NSWindowStyleMaskClosable = NSClosableWindowMask; +static const NSWindowStyleMask NSWindowStyleMaskTitled = NSTitledWindowMask; +static const NSWindowStyleMask NSWindowStyleMaskMiniaturizable = NSMiniaturizableWindowMask; +static const NSWindowStyleMask NSWindowStyleMaskResizable = NSResizableWindowMask; +static const NSWindowStyleMask NSWindowStyleMaskBorderless = NSBorderlessWindowMask; + +static const NSEventType NSEventTypeSystemDefined = NSSystemDefined; +static const NSEventType NSEventTypeKeyDown = NSKeyDown; +static const NSEventType NSEventTypeKeyUp = NSKeyUp; + +static const NSEventMask NSEventMaskKeyDown = NSKeyDownMask; +static const NSEventMask NSEventMaskKeyUp = NSKeyUpMask; + +#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10) +typedef NSUInteger NSEventModifierFlags; +#endif + +static const NSEventModifierFlags NSEventModifierFlagShift = NSShiftKeyMask; +static const NSEventModifierFlags NSEventModifierFlagControl = NSControlKeyMask; +static const NSEventModifierFlags NSEventModifierFlagCommand = NSCommandKeyMask; +static const NSEventModifierFlags NSEventModifierFlagOption = NSAlternateKeyMask; +#endif + #if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8) @interface NSArray (SubscriptingAdditions) - (id)objectAtIndexedSubscript:(NSUInteger)index; |