aboutsummaryrefslogtreecommitdiff
path: root/include/saffron_widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/saffron_widget.h')
-rw-r--r--include/saffron_widget.h15
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