aboutsummaryrefslogtreecommitdiff
path: root/libgui/inc/gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'libgui/inc/gui.h')
-rw-r--r--libgui/inc/gui.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/libgui/inc/gui.h b/libgui/inc/gui.h
index 565bcf6..ea1e40e 100644
--- a/libgui/inc/gui.h
+++ b/libgui/inc/gui.h
@@ -6,20 +6,39 @@
#include <def.h>
#include <gfx.h>
+#include <list.h>
#define MAX_CHILDS 100
+enum element_type { GUI_TYPE_CONTAINER, GUI_TYPE_BUTTON, GUI_TYPE_TEXTBOX };
+
+struct element_button {
+ const char *text;
+ u32 color;
+};
+
+struct element_textbox {
+ const char *text;
+ u32 color;
+};
+
struct element {
- struct context *ctx;
+ enum element_type type;
+ u32 window_id;
+ struct context *ctx; // Coordinates are relative to container
+ struct list *childs;
+ void *data; // Who needs static types anyways :)
};
struct window {
+ u32 id;
const char *title;
- struct element *childs[MAX_CHILDS];
+ struct list *childs;
struct context *ctx;
};
-// TODO: Remove window return (internal)
-struct window *gui_init(const char *title, u32 width, u32 height);
+struct element *gui_init(const char *title, u32 width, u32 height);
+struct element *gui_add_button(struct element *container, int x, int y, u32 width, u32 height,
+ const char *text, u32 color);
#endif