[vlc-commits] macOS: Add compatibility typedef for NSWindowStyleMask
Marvin Scholz
git at videolan.org
Thu Mar 16 11:14:23 CET 2017
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Thu Mar 16 11:13:51 2017 +0100| [095642c60e7de64fe4b05b27339242016d3f05a2] | committer: Marvin Scholz
macOS: Add compatibility typedef for NSWindowStyleMask
NSWindowStyleMask was introduced in 10.12 SDK, and used for methods like
`initWithContentRect:styleMask:` which before 10.12 used NSUInteger.
Continuing to use NSUInteger works but causes a warning when compiling
with 10.12 SDK.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=095642c60e7de64fe4b05b27339242016d3f05a2
---
modules/gui/macosx/CompatibilityFixes.h | 2 ++
modules/gui/macosx/Windows.m | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/gui/macosx/CompatibilityFixes.h b/modules/gui/macosx/CompatibilityFixes.h
index 0c3e669..0b2f933 100644
--- a/modules/gui/macosx/CompatibilityFixes.h
+++ b/modules/gui/macosx/CompatibilityFixes.h
@@ -51,4 +51,6 @@ typedef NS_OPTIONS(NSUInteger, NSStatusItemBehavior) {
@end
+typedef NSUInteger NSWindowStyleMask;
+
#endif
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 6b9f005..b430866 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -46,7 +46,7 @@
@implementation VLCWindow
-- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask
+- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)styleMask
backing:(NSBackingStoreType)backingType defer:(BOOL)flag
{
self = [super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag];
@@ -229,7 +229,7 @@
#pragma mark -
#pragma mark Init
-- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask
+- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)styleMask
backing:(NSBackingStoreType)backingType defer:(BOOL)flag
{
_darkInterface = config_GetInt(getIntf(), "macosx-interfacestyle");
More information about the vlc-commits
mailing list