[wip] change gui/widget api
This commit is contained in:
@@ -4,7 +4,15 @@
|
||||
|
||||
typedef struct GUI GUI;
|
||||
typedef struct Canvas Canvas;
|
||||
typedef struct Widget Widget;
|
||||
|
||||
typedef struct {
|
||||
void* gui;
|
||||
bool is_enabled;
|
||||
WidgetDrawCallback draw_callback;
|
||||
void* draw_callback_context;
|
||||
WidgetInputCallback input_callback;
|
||||
void* input_callback_context;
|
||||
} Widget;
|
||||
|
||||
typedef void (*WidgetDrawCallback)(Canvas* canvas, void* context);
|
||||
typedef void (*WidgetInputCallback)(InputEvent* event, void* context);
|
||||
|
||||
Reference in New Issue
Block a user