]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/os_factory.hpp
* skins2: new skins2-taskbar configuration option, to allow removing VLC from the...
[vlc] / modules / gui / skins2 / src / os_factory.hpp
index bd78d23f011723ad4f473e8748a7fb8e9efdab06..cced448cb9b1a737d7feb1c2677c1bf5cf38b4b1 100644 (file)
@@ -1,11 +1,11 @@
 /*****************************************************************************
  * os_factory.hpp
  *****************************************************************************
- * Copyright (C) 2003 VideoLAN
+ * Copyright (C) 2003 the VideoLAN team
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
- *          Olivier Teulière <ipkiss@via.ecp.fr>
+ *          Olivier Teulière <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
@@ -19,7 +19,7 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef OS_FACTORY_HPP
 #include "skin_common.hpp"
 #include "../utils/position.hpp"
 #include <string>
+#include <list>
 
 class GenericWindow;
+class CmdGeneric;
 class OSBitmap;
 class OSGraphics;
 class OSLoop;
 class OSWindow;
 class OSTooltip;
+class OSPopup;
 class OSTimer;
 
 
@@ -42,48 +45,76 @@ class OSTimer;
 class OSFactory: public SkinObject
 {
     public:
-        typedef enum
+        enum CursorType_t
         {
             kDefaultArrow,
             kResizeNS,
             kResizeWE,
             kResizeNWSE,
             kResizeNESW
-        } CursorType_t;
+        };
 
-        /// Initialization method overloaded in derived classes.
-        /// It must return false if the init failed.
+        /**
+         * Initialization method overloaded in derived classes.
+         * It must return false if the init failed.
+         */
         virtual bool init() { return true; }
 
-        /// Get the right instance of OSFactory.
-        /// Returns NULL if initialization of the concrete factory failed.
+        /**
+         * Get the right instance of OSFactory.
+         * Returns NULL if initialization of the concrete factory failed.
+         */
         static OSFactory *instance( intf_thread_t *pIntf );
 
-        /// Delete the instance of OSFactory.
+        /// Delete the instance of OSFactory
         static void destroy( intf_thread_t *pIntf );
 
-        /// Instantiate an object OSGraphics.
+        /// Instantiate an object OSGraphics
         virtual OSGraphics *createOSGraphics( int width, int height ) = 0;
 
-        /// Get the instance of the singleton OSLoop.
+        /// Get the instance of the singleton OSLoop
         virtual OSLoop *getOSLoop() = 0;
 
-        /// Destroy the instance of OSLoop.
+        /// Destroy the instance of OSLoop
         virtual void destroyOSLoop() = 0;
 
-        /// Instantiate an OSTimer with the given callback
-        virtual OSTimer *createOSTimer( const Callback &rCallback ) = 0;
+        /// Minimize all the windows
+        virtual void minimize() = 0;
 
-        /// Instantiate an object OSWindow.
+        /// Restore the minimized windows
+        virtual void restore() = 0;
+
+        /// Add an icon in the system tray
+        virtual void addInTray() = 0;
+
+        /// Remove the icon from the system tray
+        virtual void removeFromTray() = 0;
+
+        /// Show the task in the task bar
+        virtual void addInTaskBar() = 0;
+
+        /// Remove the task from the task bar
+        virtual void removeFromTaskBar() = 0;
+
+        /// Instantiate an OSTimer with the given command
+        virtual OSTimer *createOSTimer( CmdGeneric &rCmd ) = 0;
+
+        /// Instantiate an object OSWindow
         virtual OSWindow *createOSWindow( GenericWindow &rWindow,
                                           bool dragDrop, bool playOnDrop,
                                           OSWindow *pParent ) = 0;
 
-        /// Instantiate an object OSTooltip.
+        /// Instantiate an object OSTooltip
         virtual OSTooltip *createOSTooltip() = 0;
 
+        /// Instantiate an object OSPopup
+        virtual OSPopup *createOSPopup() = 0;
+
         /// Get the directory separator
-        virtual const string getDirSeparator() const = 0;
+        virtual const string &getDirSeparator() const = 0;
+
+        /// Get the resource path
+        virtual const list<string> &getResourcePath() const = 0;
 
         /// Get the screen size
         virtual int getScreenWidth() const = 0;
@@ -102,7 +133,7 @@ class OSFactory: public SkinObject
         virtual void rmDir( const string &rPath ) = 0;
 
    protected:
-        // Protected because it's a singleton.
+        // Protected because it's a singleton
         OSFactory( intf_thread_t* pIntf ): SkinObject( pIntf ) {}
         virtual ~OSFactory() {}
 };