summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/PluginModel.cpp4
-rw-r--r--src/libs/client/PluginModel.hpp5
-rw-r--r--src/libs/client/PluginUI.cpp23
-rw-r--r--src/libs/client/PluginUI.hpp25
4 files changed, 28 insertions, 29 deletions
diff --git a/src/libs/client/PluginModel.cpp b/src/libs/client/PluginModel.cpp
index 1f11cc21..9e4df473 100644
--- a/src/libs/client/PluginModel.cpp
+++ b/src/libs/client/PluginModel.cpp
@@ -97,14 +97,14 @@ lv2_ui_write(LV2UI_Controller controller,
#ifdef HAVE_SLV2
SharedPtr<PluginUI>
-PluginModel::ui(SharedPtr<EngineInterface> engine, SharedPtr<NodeModel> node) const
+PluginModel::ui(Ingen::Shared::World* world, SharedPtr<NodeModel> node) const
{
if (_type != LV2)
return SharedPtr<PluginUI>();
Glib::Mutex::Lock(_rdf_world->mutex());
- return PluginUI::create(engine, node, _slv2_world, _slv2_plugin);
+ return PluginUI::create(world, node, _slv2_plugin);
}
diff --git a/src/libs/client/PluginModel.hpp b/src/libs/client/PluginModel.hpp
index f5ac71f4..e19d1691 100644
--- a/src/libs/client/PluginModel.hpp
+++ b/src/libs/client/PluginModel.hpp
@@ -29,6 +29,7 @@
#endif
#include "interface/EngineInterface.hpp"
#include "interface/Plugin.hpp"
+#include "module/World.hpp"
using std::string;
@@ -96,8 +97,8 @@ public:
_slv2_plugins = slv2_world_get_all_plugins(_slv2_world);
}
- SharedPtr<PluginUI> ui(SharedPtr<Shared::EngineInterface> engine,
- SharedPtr<NodeModel> node) const;
+ SharedPtr<PluginUI> ui(Ingen::Shared::World* world,
+ SharedPtr<NodeModel> node) const;
const string& icon_path() const;
static string get_lv2_icon_path(SLV2Plugin plugin);
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);
diff --git a/src/libs/client/PluginUI.hpp b/src/libs/client/PluginUI.hpp
index fc14d5c9..d20dd16a 100644
--- a/src/libs/client/PluginUI.hpp
+++ b/src/libs/client/PluginUI.hpp
@@ -20,6 +20,7 @@
#include <slv2/slv2.h>
#include <raul/SharedPtr.hpp>
+#include "module/World.hpp"
namespace Ingen {
namespace Shared { class EngineInterface; }
@@ -36,25 +37,23 @@ class PluginUI {
public:
~PluginUI();
- static SharedPtr<PluginUI>
- create(SharedPtr<Shared::EngineInterface> engine,
- SharedPtr<NodeModel> node,
- SLV2World world,
- SLV2Plugin plugin);
+ static SharedPtr<PluginUI> create(Ingen::Shared::World* world,
+ SharedPtr<NodeModel> node,
+ SLV2Plugin plugin);
- SharedPtr<Shared::EngineInterface> engine() { return _engine; }
- SharedPtr<NodeModel> node() { return _node; }
- SLV2UIInstance instance() { return _instance; }
+ Ingen::Shared::World* world() const { return _world; }
+ SharedPtr<NodeModel> node() const { return _node; }
+ SLV2UIInstance instance() const { return _instance; }
private:
- PluginUI(SharedPtr<Ingen::Shared::EngineInterface> engine,
- SharedPtr<NodeModel> node);
+ PluginUI(Ingen::Shared::World* world,
+ SharedPtr<NodeModel> node);
void set_instance(SLV2UIInstance instance) { _instance = instance; }
- SharedPtr<Shared::EngineInterface> _engine;
- SharedPtr<NodeModel> _node;
- SLV2UIInstance _instance;
+ Ingen::Shared::World* _world;
+ SharedPtr<NodeModel> _node;
+ SLV2UIInstance _instance;
};