summaryrefslogtreecommitdiffstats
path: root/osdep/macosx_compat.h
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2016-09-20 23:30:54 +0200
committerwm4 <wm4@nowhere>2016-09-22 13:46:27 +0200
commit9df797575fc771f87dc6bedf89b46aab3236a21f (patch)
tree2a011c2ee32d34030973144f259398120e69dd2b /osdep/macosx_compat.h
parent78b3852f7ec7b4c8df72646e313535acacae1fd9 (diff)
downloadmpv-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.h25
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;