summaryrefslogtreecommitdiff
path: root/src/main/engine/ui/ui.h
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-22 18:04:51 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-22 18:04:51 +0200
commitcec27feccd1d3232ceae2bf284f66071d36cc96a (patch)
tree26556a4b6a4b6123bdf4bb06edb5c9e815528b9e /src/main/engine/ui/ui.h
parent9f4a0889287186907332c0186b15802297d807f3 (diff)
downloadtris-cec27feccd1d3232ceae2bf284f66071d36cc96a.tar.gz
tris-cec27feccd1d3232ceae2bf284f66071d36cc96a.zip
Remove the rendering of circles from the Engine
Diffstat (limited to 'src/main/engine/ui/ui.h')
-rw-r--r--src/main/engine/ui/ui.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/engine/ui/ui.h b/src/main/engine/ui/ui.h
index e1c4283..53040ed 100644
--- a/src/main/engine/ui/ui.h
+++ b/src/main/engine/ui/ui.h
@@ -22,11 +22,17 @@
#include "types.h"
+typedef struct LoopEvent {
+ void (*on_loop_event)(void *data);
+ void *data;
+} LoopEvent;
+
typedef struct UI {
int width;
int height;
void *extra;
int close_window;
+ LoopEvent *loop_event;
} UI;
UI *ui_new(int w, int h);
@@ -34,8 +40,8 @@ void ui_loop(UI *ui);
void ui_set_title(UI *ui, const char *title);
void ui_set_expose_listener(void (*expose_event)());
void ui_set_resize_listener(void (*resize_event)(UIEventResize *));
-void ui_set_loop_listener(void (*event)());
-void ui_set_mouse_press_listener(void (*event)(UIMouseButtonPressed *));
+void ui_set_loop_listener(UI *ui, void (*event)(void *data), void *data);
+void ui_set_mouse_press_listener(void (*event)(UIMouseButtonPressed *), void *data);
void ui_set_generic_listener(void (*generic_event)(int type));
#endif /* __UI_H__ */