2003-09-17 07:44:49 +00:00
|
|
|
/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
|
2003-09-17 07:32:52 +00:00
|
|
|
|
|
|
|
stacking.h for the Openbox window manager
|
2006-08-22 16:44:18 +00:00
|
|
|
Copyright (c) 2006 Mikael Magnusson
|
2007-04-23 17:56:35 +00:00
|
|
|
Copyright (c) 2003-2007 Dana Jansens
|
2003-09-17 07:32:52 +00:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
See the COPYING file for a copy of the GNU General Public License.
|
|
|
|
*/
|
|
|
|
|
2003-03-16 21:11:39 +00:00
|
|
|
#ifndef __stacking_h
|
|
|
|
#define __stacking_h
|
|
|
|
|
|
|
|
#include <glib.h>
|
2003-04-16 05:36:51 +00:00
|
|
|
#include <X11/Xlib.h>
|
2003-03-16 21:11:39 +00:00
|
|
|
|
2008-01-11 20:28:26 +00:00
|
|
|
struct _ObWindow;
|
|
|
|
struct _ObClient;
|
|
|
|
|
2003-03-16 21:11:39 +00:00
|
|
|
/*! The possible stacking layers a client window can be a part of */
|
|
|
|
typedef enum {
|
2007-05-10 21:33:22 +00:00
|
|
|
OB_STACKING_LAYER_INVALID,
|
2007-05-14 22:20:48 +00:00
|
|
|
OB_STACKING_LAYER_DESKTOP, /*!< 0 - desktop windows */
|
2007-05-14 23:00:36 +00:00
|
|
|
OB_STACKING_LAYER_BELOW, /*!< 1 - normal windows w/ below */
|
|
|
|
OB_STACKING_LAYER_NORMAL, /*!< 2 - normal windows */
|
|
|
|
OB_STACKING_LAYER_ABOVE, /*!< 3 - normal windows w/ above */
|
|
|
|
OB_STACKING_LAYER_FULLSCREEN, /*!< 4 - fullscreeen windows */
|
|
|
|
OB_STACKING_LAYER_INTERNAL, /*!< 5 - openbox windows/menus */
|
2003-07-10 17:03:05 +00:00
|
|
|
OB_NUM_STACKING_LAYERS
|
|
|
|
} ObStackingLayer;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
2003-05-11 19:44:33 +00:00
|
|
|
/* list of ObWindow*s in stacking order from highest to lowest */
|
2003-09-15 03:36:15 +00:00
|
|
|
extern GList *stacking_list;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
2003-05-11 19:44:33 +00:00
|
|
|
/*! Sets the window stacking list on the root window from the
|
|
|
|
stacking_list */
|
2003-03-16 21:11:39 +00:00
|
|
|
void stacking_set_list();
|
|
|
|
|
2008-01-11 20:28:26 +00:00
|
|
|
void stacking_add(struct _ObWindow *win);
|
|
|
|
void stacking_add_nonintrusive(struct _ObWindow *win);
|
2003-05-11 19:44:33 +00:00
|
|
|
#define stacking_remove(win) stacking_list = g_list_remove(stacking_list, win);
|
|
|
|
|
2003-06-26 07:08:16 +00:00
|
|
|
/*! Raises a window above all others in its stacking layer */
|
2008-01-11 20:28:26 +00:00
|
|
|
void stacking_raise(struct _ObWindow *window);
|
|
|
|
|
|
|
|
/*! Temporarily raises a window above all others */
|
|
|
|
void stacking_temp_raise(struct _ObWindow *window);
|
|
|
|
|
|
|
|
/*! Restores any temporarily raised windows to their correct place */
|
|
|
|
void stacking_restore();
|
2003-03-16 21:11:39 +00:00
|
|
|
|
2003-08-25 07:43:27 +00:00
|
|
|
/*! Lowers a window below all others in its stacking layer */
|
2008-01-11 20:28:26 +00:00
|
|
|
void stacking_lower(struct _ObWindow *window);
|
2003-04-16 05:36:51 +00:00
|
|
|
|
2003-08-25 07:44:33 +00:00
|
|
|
/*! Moves a window below another if its in the same layer.
|
|
|
|
This function does not enforce stacking rules IRT transients n such, and so
|
|
|
|
it should really ONLY be used to restore stacking orders from saved sessions
|
|
|
|
*/
|
2008-01-11 20:28:26 +00:00
|
|
|
void stacking_below(struct _ObWindow *window, struct _ObWindow *below);
|
2003-08-25 07:43:27 +00:00
|
|
|
|
2007-05-10 04:06:50 +00:00
|
|
|
/*! Restack a window based upon a sibling (or all windows) in various ways.
|
|
|
|
@param client The client to be restacked
|
|
|
|
@param sibling Another client to compare to, or NULL to compare to all
|
|
|
|
windows
|
|
|
|
@param detail One of Above, Below, TopIf, BottomIf, Opposite
|
2007-06-03 17:55:49 +00:00
|
|
|
@return TRUE if the client was restacked
|
2007-05-10 04:06:50 +00:00
|
|
|
See http://tronche.com/gui/x/xlib/window/configure.html for details on
|
|
|
|
how each detail works with and without a sibling.
|
|
|
|
*/
|
2007-06-03 17:55:49 +00:00
|
|
|
gboolean stacking_restack_request(struct _ObClient *client,
|
|
|
|
struct _ObClient *sibling,
|
2007-06-21 20:04:35 +00:00
|
|
|
gint detail);
|
2007-05-10 04:06:50 +00:00
|
|
|
|
2003-03-16 21:11:39 +00:00
|
|
|
#endif
|