1 /*****************************************************************************
2 * CompatibilityFixes.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2011-2017 VLC authors and VideoLAN
7 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
8 * Marvin Scholz <epirat07 -at- gmail -dot- com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #import <Cocoa/Cocoa.h>
28 #pragma OS detection code
29 #define OSX_LION_AND_HIGHER (NSAppKitVersionNumber >= 1115.2)
30 #define OSX_MOUNTAIN_LION_AND_HIGHER (NSAppKitVersionNumber >= 1162)
31 #define OSX_MAVERICKS_AND_HIGHER (NSAppKitVersionNumber >= 1244)
32 #define OSX_YOSEMITE_AND_HIGHER (NSAppKitVersionNumber >= 1334)
33 #define OSX_EL_CAPITAN_AND_HIGHER (NSAppKitVersionNumber >= 1404)
34 #define OSX_SIERRA_AND_HIGHER (NSAppKitVersionNumber >= 1485)
37 #ifndef MAC_OS_X_VERSION_10_12
39 typedef NS_OPTIONS(NSUInteger, NSStatusItemBehavior) {
41 NSStatusItemBehaviorRemovalAllowed = (1 << 1),
42 NSStatusItemBehaviorTerminationOnRemoval = (1 << 2),
45 @interface NSStatusItem(IntroducedInSierra)
47 @property (assign) NSStatusItemBehavior behavior;
48 @property (assign, getter=isVisible) BOOL visible;
49 @property (null_resettable, copy) NSString *autosaveName;
53 typedef NSUInteger NSWindowStyleMask;
57 void swapoutOverride(Class cls, SEL selector);