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 GTK+ 2.0-compatible widget, the code for which is contained in a shared object file that is loaded by a host process in much the same way that the actual plugin is loaded. 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.

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/gtk2gui#gui> <http://my.plugingui>
<http://my.plugingui> <http://ll-plugins.nongnu.org/lv2/ext/gtk2gui#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/gtk2gui#optionalFeature> <http://my.guifeature1>
<http://my.plugingui> <http://ll-plugins.nongnu.org/lv2/dev/gtk2gui#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.

GUIs do not have any equivalents to the pluginHints and pluginProperties defined for LV2 plugins, GUI features is 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/gtk2gui#noUserResize>
<http://ll-plugins.nongnu.org/lv2/dev/gtk2gui#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.