X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=wm.h;h=10b319e862b5ce56ab8bd0340eecc077f4ae4289;hb=6d9d2344189a18ee1a3baee5b76af8c02d38da7c;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=58936d6ab733acf784cf8b1a8f6839b7a75bfe7a;p=wmpus diff --git a/wm.h b/wm.h index e69de29..10b319e 100644 --- a/wm.h +++ b/wm.h @@ -0,0 +1,45 @@ +/* + * 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);