aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/saffron.h9
-rw-r--r--include/saffron_button.h11
-rw-r--r--include/saffron_text.h0
-rw-r--r--include/saffron_widget.h15
-rw-r--r--include/saffron_window.h0
5 files changed, 35 insertions, 0 deletions
diff --git a/include/saffron.h b/include/saffron.h
new file mode 100644
index 0000000..8682ac4
--- /dev/null
+++ b/include/saffron.h
@@ -0,0 +1,9 @@
+#ifndef SAFFRON_H
+#define SAFFRON_H
+
+#include "saffron_button.h"
+#include "saffron_text.h"
+#include "saffron_widget.h"
+#include "saffron_window.h"
+
+#endif
diff --git a/include/saffron_button.h b/include/saffron_button.h
new file mode 100644
index 0000000..3112edf
--- /dev/null
+++ b/include/saffron_button.h
@@ -0,0 +1,11 @@
+#ifndef SAFFRON_BUTTON_H
+#define SAFFRON_BUTTON_H
+
+#include "saffron_widget.h"
+
+typedef struct {
+ SaffronWidget base; // must be first, or we're f**ked
+ const char* label;
+} SaffronButton;
+
+#endif
diff --git a/include/saffron_text.h b/include/saffron_text.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/saffron_text.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 <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
diff --git a/include/saffron_window.h b/include/saffron_window.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/saffron_window.h