diff options
author | David Robillard <d@drobilla.net> | 2007-02-07 05:31:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-07 05:31:08 +0000 |
commit | 390ba15e0f31f3645857d94a2408173c60d4b198 (patch) | |
tree | b7c600682a414cd01b1073eef49d82e632a0c8a8 /src | |
parent | 39d5400b39c8089287d5d294becae1268d232d31 (diff) | |
download | ingen-390ba15e0f31f3645857d94a2408173c60d4b198.tar.gz ingen-390ba15e0f31f3645857d94a2408173c60d4b198.tar.bz2 ingen-390ba15e0f31f3645857d94a2408173c60d4b198.zip |
Abstracted out "Connectable" concept in FlowCanvas (towards connecting things other than ports).
Fixes for SLV2 API changes.
git-svn-id: http://svn.drobilla.net/lad/ingen@287 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/engine/NodeFactory.cpp | 4 | ||||
-rw-r--r-- | src/progs/ingenuity/Connection.h | 13 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchCanvas.cpp | 8 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchCanvas.h | 8 |
4 files changed, 20 insertions, 13 deletions
diff --git a/src/libs/engine/NodeFactory.cpp b/src/libs/engine/NodeFactory.cpp index f7cc07fb..841c0b1e 100644 --- a/src/libs/engine/NodeFactory.cpp +++ b/src/libs/engine/NodeFactory.cpp @@ -258,6 +258,8 @@ NodeFactory::load_internal_plugin(const string& uri, void NodeFactory::load_lv2_plugins() { + slv2_init(); + SLV2List plugins = slv2_list_new(); slv2_list_load_all(plugins); @@ -299,6 +301,8 @@ NodeFactory::load_lv2_plugins() } slv2_list_free(plugins); + + slv2_finish(); } diff --git a/src/progs/ingenuity/Connection.h b/src/progs/ingenuity/Connection.h index 70c82f1d..f816bce2 100644 --- a/src/progs/ingenuity/Connection.h +++ b/src/progs/ingenuity/Connection.h @@ -27,18 +27,19 @@ using Ingen::Client::ConnectionModel; namespace Ingenuity { -/** A Connection on an Module. +/** A Connection in a Patch. * * \ingroup Ingenuity */ class Connection : public LibFlowCanvas::Connection { public: - Connection(boost::shared_ptr<LibFlowCanvas::FlowCanvas> canvas, - boost::shared_ptr<ConnectionModel> model, - boost::shared_ptr<LibFlowCanvas::Port> src, - boost::shared_ptr<LibFlowCanvas::Port> dst) - : LibFlowCanvas::Connection(canvas, src, dst) + Connection(boost::shared_ptr<LibFlowCanvas::FlowCanvas> canvas, + boost::shared_ptr<ConnectionModel> model, + boost::shared_ptr<LibFlowCanvas::Connectable> src, + boost::shared_ptr<LibFlowCanvas::Connectable> dst, + uint32_t color) + : LibFlowCanvas::Connection(canvas, src, dst, color) , _connection_model(model) {} diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp index aab57a4e..54e90135 100644 --- a/src/progs/ingenuity/PatchCanvas.cpp +++ b/src/progs/ingenuity/PatchCanvas.cpp @@ -178,7 +178,7 @@ PatchCanvas::connection(SharedPtr<ConnectionModel> cm) cerr << "DPN: " << dst_parent_name << endl; if (src && dst) - add_connection(boost::shared_ptr<Connection>(new Connection(shared_from_this(), cm, src, dst))); + add_connection(boost::shared_ptr<Connection>(new Connection(shared_from_this(), cm, src, dst, src->color() + 0xFFFFFF00))); else cerr << "[PatchCanvas] ERROR: Unable to find ports to connect " << cm->src_port_path() << " -> " << cm->dst_port_path() << endl; @@ -225,7 +225,8 @@ PatchCanvas::disconnection(const Path& src_port_path, const Path& dst_port_path) void -PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::shared_ptr<LibFlowCanvas::Port> dst_port) +PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Connectable> src_port, + boost::shared_ptr<LibFlowCanvas::Connectable> dst_port) { const boost::shared_ptr<Ingenuity::Port> src = boost::dynamic_pointer_cast<Ingenuity::Port>(src_port); @@ -267,7 +268,8 @@ PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::sha void -PatchCanvas::disconnect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::shared_ptr<LibFlowCanvas::Port> dst_port) +PatchCanvas::disconnect(boost::shared_ptr<LibFlowCanvas::Connectable> src_port, + boost::shared_ptr<LibFlowCanvas::Connectable> dst_port) { const boost::shared_ptr<Ingenuity::Port> src = boost::dynamic_pointer_cast<Ingenuity::Port>(src_port); diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/progs/ingenuity/PatchCanvas.h index 5d622f08..9c9734b3 100644 --- a/src/progs/ingenuity/PatchCanvas.h +++ b/src/progs/ingenuity/PatchCanvas.h @@ -86,11 +86,11 @@ private: bool canvas_event(GdkEvent* event); - void connect(boost::shared_ptr<LibFlowCanvas::Port> src, - boost::shared_ptr<LibFlowCanvas::Port> dst); + void connect(boost::shared_ptr<LibFlowCanvas::Connectable> src, + boost::shared_ptr<LibFlowCanvas::Connectable> dst); - void disconnect(boost::shared_ptr<LibFlowCanvas::Port> src, - boost::shared_ptr<LibFlowCanvas::Port> dst); + void disconnect(boost::shared_ptr<LibFlowCanvas::Connectable> src, + boost::shared_ptr<LibFlowCanvas::Connectable> dst); SharedPtr<PatchModel> _patch; |