2 winnie - an experimental window system
4 Copyright (C) 2013 Eleni Maria Stea
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 Author: Eleni Maria Stea <elene.mst@gmail.com>
33 bool init_window_manager();
34 void destroy_window_manager();
38 std::list<Window*> windows;
40 std::list<Rect> dirty_rects;
44 int titlebar_thickness;
55 void create_frame(Window *win);
56 void destroy_frame(Window *win);
62 void invalidate_region(const Rect &rect);
63 void process_windows();
65 void add_window(Window *win);
66 void remove_window(Window *win);
68 void set_focused_window(Window *win);
69 const Window *get_focused_window() const;
70 Window *get_focused_window();
72 Window *get_window_at_pos(int pointer_x, int pointer_y);
73 Window *get_root_window() const;
75 void set_focused_frame_color(int r, int g, int b);
76 void get_focused_frame_color(int *r, int *g, int *b) const;
78 void set_unfocused_frame_color(int r, int g, int b);
79 void get_unfocused_frame_color(int *r, int *g, int *b) const;
81 void set_background(const Pixmap *pixmap);
82 const Pixmap *get_background() const;
84 Window *get_grab_window() const;
86 void grab_mouse(Window *win);
89 void raise_window(Window *win);
90 void sink_window(Window *win);
92 void maximize_window(Window *win);
93 void unmaximize_window(Window *win);
96 extern WindowManager *wm;