Commit 639a14dc authored by Felix Paul Kühne's avatar Felix Paul Kühne

* more info about the applescript addition:

you can also do the following now:

<tell app "VLC" to set fullscreen mode to true>, thus you also got write access ;)


Sorry, I just forgot to commit these obvious files in [18115].
parent 92c36210
......@@ -31,4 +31,14 @@
* VLControlScriptCommand interface
*****************************************************************************/
@interface VLControlScriptCommand : NSScriptCommand
@end
/*****************************************************************************
* Category that adds AppleScript support to NSApplication
*****************************************************************************/
@interface NSApplication(ScriptSupport)
- (BOOL) scriptFullscreenMode;
- (void) setScriptFullscreenMode: (BOOL) mode;
@end
\ No newline at end of file
......@@ -122,8 +122,7 @@
}
else if ( [o_command isEqualToString:@"fullscreen"] )
{
NSMenuItem *o_mi = [[NSMenuItem alloc] initWithTitle: _NS("Fullscreen") action: nil keyEquivalent:@""];
[o_controls windowAction:[o_mi autorelease]];
[o_controls toogleFullscreen: self];
return nil;
}
else if ( [o_command isEqualToString:@"mute"] )
......@@ -147,3 +146,21 @@
}
@end
/*****************************************************************************
* Category that adds AppleScript support to NSApplication
*****************************************************************************/
@implementation NSApplication(ScriptSupport)
- (BOOL) scriptFullscreenMode {
VLCControls * o_controls = (VLCControls *)[[self delegate] getControls];
return [o_controls isFullscreen];
}
- (void) setScriptFullscreenMode: (BOOL) mode {
VLCControls * o_controls = (VLCControls *)[[self delegate] getControls];
if (mode == [o_controls isFullscreen]) return;
[o_controls toogleFullscreen: self];
}
@end
\ No newline at end of file
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