ll-plugins

THIS EXTENSION IS DEPRECATED. DO NOT IMPLEMENT IT AND EXPECT IT TO WORK FOR FUTURE VERSIONS OF MY PLUGINS. A NEW UI EXTENSION IS PUBLISHED HERE.

This extension adds a way to write custom GUIs for plugins. Each GUI will consist of a shared object file containing the implementation and some data in the plugin's RDF files, much like the plugins themselves. The details are in this header file [dox].

Basically, the GUI does not talk to the plugin directly but through the host, using the function callback interface specified in the header. However, since the LV2 specification is open-ended and allows for extensions that can add new types of data and configurations that plugin writers may want to control from the GUI, the GUI interface needs to be open-ended as well. This is done in the same way as with the actual plugins - by adding an extension_data() callback pointer to the GUI that can return additional structs with more callback pointers or other data, and by passing LV2_Host_Feature structures to the GUI instantiation function.

GUIs can have different types depending on what toolkit or environment they are supposed to run in. Types are represented by URIs. The only GUI type defined in this extension is http://ll-plugins.nongnu.org/lv2/ext/gui#GtkGUI, but anyone can define a new type for a different toolkit or environment.

To add a GUI for the plugin with URI http://my.plugin you would add these triples to the RDF file:

<http://my.plugin> <http://ll-plugins.nongnu.org/lv2/ext/gui#gui> <http://my.plugingui>
<http://my.plugingui> <http://www.w3.org/2000/01/rdf-schema#type> <http://ll-plugins.nongnu.org/lv2/ext/gui#GtkGUI>
<http://my.plugingui> <http://ll-plugins.nongnu.org/lv2/ext/gui#binary> <mygui.so>

http://my.plugingui is used as an identifier for this particular GUI, and mygui.so is a shared object file containing the implementation of the GUI (see the header file linked above for the format of this shared object file).

Optional or required GUI features can then be added using the triples

<http://my.plugingui> <http://ll-plugins.nongnu.org/lv2/dev/gui#optionalFeature> <http://my.guifeature1>
<http://my.plugingui> <http://ll-plugins.nongnu.org/lv2/dev/gui#requiredFeature> <http://my.guifeature2>

...and work much in the same way as LV2 Host Features - if a feature is listed as required for a plugin GUI, a host is not allowed to load it unless it supports that feature. See the header for more details.

GUI features are the only "official" mechanism to add additional hints and data to a GUI. A GUI writer can of course still add any RDF data to the data files for the GUI, but hosts are free to ignore any additional data that isn't a required feature.

This extension defines a couple of GUI features that can be useful:

<http://ll-plugins.nongnu.org/lv2/dev/gui#noUserResize>
<http://ll-plugins.nongnu.org/lv2/dev/gui#fixedSize>

If a plugin lists the noUserResize feature as an optional or required feature it means that the GUI host should not allow the user to resize the widget dynamically, because the widget has no use for more space than it asks for in its size request.

If a plugin lists the fixedSize feature as an optional or required feature it means that the GUI widget will not use any space it is given that is larger than its size request, and the size request will never change during the widget's lifetime. fixedSize implies noUserResize.

These two features do not have any associated data structures. When calling instantiate() for the GUI, the GUI host should just set the data pointers for these features to NULL.