*in progress*
[winnie] / src / wm.h
1 #ifndef WM_H_
2 #define WM_H_
3
4 #include <list>
5 #include "geom.h"
6
7 class Window;
8
9 class WindowManager {
10 private:
11         std::list<Window*> windows;
12         std::list<Rect> dirty_rects;
13
14         int bg_color[3];
15         Window *focused_win;
16
17 public:
18         WindowManager();
19
20         void invalidate_region(const Rect &rect);
21         void process_windows();
22
23         void add_window(Window *win);
24
25         void set_focused_window(Window *win);
26         const Window *get_focused_window() const;
27         Window *get_focused_window();
28
29         Window *get_window_at_pos(int pointer_x, int pointer_y);
30 };
31
32 extern WindowManager *wm;
33
34 #endif  // WM_H_