Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
plugin_gtk.h
Go to the documentation of this file.
1// clang-format off
2// SPDX-FileCopyrightText: © 2020-2021, 2023 Alexandros Theodotou <alex@zrythm.org>
3// SPDX-License-Identifier: LicenseRef-ZrythmLicense
4// clang-format on
5
12#ifndef __PLUGINS_PLUGIN_GTK_H__
13#define __PLUGINS_PLUGIN_GTK_H__
14
15#include <gtk/gtk.h>
16
17typedef struct Plugin Plugin;
18
28typedef struct PluginGtkController
29{
30 GtkSpinButton * spin;
31 GtkWidget * control;
32
35
38
43
45{
46 Plugin * plugin;
50 void * preset;
52
57void
59
66void
67plugin_gtk_open_generic_ui (Plugin * plugin, bool fire_events);
68
74NONNULL int
76
81int
83
84void
85plugin_gtk_set_window_title (Plugin * plugin, GtkWindow * window);
86
87void
88plugin_gtk_add_control_row (
89 GtkWidget * table,
90 int row,
91 const char * name,
92 PluginGtkController * controller);
93
94void
95plugin_gtk_on_save_preset_activate (GtkWidget * widget, Plugin * plugin);
96
97gint
98plugin_gtk_menu_cmp (gconstpointer a, gconstpointer b, gpointer data);
99
106bool
107plugin_gtk_setup_plugin_banks_combo_box (GtkComboBoxText * cb, Plugin * plugin);
108
116bool
118
129GtkWidget *
131 const char * text,
132 bool title,
133 bool preformatted,
134 float xalign,
135 float yalign);
136
141void
143 Plugin * pl,
144 PluginGtkController * controller,
145 float control);
146
147#if 0
148void
149plugin_gtk_build_menu (
150 Plugin * plugin,
151 GtkWidget * window,
152 GtkWidget * vbox);
153#endif
154
159#endif
GtkWidget * plugin_gtk_new_label(const char *text, bool title, bool preformatted, float xalign, float yalign)
Creates a label for a control.
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.
void plugin_gtk_open_generic_ui(Plugin *plugin, bool fire_events)
Opens the generic UI of the plugin.
NONNULL int plugin_gtk_update_plugin_ui(Plugin *pl)
Called on each GUI frame to update the GTK UI.
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_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.
int plugin_gtk_close_ui(Plugin *plugin)
Closes the plugin's UI (either LV2 wrapped with suil, generic or LV2 external).
bool plugin_gtk_setup_plugin_banks_combo_box(GtkComboBoxText *cb, Plugin *plugin)
Sets up the combo box with all the banks the plugin has.
Widget for a control.
Definition plugin_gtk.h:29
Plugin * plugin
Pointer back to plugin.
Definition plugin_gtk.h:37
float last_set_control_val
Last set control value - used to avoid re-setting the same value on float controls.
Definition plugin_gtk.h:41
Port * port
Port this control is for.
Definition plugin_gtk.h:34
void * preset
This will be a LilvNode * for LV2 and an absolute path for carla.
Definition plugin_gtk.h:50
The base plugin Inheriting plugins must have this as a child.
Definition plugin.h:74
Must ONLY be created via port_new()
Definition port.h:139