1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 window.h for the Openbox window manager
4 Copyright (c) 2003-2007 Dana Jansens
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.
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.
16 See the COPYING file for a copy of the GNU General Public License.
27 typedef struct _ObWindow ObWindow
;
28 typedef struct _ObInternalWindow ObInternalWindow
;
31 OB_WINDOW_CLASS_MENUFRAME
,
33 OB_WINDOW_CLASS_CLIENT
,
34 OB_WINDOW_CLASS_INTERNAL
,
35 OB_WINDOW_CLASS_PROMPT
38 /* In order to be an ObWindow, you need to make this struct the top of your
44 #define WINDOW_IS_MENUFRAME(win) \
45 (((ObWindow*)win)->type == OB_WINDOW_CLASS_MENUFRAME)
46 #define WINDOW_IS_DOCK(win) \
47 (((ObWindow*)win)->type == OB_WINDOW_CLASS_DOCK)
48 #define WINDOW_IS_CLIENT(win) \
49 (((ObWindow*)win)->type == OB_WINDOW_CLASS_CLIENT)
50 #define WINDOW_IS_INTERNAL(win) \
51 (((ObWindow*)win)->type == OB_WINDOW_CLASS_INTERNAL)
52 #define WINDOW_IS_PROMPT(win) \
53 (((ObWindow*)win)->type == OB_WINDOW_CLASS_PROMPT)
61 #define WINDOW_AS_MENUFRAME(win) ((struct _ObMenuFrame*)win)
62 #define WINDOW_AS_DOCK(win) ((struct _ObDock*)win)
63 #define WINDOW_AS_CLIENT(win) ((struct _ObClient*)win)
64 #define WINDOW_AS_INTERNAL(win) ((struct _ObInternalWindow*)win)
65 #define WINDOW_AS_PROMPT(win) ((struct _ObPrompt*)win)
67 #define MENUFRAME_AS_WINDOW(menu) ((ObWindow*)menu)
68 #define DOCK_AS_WINDOW(dock) ((ObWindow*)dock)
69 #define CLIENT_AS_WINDOW(client) ((ObWindow*)client)
70 #define INTERNAL_AS_WINDOW(intern) ((ObWindow*)intern)
71 #define PROMPT_AS_WINDOW(prompt) ((ObWindow*)prompt)
73 void window_startup (gboolean reconfig
);
74 void window_shutdown(gboolean reconfig
);
76 Window
window_top (ObWindow
*self
);
77 ObStackingLayer
window_layer(ObWindow
*self
);
79 ObWindow
* window_find (Window xwin
);
80 void window_add (Window
*xwin
, ObWindow
*win
);
81 void window_remove(Window xwin
);
83 /* Internal openbox-owned windows like the alt-tab popup */
84 struct _ObInternalWindow
{
89 void window_manage_all(void);
90 void window_manage(Window win
);
91 void window_unmanage_all(void);