X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=sys.h;h=01a1734a0b44992fed14f973a3b7f6759bfd6987;hb=9b4ab92753e6e9ff8cdf96c20c6c0a2c8b5f1d33;hp=5e2d92684d3cdbcb62b8831d3f73cf1dc7c6fd69;hpb=03e529a71c9743ae971d224ba353b5c5f9385366;p=wmpus diff --git a/sys.h b/sys.h index 5e2d926..01a1734 100644 --- a/sys.h +++ b/sys.h @@ -41,7 +41,7 @@ typedef struct { unsigned char spare : 3; } mod_t; #define MOD(...) ((mod_t){__VA_ARGS__}) -#define mod2int(mod) (*((unsigned short*)&(mod))) +#define mod2int(mod) (*((unsigned char*)&(mod))) typedef struct { int x, y; @@ -49,8 +49,18 @@ typedef struct { } ptr_t; #define PTR(...) ((ptr_t){__VA_ARGS__}) +typedef enum { + st_show, + st_full, + st_shade, + st_icon, + st_hide, +} state_t; + void sys_watch(win_t *win, Key_t key, mod_t mod); +void sys_unwatch(win_t *win, Key_t key, mod_t mod); + void sys_move(win_t *win, int x, int y, int w, int h); void sys_raise(win_t *win); @@ -59,6 +69,10 @@ void sys_focus(win_t *win); void sys_foreach(win_t *win); +void sys_show(win_t *win, state_t st); + +list_t *sys_info(win_t *win); + win_t *sys_init(void); void sys_run(win_t *root);