Commit a6e1e1b0 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: require SDK macOS 10.12.2 or later for compilation

parent c38dd543
......@@ -32,72 +32,4 @@
#define OSX_HIGH_SIERRA_AND_HIGHER (NSAppKitVersionNumber >= 1560)
#define OSX_MOJAVE_AND_HIGHER (NSAppKitVersionNumber >= 1639.10)
// Sierra only APIs
#ifndef MAC_OS_X_VERSION_10_12
typedef NS_OPTIONS(NSUInteger, NSStatusItemBehavior) {
NSStatusItemBehaviorRemovalAllowed = (1 << 1),
NSStatusItemBehaviorTerminationOnRemoval = (1 << 2),
};
@interface NSStatusItem(IntroducedInSierra)
@property (assign) NSStatusItemBehavior behavior;
@property (assign, getter=isVisible) BOOL visible;
@property (null_resettable, copy) NSString *autosaveName;
@end
typedef NSUInteger NSWindowStyleMask;
#endif
#ifndef MAC_OS_X_VERSION_10_12_2
typedef NS_ENUM(NSUInteger, MPNowPlayingInfoMediaType) {
MPNowPlayingInfoMediaTypeNone = 0,
MPNowPlayingInfoMediaTypeAudio,
MPNowPlayingInfoMediaTypeVideo,
};
typedef NS_ENUM(NSUInteger, MPNowPlayingPlaybackState) {
MPNowPlayingPlaybackStateUnknown = 0,
MPNowPlayingPlaybackStatePlaying,
MPNowPlayingPlaybackStatePaused,
MPNowPlayingPlaybackStateStopped,
MPNowPlayingPlaybackStateInterrupted
};
NSString * const MPNowPlayingInfoPropertyElapsedPlaybackTime;
NSString * const MPNowPlayingInfoPropertyPlaybackRate;
NSString * const MPNowPlayingInfoPropertyDefaultPlaybackRate;
NSString * const MPNowPlayingInfoPropertyPlaybackQueueIndex;
NSString * const MPNowPlayingInfoPropertyPlaybackQueueCount;
NSString * const MPNowPlayingInfoPropertyChapterNumber;
NSString * const MPNowPlayingInfoPropertyChapterCount
NSString * const MPNowPlayingInfoPropertyIsLiveStream;
NSString * const MPNowPlayingInfoPropertyAvailableLanguageOptions;
NSString * const MPNowPlayingInfoPropertyCurrentLanguageOptions;
NSString * const MPNowPlayingInfoCollectionIdentifier;
NSString * const MPNowPlayingInfoPropertyExternalContentIdentifier;
NSString * const MPNowPlayingInfoPropertyExternalUserProfileIdentifier
NSString * const MPNowPlayingInfoPropertyServiceIdentifier;
NSString * const MPNowPlayingInfoPropertyPlaybackProgress
NSString * const MPNowPlayingInfoPropertyMediaType
NSString * const MPNowPlayingInfoPropertyAssetURL;
NSString * const MPNowPlayingInfoPropertyCurrentPlaybackDate;
@interface MPNowPlayingInfoCenter : NSObject
+ (MPNowPlayingInfoCenter *)defaultCenter;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
@property (nonatomic, copy, nullable) NSDictionary<NSString *, id> *nowPlayingInfo;
@property (nonatomic) MPNowPlayingPlaybackState playbackState MP_API(macos(10.12.2));
@end
#endif
void swapoutOverride(Class _Nonnull cls, SEL _Nonnull selector);
......@@ -39,9 +39,7 @@
#import "iTunes.h"
#import "Spotify.h"
#ifdef MAC_OS_X_VERSION_10_12_2
#import <MediaPlayer/MediaPlayer.h>
#endif
@interface VLCInputManager()
- (void)updateMainMenu;
......
......@@ -22,12 +22,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <MediaPlayer/MediaPlayer.h>
#import "VLCRemoteControlService.h"
#import "VLCCoreInteraction.h"
#import "VLCMain.h"
#ifdef MAC_OS_X_VERSION_10_12_2
#import <MediaPlayer/MediaPlayer.h>
#endif
#import "CompatibilityFixes.h"
#define kVLCSettingPlaybackForwardSkipLength @(60)
......
......@@ -167,11 +167,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
- (NSRect)knobRectFlipped:(BOOL)flipped
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
// This is our own implementation, so no need to guard it on < 10.9
NSRect barRect = [self barRectFlipped:NO];
#pragma clang diagnostic pop
CGFloat knobThickness = barRect.size.height;
double val = [self myNormalizedDouble];
......@@ -207,11 +203,6 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
[NSGraphicsContext restoreGraphicsState];
}
- (NSRect)barRectFlipped:(BOOL)flipped
{
return [[self controlView] bounds];
}
- (void)drawBarInside:(NSRect)rect flipped:(BOOL)flipped
{
// Inset rect
......
......@@ -98,21 +98,6 @@
* VLCByteCountFormatter addition
*****************************************************************************/
#ifndef MAC_OS_X_VERSION_10_8
enum {
// Specifies display of file or storage byte counts. The actual behavior for this is platform-specific; on OS X 10.7 and less, this uses the binary style, but decimal style on 10.8 and above
NSByteCountFormatterCountStyleFile = 0,
// Specifies display of memory byte counts. The actual behavior for this is platform-specific; on OS X 10.7 and less, this uses the binary style, but that may change over time.
NSByteCountFormatterCountStyleMemory = 1,
// The following two allow specifying the number of bytes for KB explicitly. It's better to use one of the above values in most cases.
NSByteCountFormatterCountStyleDecimal = 2, // 1000 bytes are shown as 1 KB
NSByteCountFormatterCountStyleBinary = 3 // 1024 bytes are shown as 1 KB
};
typedef NSInteger NSByteCountFormatterCountStyle;
#endif
@interface VLCByteCountFormatter : NSFormatter {
}
@interface VLCByteCountFormatter : NSFormatter
+ (NSString *)stringFromByteCount:(long long)byteCount countStyle:(NSByteCountFormatterCountStyle)countStyle;
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment