diff options
author | David Robillard <d@drobilla.net> | 2007-09-23 19:31:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-23 19:31:51 +0000 |
commit | 123ba8acf4817ae246130081f76fc7f4398e412d (patch) | |
tree | 715ea7a6cbfe867b8d6c4d5c2ed3878e4c8530b3 /src/pluginuiinstance.c | |
parent | a06305e2c8068f0519f25ab3d0eddf7278d6ba7c (diff) | |
download | lilv-123ba8acf4817ae246130081f76fc7f4398e412d.tar.gz lilv-123ba8acf4817ae246130081f76fc7f4398e412d.tar.bz2 lilv-123ba8acf4817ae246130081f76fc7f4398e412d.zip |
Fix LV2 UI stuff.
Sineshaper embeds in Ingen now.
git-svn-id: http://svn.drobilla.net/lad/slv2@773 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/pluginuiinstance.c')
-rw-r--r-- | src/pluginuiinstance.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/pluginuiinstance.c b/src/pluginuiinstance.c index be06217..60a3267 100644 --- a/src/pluginuiinstance.c +++ b/src/pluginuiinstance.c @@ -26,6 +26,7 @@ #include <dlfcn.h> #include <slv2/types.h> #include <slv2/plugin.h> +#include <slv2/pluginui.h> #include <slv2/pluginuiinstance.h> #include <slv2/util.h> #include "slv2_internal.h" @@ -41,12 +42,6 @@ slv2_plugin_ui_instantiate(SLV2Plugin plugin, LV2UI_Controller controller, const LV2_Host_Feature* const* host_features) { -#if 0 - assert(ui->type == SLV2_VALUE_UI); - - if (ui->val.ui_type_val != SLV2_UI_TYPE_GTK2) - return NULL; - struct _SLV2UIInstance* result = NULL; bool local_host_features = (host_features == NULL); @@ -55,7 +50,7 @@ slv2_plugin_ui_instantiate(SLV2Plugin plugin, ((LV2_Host_Feature**)host_features)[0] = NULL; } - const char* const lib_uri = slv2_value_as_uri(slv2_plugin_get_ui_library_uri(plugin, ui)); + const char* const lib_uri = slv2_plugin_ui_get_binary_uri(ui); const char* const lib_path = slv2_uri_to_path(lib_uri); if (!lib_path) @@ -76,11 +71,8 @@ slv2_plugin_ui_instantiate(SLV2Plugin plugin, dlclose(lib); return NULL; } else { - // Search for plugin by URI - // FIXME: Bundle in plugin UI only, boo - const char* bundle_path = slv2_uri_to_path(slv2_plugin_get_bundle_uri(plugin)); - printf("UI bundle path: %s\n", bundle_path); + const char* bundle_path = slv2_uri_to_path(slv2_plugin_ui_get_bundle_uri(ui)); for (uint32_t i=0; 1; ++i) { @@ -88,10 +80,10 @@ slv2_plugin_ui_instantiate(SLV2Plugin plugin, if (!ld) { fprintf(stderr, "Did not find UI %s in %s\n", - slv2_value_as_uri(ui), lib_path); + slv2_plugin_ui_get_uri(ui), lib_path); dlclose(lib); break; // return NULL - } else if (!strcmp(ld->URI, slv2_value_as_uri(ui))) { + } else if (!strcmp(ld->URI, slv2_plugin_ui_get_uri(ui))) { printf("Found UI %s at index %u in:\n\t%s\n\n", librdf_uri_as_string(plugin->plugin_uri), i, lib_path); @@ -140,8 +132,6 @@ slv2_plugin_ui_instantiate(SLV2Plugin plugin, free((LV2_Host_Feature**)host_features); return result; -#endif - return NULL; } |