]> Dogcows Code - chaz/openbox/blob - openbox/stacking.h
Merge branch 'master' into chaz
[chaz/openbox] / 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) 2006 Mikael Magnusson
5 Copyright (c) 2003-2007 Dana Jansens
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 See the COPYING file for a copy of the GNU General Public License.
18 */
19
20 #ifndef __stacking_h
21 #define __stacking_h
22
23 #include <glib.h>
24 #include <X11/Xlib.h>
25
26 struct _ObWindow;
27 struct _ObClient;
28
29 /*! The possible stacking layers a client window can be a part of */
30 typedef enum {
31 OB_STACKING_LAYER_INVALID,
32 OB_STACKING_LAYER_DESKTOP, /*!< 0 - desktop windows */
33 OB_STACKING_LAYER_BELOW, /*!< 1 - normal windows w/ below */
34 OB_STACKING_LAYER_NORMAL, /*!< 2 - normal windows */
35 OB_STACKING_LAYER_ABOVE, /*!< 3 - normal windows w/ above */
36 OB_STACKING_LAYER_FULLSCREEN, /*!< 4 - fullscreeen windows */
37 OB_STACKING_LAYER_INTERNAL, /*!< 5 - 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 /* list of ObWindow*s in stacking order from lowest to highest */
44 extern GList *stacking_list_tail;
45
46 /*! Sets the window stacking list on the root window from the
47 stacking_list */
48 void stacking_set_list(void);
49
50 void stacking_add(struct _ObWindow *win);
51 void stacking_add_nonintrusive(struct _ObWindow *win);
52 #define stacking_remove(win) stacking_list = g_list_remove(stacking_list, win);
53
54 /*! Raises a window above all others in its stacking layer */
55 void stacking_raise(struct _ObWindow *window);
56
57 /*! Temporarily raises a window above all others */
58 void stacking_temp_raise(struct _ObWindow *window);
59
60 /*! Restores any temporarily raised windows to their correct place */
61 void stacking_restore(void);
62
63 /*! Lowers a window below all others in its stacking layer */
64 void stacking_lower(struct _ObWindow *window);
65
66 /*! Moves a window below another if its in the same layer.
67 This function does not enforce stacking rules IRT transients n such, and so
68 it should really ONLY be used to restore stacking orders from saved sessions
69 */
70 void stacking_below(struct _ObWindow *window, struct _ObWindow *below);
71
72 /*! Restack a window based upon a sibling (or all windows) in various ways.
73 @param client The client to be restacked
74 @param sibling Another client to compare to, or NULL to compare to all
75 windows
76 @param detail One of Above, Below, TopIf, BottomIf, Opposite
77 @return TRUE if the client was restacked
78 See http://tronche.com/gui/x/xlib/window/configure.html for details on
79 how each detail works with and without a sibling.
80 */
81 gboolean stacking_restack_request(struct _ObClient *client,
82 struct _ObClient *sibling,
83 gint detail);
84
85 #endif
This page took 0.030313 seconds and 4 git commands to generate.