added a function to minimize VLC (check win32 compilation)

parent 8328c32c
......@@ -18,6 +18,8 @@ SOURCES_skins2 = \
commands/cmd_on_top.hpp \
commands/cmd_playlist.cpp \
commands/cmd_playlist.hpp \
commands/cmd_minimize.cpp \
commands/cmd_minimize.hpp \
commands/cmd_quit.cpp \
commands/cmd_quit.hpp \
commands/cmd_resize.cpp \
......
/*****************************************************************************
* cmd_minimize.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: cmd_fullscreen.cpp 6961 2004-03-05 17:34:23Z sam $
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "cmd_minimize.hpp"
#include "../src/os_factory.hpp"
void CmdMinimize::execute()
{
// Get the instance of OSFactory
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
pOsFactory->minimize();
}
/*****************************************************************************
* cmd_minimize.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: cmd_fullscreen.hpp 6961 2004-03-05 17:34:23Z sam $
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef CMD_MINIMIZE_HPP
#define CMD_MINIMIZE_HPP
#include "cmd_generic.hpp"
/// Command to minimize VLC
DEFINE_COMMAND(Minimize, "minimize" )
#endif
......@@ -29,6 +29,7 @@
#include "../commands/cmd_dummy.hpp"
#include "../commands/cmd_layout.hpp"
#include "../commands/cmd_quit.hpp"
#include "../commands/cmd_minimize.hpp"
#include "../commands/cmd_input.hpp"
#include "../commands/cmd_fullscreen.hpp"
#include "../commands/cmd_show_window.hpp"
......@@ -75,6 +76,7 @@ Interpreter::Interpreter( intf_thread_t *pIntf ): SkinObject( pIntf )
REGISTER_CMD( "vlc.faster()", CmdFaster )
REGISTER_CMD( "vlc.slower()", CmdSlower )
REGISTER_CMD( "vlc.mute()", CmdMute )
REGISTER_CMD( "vlc.minimize()", CmdMinimize )
REGISTER_CMD( "vlc.quit()", CmdQuit )
// Register the constant bool variables in the var manager
......
......@@ -72,6 +72,9 @@ class OSFactory: public SkinObject
/// Destroy the instance of OSLoop.
virtual void destroyOSLoop() = 0;
///
virtual void minimize() = 0;
/// Instantiate an OSTimer with the given callback
virtual OSTimer *createOSTimer( const Callback &rCallback ) = 0;
......
......@@ -223,6 +223,9 @@ void Win32Factory::destroyOSLoop()
Win32Loop::destroy( getIntf() );
}
void Win32Factory::minimize()
{
}
OSTimer *Win32Factory::createOSTimer( const Callback &rCallback )
{
......
......@@ -53,6 +53,9 @@ class Win32Factory: public OSFactory
/// Destroy the instance of OSLoop.
virtual void destroyOSLoop();
///
virtual void minimize();
/// Instantiate an OSTimer with the given callback
virtual OSTimer *createOSTimer( const Callback &rCallback );
......
......@@ -96,6 +96,11 @@ void X11Factory::destroyOSLoop()
X11Loop::destroy( getIntf() );
}
void X11Factory::minimize()
{
XIconifyWindow( m_pDisplay->getDisplay(), m_pDisplay->getMainWindow(),
DefaultScreen( m_pDisplay->getDisplay() ) );
}
OSTimer *X11Factory::createOSTimer( const Callback &rCallback )
{
......
......@@ -62,6 +62,9 @@ class X11Factory: public OSFactory
/// Instantiate an OSTimer with the given callback
virtual OSTimer *createOSTimer( const Callback &rCallback );
///
virtual void minimize();
/// Instantiate an OSWindow object
virtual OSWindow *createOSWindow( GenericWindow &rWindow,
bool dragDrop, bool playOnDrop,
......
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