summaryrefslogtreecommitdiffstats
path: root/src/libs/client/PluginUI.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-05-19 23:52:44 +0000
committerDavid Robillard <d@drobilla.net>2008-05-19 23:52:44 +0000
commit239825b92b1d4c79ebd67cb3766355bf8e699bc7 (patch)
tree1f18e56760afcd0fbe201161ca0e7262d6c54124 /src/libs/client/PluginUI.cpp
parentf9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4 (diff)
downloadingen-239825b92b1d4c79ebd67cb3766355bf8e699bc7.tar.gz
ingen-239825b92b1d4c79ebd67cb3766355bf8e699bc7.tar.bz2
ingen-239825b92b1d4c79ebd67cb3766355bf8e699bc7.zip
Better global (engine/client) LV2 feature sharing.
Provide URI map extension to plugin UIs. git-svn-id: http://svn.drobilla.net/lad/ingen@1217 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/PluginUI.cpp')
-rw-r--r--src/libs/client/PluginUI.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/libs/client/PluginUI.cpp b/src/libs/client/PluginUI.cpp
index 54ee0009..5215de25 100644
--- a/src/libs/client/PluginUI.cpp
+++ b/src/libs/client/PluginUI.cpp
@@ -33,7 +33,7 @@ lv2_ui_write(LV2UI_Controller controller,
uint32_t format,
const void* buffer)
{
- cerr << "********* LV2 UI WRITE (FORMAT " << format << ":" << endl;
+ cerr << "********* LV2 UI WRITE (FORMAT " << format << "):" << endl;
/*lv2_osc_message_print((const LV2Message*)buffer);*/
fprintf(stderr, "RAW:\n");
@@ -51,16 +51,16 @@ lv2_ui_write(LV2UI_Controller controller,
SharedPtr<PortModel> port = ui->node()->ports()[port_index];
if (format == 0) {
- ui->engine()->set_port_value_immediate(port->path(),
+ ui->world()->engine->set_port_value_immediate(port->path(),
port->type().uri(),
buffer_size, buffer);
}
}
-PluginUI::PluginUI(SharedPtr<EngineInterface> engine,
- SharedPtr<NodeModel> node)
- : _engine(engine)
+PluginUI::PluginUI(Ingen::Shared::World* world,
+ SharedPtr<NodeModel> node)
+ : _world(world)
, _node(node)
, _instance(NULL)
{
@@ -74,14 +74,13 @@ PluginUI::~PluginUI()
SharedPtr<PluginUI>
-PluginUI::create(SharedPtr<EngineInterface> engine,
- SharedPtr<NodeModel> node,
- SLV2World world,
- SLV2Plugin plugin)
+PluginUI::create(Ingen::Shared::World* world,
+ SharedPtr<NodeModel> node,
+ SLV2Plugin plugin)
{
SharedPtr<PluginUI> ret;
- SLV2Value gtk_gui_uri = slv2_value_new_uri(world,
+ SLV2Value gtk_gui_uri = slv2_value_new_uri(world->slv2_world,
"http://lv2plug.in/ns/extensions/ui#GtkUI");
SLV2UIs uis = slv2_plugin_get_uis(plugin);
@@ -99,9 +98,9 @@ PluginUI::create(SharedPtr<EngineInterface> engine,
if (ui) {
cout << "Found GTK Plugin UI: " << slv2_ui_get_uri(ui) << endl;
- ret = SharedPtr<PluginUI>(new PluginUI(engine, node));
+ ret = SharedPtr<PluginUI>(new PluginUI(world, node));
SLV2UIInstance inst = slv2_ui_instantiate(
- plugin, ui, lv2_ui_write, ret.get(), NULL);
+ plugin, ui, lv2_ui_write, ret.get(), world->lv2_features->lv2_features());
if (inst) {
ret->set_instance(inst);