shithub: neindaw

ref: c32367bfe581fb67aff6597db4f24b3944028676
dir: /aux.h/

View raw version
typedef enum {
	Xclone,
	Xctl,
	Xmetadata,

	Xdsp,
	Xdspctl,
	Xdspdata,

	Xui,
	Xuictl,
	Xuimeta,
}Auxtype;

typedef struct Aux Aux;
typedef struct Auxdsp Auxdsp;
typedef struct Meta Meta;
typedef struct UI UI;

struct Aux {
	Auxtype type;
	int id;
	int ctl;
	int data;
	int metadata;

	struct Auxdsp *dsp;
	UI *ui;
};

struct Meta {
	const char *k;
	const char *v;
};

struct UI {
	UItype type;
	const char *label;
	float *zone;
	float init;
	float min;
	float max;
	float step;
	char *(*readstr)(UI *ui, int auxtype, char *s, int sz);
	int (*writestr)(UI *ui, int auxtype, char *s);

	Meta *meta;
	int nummeta;
};