]> Dogcows Code - chaz/openbox/blob - openbox/window.h
only sopt moveresize when shutting down
[chaz/openbox] / openbox / window.h
1 #ifndef __window_h
2 #define __window_h
3
4 #include <X11/Xlib.h>
5 #include <glib.h>
6
7 typedef struct _ObWindow ObWindow;
8 typedef struct _ObInternalWindow ObInternalWindow;
9
10 typedef enum {
11 Window_Menu,
12 Window_Dock,
13 Window_DockApp, /* used for events but not stacking */
14 Window_Client,
15 Window_Internal /* used for stacking but not events */
16 } Window_InternalType;
17
18 struct _ObWindow
19 {
20 Window_InternalType type;
21 };
22
23 /* Wrapper for internal stuff. If its struct matches this then it can be used
24 as an ObWindow */
25 typedef struct InternalWindow {
26 ObWindow obwin;
27 Window win;
28 } InternalWindow;
29
30 #define WINDOW_IS_MENU(win) (((ObWindow*)win)->type == Window_Menu)
31 #define WINDOW_IS_DOCK(win) (((ObWindow*)win)->type == Window_Dock)
32 #define WINDOW_IS_DOCKAPP(win) (((ObWindow*)win)->type == Window_DockApp)
33 #define WINDOW_IS_CLIENT(win) (((ObWindow*)win)->type == Window_Client)
34 #define WINDOW_IS_INTERNAL(win) (((ObWindow*)win)->type == Window_Internal)
35
36 struct _ObMenu;
37 struct _ObDock;
38 struct _ObDockApp;
39 struct _ObClient;
40
41 #define WINDOW_AS_MENU(win) ((struct _ObMenuFrame*)win)
42 #define WINDOW_AS_DOCK(win) ((struct _ObDock*)win)
43 #define WINDOW_AS_DOCKAPP(win) ((struct _ObDockApp*)win)
44 #define WINDOW_AS_CLIENT(win) ((struct _ObClient*)win)
45 #define WINDOW_AS_INTERNAL(win) ((struct InternalWindow*)win)
46
47 #define MENU_AS_WINDOW(menu) ((ObWindow*)menu)
48 #define DOCK_AS_WINDOW(dock) ((ObWindow*)dock)
49 #define DOCKAPP_AS_WINDOW(dockapp) ((ObWindow*)dockapp)
50 #define CLIENT_AS_WINDOW(client) ((ObWindow*)client)
51 #define INTERNAL_AS_WINDOW(intern) ((ObWindow*)intern)
52
53 extern GHashTable *window_map;
54
55 void window_startup(gboolean reconfig);
56 void window_shutdown(gboolean reconfig);
57
58 Window window_top(ObWindow *self);
59 Window window_layer(ObWindow *self);
60
61 #endif
This page took 0.033937 seconds and 4 git commands to generate.