Commit b8e3c1ea authored by Felix Paul Kühne's avatar Felix Paul Kühne

* added an option to the apple script binding to check for windowed or...

* added an option to the apple script binding to check for windowed or fullscreen mode. Patch by Martin Kahr <martin --att-- martinkahr com>
parent ca2dd274
......@@ -6,6 +6,26 @@
<string>vlc</string>
<key>AppleEventCode</key>
<string>VLC#</string>
<key>Classes</key>
<dict>
<key>VLCApplication</key>
<dict>
<key>AppleEventCode</key>
<string>capp</string>
<key>Attributes</key>
<dict>
<key>scriptFullscreenMode</key>
<dict>
<key>AppleEventCode</key>
<string>pFsC</string>
<key>Type</key>
<string>NSNumber&lt;Bool&gt;</string>
</dict>
</dict>
<key>Superclass</key>
<string>NSCoreSuite.NSApplication</string>
</dict>
</dict>
<key>Commands</key>
<dict>
<key>OpenURL</key>
......
......@@ -6,6 +6,28 @@
<string>VLC suite</string>
<key>Description</key>
<string>VLC commands.</string>
<key>Classes</key>
<dict>
<key>VLCApplication</key>
<dict>
<key>Description</key>
<string>VLC's top level scripting object</string>
<key>Name</key>
<string>application</string>
<key>PluralName</key>
<string>applications</string>
<key>Attributes</key>
<dict>
<key>scriptFullscreenMode</key>
<dict>
<key>Description</key>
<string>indicates wheter fullscreen is enabled or not</string>
<key>Name</key>
<string>fullscreen mode</string>
</dict>
</dict>
</dict>
</dict>
<key>Commands</key>
<dict>
<key>OpenURL</key>
......
......@@ -78,6 +78,9 @@
- (IBAction)mute:(id)sender;
- (IBAction)volumeSliderUpdated:(id)sender;
- (IBAction)showPosition: (id)sender;
- (IBAction)toogleFullscreen:(id)sender;
- (BOOL) isFullscreen;
- (IBAction)windowAction:(id)sender;
- (BOOL)keyEvent:(NSEvent *)o_event;
......
......@@ -383,6 +383,33 @@
[o_main manageVolumeSlider];
}
- (IBAction)showPosition: (id)sender
{
vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if( p_vout != NULL )
{
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-position" );
var_Set( p_intf, "key-pressed", val );
}
}
- (IBAction)toogleFullscreen:(id)sender {
NSMenuItem *o_mi = [[NSMenuItem alloc] initWithTitle: _NS("Fullscreen") action: nil keyEquivalent:@""];
[self windowAction: [o_mi autorelease]];
}
- (BOOL) isFullscreen {
id o_vout_view = [self getVoutView];
if( o_vout_view )
{
return [o_vout_view isFullscreen];
}
return NO;
}
- (IBAction)windowAction:(id)sender
{
NSString *o_title = [sender title];
......
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