Commit 81833785 authored by Cyril Deguet's avatar Cyril Deguet

* all: new skin variable "vlc.isFullscreen" (guess what it does ;)

parent b5b707f0
......@@ -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>
......
......@@ -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 );
}
......
......@@ -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;
......
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