summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-24 22:14:06 +0000
committerDavid Robillard <d@drobilla.net>2015-10-24 22:14:06 +0000
commit557f9d42641f7f602f9fec4d2f3aae50b893de6b (patch)
tree06b7ef9e9d5f153bd878fc084ba0ab838bf8bd71 /ingen
parente4d549a7d7322103904ac8ba8d5a4711c6901870 (diff)
downloadingen-557f9d42641f7f602f9fec4d2f3aae50b893de6b.tar.gz
ingen-557f9d42641f7f602f9fec4d2f3aae50b893de6b.tar.bz2
ingen-557f9d42641f7f602f9fec4d2f3aae50b893de6b.zip
Fix LV2 UIs that send during instantiation
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5780 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ingen')
-rw-r--r--ingen/client/PluginUI.hpp21
1 files changed, 20 insertions, 1 deletions
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<PluginUI> create(Ingen::World* world,
SPtr<const BlockModel> 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<const BlockModel> block,
- const LilvNode* ui_node);
+ LilvUIs* uis,
+ const LilvUI* ui,
+ const LilvNode* ui_type);
Ingen::World* _world;
SPtr<const BlockModel> _block;
SuilInstance* _instance;
+ LilvUIs* _uis;
+ const LilvUI* _ui;
LilvNode* _ui_node;
+ LilvNode* _ui_type;
std::set<uint32_t> _subscribed_ports;
static SuilHost* ui_host;