libxputty 0.1
Loading...
Searching...
No Matches
Functions
lv2_plugin.cc File Reference

Go to the source code of this file.

Functions

Widget_tadd_my_knob (Widget_t *w, PortIndex index, const char *label, X11_UI *ui, int x, int y, int width, int height)
 
Widget_tadd_my_image_knob (Widget_t *w, PortIndex index, const char *label, X11_UI *ui, int x, int y, int width, int height)
 
Widget_tadd_my_value_knob (Widget_t *w, PortIndex index, const char *label, X11_UI *ui, int x, int y, int width, int height)
 
Widget_tadd_my_switch_image (Widget_t *w, PortIndex index, const char *label, X11_UI *ui, int x, int y, int width, int height)
 
Widget_tadd_my_combobox (Widget_t *w, PortIndex index, const char *label, const char **items, size_t len, int active, X11_UI *ui, int x, int y, int width, int height)
 
LV2_SYMBOL_EXPORT const LV2UI_Descriptor * lv2ui_descriptor (uint32_t index)
 

Function Documentation

◆ add_my_combobox()

Widget_t * add_my_combobox ( Widget_t w,
PortIndex  index,
const char *  label,
const char **  items,
size_t  len,
int  active,
X11_UI ui,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 267 of file lv2_plugin.cc.

268 {
269 w = add_combobox(ui->win, label, x, y, width, height);
270 size_t st = 0;
271 for(; st < len; st++) {
272 combobox_add_entry(w,items[st]);
273 }
274 w->parent_struct = ui;
275 w->data = index;
276 combobox_set_active_entry(w, active);
277 w->func.value_changed_callback = value_changed;
278 return w;
279}
xevfunc value_changed_callback
Definition xwidget.h:90
int data
Definition xwidget.h:509
void * parent_struct
Definition xwidget.h:473
Func_t func
Definition xwidget.h:481
Widget_t * win
Definition lv2_plugin.h:56
void combobox_set_active_entry(Widget_t *w, int active)
combobox_set_active_entry - set the active combobox entry
Definition xcombobox.c:27
void combobox_add_entry(Widget_t *wid, const char *label)
combobox_add_entry - add a entry to the combobox
Definition xcombobox.c:175
Widget_t * add_combobox(Widget_t *parent, const char *label, int x, int y, int width, int height)
add_combobox - add a combobox
Definition xcombobox.c:152

References add_combobox(), combobox_add_entry(), combobox_set_active_entry(), Widget_t::data, Widget_t::func, Widget_t::parent_struct, Func_t::value_changed_callback, and X11_UI::win.

◆ add_my_image_knob()

Widget_t * add_my_image_knob ( Widget_t w,
PortIndex  index,
const char *  label,
X11_UI ui,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 237 of file lv2_plugin.cc.

238 {
239 w = add_image_knob(ui->win, label, x, y, width, height);
240 w->parent_struct = ui;
241 w->data = index;
242 w->func.value_changed_callback = value_changed;
243 return w;
244}
Widget_t * add_image_knob(Widget_t *parent, const char *label, int x, int y, int width, int height)
add_image_knob - add a knob from image to a Widget_t without value display on the knob connect to fun...
Definition xknob.c:41

References add_image_knob(), Widget_t::data, Widget_t::func, Widget_t::parent_struct, Func_t::value_changed_callback, and X11_UI::win.

◆ add_my_knob()

Widget_t * add_my_knob ( Widget_t w,
PortIndex  index,
const char *  label,
X11_UI ui,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 226 of file lv2_plugin.cc.

227 {
228 w = add_knob(ui->win, label, x, y, width, height);
229 w->func.expose_callback = draw_my_knob;
230 w->parent_struct = ui;
231 w->data = index;
232 w->func.value_changed_callback = value_changed;
233 return w;
234}
xevfunc expose_callback
Definition xwidget.h:85
Widget_t * add_knob(Widget_t *parent, const char *label, int x, int y, int width, int height)
add_knob - add a knob to a Widget_t connect to func.value_changed_callback to implement your actions ...
Definition xknob.c:26

References add_knob(), Widget_t::data, Func_t::expose_callback, Widget_t::func, Widget_t::parent_struct, Func_t::value_changed_callback, and X11_UI::win.

◆ add_my_switch_image()

Widget_t * add_my_switch_image ( Widget_t w,
PortIndex  index,
const char *  label,
X11_UI ui,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 257 of file lv2_plugin.cc.

258 {
259 w = add_switch_image_button(ui->win, label, x, y, width, height);
260 w->parent_struct = ui;
261 w->data = index;
262 w->func.value_changed_callback = value_changed;
263 return w;
264}
Widget_t * add_switch_image_button(Widget_t *parent, const char *label, int x, int y, int width, int height)
add_switch_image_button - add a button to a Widget_t connect to func.value_changed_callback to implem...
Definition xbutton.c:105

References add_switch_image_button(), Widget_t::data, Widget_t::func, Widget_t::parent_struct, Func_t::value_changed_callback, and X11_UI::win.

◆ add_my_value_knob()

Widget_t * add_my_value_knob ( Widget_t w,
PortIndex  index,
const char *  label,
X11_UI ui,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 247 of file lv2_plugin.cc.

248 {
249 w = add_knob(ui->win, label, x, y, width, height);
250 w->parent_struct = ui;
251 w->data = index;
252 w->func.value_changed_callback = value_changed;
253 return w;
254}

References add_knob(), Widget_t::data, Widget_t::func, Widget_t::parent_struct, Func_t::value_changed_callback, and X11_UI::win.

◆ lv2ui_descriptor()

LV2_SYMBOL_EXPORT const LV2UI_Descriptor * lv2ui_descriptor ( uint32_t  index)

Definition at line 427 of file lv2_plugin.cc.

427 {
428 if (index >= sizeof(descriptors) / sizeof(descriptors[0])) {
429 return NULL;
430 }
431 return descriptors + index;
432}