raise menus above clients.
[dana/openbox.git] / openbox / stacking.h
1 #ifndef __stacking_h
2 #define __stacking_h
3
4 #include <glib.h>
5 #include <X11/Xlib.h>
6
7 struct Client;
8
9 /*! The possible stacking layers a client window can be a part of */
10 typedef enum {
11     Layer_Icon,       /*!< 0 - iconified windows, in any order at all */
12     Layer_Desktop,    /*!< 1 - desktop windows */
13     Layer_Below,      /*!< 2 - normal windows w/ below */
14     Layer_Normal,     /*!< 3 - normal windows */
15     Layer_Above,      /*!< 4 - normal windows w/ above */
16     Layer_Top,        /*!< 5 - always-on-top-windows (docks?) */
17     Layer_Fullscreen, /*!< 6 - fullscreeen windows */
18     Layer_Internal    /*!< 7 - openbox windows/menus */
19 } StackLayer;
20
21 /* list of Client*s in stacking order from highest to lowest */
22 extern GList  *stacking_list;
23
24 void stacking_startup();
25 void stacking_shutdown();
26
27 /*! Sets the client stacking list on the root window from the
28   stacking_clientlist */
29 void stacking_set_list();
30
31 /*! Raises a client window above all others in its stacking layer
32   raiseWindow has a couple of constraints that lowerWindow does not.<br>
33   1) raiseWindow can be called after changing a Client's stack layer, and
34      the list will be reorganized properly.<br>
35   2) raiseWindow guarantees that XRestackWindows() will <i>always</i> be
36      called for the specified client.
37 */
38 void stacking_raise(struct Client *client);
39
40 /*! Lowers a client window below all others in its stacking layer */
41 void stacking_lower(struct Client *client);
42
43 /*! Raises an internal window (e.g. menus) */
44 void stacking_raise_internal(Window win);
45
46 #endif