X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=sys.h;h=adc0247590c6470b74e1769607542d492b1dd748;hb=b1d6aee69be4c1cfe6c085936620d8c60769c991;hp=8a21aef6f8315ccc27fd35ec84e24dde33e76cea;hpb=e666d231a1035c96788fc148bcc7eda4b8c1b6ec;p=wmpus diff --git a/sys.h b/sys.h index 8a21aef..adc0247 100644 --- a/sys.h +++ b/sys.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Andy Spencer + * Copyright (c) 2011-2012, Andy Spencer * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -26,23 +26,33 @@ /* Window states */ typedef enum { + ST_HIDE, // completely hidden ST_SHOW, // show as regular window - ST_FULL, // fullscreen/maximized + ST_FULL, // fullscreen (without decorations) + ST_MAX, // maximized (with decorations) ST_SHADE, // show titlebar only ST_ICON, // iconified/minimized - ST_HIDE, // completely hidden ST_CLOSE, // close the window } state_t; +/* Window types */ +typedef enum { + TYPE_NORMAL, + TYPE_DIALOG, + TYPE_TOOLBAR, +} type_t; + /* Basic window type */ typedef struct win_sys win_sys_t; typedef struct win_wm win_wm_t; -typedef struct { +typedef struct win { int x, y, z; int w, h; - state_t state; - win_sys_t *sys; - win_wm_t *wm; + state_t state; + type_t type; + struct win *parent; + win_sys_t *sys; + win_wm_t *wm; } win_t; /* Generic key codes, also used for some other events