diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-04-27 11:07:55 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-04-27 11:07:55 -0400 |
| commit | dec2f0fe3ea9e3e95d6fc6abc421f1a81149c10c (patch) | |
| tree | a5af814c7b4249ccee710a8e455ac3195d2ad068 /widget.h | |
| parent | f45e9a8d37a384ccea33158a4d3062d633720c93 (diff) | |
| download | volute-dec2f0fe3ea9e3e95d6fc6abc421f1a81149c10c.zip | |
init compressor-select widget
Diffstat (limited to 'widget.h')
| -rw-r--r-- | widget.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1,6 +1,7 @@ enum { FIELD_SIZE = 64, NUMBER_SIZE = 128, + NAME_SIZE = 256, }; @@ -28,6 +29,26 @@ void w_init_select(w_Select *select, int nopts, const char *const opts[]); int w_select(mu_Context *ctx, w_Select *select); +typedef struct { + const Compressor *comps; + int n; /* len(comps) */ + + int *filtered; /* indices of compressors accepted by the filter. */ + int nfiltered; /* len(filtered) */ + + char **names; /* buffer to hold names of compressors. */ + + int idx; /* index of selected in filtered. */ + int oldidx; /* index of previously selected. */ + + int active; +} w_Select_Compressor; + +int w_init_select_compressor(w_Select_Compressor *select, int n, const Compressor *const comps); +void w_free_select_compressor(w_Select_Compressor *select); +int w_select_compressor(mu_Context *ctx, w_Select_Compressor *select); + + typedef char w_Number[NUMBER_SIZE]; void w_init_number(w_Number num); |