From 04ff8c0a6acc2cc9204492690b7f99f892ed439a Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Tue, 7 Apr 2026 11:13:23 +1200 Subject: Refactor things, and start implementing API widgets --- include/saffron_widget.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/saffron_widget.h (limited to 'include/saffron_widget.h') diff --git a/include/saffron_widget.h b/include/saffron_widget.h new file mode 100644 index 0000000..6d7b6bd --- /dev/null +++ b/include/saffron_widget.h @@ -0,0 +1,15 @@ +#ifndef SAFFRON_WIDGET_H +#define SAFFRON_WIDGET_H + +#include + +typedef struct SaffronWidget { + int x, y, w, h; + void (*draw)(struct SaffronWidget *self, SDL_Renderer *renderer); + void (*on_click)(struct SaffronWidget *self); + struct SaffronWidget *parent; + struct SaffronWidget **children; + int child_count; +} SaffronWidget; + +#endif -- cgit v1.2.3