aboutsummaryrefslogtreecommitdiffstats
path: root/widget.h
diff options
context:
space:
mode:
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);