aboutsummaryrefslogtreecommitdiffstats
path: root/widget.h
blob: afd7bb1456ef2f99ed2fd6f2e5f148a6dc2cec58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Field is a floating point number input field. */
typedef struct {
	char buf[64];
	double value;
} w_Field;

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);