]> Pileus Git - wmpus/blob - sys.h
Allow adding hidden windows
[wmpus] / sys.h
1 /*
2  * Copyright (c) 2011-2012, Andy Spencer <andy753421@gmail.com>
3  *
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.
7  *
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
14  */
15
16 /* Windowing system interface:
17  *
18  * The sys provides input to the window manager. It creates
19  * the main loop and responds to input events from the user,
20  * generally by converting them to a system independent form
21  * and then passing them to the wm.
22  *
23  * The sys also provides the API used by the wm to position
24  * and control windows. */
25
26 /* Move the window to the specified location and set it's
27  * geometry. The position and size include borders and
28  * window decorations. */
29 void sys_move(win_t *win, int x, int y, int w, int h);
30
31 /* Rise the window above all other windows */
32 void sys_raise(win_t *win);
33
34 /* Give keyboard focus to the window and update window
35  * decorations. */
36 void sys_focus(win_t *win);
37
38 /* Set the windows drawing state */
39 void sys_show(win_t *win, state_t st);
40
41 /* Start watching for an event. The sys subsequently
42  * calls wm_handle_event whenever the event occurs. */
43 void sys_watch(win_t *win, event_t ev, mod_t mod);
44
45 /* Stop watching an event */
46 void sys_unwatch(win_t *win, event_t event, mod_t mod);
47
48 /* Return a list of windows representing the geometry of the
49  * physical displays attached to the computer. */
50 list_t *sys_info(void);
51
52 /* First call, calls wm_insert for each existing window */
53 void sys_init(void);
54
55 /* Starts the main loop */
56 void sys_run(void);
57
58 /* Exit main loop */
59 void sys_exit(void);
60
61 /* Free all static data, for memory debugging */
62 void sys_free(void);