summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-22 07:04:37 +0000
committerDavid Robillard <d@drobilla.net>2011-02-22 07:04:37 +0000
commitf53f07d814a4924c63c80af44553cd952a40d82c (patch)
treee6fe093a382cbd78a3b049ed686f9f17243d98e3 /src/gui
parentee2d096d7160ea4426b060626392ce7a451e1d1e (diff)
downloadingen-f53f07d814a4924c63c80af44553cd952a40d82c.tar.gz
ingen-f53f07d814a4924c63c80af44553cd952a40d82c.tar.bz2
ingen-f53f07d814a4924c63c80af44553cd952a40d82c.zip
Better PluginUI abstraction.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3007 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeModule.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 52f14772..7e75d501 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -154,20 +154,15 @@ NodeModule::value_changed(uint32_t index, const Atom& value)
if (!_plugin_ui)
return;
- float float_val = 0.0f;
- SLV2UIInstance inst = _plugin_ui->instance();
- const LV2UI_Descriptor* ui_desc = slv2_ui_instance_get_descriptor(inst);
- LV2UI_Handle ui = slv2_ui_instance_get_handle(inst);
+ float float_val = 0.0f;
switch (value.type()) {
case Atom::FLOAT:
float_val = value.get_float();
- if (ui_desc->port_event)
- ui_desc->port_event(ui, index, 4, 0, &float_val);
+ _plugin_ui->port_event(index, 4, 0, &float_val);
break;
case Atom::STRING:
- if (ui_desc->port_event)
- ui_desc->port_event(ui, index, strlen(value.get_string()), 0, value.get_string());
+ _plugin_ui->port_event(index, strlen(value.get_string()), 0, value.get_string());
break;
default:
break;
@@ -201,9 +196,8 @@ NodeModule::embed_gui(bool embed)
}
if (_plugin_ui) {
- GtkWidget* c_widget = (GtkWidget*)slv2_ui_instance_get_widget(_plugin_ui->instance());
+ GtkWidget* c_widget = (GtkWidget*)_plugin_ui->get_widget();
_gui_widget = Glib::wrap(c_widget);
- assert(_gui_widget);
Gtk::Container* container = new Gtk::EventBox();
container->set_name("ingen_embedded_node_gui_container");
@@ -308,7 +302,7 @@ NodeModule::popup_gui()
_plugin_ui = plugin->ui(App::instance().world(), _node);
if (_plugin_ui) {
- GtkWidget* c_widget = (GtkWidget*)slv2_ui_instance_get_widget(_plugin_ui->instance());
+ GtkWidget* c_widget = (GtkWidget*)_plugin_ui->get_widget();
_gui_widget = Glib::wrap(c_widget);
_gui_window = new Gtk::Window();