Suil
0.4.4
|
Opaque Types | |
typedef struct SuilHostImpl | SuilHost |
typedef struct SuilInstanceImpl | SuilInstance |
typedef void * | SuilWidget |
typedef void * | SuilController |
typedef void(* | SuilPortWriteFunc )(SuilController controller, uint32_t port_index, uint32_t buffer_size, uint32_t protocol, void const *buffer) |
typedef uint32_t(* | SuilPortIndexFunc )(SuilController controller, const char *port_symbol) |
typedef uint32_t(* | SuilPortSubscribeFunc )(SuilController controller, uint32_t port_index, uint32_t protocol, const LV2_Feature *const *features) |
typedef uint32_t(* | SuilPortUnsubscribeFunc )(SuilController controller, uint32_t port_index, uint32_t protocol, const LV2_Feature *const *features) |
Functions | |
SuilHost * | suil_host_new (SuilPortWriteFunc write_func, SuilPortIndexFunc index_func, SuilPortSubscribeFunc subscribe_func, SuilPortUnsubscribeFunc unsubscribe_func) |
void | suil_host_free (SuilHost *host) |
unsigned | suil_ui_supported (const char *host_type_uri, const char *ui_type_uri) |
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) |
void | suil_instance_free (SuilInstance *instance) |
SuilWidget | suil_instance_get_widget (SuilInstance *instance) |
void | suil_instance_port_event (SuilInstance *instance, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void *buffer) |
const void * | suil_instance_extension_data (SuilInstance *instance, const char *uri) |
A library for hosting LV2 plugin UIs.
typedef struct SuilHostImpl SuilHost |
UI host descriptor.
This contains the various functions that a plugin UI may use to communicate with the plugin. It is passed to suil_instance_new to provide these functions to the UI.
typedef struct SuilInstanceImpl SuilInstance |
An instance of an LV2 plugin UI.
typedef void* SuilWidget |
Opaque pointer to a UI widget.
typedef void* SuilController |
UI controller.
This is an opaque pointer passed by the user which is passed to the various UI control functions (e.g. SuilPortWriteFunc). It is typically used to pass a pointer to some controller object the host uses to communicate with plugins.
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.
SuilHost* suil_host_new | ( | SuilPortWriteFunc | write_func, |
SuilPortIndexFunc | index_func, | ||
SuilPortSubscribeFunc | subscribe_func, | ||
SuilPortUnsubscribeFunc | unsubscribe_func | ||
) |
Create a new UI host descriptor.
write_func | Function to send a value to a plugin port. |
index_func | Function to get the index for a port by symbol. |
subscribe_func | Function to subscribe to port updates. |
unsubscribe_func | Function to unsubscribe from port updates. |
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.
host_type_uri | The URI of the desired widget type of the host, corresponding to the type_uri parameter of suil_instance_new. |
ui_type_uri | The URI of the UI widget 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.
host | Host descriptor. |
controller | Opaque host controller pointer. |
container_type_uri | URI of the desired host container widget type. |
plugin_uri | URI of the plugin to instantiate this UI for. |
ui_uri | URI of the specifically desired UI. |
ui_type_uri | URI of the actual UI widget type. |
ui_bundle_path | Path of the UI bundle. |
ui_binary_path | Path of the UI binary. |
features | NULL-terminated array of supported features, or NULL. |
void suil_instance_free | ( | SuilInstance * | instance | ) |
Free a plugin UI instance.
The caller must ensure all references to the UI have been dropped before calling this function (e.g. it has been removed from its parent).
SuilWidget suil_instance_get_widget | ( | SuilInstance * | instance | ) |
Get the widget for a UI instance.
Returns an opaque pointer to a widget, the type of which matches the container_type_uri
parameter of suil_instance_new. Note this may be a wrapper widget created by Suil, and not necessarily the widget directly implemented by the UI.
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.