kranewm

An ICCCM & EWMH compliant X11 reparenting, dynamic window manager, written in C++
git clone git://git.deurzen.net/kranewm
Log | Files | Refs | LICENSE

stack.hh (1238B)


      1 #ifndef __STACK_H_GUARD__
      2 #define __STACK_H_GUARD__
      3 
      4 #include "../winsys/window.hh"
      5 
      6 #include <unordered_map>
      7 #include <vector>
      8 
      9 class StackHandler final
     10 {
     11 public:
     12     enum class StackLayer
     13     {
     14         Desktop,
     15         Below_,
     16         Dock,
     17         // Regular,
     18         // Free,
     19         // Transient,
     20         Above_,
     21         // Fullscreen,
     22         Notification,
     23     };
     24 
     25     StackHandler();
     26     ~StackHandler();
     27 
     28     void add_window(winsys::Window, StackLayer);
     29     void remove_window(winsys::Window);
     30 
     31     void relayer_window(winsys::Window, StackLayer);
     32     void raise_window(winsys::Window);
     33 
     34     void add_above_other(winsys::Window, winsys::Window);
     35     void add_below_other(winsys::Window, winsys::Window);
     36 
     37     std::vector<winsys::Window> const& get_layer(StackLayer) const;
     38 
     39 private:
     40     std::unordered_map<winsys::Window, StackLayer> m_layers;
     41 
     42     std::vector<winsys::Window> m_desktop;
     43     std::vector<winsys::Window> m_below;
     44     std::vector<winsys::Window> m_dock;
     45     std::vector<winsys::Window> m_above;
     46     std::vector<winsys::Window> m_notification;
     47 
     48     std::unordered_map<winsys::Window, winsys::Window> m_above_other;
     49     std::unordered_map<winsys::Window, winsys::Window> m_below_other;
     50 
     51 };
     52 
     53 #endif//__STACK_H_GUARD__