From 8ba6bb943889bfdd58cf4a971a152041c1199cfe Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 18 Apr 2011 12:47:15 +0000 Subject: Put engine code in new Ingen::Engine namespace. Put core interfaces in Ingen namespace (not Ingen::Shared). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3159 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/App.cpp | 9 +++++---- src/gui/App.hpp | 17 ++++++----------- src/gui/Configuration.cpp | 4 ++-- src/gui/ConnectWindow.cpp | 6 +++--- src/gui/ConnectWindow.hpp | 8 +++----- src/gui/ControlPanel.cpp | 2 +- src/gui/NodeModule.cpp | 4 ++-- src/gui/PatchPortModule.cpp | 2 +- src/gui/PortPropertiesWindow.cpp | 2 +- src/gui/PropertiesWindow.cpp | 2 +- 10 files changed, 25 insertions(+), 31 deletions(-) (limited to 'src/gui') diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 5462116a..0ed8b10a 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -35,6 +35,7 @@ #include "client/ObjectModel.hpp" #include "client/PatchModel.hpp" #include "client/ClientStore.hpp" +#include "client/SigClientInterface.hpp" #include "NodeModule.hpp" #include "ControlPanel.hpp" #include "SubpatchModule.hpp" @@ -160,9 +161,9 @@ void App::attach(SharedPtr client, SharedPtr handle) { - assert( ! _client); - assert( ! _store); - assert( ! _loader); + assert(!_client); + assert(!_store); + assert(!_loader); _world->engine()->register_client(client.get()); @@ -372,7 +373,7 @@ App::icon_destroyed(void* data) } bool -App::can_control(const Shared::Port* port) const +App::can_control(const Ingen::Port* port) const { return port->is_a(PortType::CONTROL) || (port->is_a(PortType::VALUE) diff --git a/src/gui/App.hpp b/src/gui/App.hpp index 5f68f12f..5a5fa0c2 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -30,12 +30,11 @@ #include "shared/World.hpp" namespace Ingen { - class Engine; + class ClientInterface; + class EngineInterface; + class Port; namespace Shared { - class EngineInterface; - class ClientInterface; class World; - class Port; } namespace Client { class ClientStore; @@ -63,11 +62,7 @@ class ThreadedLoader; class WindowFactory; class Port; -/** Singleton master class most everything is contained within. - * - * This is a horrible god-object, but it's shrinking in size as things are - * moved out. Hopefully it will go away entirely some day.. - * +/** Ingen Gtk Application. * \ingroup GUI */ class App @@ -90,7 +85,7 @@ public: void port_activity(Port* port); void activity_port_destroyed(Port* port); - bool can_control(const Shared::Port* port) const; + bool can_control(const Ingen::Port* port) const; bool signal() const { return _enable_signal; } bool disable_signals() { bool old = _enable_signal; _enable_signal = false; return old; } @@ -104,7 +99,7 @@ public: Glib::RefPtr icon_from_path(const std::string& path, int size); - SharedPtr engine() const { return _world->engine(); } + SharedPtr engine() const { return _world->engine(); } SharedPtr client() const { return _client; } SharedPtr store() const { return _store; } SharedPtr loader() const { return _loader; } diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp index cc675dab..1fcbfe88 100644 --- a/src/gui/Configuration.cpp +++ b/src/gui/Configuration.cpp @@ -84,13 +84,13 @@ Configuration::get_port_color(const PortModel* p) { assert(p != NULL); const Shared::LV2URIMap& uris = App::instance().uris(); - if (p->is_a(Shared::PortType::AUDIO)) { + if (p->is_a(PortType::AUDIO)) { return _audio_port_color; } else if (p->supports(uris.atom_String)) { return _string_port_color; } else if (App::instance().can_control(p)) { return _control_port_color; - } else if (p->is_a(Shared::PortType::EVENTS) || p->is_a(Shared::PortType::MESSAGE)) { + } else if (p->is_a(PortType::EVENTS) || p->is_a(PortType::MESSAGE)) { return _event_port_color; } diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 19e5594b..684b8f30 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -84,7 +84,7 @@ ConnectWindow::start(Ingen::Shared::World* world) } void -ConnectWindow::set_connected_to(SharedPtr engine) +ConnectWindow::set_connected_to(SharedPtr engine) { App::instance().world()->set_engine(engine); @@ -246,7 +246,7 @@ ConnectWindow::connect(bool existing) SharedPtr client(new SigClientInterface()); - if (!((Engine*)world->local_engine().get())->driver()) + if (!((Engine::Engine*)world->local_engine().get())->driver()) world->load_module("jack"); world->local_engine()->activate(); @@ -266,7 +266,7 @@ ConnectWindow::disconnect() _attached = false; App::instance().detach(); - set_connected_to(SharedPtr()); + set_connected_to(SharedPtr()); if (!_widgets_loaded) return; diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp index 9823cfc6..b5434d29 100644 --- a/src/gui/ConnectWindow.hpp +++ b/src/gui/ConnectWindow.hpp @@ -27,12 +27,10 @@ #include #include #include + #include "raul/SharedPtr.hpp" -#include "client/ThreadedSigClientInterface.hpp" -#include "Window.hpp" -using Ingen::Client::SigClientInterface; -namespace Ingen { class Engine; class QueuedEngineInterface; } +#include "Window.hpp" namespace Ingen { namespace GUI { @@ -51,7 +49,7 @@ class ConnectWindow : public Dialog public: ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void set_connected_to(SharedPtr engine); + void set_connected_to(SharedPtr engine); void start(Ingen::Shared::World* world); void on_response(int32_t id) { _attached = true; } diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp index b64c460c..083c1457 100644 --- a/src/gui/ControlPanel.cpp +++ b/src/gui/ControlPanel.cpp @@ -91,7 +91,7 @@ ControlPanel::add_port(SharedPtr pm) = GladeFactory::new_glade_reference("toggle_control"); xml->get_widget_derived("toggle_control", tc); control = tc; - } else if (pm->is_a(Shared::PortType::CONTROL) + } else if (pm->is_a(PortType::CONTROL) || pm->supports(App::instance().uris().atom_Float32)) { SliderControl* sc; Glib::RefPtr xml diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index d4ba8bd4..984e84b8 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -372,10 +372,10 @@ NodeModule::store_location() if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT || existing_x.get_float() != x || existing_y.get_float() != y) { - Shared::Resource::Properties remove; + Resource::Properties remove; remove.insert(make_pair(uris.ingenui_canvas_x, uris.wildcard)); remove.insert(make_pair(uris.ingenui_canvas_y, uris.wildcard)); - Shared::Resource::Properties add; + Resource::Properties add; add.insert(make_pair(uris.ingenui_canvas_x, Atom(x))); add.insert(make_pair(uris.ingenui_canvas_y, Atom(y))); App::instance().engine()->delta(_node->path(), remove, add); diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp index cecec962..10bb60e6 100644 --- a/src/gui/PatchPortModule.cpp +++ b/src/gui/PatchPortModule.cpp @@ -93,7 +93,7 @@ PatchPortModule::store_location() if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT || existing_x.get_float() != x || existing_y.get_float() != y) { - Shared::Resource::Properties props; + Resource::Properties props; props.insert(make_pair(uris.ingenui_canvas_x, Atom(x))); props.insert(make_pair(uris.ingenui_canvas_y, Atom(y))); App::instance().engine()->put(_model->path(), props, Resource::INTERNAL); diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp index 62310a1f..1f3be2fb 100644 --- a/src/gui/PortPropertiesWindow.cpp +++ b/src/gui/PortPropertiesWindow.cpp @@ -147,7 +147,7 @@ void PortPropertiesWindow::ok() { const Shared::LV2URIMap& uris = App::instance().uris(); - Shared::Resource::Properties props; + Resource::Properties props; props.insert(make_pair(uris.lv2_minimum, float(_min_spinner->get_value()))); props.insert(make_pair(uris.lv2_maximum, float(_max_spinner->get_value()))); App::instance().engine()->put(_port_model->path(), props); diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 37a5994b..1a1e5fab 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -276,7 +276,7 @@ void PropertiesWindow::apply_clicked() { LOG(debug) << "apply {" << endl; - Shared::Resource::Properties properties; + Resource::Properties properties; for (Records::const_iterator r = _records.begin(); r != _records.end(); ++r) { const Raul::URI& uri = r->first; const Record& record = r->second; -- cgit v1.2.1