From 557f9d42641f7f602f9fec4d2f3aae50b893de6b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 24 Oct 2015 22:14:06 +0000 Subject: Fix LV2 UIs that send during instantiation git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5780 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/client/PluginUI.hpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'ingen') diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp index f29f2994..1ccadc58 100644 --- a/ingen/client/PluginUI.hpp +++ b/ingen/client/PluginUI.hpp @@ -42,10 +42,24 @@ class INGEN_API PluginUI { public: ~PluginUI(); + /** Create a UI for the given block and plugin. + * + * This does not actually instantiate the UI itself, so signals can be + * connected first. The caller should connect to signal_property_changed, + * then call instantiate(). + */ static SPtr create(Ingen::World* world, SPtr block, const LilvPlugin* plugin); + /** Instantiate the UI. + * + * If true is returned, instantiation was successfull and the widget can be + * obtained with get_widget(). Otherwise, instantiation failed, so there is + * no widget and the UI can not be used. + */ + bool instantiate(); + SuilWidget get_widget(); void port_event(uint32_t port_index, @@ -71,12 +85,17 @@ public: private: PluginUI(Ingen::World* world, SPtr block, - const LilvNode* ui_node); + LilvUIs* uis, + const LilvUI* ui, + const LilvNode* ui_type); Ingen::World* _world; SPtr _block; SuilInstance* _instance; + LilvUIs* _uis; + const LilvUI* _ui; LilvNode* _ui_node; + LilvNode* _ui_type; std::set _subscribed_ports; static SuilHost* ui_host; -- cgit v1.2.1