Struct lv2_raw::ui::LV2UIDescriptorRaw [] [src]

#[repr(C)]
pub struct LV2UIDescriptorRaw { pub uri: *const c_char, pub instantiate_raw: extern "C" fn(_: *const LV2UIDescriptorRaw, _: *const c_char, _: *const c_char, _: LV2UIWriteFunctionRaw, _: LV2UIControllerRaw, _: *mut LV2UIWidget, _: *const *const LV2Feature) -> LV2UIHandle, pub cleanup: extern "C" fn(_: LV2UIHandle), pub port_event: extern "C" fn(_: LV2UIHandle, _: c_uint, _: c_uint, _: c_uint, _: *const c_void), pub extension_data: Option<extern "C" fn(_: *const c_char) -> *const c_void>, }

A plugin UI.

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

Fields

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

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.

@param plugin_uri The 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 UI 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.

@param features An 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.

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

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.

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().