aboutsummaryrefslogtreecommitdiff
path: root/libgui/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-11-27 12:46:45 +0100
committerMarvin Borner2020-11-27 12:46:45 +0100
commita1dbc858d40b2394e23511aa111ec6590b5fb8c7 (patch)
tree7ad9a63a67a0fca0b879cb7053eb702407a64174 /libgui/inc
parent3288fc6ad2119828c028846ebfdd9cdc8c94af83 (diff)
Started window resize support
Diffstat (limited to 'libgui/inc')
-rw-r--r--libgui/inc/gui.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgui/inc/gui.h b/libgui/inc/gui.h
index 8e925d6..cf0020d 100644
--- a/libgui/inc/gui.h
+++ b/libgui/inc/gui.h
@@ -13,7 +13,7 @@
#define MAX_INPUT_LENGTH 100
// TODO: Improve event types (maybe as struct header)
-enum window_event_type { GUI_KEYBOARD = GFX_MAX + 1, GUI_MOUSE, GUI_MAX };
+enum window_event_type { GUI_KEYBOARD = GFX_MAX + 1, GUI_MOUSE, GUI_RESIZE, GUI_MAX };
enum element_type {
GUI_TYPE_ROOT,
GUI_TYPE_CONTAINER,
@@ -101,6 +101,10 @@ struct gui_event_mouse {
int but3;
};
+struct gui_event_resize {
+ struct context *new_ctx;
+};
+
struct element *gui_init(const char *title, u32 width, u32 height, u32 color_bg);
void gui_event_loop(struct element *container);
struct element *gui_add_button(struct element *container, int x, int y, enum font_type font_type,