]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/commands/cmd_resize.cpp
skins2: rework of vout manager
[vlc] / modules / gui / skins2 / commands / cmd_resize.cpp
index 2180ed52ee6a754f4a73d3124318f3d420fc393a..93a439d981cca5b8ef70f9248194e8655714bd83 100644 (file)
 
 #include "cmd_resize.hpp"
 #include "../src/generic_layout.hpp"
-#include "../src/window_manager.hpp"
 #include "../src/vlcproc.hpp"
-#include "../src/vout_window.hpp"
+#include "../src/window_manager.hpp"
+#include "../src/vout_manager.hpp"
 #include "../controls/ctrl_video.hpp"
-#include <vlc_vout.h>
 
 
 CmdResize::CmdResize( intf_thread_t *pIntf, const WindowManager &rWindowManager,
@@ -46,39 +45,46 @@ void CmdResize::execute()
 }
 
 
-CmdResizeVout::CmdResizeVout( intf_thread_t *pIntf, VoutWindow *pVoutWindow,
-                              int width, int height ):
-    CmdGeneric( pIntf ), m_pVoutWindow( pVoutWindow ), m_width( width ),
-    m_height( height )
+
+CmdResizeInnerVout::CmdResizeInnerVout( intf_thread_t *pIntf,
+                    CtrlVideo* pCtrlVideo )
+         : CmdGeneric( pIntf ), m_pCtrlVideo( pCtrlVideo )
 {
 }
 
 
-void CmdResizeVout::execute()
+void CmdResizeInnerVout::execute()
 {
-    if( m_pVoutWindow )
-    {
-        m_pVoutWindow->setOriginalWidth( m_width );
-        m_pVoutWindow->setOriginalHeight( m_height );
-
-        CtrlVideo* pCtrlVideo = m_pVoutWindow->getCtrlVideo();
-        if( pCtrlVideo )
-        {
-            pCtrlVideo->resizeControl( m_width, m_height );
-        }
-    }
+    m_pCtrlVideo->resizeInnerVout();
 }
 
 
-CmdResizeInnerVout::CmdResizeInnerVout( intf_thread_t *pIntf,
-                    CtrlVideo* pCtrlVideo )
-         : CmdGeneric( pIntf ), m_pCtrlVideo( pCtrlVideo )
+CmdResizeVout::CmdResizeVout( intf_thread_t *pIntf, vout_window_t* pWnd,
+                              int width, int height )
+  : CmdGeneric( pIntf ), m_pWnd( pWnd ), m_width( width ), m_height( height )
 {
 }
 
 
-void CmdResizeInnerVout::execute()
+void CmdResizeVout::execute()
+{
+    VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager;
+
+    p_VoutManager->setSizeWnd( m_pWnd, m_width, m_height );
+}
+
+CmdSetFullscreen::CmdSetFullscreen( intf_thread_t *pIntf,
+                                    vout_window_t * pWnd, bool fullscreen )
+    : CmdGeneric( pIntf ), m_pWnd( pWnd ), m_bFullscreen( fullscreen )
 {
-    m_pCtrlVideo->resizeInnerVout();
 }
 
+
+void CmdSetFullscreen::execute()
+{
+    VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager;
+
+    p_VoutManager->setFullscreenWnd( m_pWnd, m_bFullscreen );
+}
+
+