[][src]Struct lv2_sys::_LV2UI_Descriptor

#[repr(C)]
pub struct _LV2UI_Descriptor {
    pub URI: *const c_char,
    pub instantiate: Option<unsafe extern "C" fn(descriptor: *const _LV2UI_Descriptor, plugin_uri: *const c_char, bundle_path: *const c_char, write_function: LV2UI_Write_Function, controller: LV2UI_Controller, widget: *mut LV2UI_Widget, features: *const *const LV2_Feature) -> LV2UI_Handle>,
    pub cleanup: Option<unsafe extern "C" fn(ui: LV2UI_Handle)>,
    pub port_event: Option<unsafe extern "C" fn(ui: LV2UI_Handle, port_index: u32, buffer_size: u32, format: u32, buffer: *const c_void)>,
    pub extension_data: Option<unsafe extern "C" fn(uri: *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

URI: *const c_char

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

instantiate: Option<unsafe extern "C" fn(descriptor: *const _LV2UI_Descriptor, plugin_uri: *const c_char, bundle_path: *const c_char, write_function: LV2UI_Write_Function, controller: LV2UI_Controller, widget: *mut LV2UI_Widget, features: *const *const LV2_Feature) -> LV2UI_Handle>

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.

cleanup: Option<unsafe extern "C" fn(ui: LV2UI_Handle)>

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

port_event: Option<unsafe extern "C" fn(ui: LV2UI_Handle, port_index: u32, buffer_size: u32, format: u32, buffer: *const c_void)>

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.

extension_data: Option<unsafe extern "C" fn(uri: *const c_char) -> *const c_void>

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

Trait Implementations

impl Clone for _LV2UI_Descriptor[src]

impl Copy for _LV2UI_Descriptor[src]

impl Debug for _LV2UI_Descriptor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.