aboutsummaryrefslogtreecommitdiffstats
path: root/widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'widget.h')
-rw-r--r--widget.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/widget.h b/widget.h
index 1237e29..34e6edf 100644
--- a/widget.h
+++ b/widget.h
@@ -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);