]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/generic_window.hpp
udev: handle "change" action properly, fix disc ejection/insertion
[vlc] / modules / gui / skins2 / src / generic_window.hpp
index 34f74c1db65ff64f4b79a968eb447072b7d23bf7..e75b733b7fda3ab91e12375263596ea5d900be59 100644 (file)
@@ -5,7 +5,7 @@
  * $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 GENERIC_WINDOW_HPP
@@ -42,10 +42,12 @@ class WindowManager;
 
 
 /// Generic window class
-class GenericWindow: public SkinObject, public Observer<VarBool, void*>
+class GenericWindow: public SkinObject, public Observer<VarBool>
 {
     private:
         friend class WindowManager;
+        friend class VoutManager;
+        friend class CtrlVideo;
     public:
         GenericWindow( intf_thread_t *pIntf, int xPos, int yPos,
                        bool dragDrop, bool playOnDrop,
@@ -76,11 +78,17 @@ class GenericWindow: public SkinObject, public Observer<VarBool, void*>
         int getHeight() const { return m_height; }
 
         /// Give access to the visibility variable
-        VarBool &getVisibleVar() { return m_varVisible; }
+        VarBool &getVisibleVar() { return *m_pVarVisible; }
 
         /// Window type, mainly useful when overloaded (for VoutWindow)
         virtual string getType() const { return "Generic"; }
 
+        /// windows handle
+        void* getOSHandle() const;
+
+        /// reparent
+        void setParent( GenericWindow* pParent, int x, int y, int w, int h );
+
     protected:
         /// Get the OS window
         OSWindow *getOSWindow() const { return m_pOsWindow; }
@@ -119,10 +127,10 @@ class GenericWindow: public SkinObject, public Observer<VarBool, void*>
         /// OS specific implementation
         OSWindow *m_pOsWindow;
         /// Variable for the visibility of the window
-        mutable VarBoolImpl m_varVisible;
+        mutable VarBoolImpl *m_pVarVisible;
 
         /// Method called when the observed variable is modified
-        virtual void onUpdate( Subject<VarBool, void*> &rVariable , void*);
+        virtual void onUpdate( Subject<VarBool> &rVariable , void*);
 };