diff options
author | David Robillard <d@drobilla.net> | 2011-03-08 19:58:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-08 19:58:25 +0000 |
commit | 2edb1283923b3c9b31d289342c74688975cb45fa (patch) | |
tree | 3751838306c79cfc858e7514e45cce6311373063 /src | |
parent | a7d7fae434dc32e6787dfe54d1c30e0bccc660bd (diff) | |
download | ingen-2edb1283923b3c9b31d289342c74688975cb45fa.tar.gz ingen-2edb1283923b3c9b31d289342c74688975cb45fa.tar.bz2 ingen-2edb1283923b3c9b31d289342c74688975cb45fa.zip |
Update for new SLV2 UI API.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3056 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/client/PluginUI.cpp | 10 | ||||
-rw-r--r-- | src/client/PluginUI.hpp | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index 8233506c..3005a02a 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -34,6 +34,8 @@ using namespace Raul; namespace Ingen { namespace Client { +SLV2UIHost PluginUI::ui_host = NULL; + static void lv2_ui_write(LV2UI_Controller controller, uint32_t port_index, @@ -120,6 +122,10 @@ PluginUI::create(Ingen::Shared::World* world, SharedPtr<NodeModel> node, SLV2Plugin plugin) { + if (!PluginUI::ui_host) { + PluginUI::ui_host = slv2_ui_host_new(lv2_ui_write, NULL, NULL, NULL); + } + SharedPtr<PluginUI> ret(new PluginUI(world, node)); ret->_features = world->lv2_features()->lv2_features(world, node.get()); @@ -128,14 +134,12 @@ PluginUI::create(Ingen::Shared::World* world, SLV2UI ui = slv2_plugin_get_default_ui(plugin, gtk_ui); - SLV2UIHost ui_host = slv2_ui_host_new( - ret.get(), lv2_ui_write, NULL, NULL, NULL); - SLV2UIInstance instance = slv2_ui_instance_new( plugin, ui, gtk_ui, ui_host, + ret.get(), ret->_features->array()); slv2_ui_host_free(ui_host); diff --git a/src/client/PluginUI.hpp b/src/client/PluginUI.hpp index 3a59a232..9cc6a4db 100644 --- a/src/client/PluginUI.hpp +++ b/src/client/PluginUI.hpp @@ -61,6 +61,8 @@ private: SharedPtr<NodeModel> _node; SLV2UIInstance _instance; + static SLV2UIHost ui_host; + SharedPtr<Shared::LV2Features::FeatureArray> _features; }; |