diff options
| author | Arslaan Pathan <[email protected]> | 2026-04-07 11:13:23 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-04-07 11:13:23 +1200 |
| commit | 04ff8c0a6acc2cc9204492690b7f99f892ed439a (patch) | |
| tree | f1e2eb213c95f51ba0b97089aa04b60b7d19330d /include/saffron_widget.h | |
| parent | 7fba8447b9ce0c74808b943d9fe7f56b9663c4cf (diff) | |
| download | saffron-04ff8c0a6acc2cc9204492690b7f99f892ed439a.tar.xz saffron-04ff8c0a6acc2cc9204492690b7f99f892ed439a.zip | |
Refactor things, and start implementing API widgets
Diffstat (limited to 'include/saffron_widget.h')
| -rw-r--r-- | include/saffron_widget.h | 15 |
1 files changed, 15 insertions, 0 deletions
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 <SDL3/SDL.h> + +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 |
