X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fwindow.h;fp=openbox%2Fwindow.h;h=409697c1efc4503cef5c0358248a5e18cdfb0614;hb=58cfbb7f8419e084af6b6b8b00c88ed270c29e88;hp=0000000000000000000000000000000000000000;hpb=506122a110035f810c7d25225661973845a59c62;p=chaz%2Fopenbox 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