LMMS
Loading...
Searching...
No Matches
_LV2UI_Descriptor Struct Reference

#include <ui.h>

Public Attributes

const char * URI
LV2UI_Handle(* instantiate )(const struct _LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features)
void(* cleanup )(LV2UI_Handle ui)
void(* port_event )(LV2UI_Handle ui, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void *buffer)
const void *(* extension_data )(const char *uri)

Detailed Description

A plugin UI.

A pointer to an object of this type is returned by the lv2ui_descriptor() function.

Member Data Documentation

◆ cleanup

void(* _LV2UI_Descriptor::cleanup)(LV2UI_Handle ui)

Destroy the UI. The host must not try to access the widget after calling this function.

◆ extension_data

const void *(* _LV2UI_Descriptor::extension_data)(const char *uri)

Return a data structure associated with an extension URI, typically an interface struct with additional function pointers

This member may be set to NULL if the UI is not interested in supporting any extensions. This is similar to LV2_Descriptor::extension_data().

◆ instantiate

LV2UI_Handle(* _LV2UI_Descriptor::instantiate)(const struct _LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features)

Create a new UI and return a handle to it. This function works similarly to LV2_Descriptor::instantiate().

Parameters
descriptorThe descriptor for the UI to instantiate.
plugin_uriThe URI of the plugin that this UI will control.
bundle_pathThe path to the bundle containing this UI, including the trailing directory separator.
write_functionA function that the UI can use to send data to the plugin's input ports.
controllerA handle for the UI instance to be passed as the first parameter of UI methods.
widget(output) widget pointer. The UI points this at its main widget, which has the type defined by the UI type in the data file.
featuresAn array of LV2_Feature pointers. The host must pass all feature URIs that it and the UI supports and any additional data, as in LV2_Descriptor::instantiate(). Note that UI features and plugin features are not necessarily the same.
 Create a new UI and return a handle to it.  This function works
 similarly to LV2_Descriptor::instantiate().

 @param descriptor The descriptor for the UI to instantiate.
Parameters
plugin_uriThe URI of the plugin that this UI will control.
 @param bundle_path The path to the bundle containing this UI, including
 the trailing directory separator.

 @param write_function A function that the UI can use to send data to the
 plugin's input ports.

 @param controller A handle for the plugin instance to be passed as the
 first parameter of UI methods.

 @param widget (output) widget pointer.  The UI points this at its main
 widget, which has the type defined by the UI type in the data file.
featuresAn array of LV2_Feature pointers. The host must pass all feature URIs that it and the UI supports and any additional data, as in LV2_Descriptor::instantiate(). Note that UI features and plugin features are not necessarily the same.

◆ port_event

void(* _LV2UI_Descriptor::port_event)(LV2UI_Handle ui, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void *buffer)

Tell the UI that something interesting has happened at a plugin port.

What is "interesting" and how it is written to buffer is defined by format, which has the same meaning as in LV2UI_Write_Function(). Format 0 is a special case for lv2:ControlPort, where this function should be called when the port value changes (but not necessarily for every change), buffer_size must be sizeof(float), and buffer points to a single IEEE-754 float.

By default, the host should only call this function for lv2:ControlPort inputs. However, the UI can request updates for other ports statically with ui:portNotification or dynamicaly with ui:portSubscribe.

The UI MUST NOT retain any reference to buffer after this function returns, it is only valid for the duration of the call.

This member may be NULL if the UI is not interested in any port events.

Tell the UI that something interesting has happened at a plugin port.

What is "interesting" and how it is written to buffer is defined by format, which has the same meaning as in LV2UI_Write_Function(). Format 0 is a special case for lv2:ControlPort, where this function should be called when the port value changes (but not necessarily for every change), buffer_size must be sizeof(float), and buffer points to a single IEEE-754 float.

By default, the host should only call this function for lv2:ControlPort inputs. However, the UI can request updates for other ports statically with ui:portNotification or dynamically with ui:portSubscribe.

The UI MUST NOT retain any reference to buffer after this function returns, it is only valid for the duration of the call.

This member may be NULL if the UI is not interested in any port events.

◆ URI

const char * _LV2UI_Descriptor::URI

The URI for this UI (not for the plugin it controls).


The documentation for this struct was generated from the following files: