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();
36 bool client_open_wm(void *smem_start, int offset);
37 void client_close_wm();
41 std::list<Window*> windows;
43 std::list<Rect> dirty_rects;
47 int titlebar_thickness;
58 void create_frame(Window *win);
59 void destroy_frame(Window *win);
65 void invalidate_region(const Rect &rect);
66 void process_windows();
68 void add_window(Window *win);
69 void remove_window(Window *win);
71 void set_focused_window(Window *win);
72 const Window *get_focused_window() const;
73 Window *get_focused_window();
75 Window *get_window_at_pos(int pointer_x, int pointer_y);
76 Window *get_root_window() const;
78 void set_focused_frame_color(int r, int g, int b);
79 void get_focused_frame_color(int *r, int *g, int *b) const;
81 void set_unfocused_frame_color(int r, int g, int b);
82 void get_unfocused_frame_color(int *r, int *g, int *b) const;
84 void set_background(const Pixmap *pixmap);
85 const Pixmap *get_background() const;
87 Window *get_grab_window() const;
89 void grab_mouse(Window *win);
92 void raise_window(Window *win);
93 void sink_window(Window *win);
95 void maximize_window(Window *win);
96 void unmaximize_window(Window *win);
99 extern WindowManager *wm;