2 * Copyright (c) 2011-2012, Andy Spencer <andy753421@gmail.com>
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 /* Window manager interface:
18 * The window manager receives input events from the system
19 * and responds by using the system to arrange the windows
20 * according to it's layout.
22 * The window provided to these function is generally the
23 * window with the keyboard or mouse focus. */
25 /* Called for each watched event */
26 int wm_handle_event(win_t *win, event_t ev, mod_t mod, ptr_t ptr);
28 /* Called for each mouse movement */
29 int wm_handle_ptr(win_t *win, ptr_t ptr);
31 /* Called when a window changes states */
32 int wm_handle_state(win_t *win, state_t prev, state_t next);
34 /* Begin managing a window, called for each new window */
35 void wm_insert(win_t *win);
37 /* Stop managing a window and free data */
38 void wm_remove(win_t *win);
40 /* First call, sets up key bindings, etc */
43 /* First call, sets up key bindings, etc */