]> Pileus Git - wmpus/blob - wm.h
Fake clicking on title bars in stack mode
[wmpus] / wm.h
1 /*
2  * Copyright (C) 2011 Andy Spencer <andy753421@gmail.com>
3  * 
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 /* Window manager interface:
19  * 
20  * The window manager receives input events from the system
21  * and responds by using the system to arrange the windows
22  * according to it's layout.
23  *
24  * The window provided to these function is generally the
25  * window with the keyboard or mouse focus. */
26
27 /* Refresh the window layout */
28 void wm_update(void);
29
30 /* Called for each watched key press.
31  * This is currently used for some other events such
32  * as focus-in and focus-out as well. */
33 int wm_handle_key(win_t *win, Key_t key, mod_t mod, ptr_t ptr);
34
35 /* Called for each mouse movement */
36 int wm_handle_ptr(win_t *win, ptr_t ptr);
37
38 /* Begin managing a window, called for each new window */
39 void wm_insert(win_t *win);
40
41 /* Stop managing a window and free data */
42 void wm_remove(win_t *win);
43
44 /* First call, sets up key bindings, etc */
45 void wm_init(win_t *root);