diff options
author | David Robillard <d@drobilla.net> | 2007-06-30 23:33:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-30 23:33:36 +0000 |
commit | f291f0a52c45c9ae14d031c1fc16d772c65d94ce (patch) | |
tree | dbe9701473c6cfe6fd3df50a6d4dc103c0ab9f26 /src/plugin.c | |
parent | 435bc2fc2c0eb78addac1e688411ad8fad02517a (diff) | |
download | lilv-f291f0a52c45c9ae14d031c1fc16d772c65d94ce.tar.gz lilv-f291f0a52c45c9ae14d031c1fc16d772c65d94ce.tar.bz2 lilv-f291f0a52c45c9ae14d031c1fc16d772c65d94ce.zip |
Reworked GUI access in a safer way, anticipating various GUI specs (w/o breaking binary compatibility).
Increment libtool library version number accordingly (new methods added, still backwards compatible).
git-svn-id: http://svn.drobilla.net/lad/slv2@547 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/plugin.c b/src/plugin.c index 1d63978..783ba23 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -377,7 +377,7 @@ slv2_plugin_get_value_for_subject(SLV2Plugin p, SLV2URIType predicate_type, const char* predicate) { - if (subject->type != SLV2_VALUE_URI) { + if ( ! slv2_value_is_uri(subject)) { fprintf(stderr, "slv2_plugin_get_value_for_subject error: " "passed non-URI subject\n"); return NULL; @@ -548,15 +548,25 @@ slv2_plugin_get_guis(SLV2Plugin plugin) if (!plugin->rdf) slv2_plugin_load(plugin); - return slv2_plugin_get_value(plugin, SLV2_URI, + SLV2Values result = slv2_plugin_get_value(plugin, SLV2_URI, "http://ll-plugins.nongnu.org/lv2/ext/gtk2gui#gui"); + + for (int i=0; i < raptor_sequence_size(result); ++i) { + SLV2Value val = (SLV2Value)raptor_sequence_get_at(result, i); + val->type = SLV2_VALUE_GUI; + val->val.gui_type_val = SLV2_GTK2_GUI; + } + + return result; } SLV2Value -slv2_plugin_gui_get_library_uri(SLV2Plugin plugin, +slv2_plugin_get_gui_library_uri(SLV2Plugin plugin, SLV2Value gui) { + assert(gui->type == SLV2_VALUE_GUI); + if (!plugin->rdf) slv2_plugin_load(plugin); |