]> icculus.org git repositories - mikachu/openbox.git/blob - openbox/stacking.h
no more april's fool (and also committed a bit too much before)
[mikachu/openbox.git] / openbox / stacking.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3    stacking.h for the Openbox window manager
4    Copyright (c) 2003        Ben Jansens
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    See the COPYING file for a copy of the GNU General Public License.
17 */
18
19 #ifndef __stacking_h
20 #define __stacking_h
21
22 #include "window.h"
23
24 #include <glib.h>
25 #include <X11/Xlib.h>
26
27 /*! The possible stacking layers a client window can be a part of */
28 typedef enum {
29     OB_STACKING_LAYER_DESKTOP,     /*!< 0 - desktop windows */
30     OB_STACKING_LAYER_DOCK_BELOW,  /*!< 1 - dock windows set to below */
31     OB_STACKING_LAYER_BELOW,       /*!< 2 - normal windows w/ below */
32     OB_STACKING_LAYER_NORMAL,      /*!< 3 - normal windows */
33     OB_STACKING_LAYER_ABOVE,       /*!< 4 - normal windows w/ above */
34     OB_STACKING_LAYER_DOCK_NORMAL, /*!< 5 - dock windows set to on top */
35     OB_STACKING_LAYER_DOCK_ABOVE,  /*!< 6 - dock windows set to on top */
36     OB_STACKING_LAYER_FULLSCREEN,  /*!< 7 - fullscreeen windows */
37     OB_STACKING_LAYER_INTERNAL,    /*!< 8 - openbox windows/menus */
38     OB_NUM_STACKING_LAYERS
39 } ObStackingLayer;
40
41 /* list of ObWindow*s in stacking order from highest to lowest */
42 extern GList *stacking_list;
43
44 /*! Sets the window stacking list on the root window from the
45   stacking_list */
46 void stacking_set_list();
47
48 void stacking_add(ObWindow *win);
49 void stacking_add_nonintrusive(ObWindow *win);
50 #define stacking_remove(win) stacking_list = g_list_remove(stacking_list, win);
51
52 /*! Raises a window above all others in its stacking layer */
53 void stacking_raise(ObWindow *window);
54
55 /*! Lowers a window below all others in its stacking layer */
56 void stacking_lower(ObWindow *window);
57
58 /*! Moves a window below another if its in the same layer.
59   This function does not enforce stacking rules IRT transients n such, and so
60   it should really ONLY be used to restore stacking orders from saved sessions
61 */
62 void stacking_below(ObWindow *window, ObWindow *below);
63
64 #endif