]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/window_manager.hpp
skins2: rework and simplify transparency
[vlc] / modules / gui / skins2 / src / window_manager.hpp
index 4849f552dc19c13f2925a3f2b2762f7e754ba364..c631491f9112f6f3cc0b9a2ef1a8e69a97e774f9 100644 (file)
@@ -120,11 +120,14 @@ public:
     void raise( TopWindow &rWindow ) const { rWindow.raise(); }
 
     /// Show the given window
-    void show( TopWindow &rWindow ) const { rWindow.show(); }
+    void show( TopWindow &rWindow ) const;
 
     /// Hide the given window
     void hide( TopWindow &rWindow ) const { rWindow.hide(); }
 
+    /// Set/unset all the windows on top
+    void setOnTop( bool b_ontop );
+
     /// Toggle all the windows on top
     void toggleOnTop();
 
@@ -159,6 +162,10 @@ public:
     /// Return the active popup, or NULL if none is active
     Popup * getActivePopup() const { return m_pPopup; }
 
+    /// getter to know whether opacity is needed
+    bool isOpacityNeeded() const
+    { return (m_OpacityEnabled && (m_alpha != 255 || m_moveAlpha != 255 )); }
+
 private:
     /// Some useful typedefs for lazy people like me
     typedef set<TopWindow*> WinSet_t;
@@ -202,6 +209,8 @@ private:
     int m_alpha;
     /// Alpha value of the moving windows
     int m_moveAlpha;
+    /// transparency set by user
+    bool m_OpacityEnabled;
     /// Direction of the current resizing
     Direction_t m_direction;
     /// Rect of the last maximized window