GenericWindow::GenericWindow( intf_thread_t *pIntf, int left, int top,
bool dragDrop, bool playOnDrop,
- GenericWindow *pParent ):
+ GenericWindow *pParent, WindowType_t type ):
SkinObject( pIntf ), m_left( left ), m_top( top ), m_width( 0 ),
m_height( 0 ), m_pVarVisible( NULL )
{
// Create an OSWindow to handle OS specific processing
m_pOsWindow = pOsFactory->createOSWindow( *this, dragDrop, playOnDrop,
- pOSParent );
+ pOSParent, type );
// Create the visibility variable and register it in the manager
m_pVarVisible = new VarBoolImpl( pIntf );
friend class VoutManager;
friend class CtrlVideo;
public:
+
+ enum WindowType_t
+ {
+ TopWindow,
+ VoutWindow,
+ FullscreenWindow,
+ };
+
GenericWindow( intf_thread_t *pIntf, int xPos, int yPos,
bool dragDrop, bool playOnDrop,
- GenericWindow *pParent = NULL );
+ GenericWindow *pParent = NULL,
+ WindowType_t type = TopWindow );
virtual ~GenericWindow();
/// Methods to process OS events.
#include <string>
#include <list>
-class GenericWindow;
+#include "../src/generic_window.hpp"
class CmdGeneric;
class OSBitmap;
class OSGraphics;
/// Instantiate an object OSWindow
virtual OSWindow *createOSWindow( GenericWindow &rWindow,
bool dragDrop, bool playOnDrop,
- OSWindow *pParent ) = 0;
+ OSWindow *pParent, GenericWindow::WindowType_t ) = 0;
/// Instantiate an object OSTooltip
virtual OSTooltip *createOSTooltip() = 0;
public:
VoutMainWindow( intf_thread_t *pIntf, int left = 0, int top = 0 ) :
- GenericWindow( pIntf, left, top, false, false, NULL )
+ GenericWindow( pIntf, left, top, false, false, NULL,
+ GenericWindow::FullscreenWindow )
{
resize( 10, 10 );
move( -50, -50 );
VoutWindow::VoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd,
int width, int height, GenericWindow* pParent ) :
- GenericWindow( pIntf, 0, 0, false, false, pParent ),
+ GenericWindow( pIntf, 0, 0, false, false, pParent,
+ GenericWindow::VoutWindow ),
m_pWnd( pWnd ), original_width( width ), original_height( height ),
m_pParentWindow( pParent ), m_pCtrlVideo( NULL ), m_bFullscreen( false )
{
{
if( pCtrlVideo )
{
+ hide();
const Position *pPos = pCtrlVideo->getPosition();
int x = pPos->getLeft();
int y = pPos->getTop();
}
else
{
+ hide();
int w = VoutManager::instance( getIntf() )->getVoutMainWindow()->getWidth();
int h = VoutManager::instance( getIntf() )->getVoutMainWindow()->getHeight();
0, 0, w, h );
m_pParentWindow =
VoutManager::instance( getIntf() )->getVoutMainWindow();
+ show();
}
m_pCtrlVideo = pCtrlVideo;
#include "win32_loop.hpp"
#include "../src/theme.hpp"
#include "../src/window_manager.hpp"
+#include "../src/generic_window.hpp"
#include "../commands/cmd_dialogs.hpp"
#include "../commands/cmd_minimize.hpp"
OSWindow *Win32Factory::createOSWindow( GenericWindow &rWindow, bool dragDrop,
- bool playOnDrop, OSWindow *pParent )
+ bool playOnDrop, OSWindow *pParent,
+ GenericWindow::WindowType_t type )
{
return new Win32Window( getIntf(), rWindow, m_hInst, m_hParentWindow,
dragDrop, playOnDrop, (Win32Window*)pParent );
#include <windows.h>
#include <shellapi.h>
#include "../src/os_factory.hpp"
+#include "../src/generic_window.hpp"
+
#include <map>
/// Instantiate an OSWindow object
virtual OSWindow *createOSWindow( GenericWindow &rWindow,
bool dragDrop, bool playOnDrop,
- OSWindow *pParent );
+ OSWindow *pParent,
+ GenericWindow::WindowType_t type );
/// Instantiate an object OSTooltip
virtual OSTooltip *createOSTooltip();
#include "x11_window.hpp"
#include "x11_tooltip.hpp"
+#include "../src/generic_window.hpp"
X11Factory::X11Factory( intf_thread_t *pIntf ): OSFactory( pIntf ),
m_pDisplay( NULL ), m_pTimerLoop( NULL ), m_dirSep( "/" )
OSWindow *X11Factory::createOSWindow( GenericWindow &rWindow, bool dragDrop,
- bool playOnDrop, OSWindow *pParent )
+ bool playOnDrop, OSWindow *pParent,
+ GenericWindow::WindowType_t type )
{
return new X11Window( getIntf(), rWindow, *m_pDisplay, dragDrop,
- playOnDrop, (X11Window*)pParent );
+ playOnDrop, (X11Window*)pParent, type );
}
#include <X11/Xlib.h>
#include "../src/os_factory.hpp"
+#include "../src/generic_window.hpp"
#include <map>
class X11Display;
/// Instantiate an OSWindow object
virtual OSWindow *createOSWindow( GenericWindow &rWindow,
bool dragDrop, bool playOnDrop,
- OSWindow *pParent );
+ OSWindow *pParent,
+ GenericWindow::WindowType_t type );
/// Instantiate an object OSTooltip
virtual OSTooltip *createOSTooltip();
X11Window::X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
X11Display &rDisplay, bool dragDrop, bool playOnDrop,
- X11Window *pParentWindow ):
+ X11Window *pParentWindow, GenericWindow::WindowType_t type ):
OSWindow( pIntf ), m_rDisplay( rDisplay ), m_pParent( pParentWindow ),
m_dragDrop( dragDrop )
{
XSetWindowAttributes attr;
unsigned long valuemask;
+ string name_type;
- if (pParentWindow)
+ if( type == GenericWindow::FullscreenWindow )
+ {
+ m_wnd_parent = DefaultRootWindow( XDISPLAY );
+
+ int i_screen = DefaultScreen( XDISPLAY );
+
+ attr.event_mask = ExposureMask | StructureNotifyMask;
+ attr.background_pixel = BlackPixel( XDISPLAY, i_screen );
+ attr.backing_store = Always;
+ attr.override_redirect = True;
+ valuemask = CWBackingStore | CWOverrideRedirect |
+ CWBackPixel | CWEventMask;
+
+ name_type = "Fullscreen";
+ }
+ else if( type == GenericWindow::VoutWindow )
{
m_wnd_parent = pParentWindow->m_wnd;
attr.backing_store = Always;
attr.background_pixel = BlackPixel( XDISPLAY, i_screen );
valuemask = CWBackingStore | CWBackPixel | CWEventMask;
+
+ name_type = "VoutWindow";
}
else
{
attr.event_mask = ExposureMask | StructureNotifyMask;
valuemask = CWEventMask;
+
+ name_type = "TopWindow";
}
// Create the window
}
// Change the window title
- XStoreName( XDISPLAY, m_wnd, "VLC" );
+ string name_window = "VLC (" + name_type + ")";
+ XStoreName( XDISPLAY, m_wnd, name_window.c_str() );
// Associate the window to the main "parent" window
XSetTransientForHint( XDISPLAY, m_wnd, m_rDisplay.getMainWindow() );
#include <X11/Xlib.h>
+#include "../src/generic_window.hpp"
#include "../src/os_window.hpp"
class X11Display;
public:
X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
X11Display &rDisplay, bool dragDrop, bool playOnDrop,
- X11Window *pParentWindow );
+ X11Window *pParentWindow, GenericWindow::WindowType_t );
virtual ~X11Window();