starting the material window
[retroray] / src / rtk_impl.h
index 17431ee..566e254 100644 (file)
@@ -2,17 +2,33 @@
 #define RTK_IMPL_H_
 
 #include <assert.h>
+#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)