From df0fdf362347495531bc3a5d19233220721d846b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 11 May 2021 13:45:26 -0400 Subject: Refactor most functionality around actions and settings This moves more code into general places, and completely eliminates dependencies on the Patchage "god object". --- src/Configuration.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Configuration.cpp') diff --git a/src/Configuration.cpp b/src/Configuration.cpp index 665e66f..8b5a47b 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include namespace patchage { @@ -37,7 +38,8 @@ static const char* const port_type_names[N_PORT_TYPES] = {"JACK_AUDIO", "JACK_OSC", "JACK_CV"}; -Configuration::Configuration() +Configuration::Configuration(std::function on_change) + : _on_change(std::move(on_change)) { std::get(_settings).value = Coord{0.0, 0.0}; std::get(_settings).value = Coord{960.0, 540.0}; -- cgit v1.2.1