summaryrefslogtreecommitdiff
path: root/openbox/window.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-05-11 19:44:33 +0000
committerDana Jansens <danakj@orodu.net>2003-05-11 19:44:33 +0000
commit58cfbb7f8419e084af6b6b8b00c88ed270c29e88 (patch)
tree6d786e87e1fb369d94522a69d0b3f2c694a8ed4e /openbox/window.h
parent506122a110035f810c7d25225661973845a59c62 (diff)
Clients Menus and Slits are all 'ObWindow's now.
Stacking is done with ObWindows. Slits add themselves to the stacking order, as do clients of course. Added some macros for adding/removing to the stacking order.
Diffstat (limited to 'openbox/window.h')
-rw-r--r--openbox/window.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/openbox/window.h b/openbox/window.h
new file mode 100644
index 00000000..409697c1
--- /dev/null
+++ b/openbox/window.h
@@ -0,0 +1,35 @@
+#ifndef __window_h
+#define __window_h
+
+#include <X11/Xlib.h>
+
+typedef enum {
+ Window_Menu,
+ Window_Slit,
+ Window_Client
+} Window_InternalType;
+
+typedef struct ObWindow {
+ Window_InternalType type;
+} ObWindow;
+
+#define WINDOW_IS_MENU(win) (((ObWindow*)win)->type == Window_Menu)
+#define WINDOW_IS_SLIT(win) (((ObWindow*)win)->type == Window_Slit)
+#define WINDOW_IS_CLIENT(win) (((ObWindow*)win)->type == Window_Client)
+
+struct Menu;
+struct Slit;
+struct Client;
+
+#define WINDOW_AS_MENU(win) ((struct Menu*)win)
+#define WINDOW_AS_SLIT(win) ((struct Slit*)win)
+#define WINDOW_AS_CLIENT(win) ((struct Client*)win)
+
+#define MENU_AS_WINDOW(menu) ((ObWindow*)menu)
+#define SLIT_AS_WINDOW(slit) ((ObWindow*)slit)
+#define CLIENT_AS_WINDOW(client) ((ObWindow*)client)
+
+Window window_top(ObWindow *self);
+Window window_layer(ObWindow *self);
+
+#endif