]> git.sesse.net Git - vlc/commitdiff
* all: new skin variable "vlc.isFullscreen" (guess what it does ;)
authorCyril Deguet <asmax@videolan.org>
Sun, 19 Feb 2006 15:37:05 +0000 (15:37 +0000)
committerCyril Deguet <asmax@videolan.org>
Sun, 19 Feb 2006 15:37:05 +0000 (15:37 +0000)
doc/skins/skins2-howto.xml
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.hpp

index 5c1311aa36f1dafedb7c4b0f9fdf0dddf52d2e5c..a8bdb6633e03dee09b13f42e931cacb3c43b1508 100644 (file)
@@ -939,6 +939,9 @@ difficulty to understand how VLC skins work.</para>
   <listitem><para>
     <emphasis>equalizer.isEnabled</emphasis>: True if the equalizer audio filter is enabled (since VLC 0.8.5).
   </para></listitem>
+  <listitem><para>
+    <emphasis>vlc.isFullscreen</emphasis>: True when the video is in fullscreen mode (since VLV 0.8.5).
+  </para></listitem>
   <listitem><para>
     <emphasis>vlc.isPlaying</emphasis>: True when VLC is playing, false otherwise.
   </para></listitem>
index 596fb16856359b59480240696c83ec14cca24672..e3f5c05357621f600a4ebedb246e1c3f17e5d1cb 100644 (file)
@@ -101,6 +101,7 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
     REGISTER_VAR( m_cVarEqualizer, VarBoolImpl, "equalizer.isEnabled" )
     REGISTER_VAR( m_cVarEqPreamp, EqualizerPreamp, "equalizer.preamp" )
     REGISTER_VAR( m_cVarDvdActive, VarBoolImpl, "dvd.isActive" )
+    REGISTER_VAR( m_cVarFullscreen, VarBoolImpl, "vlc.isFullscreen" )
 #undef REGISTER_VAR
     m_cVarStreamName = VariablePtr( new VarText( getIntf(), false ) );
     pVarManager->registerVar( m_cVarStreamName, "streamName" );
@@ -235,11 +236,12 @@ void VlcProc::manage()
     VarBoolImpl *pVarLoop = (VarBoolImpl*)m_cVarLoop.get();
     VarBoolImpl *pVarRepeat = (VarBoolImpl*)m_cVarRepeat.get();
     VarBoolImpl *pVarDvdActive = (VarBoolImpl*)m_cVarDvdActive.get();
+    VarBoolImpl *pVarFullscreen = (VarBoolImpl*)m_cVarFullscreen.get();
 
     // Refresh audio variables
     refreshAudio();
 
-   // Update the input
+    // Update the input
     if( getIntf()->p_sys->p_input == NULL )
     {
         getIntf()->p_sys->p_input = getIntf()->p_sys->p_playlist->p_input;
@@ -276,6 +278,15 @@ void VlcProc::manage()
         var_Change( pInput, "chapter", VLC_VAR_CHOICESCOUNT,
                     &chapters_count, NULL );
         pVarDvdActive->set( chapters_count.i_int > 0 );
+
+        // Refresh fullscreen status
+        vout_thread_t *pVout = (vout_thread_t *)vlc_object_find( pInput,
+                VLC_OBJECT_VOUT, FIND_CHILD );
+        if( pVout )
+        {
+            pVarFullscreen->set( pVout->b_fullscreen );
+            vlc_object_release( pVout );
+        }
     }
     else
     {
@@ -285,6 +296,7 @@ void VlcProc::manage()
         pVarSeekable->set( false );
         pVarDvdActive->set( false );
         pTime->set( 0, false );
+        pVarFullscreen->set( false );
     }
 
     // Refresh the random variable
@@ -299,6 +311,8 @@ void VlcProc::manage()
     // Refresh the repeat variable
     var_Get( getIntf()->p_sys->p_playlist, "repeat", &val );
     pVarRepeat->set( val.b_bool != 0 );
+
+
 }
 
 
index 09cac396a886c4cafa44dcf3d9f1b504d04358d7..aef2f50a9ef22da2d06590f4587ed8f7715b962c 100644 (file)
@@ -117,7 +117,8 @@ class VlcProc: public SkinObject
         VariablePtr m_cVarStopped;
         VariablePtr m_cVarPaused;
         VariablePtr m_cVarSeekable;
-        /// Variable for the vout
+        /// Variables related to the vout
+        VariablePtr m_cVarFullscreen;
         VarBox m_varVoutSize;
         /// Equalizer variables
         EqualizerBands m_varEqBands;