]> git.sesse.net Git - vlc/commitdiff
* added an option to the apple script binding to check for windowed or fullscreen...
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 27 Nov 2006 21:11:47 +0000 (21:11 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 27 Nov 2006 21:11:47 +0000 (21:11 +0000)
extras/MacOSX/Resources/vlc.scriptSuite
extras/MacOSX/Resources/vlc.scriptTerminology
modules/gui/macosx/controls.h
modules/gui/macosx/controls.m

index fbea7a66a72c5ef0d34a7eff0a5856c5733dcb23..25cd6e357da8d1123603a5221bc6ff531fbf97d0 100644 (file)
@@ -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>
index 498fecc43bbd10544f33b0032201de494c448a7a..f3557d63d21c187f92cce8607aba6bcf4a36a0c7 100644 (file)
@@ -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>
index cd5ab7d7d5ced281c1d37968972ac84b5c514fda..cc7111597bbb0f5fb3bdcf8ac632e8e5326ae549 100644 (file)
@@ -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;
 
index 0f53bff28c4054067873b462de31bbf933473650..47ed015d36f6e8070276fac6f6cf09b5bb071bc7 100644 (file)
     [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];