Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
lv2_gtk.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: © 2018-2021 Alexandros Theodotou <alex@zrythm.org>
3 *
4 * SPDX-License-Identifier: LicenseRef-ZrythmLicense
5 */
6/*
7 Copyright 2007-2016 David Robillard <http://drobilla.net>
8
9 Permission to use, copy, modify, and/or distribute this software for any
10 purpose with or without fee is hereby granted, provided that the above
11 copyright notice and this permission notice appear in all copies.
12
13 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20*/
21
28#ifndef __PLUGINS_LV2_GTK_H__
29#define __PLUGINS_LV2_GTK_H__
30
31typedef struct Lv2Plugin Lv2Plugin;
32typedef struct Lv2Control Lv2Control;
33typedef struct PluginGtkPresetMenu PluginGtkPresetMenu;
34typedef struct Port Port;
35
36#include <stdint.h>
37
38#include <gtk/gtk.h>
39
40#include <lilv/lilv.h>
41
52void
55 uint32_t port_index,
56 uint32_t buffer_size,
57 uint32_t protocol,
58 const void * buffer);
59
64void
65lv2_gtk_set_float_control (Lv2Plugin * lv2_plugin, Port * port, float value);
66
73int
75
76#if 0
77PluginGtkPresetMenu*
78lv2_gtk_get_bank_menu (
80 PluginGtkPresetMenu* menu,
81 const LilvNode* bank);
82
83void
84lv2_gtk_on_save_activate (
86
87int
88lv2_gtk_add_preset_to_menu (
90 const LilvNode* node,
91 const LilvNode* title,
92 void* data);
93#endif
94
99void
101 GtkWidget * widget,
103 const char * path,
104 const char * uri,
105 bool add_prefix);
106
107GtkWidget *
108lv2_gtk_build_control_widget (Lv2Plugin * plugin, GtkWindow * window);
109
110void
111lv2_gtk_on_delete_preset_activate (GtkWidget * widget, Lv2Plugin * plugin);
112
117#endif
void lv2_gtk_ui_port_event(Lv2Plugin *plugin, uint32_t port_index, uint32_t buffer_size, uint32_t protocol, const void *buffer)
Called when there is a UI port event from the plugin.
void lv2_gtk_on_save_preset_activate(GtkWidget *widget, Lv2Plugin *plugin, const char *path, const char *uri, bool add_prefix)
Called by plugin_gtk_on_save_preset_activate() on accept.
int lv2_gtk_open_ui(Lv2Plugin *plugin)
Opens the LV2 plugin's UI (either wrapped with suil or external).
void lv2_gtk_set_float_control(Lv2Plugin *lv2_plugin, Port *port, float value)
Called by generic UI callbacks when e.g.
LV2 plugin.
Definition lv2_plugin.h:141
Must ONLY be created via port_new()
Definition port.h:140
Plugin * plugin
Pointer to owner plugin, if any.
Definition port.h:323
PluginGtkController * widget
Control widget, if applicable.
Definition port.h:466
void * data
Pointer to arbitrary data.
Definition port.h:228