Header file | LV2UI_Descriptor

_LV2UI_Descriptor Struct Reference

#include <lv2-gtk2gui.h>


Data Fields

const char * URI
 The URI for this GUI (not for the plugin it controls).
LV2UI_Handle(* instantiate )(const struct _LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Set_Control_Function control_function, LV2UI_Controller controller, GtkWidget **widget, const LV2_Host_Feature **features)
 Create a new GUI object and return a handle to it.
void(* cleanup )(LV2UI_Handle gui)
 Destroy the GUI object and the associated widget.
void(* set_control )(LV2UI_Handle gui, uint32_t port, float value)
 Tell the GUI that a control port value has changed.
void *(* extension_data )(LV2UI_Handle gui, const char *uri)
 Returns a data structure associated with an extension URI, for example a struct containing additional function pointers.


Field Documentation

const char* _LV2UI_Descriptor::URI

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

LV2UI_Handle(* _LV2UI_Descriptor::instantiate)(const struct _LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Set_Control_Function control_function, LV2UI_Controller controller, GtkWidget **widget, const LV2_Host_Feature **features)

Create a new GUI object and return a handle to it.

This function works similarly to the instantiate() member in LV2_Descriptor, with the additions that the URI for the plugin that this GUI is for is passed as a parameter, a function pointer and a controller handle are passed to allow the plugin to change control port values in the plugin (control_function and controller) and a pointer to a GtkWidget pointer is passed, which the GUI plugin should set to point to a newly created widget which will be the main GUI for the plugin.

The features array works like the one in the instantiate() member in LV2_Descriptor, except that the URIs should be denoted with the triples

      <http://my.plugingui> <http://ll-plugins.nongnu.org/lv2/dev/gtk2gui#optionalFeature> <http://my.guifeature>
      
or
      <http://my.plugingui> <http://ll-plugins.nongnu.org/lv2/dev/gtk2gui#requiredFeature> <http://my.guifeature>
      
in the RDF file, instead of the lv2:optionalFeature or lv2:requiredFeature that is used by host features. These features are associated with the GUI, not with the plugin - they are not actually LV2 Host Features, they just use the same data structure.

The same rules apply for these features as for normal host features - if a feature is listed as required in the RDF file and the host does not support it, it must not load the GUI.

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

Destroy the GUI object and the associated widget.

void(* _LV2UI_Descriptor::set_control)(LV2UI_Handle gui, uint32_t port, float value)

Tell the GUI that a control port value has changed.

This member may be set to NULL if the GUI is not interested in control port changes.

void*(* _LV2UI_Descriptor::extension_data)(LV2UI_Handle gui, const char *uri)

Returns a data structure associated with an extension URI, for example a struct containing additional function pointers.

Avoid returning function pointers directly since standard C++ has no valid way of casting a void* to a function pointer. This member may be set to NULL if the GUI is not interested in supporting any extensions. This is similar to the extension_data() member in LV2_Descriptor.


The documentation for this struct was generated from the following file:
Generated on Tue Feb 6 16:07:54 2007 by  doxygen 1.5.1