Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
plugin_gtk.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2020-2021, 2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __PLUGINS_PLUGIN_GTK_H__
11#define __PLUGINS_PLUGIN_GTK_H__
12
13#include "gui/backend/gtk_widgets/gtk_wrapper.h"
14
15class ControlPort;
16
17namespace zrythm::plugins
18{
19class Plugin;
20
26
31{
32 GtkSpinButton * spin;
33 GtkWidget * control;
34
36 ControlPort * port;
37
40
44};
45
47{
48 Plugin * plugin;
52 void * preset;
53};
54
59void
61
68void
69plugin_gtk_open_generic_ui (Plugin * plugin, bool fire_events);
70
76ATTR_NONNULL int
78
83int
85
86void
87plugin_gtk_set_window_title (Plugin * plugin, GtkWindow * window);
88
89void
90plugin_gtk_add_control_row (
91 GtkWidget * table,
92 int row,
93 const char * name,
94 PluginGtkController * controller);
95
96void
97plugin_gtk_on_save_preset_activate (GtkWidget * widget, Plugin * plugin);
98
99gint
100plugin_gtk_menu_cmp (gconstpointer a, gconstpointer b, gpointer data);
101
108bool
109plugin_gtk_setup_plugin_banks_combo_box (GtkComboBoxText * cb, Plugin * plugin);
110
118bool
120
131GtkWidget *
133 const char * text,
134 bool title,
135 bool preformatted,
136 float xalign,
137 float yalign);
138
143void
145 Plugin * pl,
146 PluginGtkController * controller,
147 float control);
148
149#if 0
150void
151plugin_gtk_build_menu (
152 Plugin * plugin,
153 GtkWidget * window,
154 GtkWidget * vbox);
155#endif
156
157} // namespace zrythm::plugins
158
162
163#endif
DSP processing plugin.
Definition plugin.h:30
Plugin * plugin
Pointer back to plugin.
Definition plugin_gtk.h:39
void plugin_gtk_generic_set_widget_value(Plugin *pl, PluginGtkController *controller, float control)
Called when a property changed or when there is a UI port event to set (update) the widget's value.
bool plugin_gtk_setup_plugin_banks_combo_box(GtkComboBoxText *cb, Plugin *plugin)
Sets up the combo box with all the banks the plugin has.
int plugin_gtk_close_ui(Plugin *plugin)
Closes the plugin's UI (either LV2 wrapped with suil, generic or LV2 external).
ControlPort * port
Port this control is for.
Definition plugin_gtk.h:36
GtkWidget * plugin_gtk_new_label(const char *text, bool title, bool preformatted, float xalign, float yalign)
Creates a label for a control.
bool plugin_gtk_setup_plugin_presets_list_box(GtkListBox *box, Plugin *plugin)
Sets up the combo box with all the presets the plugin has in the given bank, or all the presets if NU...
void plugin_gtk_open_generic_ui(Plugin *plugin, bool fire_events)
Opens the generic UI of the plugin.
float last_set_control_val
Last set control value - used to avoid re-setting the same value on float controls.
Definition plugin_gtk.h:43
void * preset
This will be a LilvNode * for LV2 and an absolute path for carla.
Definition plugin_gtk.h:52
ATTR_NONNULL int plugin_gtk_update_plugin_ui(Plugin *pl)
Called on each GUI frame to update the GTK UI.
void plugin_gtk_create_window(Plugin *plugin)
Creates a new GtkWindow that will be used to either wrap plugin UIs or create generic UIs in.