summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-06-30 22:29:56 +0000
committerDavid Robillard <d@drobilla.net>2007-06-30 22:29:56 +0000
commit435bc2fc2c0eb78addac1e688411ad8fad02517a (patch)
tree68eb0a9f6ceac13a9cd634f9cf8ea4fb5f7da75c /src/plugin.c
parent8d964fa7e72ebf076cd40a0b72caf778ce82fb85 (diff)
downloadlilv-435bc2fc2c0eb78addac1e688411ad8fad02517a.tar.gz
lilv-435bc2fc2c0eb78addac1e688411ad8fad02517a.tar.bz2
lilv-435bc2fc2c0eb78addac1e688411ad8fad02517a.zip
Added support for (Lars Luthman's) GTK GUI extension (SLV2 still does NOT depend on GTK!).
git-svn-id: http://svn.drobilla.net/lad/slv2@546 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 7dba104..1d63978 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -541,3 +541,42 @@ slv2_plugin_get_port_by_symbol(SLV2Plugin p,
return NULL;
}
+
+SLV2Values
+slv2_plugin_get_guis(SLV2Plugin plugin)
+{
+ if (!plugin->rdf)
+ slv2_plugin_load(plugin);
+
+ return slv2_plugin_get_value(plugin, SLV2_URI,
+ "http://ll-plugins.nongnu.org/lv2/ext/gtk2gui#gui");
+}
+
+
+SLV2Value
+slv2_plugin_gui_get_library_uri(SLV2Plugin plugin,
+ SLV2Value gui)
+{
+ if (!plugin->rdf)
+ slv2_plugin_load(plugin);
+
+ SLV2Values values = slv2_plugin_get_value_for_subject(plugin, gui, SLV2_URI,
+ "http://ll-plugins.nongnu.org/lv2/ext/gtk2gui#binary");
+
+ if (!values || slv2_values_size(values) == 0) {
+ slv2_values_free(values);
+ return NULL;
+ }
+
+ SLV2Value value = slv2_values_get_at(values, 0);
+ if (!slv2_value_is_uri(value)) {
+ slv2_values_free(values);
+ return NULL;
+ }
+
+ value = slv2_value_duplicate(value);
+ slv2_values_free(values);
+
+ return value;
+}
+