plugins/lv2/suil/suil.h file

API for Suil, an LV2 UI wrapper library.

Contents

Enums

enum SuilArg { SUIL_ARG_NONE }
Initialization argument.

Typedefs

using SuilHost = struct SuilHostImpl
UI host descriptor.
using SuilInstance = struct SuilInstanceImpl
An instance of an LV2 plugin UI.
using SuilHandle = void*
Opaque pointer to a UI handle.
using SuilWidget = void*
Opaque pointer to a UI widget.
using SuilController = void*
UI controller.
using SuilPortWriteFunc = void(*)(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.
using SuilPortIndexFunc = uint32_t(*)(SuilController controller, const char*port_symbol)
Function to return the index for a port by symbol.
using SuilPortSubscribeFunc = uint32_t(*)(SuilController controller, uint32_t port_index, uint32_t protocol, const LV2_Feature*const*features)
Function to subscribe to notifications for a port.
using SuilPortUnsubscribeFunc = uint32_t(*)(SuilController controller, uint32_t port_index, uint32_t protocol, const LV2_Feature*const*features)
Function to unsubscribe from notifications for a port.
using SuilTouchFunc = void(*)(SuilController controller, uint32_t port_index, bool grabbed)
Function called when a control is grabbed or released.
using SuilWrapperNewFunc = SuilWrapper*(*)(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.

Functions

void suil_init(int* argc, char*** argv, SuilArg key, ...)
Initialize suil.
auto suil_host_new(SuilPortWriteFunc write_func, SuilPortIndexFunc index_func, SuilPortSubscribeFunc subscribe_func, SuilPortUnsubscribeFunc unsubscribe_func) -> SuilHost*
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.
auto suil_ui_supported(const char* host_type_uri, const char* ui_type_uri) -> unsigned
Check if suil can wrap a UI type.
auto 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) -> SuilInstance*
Instantiate a UI for an LV2 plugin.
void suil_instance_free(SuilInstance* instance)
Free a plugin UI instance.
auto suil_instance_get_handle(SuilInstance* instance) -> SuilHandle
Get the handle for a UI instance.
auto suil_instance_get_widget(SuilInstance* instance) -> SuilWidget
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.
auto suil_instance_extension_data(SuilInstance* instance, const char* uri) -> const void*
Return a data structure defined by some LV2 extension URI.
auto suil_wrapper_new_x11(SuilHost* host, const char* host_type_uri, const char* ui_type_uri, LV2_Feature*** features, unsigned n_features) -> SuilWrapper*
Prototype for suil_wrapper_new in each wrapper module.
auto suil_wrapper_new_qt5(SuilHost* host, const char* host_type_uri, const char* ui_type_uri, LV2_Feature*** features, unsigned n_features) -> SuilWrapper*
Prototype for suil_wrapper_new in each wrapper module.
auto suil_wrapper_new_woe(SuilHost* host, const char* host_type_uri, const char* ui_type_uri, LV2_Feature*** features, unsigned n_features) -> SuilWrapper*
Prototype for suil_wrapper_new in each wrapper module.
auto suil_wrapper_new_cocoa(SuilHost* host, const char* host_type_uri, const char* ui_type_uri, LV2_Feature*** features, unsigned n_features) -> SuilWrapper*
Prototype for suil_wrapper_new in each wrapper module.
void suil_host_init(void)
Prototype for suil_host_init in each init module.
static auto suil_dlfunc(void* handle, const char* symbol) -> SuilVoidFunc
dlsym wrapper to return a function pointer (without annoying warning)
static void suil_add_feature(LV2_Feature*** features, unsigned* n, const char* uri, void* data)
Add a feature to a (mutable) LV2 feature array.

Typedef documentation

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.