projects
/
retroray
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add relative mouse handling in mouse.asm
[retroray]
/
src
/
rtk_impl.h
diff --git
a/src/rtk_impl.h
b/src/rtk_impl.h
index
17431ee
..
34afd0f
100644
(file)
--- a/
src/rtk_impl.h
+++ b/
src/rtk_impl.h
@@
-2,17
+2,28
@@
#define RTK_IMPL_H_
#include <assert.h>
#define RTK_IMPL_H_
#include <assert.h>
+#include "sizeint.h"
#include "rtk.h"
#include "rtk.h"
+enum {
+ VISIBLE = 0x001,
+ ENABLED = 0x002,
+ HOVER = 0x010,
+ PRESS = 0x020,
+ GEOMCHG = 0x100,
+ DIRTY = 0x200
+};
+
typedef struct rtk_any {
int type;
int x, y, width, height;
char *text;
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;
union rtk_widget *par, *next;
rtk_callback cbfunc;
void *cbcls;
-} rtk_any, rtk_label;
+} rtk_any;
typedef struct rtk_window {
rtk_any any;
typedef struct rtk_window {
rtk_any any;
@@
-22,23
+33,23
@@
typedef struct rtk_window {
typedef struct rtk_button {
rtk_any any;
typedef struct rtk_button {
rtk_any any;
- struct image *icon;
+ int mode;
+ rtk_icon *icon;
} rtk_button;
} 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;
typedef union rtk_widget {
int type;
rtk_any any;
rtk_window win;
rtk_button bn;
- rtk_label lb;
- rtk_checkbox chk;
} rtk_widget;
} 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)
#define RTK_ASSERT_TYPE(w, t) assert(w->any.type == t)