Zrythm
a highly automated and intuitive digital audio workstation
|
API for Suil, an LV2 UI wrapper library. More...
#include "zrythm-config.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include "lv2/core/lv2.h"
#include "lv2/ui/ui.h"
#include <dlfcn.h>
#include <gtk/gtk.h>
Go to the source code of this file.
Data Structures | |
struct | SuilHost |
UI host descriptor. More... | |
struct | SuilWrapper |
struct | SuilInstance |
An instance of an LV2 plugin UI. More... | |
Macros | |
#define | GTK2_UI_URI LV2_UI__GtkUI |
#define | GTK3_UI_URI LV2_UI__Gtk3UI |
#define | GTK4_UI_URI LV2_UI__Gtk4UI |
#define | QT4_UI_URI LV2_UI__Qt4UI |
#define | QT5_UI_URI LV2_UI__Qt5UI |
#define | X11_UI_URI LV2_UI__X11UI |
#define | WIN_UI_URI LV2_UI_PREFIX "WindowsUI" |
#define | COCOA_UI_URI LV2_UI__CocoaUI |
#define | SUIL_ERRORF(fmt, ...) g_warning("suil error: " fmt, __VA_ARGS__) |
Typedefs | |
typedef void * | SuilHandle |
Opaque pointer to a UI handle. | |
typedef void * | SuilWidget |
Opaque pointer to a UI widget. | |
typedef void * | SuilController |
UI controller. | |
typedef void(* | SuilPortWriteFunc) (SuilController controller, uint32_t port_index, uint32_t buffer_size, uint32_t protocol, void const *buffer) |
Function to write/send a value to a port. | |
typedef uint32_t(* | SuilPortIndexFunc) (SuilController controller, const char *port_symbol) |
Function to return the index for a port by symbol. | |
typedef uint32_t(* | SuilPortSubscribeFunc) (SuilController controller, uint32_t port_index, uint32_t protocol, const LV2_Feature *const *features) |
Function to subscribe to notifications for a port. | |
typedef uint32_t(* | SuilPortUnsubscribeFunc) (SuilController controller, uint32_t port_index, uint32_t protocol, const LV2_Feature *const *features) |
Function to unsubscribe from notifications for a port. | |
typedef void(* | SuilTouchFunc) (SuilController controller, uint32_t port_index, bool grabbed) |
Function called when a control is grabbed or released. | |
typedef void(* | SuilWrapperFreeFunc) (struct _SuilWrapper *) |
typedef int(* | SuilWrapperWrapFunc) (struct _SuilWrapper *wrapper, SuilInstance *instance) |
typedef SuilWrapper *(* | SuilWrapperNewFunc) (SuilHost *host, const char *host_type_uri, const char *ui_type_uri, LV2_Feature ***features, unsigned n_features) |
The type of the suil_wrapper_new entry point in a wrapper module. | |
typedef void(* | SuilVoidFunc) (void) |
Enumerations | |
enum | SuilArg { SUIL_ARG_NONE } |
Initialization argument. More... | |
Functions | |
void | suil_init (int *argc, char ***argv, SuilArg key,...) |
Initialize suil. | |
SuilHost * | suil_host_new (SuilPortWriteFunc write_func, SuilPortIndexFunc index_func, SuilPortSubscribeFunc subscribe_func, SuilPortUnsubscribeFunc unsubscribe_func) |
Create a new UI host descriptor. | |
void | suil_host_set_touch_func (SuilHost *host, SuilTouchFunc touch_func) |
Set a touch function for a host descriptor. | |
void | suil_host_free (SuilHost *host) |
Free host . | |
unsigned | suil_ui_supported (const char *host_type_uri, const char *ui_type_uri) |
Check if suil can wrap a UI type. | |
SuilInstance * | suil_instance_new (SuilHost *host, SuilController controller, const char *container_type_uri, const char *plugin_uri, const char *ui_uri, const char *ui_type_uri, const char *ui_bundle_path, const char *ui_binary_path, const LV2_Feature *const *features) |
Instantiate a UI for an LV2 plugin. | |
void | suil_instance_free (SuilInstance *instance) |
Free a plugin UI instance. | |
SuilHandle | suil_instance_get_handle (SuilInstance *instance) |
Get the handle for a UI instance. | |
SuilWidget | suil_instance_get_widget (SuilInstance *instance) |
Get the widget for a UI instance. | |
void | suil_instance_port_event (SuilInstance *instance, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void *buffer) |
Notify the UI about a change in a plugin port. | |
const void * | suil_instance_extension_data (SuilInstance *instance, const char *uri) |
Return a data structure defined by some LV2 extension URI. | |
SuilWrapper * | suil_wrapper_new_x11 (SuilHost *host, const char *host_type_uri, const char *ui_type_uri, LV2_Feature ***features, unsigned n_features) |
Prototype for suil_wrapper_new in each wrapper module. | |
SuilWrapper * | suil_wrapper_new_qt5 (SuilHost *host, const char *host_type_uri, const char *ui_type_uri, LV2_Feature ***features, unsigned n_features) |
Prototype for suil_wrapper_new in each wrapper module. | |
SuilWrapper * | suil_wrapper_new_woe (SuilHost *host, const char *host_type_uri, const char *ui_type_uri, LV2_Feature ***features, unsigned n_features) |
Prototype for suil_wrapper_new in each wrapper module. | |
SuilWrapper * | suil_wrapper_new_cocoa (SuilHost *host, const char *host_type_uri, const char *ui_type_uri, LV2_Feature ***features, unsigned n_features) |
Prototype for suil_wrapper_new in each wrapper module. | |
void | suil_host_init (void) |
Prototype for suil_host_init in each init module. | |
API for Suil, an LV2 UI wrapper library.
Definition in file suil.h.
#define SUIL_ERRORF | ( | fmt, | |
... ) g_warning("suil error: " fmt, __VA_ARGS__) |
typedef SuilWrapper *(* SuilWrapperNewFunc) (SuilHost *host, const char *host_type_uri, const char *ui_type_uri, LV2_Feature ***features, unsigned n_features) |
The type of the suil_wrapper_new entry point in a wrapper module.
This constructs a SuilWrapper which contains everything necessary to wrap a widget, including a possibly extended features array to be used for instantiating the UI.