X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Frtk_impl.h;h=566e254700475266048659a5da0b2d75a9558609;hb=3c3612761bcf77a5c4ec6810aa47e0e3f0131bf1;hp=17431eebbd7302ea4e0be2d00ab0d58e63467d8f;hpb=8b100bf80fd9975d841458bc76433366b03309b9;p=retroray diff --git a/src/rtk_impl.h b/src/rtk_impl.h index 17431ee..566e254 100644 --- a/src/rtk_impl.h +++ b/src/rtk_impl.h @@ -2,17 +2,33 @@ #define RTK_IMPL_H_ #include +#include "sizeint.h" #include "rtk.h" +enum { + VISIBLE = 0x001, + ENABLED = 0x002, + HOVER = 0x010, + PRESS = 0x020, + GEOMCHG = 0x100, + DIRTY = 0x200, + + /* window flags */ + FRAME = RTK_WIN_FRAME << 16, + MOVABLE = RTK_WIN_MOVABLE << 16, + RESIZABLE = RTK_WIN_RESIZABLE << 16 +}; + typedef struct rtk_any { int type; int x, y, width, height; char *text; - int visible, enabled; + int value; + unsigned int flags; union rtk_widget *par, *next; rtk_callback cbfunc; void *cbcls; -} rtk_any, rtk_label; +} rtk_any; typedef struct rtk_window { rtk_any any; @@ -22,23 +38,23 @@ typedef struct rtk_window { typedef struct rtk_button { rtk_any any; - struct image *icon; + int mode; + rtk_icon *icon; } rtk_button; -typedef struct rtk_checkbox { - rtk_any any; - int chk; -} rtk_checkbox; - typedef union rtk_widget { int type; rtk_any any; rtk_window win; rtk_button bn; - rtk_label lb; - rtk_checkbox chk; } rtk_widget; +typedef struct rtk_iconsheet { + int width, height; + uint32_t *pixels; + + struct rtk_icon *icons; +} rtk_iconsheet; #define RTK_ASSERT_TYPE(w, t) assert(w->any.type == t)