shithub: neindaw

ref: 72f6206d3fbe5c94479d5b0eaa6f79bcab8a8911
dir: /aux.h/

View raw version
enum {
	Xctl,
	Xmetadata,
	Xclone,
	Xdsp,
	Xdspctl,
	Xdspdata,
	UITBox,
	UIHBox,
	UIVBox,
	UIButton,
	UICheck,
	UIVSlider,
	UIHSlider,
	UINum,
	UIHBarGraph,
	UIVBarGraph,
	Xuictl,
};

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

struct Auxdsp {
	void *dsp;
	FAUSTFLOAT **in, **out;
	int numin, numout;
	int inmax, outmax;
};

struct Aux {
	int type;
	int id;
	Auxdsp dsp;
	int ctl;
	int data;
	UI *ui;
};

struct UI {
	const char *key;
	const char *value;
	const char *label;
	FAUSTFLOAT *zone;
	FAUSTFLOAT init;
	FAUSTFLOAT min;
	FAUSTFLOAT max;
	FAUSTFLOAT step;
	char *(*readstr)(Aux *a, UI *ui, int type, char *s, int sz);
	int (*write)(Aux *a, UI *ui, int type, char *s);
};