aboutsummaryrefslogtreecommitdiffstats
path: root/widget.h
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-02-27 17:15:15 -0500
committerSam Anthony <sam@samanthony.xyz>2025-02-27 17:15:15 -0500
commit8cf3c8ca1b193c454b8a79ad921ea5f4890da013 (patch)
tree6585ee274fed4916528ea51386cfd9a1c3ce6009 /widget.h
parent6cd6584675cc91be0dce27809aeab7748621e43e (diff)
downloadvolute-8cf3c8ca1b193c454b8a79ad921ea5f4890da013.zip
select widget
Diffstat (limited to 'widget.h')
-rw-r--r--widget.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/widget.h b/widget.h
index a0149e0..afd7bb1 100644
--- a/widget.h
+++ b/widget.h
@@ -2,7 +2,18 @@
typedef struct {
char buf[64];
double value;
-} Field;
+} w_Field;
-void init_field(Field *f);
-int field(mu_Context *ctx, Field *f);
+void w_init_field(w_Field *f);
+int w_field(mu_Context *ctx, w_Field *f);
+
+
+typedef struct {
+ int nopts;
+ const char *const *opts;
+ int idx; /* index of selected option. */
+ int active;
+} w_Select;
+
+void w_init_select(w_Select *select, int nopts, const char *const opts[]);
+int w_select(mu_Context *ctx, w_Select *select);