Commit b095d5f2 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/Framework/VLCVideoView.m: Capitalize the s in FullScreen.

parent 7758266f
...@@ -41,13 +41,13 @@ extern NSString * VLCVideoViewLeftFullScreen; ...@@ -41,13 +41,13 @@ extern NSString * VLCVideoViewLeftFullScreen;
id delegate; id delegate;
NSColor * backColor; NSColor * backColor;
BOOL stretchesVideo; BOOL stretchesVideo;
BOOL fullscreen; BOOL fullScreen;
id layoutManager; id layoutManager;
// TODO: Allow for view to report transparency to do some cool effects // TODO: Allow for view to report transparency to do some cool effects
// with the video? // with the video?
} }
@property (readonly, assign) BOOL fullscreen; @property BOOL fullScreen;
@property BOOL fillScreen; @property BOOL fillScreen;
- (void)setDelegate:(id)value; - (void)setDelegate:(id)value;
......
...@@ -59,10 +59,6 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; ...@@ -59,10 +59,6 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen";
/****************************************************************************** /******************************************************************************
* VLCVideoView (Private) * VLCVideoView (Private)
*/ */
@interface VLCVideoView ()
/* Property */
@property (readwrite, assign) BOOL fullscreen;
@end
@interface VLCVideoView (Private) @interface VLCVideoView (Private)
/* Method */ /* Method */
...@@ -141,7 +137,6 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; ...@@ -141,7 +137,6 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen";
*/ */
@implementation VLCVideoView @implementation VLCVideoView
@synthesize fullscreen;
- (BOOL)fillScreen - (BOOL)fillScreen
{ {
...@@ -153,6 +148,25 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; ...@@ -153,6 +148,25 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen";
[[self layer] setNeedsLayout]; [[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 - (id)initWithFrame:(NSRect)rect
{ {
...@@ -210,7 +224,7 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; ...@@ -210,7 +224,7 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen";
withNotificationName:VLCVideoViewEnteredFullScreen]; withNotificationName:VLCVideoViewEnteredFullScreen];
[super enterFullScreenMode:[[self window] screen] withOptions:nil]; [super enterFullScreenMode:[[self window] screen] withOptions:nil];
self.fullscreen = YES; if( !self.fullScreen ) self.fullScreen = YES;
} }
/* This is a LibVLC notification that we're about to enter leaving full screen, /* This is a LibVLC notification that we're about to enter leaving full screen,
...@@ -224,7 +238,7 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; ...@@ -224,7 +238,7 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen";
// There is nothing else to do, as this object strictly displays the video feed // There is nothing else to do, as this object strictly displays the video feed
[super exitFullScreenModeWithOptions:nil]; [super exitFullScreenModeWithOptions:nil];
self.fullscreen = NO; if( self.fullScreen ) self.fullScreen = NO;
} }
- (void)drawRect:(NSRect)aRect - (void)drawRect:(NSRect)aRect
...@@ -244,7 +258,7 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; ...@@ -244,7 +258,7 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen";
{ {
if([theEvent clickCount] != 2) if([theEvent clickCount] != 2)
return; return;
if(self.fullscreen) if(self.fullScreen)
[self leaveFullscreen]; [self leaveFullscreen];
else else
[self enterFullscreen]; [self enterFullscreen];
......
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