Commit 555be297 authored by Faustino Osuna's avatar Faustino Osuna

MacOSX/VLC_app: Make application responsible for window to fullscreen transition.

parent 11c628ea
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
NSString * nodeKeyPath; NSString * nodeKeyPath;
NSString * contentKeyPath; NSString * contentKeyPath;
id selectedObject; id selectedObject;
BOOL fullScreen;
/* Actions on non-node items*/ /* Actions on non-node items*/
id target; id target;
...@@ -51,6 +52,8 @@ ...@@ -51,6 +52,8 @@
@property (readonly, retain) id selectedObject; @property (readonly, retain) id selectedObject;
@property (readwrite) BOOL fullScreen;
/* Set up a specific action to do, on items that don't have node. /* Set up a specific action to do, on items that don't have node.
* action first argument is the browsableVideoView. You can get the selected object, * action first argument is the browsableVideoView. You can get the selected object,
* with -selectedObject */ * with -selectedObject */
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
- (NSArray *)itemsTree { - (NSArray *)itemsTree {
return itemsTree; return itemsTree;
} }
- (void)setItemsTree:(NSArray *)newItemsTree - (void)setItemsTree:(NSArray *)newItemsTree
{ {
[itemsTree release]; [itemsTree release];
...@@ -69,6 +70,26 @@ ...@@ -69,6 +70,26 @@
[self changeSelectedPath:[[[NSIndexPath alloc] init] autorelease] withSelectedIndex:0]; [self changeSelectedPath:[[[NSIndexPath alloc] init] autorelease] withSelectedIndex:0];
} }
- (BOOL)fullScreen
{
return [super isInFullScreenMode];
}
- (void)setFullScreen:(BOOL)newFullScreen
{
if( newFullScreen == self.fullScreen )
return;
if( newFullScreen )
{
[super enterFullScreenMode:[[self window] screen] withOptions:nil];
}
else
{
[super exitFullScreenModeWithOptions:nil];
}
}
/* Initializer */ /* Initializer */
- (void)awakeFromNib - (void)awakeFromNib
{ {
...@@ -85,7 +106,6 @@ ...@@ -85,7 +106,6 @@
//[self changeSelectedIndex:0]; //[self changeSelectedIndex:0];
} }
/* Hiding/Displaying the menu */ /* Hiding/Displaying the menu */
- (void)hideMenu - (void)hideMenu
...@@ -157,6 +177,14 @@ ...@@ -157,6 +177,14 @@
[self changeSelectedIndex:selectedIndex+1]; [self changeSelectedIndex:selectedIndex+1];
} }
- (void)mouseDown:(NSEvent *)theEvent
{
if([theEvent clickCount] != 2)
return;
self.fullScreen = !self.fullScreen;
}
- (void)keyDown:(NSEvent *)theEvent - (void)keyDown:(NSEvent *)theEvent
{ {
if(([[theEvent charactersIgnoringModifiers] characterAtIndex:0] == 13) && menuDisplayed) if(([[theEvent charactersIgnoringModifiers] characterAtIndex:0] == 13) && menuDisplayed)
......
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