VarBox &rVoutSize = VlcProc::instance( pIntf )->getVoutSizeVar();
rVoutSize.addObserver( this );
}
+
+ VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
+ rFullscreen.addObserver( this );
}
VarBox &rVoutSize = VlcProc::instance( getIntf() )->getVoutSizeVar();
rVoutSize.delObserver( this );
+ VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
+ rFullscreen.delObserver( this );
+
//m_pLayout->getActiveVar().delObserver( this );
}
m_pLayout->getActiveVar().get() );
}
- m_bIsUseable = isVisible() && m_pLayout->getActiveVar().get();
+ VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
+ if( &rVariable == &rFullscreen )
+ {
+ msg_Dbg( getIntf(), "VideoCtrl : fullscreen toggled (fullscreen = %d)",
+ rFullscreen.get() );
+ }
+
+ m_bIsUseable = isVisible() &&
+ m_pLayout->getActiveVar().get() &&
+ !rFullscreen.get();
if( m_bIsUseable && !isUsed() )
{
SET_BOOL( m_cVarEqualizer, b_equalizer );
}
+void VlcProc::setFullscreenVar( bool b_fullscreen )
+{
+ SET_BOOL( m_cVarFullscreen, b_fullscreen );
+}
+
#undef SET_BOOL
#undef SET_STREAMTIME
#undef SET_TEXT
/// Getter for the vout size variable
VarBox &getVoutSizeVar() { return m_varVoutSize; }
+ /// Getter/Setter for the fullscreen variable
+ VarBool &getFullscreenVar() { return *((VarBool*)(m_cVarFullscreen.get())); }
+ void setFullscreenVar( bool );
+
/// Indicate whether the embedded video output is currently used
bool isVoutUsed() const { return m_pVout != NULL; }
m_pCtrlVideoVecBackup(), m_SavedWndVec()
{
m_pVoutMainWindow = new VoutMainWindow( getIntf() );
+
+ OSFactory *pOsFactory = OSFactory::instance( getIntf() );
+ int width = pOsFactory->getScreenWidth();
+ int height = pOsFactory->getScreenHeight();
+
+ m_pVoutMainWindow->move( 0, 0 );
+ m_pVoutMainWindow->resize( width, height );
}
void VoutManager::setFullscreenWnd( vout_window_t *pWnd, bool b_fullscreen )
{
- msg_Dbg( pWnd, "setFullscreen (%d) received from vout thread",
- b_fullscreen ? 1 : 0 );
+ msg_Dbg( pWnd, "setFullscreen (%d) received from vout thread",
+ b_fullscreen ? 1 : 0 );
- vector<SavedWnd>::iterator it;
- for( it = m_SavedWndVec.begin(); it != m_SavedWndVec.end(); it++ )
- {
- if( (*it).pWnd == pWnd )
- {
- VoutWindow* pVoutWindow = (*it).pVoutWindow;
+ VlcProc::instance( getIntf() )->setFullscreenVar( b_fullscreen );
- pVoutWindow->setFullscreen( b_fullscreen );
- break;
- }
+ if( b_fullscreen )
+ {
+ m_pVoutMainWindow->show();
+ }
+ else
+ {
+ m_pVoutMainWindow->hide();
}
}
}
else
{
- hide();
+ int w = VoutManager::instance( getIntf() )->getVoutMainWindow()->getWidth();
+ int h = VoutManager::instance( getIntf() )->getVoutMainWindow()->getHeight();
+
setParent( VoutManager::instance( getIntf() )->getVoutMainWindow(),
- 0, 0, 0, 0 );
+ 0, 0, w, h );
m_pParentWindow =
VoutManager::instance( getIntf() )->getVoutMainWindow();
}