vlc | branch: master | Felix Paul Kühne <fe...@feepk.net> | Sun Jun 10 14:00:27 2018 +0200| [a6e1e1b01c74ee0ad21f880ad02d2ce674585c2f] | committer: Felix Paul Kühne
macosx: require SDK macOS 10.12.2 or later for compilation > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a6e1e1b01c74ee0ad21f880ad02d2ce674585c2f --- modules/gui/macosx/CompatibilityFixes.h | 68 ---------------------------- modules/gui/macosx/VLCInputManager.m | 2 - modules/gui/macosx/VLCRemoteControlService.m | 5 +- modules/gui/macosx/VLCSliderCell.m | 9 ---- modules/gui/macosx/misc.h | 17 +------ 5 files changed, 3 insertions(+), 98 deletions(-) diff --git a/modules/gui/macosx/CompatibilityFixes.h b/modules/gui/macosx/CompatibilityFixes.h index 759219fc64..7e91054cfd 100644 --- a/modules/gui/macosx/CompatibilityFixes.h +++ b/modules/gui/macosx/CompatibilityFixes.h @@ -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); diff --git a/modules/gui/macosx/VLCInputManager.m b/modules/gui/macosx/VLCInputManager.m index 5de9ee6523..2a2af7e00a 100644 --- a/modules/gui/macosx/VLCInputManager.m +++ b/modules/gui/macosx/VLCInputManager.m @@ -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; diff --git a/modules/gui/macosx/VLCRemoteControlService.m b/modules/gui/macosx/VLCRemoteControlService.m index 5e139b810a..04d0fe2bcd 100644 --- a/modules/gui/macosx/VLCRemoteControlService.m +++ b/modules/gui/macosx/VLCRemoteControlService.m @@ -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) diff --git a/modules/gui/macosx/VLCSliderCell.m b/modules/gui/macosx/VLCSliderCell.m index d475b0b47a..9543b842de 100644 --- a/modules/gui/macosx/VLCSliderCell.m +++ b/modules/gui/macosx/VLCSliderCell.m @@ -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 diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h index d3c68eccb9..796e4680e5 100644 --- a/modules/gui/macosx/misc.h +++ b/modules/gui/macosx/misc.h @@ -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 _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits