diff options
Diffstat (limited to 'widget.h')
| -rw-r--r-- | widget.h | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -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); |