X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=wm.h;h=10b319e862b5ce56ab8bd0340eecc077f4ae4289;hb=3c4fc1c7ea3e0bfaaa781bc9e13833d0cb78478f;hp=e5e8d76b9fb94249acbb4ac0b272cb4ce0c45f13;hpb=d7d862c402564b4fe29f17e1a55cdbb2967aa6fd;p=wmpus diff --git a/wm.h b/wm.h index e5e8d76..10b319e 100644 --- a/wm.h +++ b/wm.h @@ -1,5 +1,45 @@ -void wm_init(win_t *root); +/* + * Copyright (C) 2011 Andy Spencer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* Window manager interface: + * + * The window manager receives input events from the system + * and responds by using the system to arrange the windows + * according to it's layout. + * + * The window provided to these function is generally the + * window with the keyboard or mouse focus. */ +/* Refresh the window layout */ +void wm_update(void); + +/* Called for each watched key press. + * This is currently used for some other events such + * as focus-in and focus-out as well. */ int wm_handle_key(win_t *win, Key_t key, mod_t mod, ptr_t ptr); +/* Called for each mouse movement */ int wm_handle_ptr(win_t *win, ptr_t ptr); + +/* Begin managing a window, called for each new window */ +void wm_insert(win_t *win); + +/* Stop managing a window and free data */ +void wm_remove(win_t *win); + +/* First call, sets up key bindings, etc */ +void wm_init(win_t *root);