Mercurial
comparison infinite_canvas/theme.h @ 276:b55c22cff335
Add interactive infinite canvas prototype
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 16:57:56 -0700 |
| parents | |
| children | 8d560f50ed4c |
comparison
equal
deleted
inserted
replaced
| 274:c9be578316a6 | 276:b55c22cff335 |
|---|---|
| 1 #ifndef INFINITE_CANVAS_THEME_H | |
| 2 #define INFINITE_CANVAS_THEME_H | |
| 3 | |
| 4 #include "dowa/dowa.h" | |
| 5 #include "third_party/raylib/include/raylib.h" | |
| 6 | |
| 7 typedef enum { | |
| 8 CANVAS_THEME_AUTO = 0, | |
| 9 CANVAS_THEME_LIGHT, | |
| 10 CANVAS_THEME_DARK, | |
| 11 } Canvas_Theme_Mode; | |
| 12 | |
| 13 typedef struct { | |
| 14 Canvas_Theme_Mode requested_mode; | |
| 15 Canvas_Theme_Mode resolved_mode; | |
| 16 Color background; | |
| 17 Color surface; | |
| 18 Color surface_muted; | |
| 19 Color border; | |
| 20 Color text; | |
| 21 Color text_muted; | |
| 22 Color accent; | |
| 23 Color accent_soft; | |
| 24 Color shadow; | |
| 25 Color toast_surface; | |
| 26 Color toast_border; | |
| 27 } Canvas_Theme; | |
| 28 | |
| 29 Canvas_Theme_Mode Canvas_Theme_Mode_From_String(const char *p_value); | |
| 30 boolean Canvas_System_Prefers_Dark(void); | |
| 31 void Canvas_Theme_Resolve(Canvas_Theme *p_theme, Canvas_Theme_Mode mode); | |
| 32 void Canvas_Theme_Toggle(Canvas_Theme *p_theme); | |
| 33 void Canvas_Theme_Draw_Shadow( | |
| 34 const Canvas_Theme *p_theme, | |
| 35 Rectangle bounds, | |
| 36 float roundness, | |
| 37 int32 segments, | |
| 38 float zoom, | |
| 39 float opacity); | |
| 40 | |
| 41 #endif |