UI Host¶
-
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.
-
typedef void (*
SuilTouchFunc
)(SuilController controller, uint32_t port_index, bool grabbed)¶ Function called when a control is grabbed or released.
-
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.
-
void
suil_init
(int *argc, char ***argv, SuilArg key, ...)¶ Initialize suil.
This function should be called as early as possible, before any other GUI toolkit functions. The variable argument list is a sequence of SuilArg keys and corresponding value pairs for passing any necessary platform-specific information. It must be terminated with SUIL_ARG_NONE.
-
SuilHost *
suil_host_new
(SuilPortWriteFunc write_func, SuilPortIndexFunc index_func, SuilPortSubscribeFunc subscribe_func, SuilPortUnsubscribeFunc unsubscribe_func)¶ Create a new UI host descriptor.
- Parameters
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_set_touch_func
(SuilHost *host, SuilTouchFunc touch_func)¶ Set a touch function for a host descriptor.
Note this function will only be called if the UI supports it.