aboutsummaryrefslogtreecommitdiff
path: root/src/custom_elements.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/custom_elements.h')
-rw-r--r--src/custom_elements.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/custom_elements.h b/src/custom_elements.h
new file mode 100644
index 0000000..cd36b6a
--- /dev/null
+++ b/src/custom_elements.h
@@ -0,0 +1,32 @@
+#ifndef CUSTOM_ELEMENTS_H_
+#define CUSTOM_ELEMENTS_H_
+
+#include "clay.h"
+
+typedef enum {
+ CUSTOM_ELEMENT_TYPE_CIRCLE,
+ CUSTOM_ELEMENT_TYPE_WAVE_SCREEN,
+} CustomElementType;
+
+typedef struct {
+ float start_angle;
+ float value;
+} CircleData;
+
+typedef struct {
+ float *point_buffer;
+ size_t buffer_len;
+} WaveScreenData;
+
+typedef struct {
+ CustomElementType type;
+
+ union {
+ CircleData circle;
+ WaveScreenData wave_screen;
+ };
+} CustomElementData;
+
+void handle_custom(Clay_BoundingBox bbox, Clay_CustomRenderData *config);
+
+#endif // CUSTOM_ELEMENTS_H_