summaryrefslogtreecommitdiffstats
path: root/src/PatchageCanvas.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-28 21:41:26 +0100
committerDavid Robillard <d@drobilla.net>2020-11-28 22:49:10 +0100
commit5128bfab7ddb9504abf17375e910e5bc94af291e (patch)
tree79cc0953718e1f79ed47282b9f11f9f087edc3bc /src/PatchageCanvas.hpp
parent0f25dd575f9c74cc34a54e64468f07e6c631750d (diff)
downloadpatchage-5128bfab7ddb9504abf17375e910e5bc94af291e.tar.gz
patchage-5128bfab7ddb9504abf17375e910e5bc94af291e.tar.bz2
patchage-5128bfab7ddb9504abf17375e910e5bc94af291e.zip
Refresh by emitting events
This decouples drivers from the rest of the application, in particular the horrible situation where they were working with the canvas directly, by having them always communicate changes by emitting events.
Diffstat (limited to 'src/PatchageCanvas.hpp')
-rw-r--r--src/PatchageCanvas.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/PatchageCanvas.hpp b/src/PatchageCanvas.hpp
index 0debcf8..073b3fb 100644
--- a/src/PatchageCanvas.hpp
+++ b/src/PatchageCanvas.hpp
@@ -36,6 +36,7 @@ PATCHAGE_RESTORE_WARNINGS
#include <string>
#include <utility>
+class Patchage;
class PatchageModule;
class PatchagePort;
class Connector;
@@ -45,6 +46,13 @@ class PatchageCanvas : public Ganv::Canvas
public:
PatchageCanvas(Connector& connector, int width, int height);
+ PatchageModule* create_module(Patchage& patchage,
+ const ClientID& id,
+ const ClientInfo& info);
+
+ PatchagePort*
+ create_port(Patchage& patchage, const PortID& id, const PortInfo& info);
+
PatchageModule* find_module(const ClientID& id, SignalDirection type);
PatchagePort* find_port(const PortID& id);