summaryrefslogtreecommitdiffstats
path: root/ingen/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-03-19 13:26:38 +0100
committerDavid Robillard <d@drobilla.net>2017-03-20 02:58:56 +0100
commitf1c793f7e2148b10610a09a459d9e89b39d2d87b (patch)
treeb898407dce08af0f2f978d59a85d4887d8555b54 /ingen/client
parentefc0fe0a973db706d9409b345ad6fae585f4388c (diff)
downloadingen-f1c793f7e2148b10610a09a459d9e89b39d2d87b.tar.gz
ingen-f1c793f7e2148b10610a09a459d9e89b39d2d87b.tar.bz2
ingen-f1c793f7e2148b10610a09a459d9e89b39d2d87b.zip
Fix round-trip preservation of property contexts
Diffstat (limited to 'ingen/client')
-rw-r--r--ingen/client/ClientStore.hpp6
-rw-r--r--ingen/client/PluginUI.hpp3
-rw-r--r--ingen/client/SigClientInterface.hpp16
-rw-r--r--ingen/client/ThreadedSigClientInterface.hpp36
4 files changed, 37 insertions, 24 deletions
diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp
index 84a95b7b..1887bed3 100644
--- a/ingen/client/ClientStore.hpp
+++ b/ingen/client/ClientStore.hpp
@@ -79,7 +79,8 @@ public:
void delta(const Raul::URI& uri,
const Properties& remove,
- const Properties& add);
+ const Properties& add,
+ Resource::Graph ctx = Resource::Graph::DEFAULT);
void copy(const Raul::URI& old_uri,
const Raul::URI& new_uri);
@@ -89,7 +90,8 @@ public:
void set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
- const Atom& value);
+ const Atom& value,
+ Resource::Graph ctx = Resource::Graph::DEFAULT);
void connect(const Raul::Path& tail,
const Raul::Path& head);
diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp
index d4d47e3b..c44cad82 100644
--- a/ingen/client/PluginUI.hpp
+++ b/ingen/client/PluginUI.hpp
@@ -78,7 +78,8 @@ public:
INGEN_SIGNAL(property_changed, void,
const Raul::URI&, // Subject
const Raul::URI&, // Predicate
- const Atom&); // Object
+ const Atom&, // Object
+ Resource::Graph); // Context
Ingen::World* world() const { return _world; }
SPtr<const BlockModel> block() const { return _block; }
diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp
index a65806f4..7e903fab 100644
--- a/ingen/client/SigClientInterface.hpp
+++ b/ingen/client/SigClientInterface.hpp
@@ -53,14 +53,14 @@ public:
INGEN_SIGNAL(bundle_end, void)
INGEN_SIGNAL(error, void, std::string)
INGEN_SIGNAL(put, void, Raul::URI, Properties, Resource::Graph)
- INGEN_SIGNAL(delta, void, Raul::URI, Properties, Properties)
+ INGEN_SIGNAL(delta, void, Raul::URI, Properties, Properties, Resource::Graph)
INGEN_SIGNAL(object_copied, void, Raul::URI, Raul::URI)
INGEN_SIGNAL(object_moved, void, Raul::Path, Raul::Path)
INGEN_SIGNAL(object_deleted, void, Raul::URI)
INGEN_SIGNAL(connection, void, Raul::Path, Raul::Path)
INGEN_SIGNAL(disconnection, void, Raul::Path, Raul::Path)
INGEN_SIGNAL(disconnect_all, void, Raul::Path, Raul::Path)
- INGEN_SIGNAL(property_change, void, Raul::URI, Raul::URI, Atom)
+ INGEN_SIGNAL(property_change, void, Raul::URI, Raul::URI, Atom, Resource::Graph)
/** Fire pending signals. Only does anything on derived classes (that may queue) */
virtual bool emit_signals() { return false; }
@@ -90,8 +90,9 @@ protected:
void delta(const Raul::URI& uri,
const Properties& remove,
- const Properties& add)
- { EMIT(delta, uri, remove, add); }
+ const Properties& add,
+ Resource::Graph ctx = Resource::Graph::DEFAULT)
+ { EMIT(delta, uri, remove, add, ctx); }
void connect(const Raul::Path& tail, const Raul::Path& head)
{ EMIT(connection, tail, head); }
@@ -111,8 +112,11 @@ protected:
void disconnect_all(const Raul::Path& graph, const Raul::Path& path)
{ EMIT(disconnect_all, graph, path); }
- void set_property(const Raul::URI& subject, const Raul::URI& key, const Atom& value)
- { EMIT(property_change, subject, key, value); }
+ void set_property(const Raul::URI& subject,
+ const Raul::URI& key,
+ const Atom& value,
+ Resource::Graph ctx = Resource::Graph::DEFAULT)
+ { EMIT(property_change, subject, key, value, ctx); }
void undo() {}
void redo() {}
diff --git a/ingen/client/ThreadedSigClientInterface.hpp b/ingen/client/ThreadedSigClientInterface.hpp
index db3aad44..219fd8d1 100644
--- a/ingen/client/ThreadedSigClientInterface.hpp
+++ b/ingen/client/ThreadedSigClientInterface.hpp
@@ -87,8 +87,9 @@ public:
void delta(const Raul::URI& path,
const Properties& remove,
- const Properties& add)
- { push_sig(sigc::bind(delta_slot, path, remove, add)); }
+ const Properties& add,
+ Resource::Graph ctx = Resource::Graph::DEFAULT)
+ { push_sig(sigc::bind(delta_slot, path, remove, add, ctx)); }
void connect(const Raul::Path& tail, const Raul::Path& head)
{ push_sig(sigc::bind(connection_slot, tail, head)); }
@@ -108,8 +109,11 @@ public:
void disconnect_all(const Raul::Path& graph, const Raul::Path& path)
{ push_sig(sigc::bind(disconnect_all_slot, graph, path)); }
- void set_property(const Raul::URI& subject, const Raul::URI& key, const Atom& value)
- { push_sig(sigc::bind(property_change_slot, subject, key, value)); }
+ void set_property(const Raul::URI& subject,
+ const Raul::URI& key,
+ const Atom& value,
+ Resource::Graph ctx = Resource::Graph::DEFAULT)
+ { push_sig(sigc::bind(property_change_slot, subject, key, value, ctx)); }
/** Process all queued events - Called from GTK thread to emit signals. */
bool emit_signals() {
@@ -149,22 +153,24 @@ private:
Raul::SRSWQueue<Closure> _sigs;
- typedef Resource::Graph Graph;
+ using Graph = Resource::Graph;
+ using Path = Raul::Path;
+ using URI = Raul::URI;
sigc::slot<void> bundle_begin_slot;
sigc::slot<void> bundle_end_slot;
sigc::slot<void, int32_t, Status, std::string> response_slot;
sigc::slot<void, std::string> error_slot;
- sigc::slot<void, Raul::URI, Raul::URI, Raul::Symbol> new_plugin_slot;
- sigc::slot<void, Raul::URI, Properties, Graph> put_slot;
- sigc::slot<void, Raul::URI, Properties, Properties> delta_slot;
- sigc::slot<void, Raul::Path, Raul::Path> connection_slot;
- sigc::slot<void, Raul::URI> object_deleted_slot;
- sigc::slot<void, Raul::Path, Raul::Path> object_moved_slot;
- sigc::slot<void, Raul::URI, Raul::URI> object_copied_slot;
- sigc::slot<void, Raul::Path, Raul::Path> disconnection_slot;
- sigc::slot<void, Raul::Path, Raul::Path> disconnect_all_slot;
- sigc::slot<void, Raul::URI, Raul::URI, Atom> property_change_slot;
+ sigc::slot<void, URI, URI, Raul::Symbol> new_plugin_slot;
+ sigc::slot<void, URI, Properties, Graph> put_slot;
+ sigc::slot<void, URI, Properties, Properties, Graph> delta_slot;
+ sigc::slot<void, Path, Path> connection_slot;
+ sigc::slot<void, URI> object_deleted_slot;
+ sigc::slot<void, Path, Path> object_moved_slot;
+ sigc::slot<void, URI, URI> object_copied_slot;
+ sigc::slot<void, Path, Path> disconnection_slot;
+ sigc::slot<void, Path, Path> disconnect_all_slot;
+ sigc::slot<void, URI, URI, Atom, Graph> property_change_slot;
};
} // namespace Client