From: Faustino Osuna Date: Fri, 4 Jan 2008 16:23:53 +0000 (+0000) Subject: MacOSX/Framework: Remove all references to fullscreen mode, it should be the host... X-Git-Tag: 0.9.0-test0~3664 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=11c628ea4029c846d85753ee2ba92c2808d7e2b2;p=vlc MacOSX/Framework: Remove all references to fullscreen mode, it should be the host application's responsibility to transition between fullscreen and window mode. --- diff --git a/extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h b/extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h index accd6a87d3..e11dcf2ab6 100644 --- a/extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h +++ b/extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h @@ -93,9 +93,6 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); - (void)setVideoView:(VLCVideoView *)aVideoView; - (void)setVideoLayer:(VLCVideoLayer *)aVideoLayer; -- (void)setFullscreen:(BOOL)value; -- (BOOL)fullscreen; - - (void)setVideoAspectRatio:(char *)value; - (char *)videoAspectRatio; - (void)setVideoSubTitles:(int)value; diff --git a/extras/MacOSX/Framework/Headers/Public/VLCVideoView.h b/extras/MacOSX/Framework/Headers/Public/VLCVideoView.h index 33137758fd..66f782a827 100644 --- a/extras/MacOSX/Framework/Headers/Public/VLCVideoView.h +++ b/extras/MacOSX/Framework/Headers/Public/VLCVideoView.h @@ -24,30 +24,19 @@ #import #import -@class CALayer; - -/* Notifications */ -extern NSString * VLCVideoViewEnteredFullScreen; -extern NSString * VLCVideoViewLeftFullScreen; -@protocol VLCVideoViewDelegate -// Notifications defined in VLCVideoView.h -- (void)videoEnteredFullscreen:(NSNotification *)aNotification; -- (void)videoLeftFullscreen:(NSNotification *)aNotification; -@end +@class CALayer; @interface VLCVideoView : NSView { id delegate; NSColor * backColor; BOOL stretchesVideo; - BOOL fullScreen; id layoutManager; // TODO: Allow for view to report transparency to do some cool effects // with the video? } -@property BOOL fullScreen; @property BOOL fillScreen; - (void)setDelegate:(id)value; @@ -55,12 +44,4 @@ extern NSString * VLCVideoViewLeftFullScreen; - (void)setBackColor:(NSColor *)value; - (NSColor *)backColor; - -- (void)enterFullscreen; -- (void)leaveFullscreen; - -//- (void)setOnTop: (BOOL)ontop; /* Do we really want that in protocol? */ - -// The media controls that were here previously should be moved elsewhere. This -// View is just that, a view not a controller. -- Moved to VLCMediaPlayer @end diff --git a/extras/MacOSX/Framework/Sources/VLCMediaPlayer.m b/extras/MacOSX/Framework/Sources/VLCMediaPlayer.m index ee3796e686..5cab52e59c 100644 --- a/extras/MacOSX/Framework/Sources/VLCMediaPlayer.m +++ b/extras/MacOSX/Framework/Sources/VLCMediaPlayer.m @@ -204,20 +204,6 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * [self setDrawable: aVideoLayer]; } -- (void)setFullscreen:(BOOL)value -{ - libvlc_set_fullscreen(instance, value, NULL); -} - -- (BOOL)fullscreen -{ - libvlc_exception_t ex; - libvlc_exception_init( &ex ); - int result = libvlc_get_fullscreen( instance, &ex ); - catch_exception( &ex ); - return result; -} - - (void)setVideoAspectRatio:(char *)value { libvlc_video_set_aspect_ratio( instance, value, NULL ); diff --git a/extras/MacOSX/Framework/Sources/VLCVideoView.m b/extras/MacOSX/Framework/Sources/VLCVideoView.m index 34b6f7a7a0..f58c4edcd6 100644 --- a/extras/MacOSX/Framework/Sources/VLCVideoView.m +++ b/extras/MacOSX/Framework/Sources/VLCVideoView.m @@ -32,10 +32,6 @@ #import -/* Notifications */ -NSString * VLCVideoViewEnteredFullScreen = @"VLCVideoViewEnteredFullScreen"; -NSString * VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; - /****************************************************************************** * Soon deprecated stuff */ @@ -146,26 +142,6 @@ NSString * VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; [[self layer] setNeedsLayout]; } -- (BOOL)fullScreen -{ - return fullScreen; -} - -- (void)setFullScreen:(BOOL)newFullScreen -{ - if( newFullScreen ) - { - fullScreen = YES; - [self enterFullscreen]; - } - else - { - fullScreen = NO; - [self leaveFullscreen]; - } -} - - - (id)initWithFrame:(NSRect)rect { if (self = [super initWithFrame:rect]) @@ -212,33 +188,6 @@ NSString * VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; return backColor; } -/* This is a LibVLC notification that we're about to enter into full screen, - there is no other place where I can see where we can trap this event */ -- (void)enterFullscreen -{ - // Go ahead and send a notification to the world we're going into full screen - [[VLCEventManager sharedManager] callOnMainThreadDelegateOfObject:self - withDelegateMethod:nil - withNotificationName:VLCVideoViewEnteredFullScreen]; - - [super enterFullScreenMode:[[self window] screen] withOptions:nil]; - if( !self.fullScreen ) self.fullScreen = YES; -} - -/* This is a LibVLC notification that we're about to enter leaving full screen, - there is no other place where I can see where we can trap this event */ -- (void)leaveFullscreen -{ - // Go ahead and send a notification to the world we're leaving full screen - [[VLCEventManager sharedManager] callOnMainThreadDelegateOfObject:self - withDelegateMethod:nil - withNotificationName:VLCVideoViewLeftFullScreen]; - - // There is nothing else to do, as this object strictly displays the video feed - [super exitFullScreenModeWithOptions:nil]; - if( self.fullScreen ) self.fullScreen = NO; -} - - (void)drawRect:(NSRect)aRect { [self lockFocus]; @@ -251,16 +200,6 @@ NSString * VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; { return YES; } - -- (void)mouseDown:(NSEvent *)theEvent -{ - if([theEvent clickCount] != 2) - return; - if(self.fullScreen) - [self leaveFullscreen]; - else - [self enterFullscreen]; -} @end /******************************************************************************