From 58cfbb7f8419e084af6b6b8b00c88ed270c29e88 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 11 May 2003 19:44:33 +0000 Subject: 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. --- openbox/window.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 openbox/window.h (limited to 'openbox/window.h') 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 + +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 -- cgit v1.2.3