libxputty 0.1
Loading...
Searching...
No Matches
lv2_plugname_ui.c
Go to the documentation of this file.
1/*
2 * 0BSD
3 *
4 * BSD Zero Clause License
5 *
6 * Copyright (c) 2019 Hermann Meyer
7 *
8 * Permission to use, copy, modify, and/or distribute this software for any
9 * purpose with or without fee is hereby granted.
10
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
18 *
19 */
20
21
22/*---------------------------------------------------------------------
23-----------------------------------------------------------------------
24 define PortIndex and plugin uri
25-----------------------------------------------------------------------
26----------------------------------------------------------------------*/
27
28#include "yourplugin.h"
29
30/*---------------------------------------------------------------------
31-----------------------------------------------------------------------
32 define controller numbers
33-----------------------------------------------------------------------
34----------------------------------------------------------------------*/
35
36#define CONTROLS 1
37
38/*---------------------------------------------------------------------
39-----------------------------------------------------------------------
40 include the LV2 interface
41-----------------------------------------------------------------------
42----------------------------------------------------------------------*/
43
44#include "lv2_plugin.cc"
45
46/*---------------------------------------------------------------------
47-----------------------------------------------------------------------
48 define the plugin settings
49-----------------------------------------------------------------------
50----------------------------------------------------------------------*/
51
52void plugin_value_changed(X11_UI *ui, Widget_t *w, PortIndex index) {
53 // do special stuff when needed
54}
55
56void plugin_set_window_size(int *w,int *h,const char * plugin_uri) {
57 (*w) = 1; //set initial widht of main window
58 (*h) = 1; //set initial heigth of main window
59}
60
61const char* plugin_set_name() {
62 return "NAME"; //set plugin name to display on UI
63}
64
65void plugin_create_controller_widgets(X11_UI *ui, const char * plugin_uri) {
66 // create all controllers needed
67 // ui->widget[0] = add_my_knob(ui->widget[0], PORT,"NAME", ui, x, y, w, h);
68 // set_adjustment(ui->widget[0]->adj,0.5, 0.5, 0.0, 1.0, 0.01, CL_CONTINUOS);
69}
70
72 // clean up used sources when needed
73}
74
75void plugin_port_event(LV2UI_Handle handle, uint32_t port_index,
76 uint32_t buffer_size, uint32_t format,
77 const void * buffer) {
78 // port value change message from host
79 // do special stuff when needed
80}
81
void plugin_create_controller_widgets(X11_UI *ui, const char *plugin_uri)
const char * plugin_set_name()
void plugin_value_changed(X11_UI *ui, Widget_t *w, PortIndex index)
void plugin_cleanup(X11_UI *ui)
void plugin_set_window_size(int *w, int *h, const char *plugin_uri)
void plugin_port_event(LV2UI_Handle handle, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void *buffer)
Widget_t - struct to hold the basic Widget_t info.
Definition xwidget.h:457