summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-18 12:47:15 +0000
committerDavid Robillard <d@drobilla.net>2011-04-18 12:47:15 +0000
commit8ba6bb943889bfdd58cf4a971a152041c1199cfe (patch)
tree91fbe8577e6d01070aa81f532ddd8102db1476f5 /src/gui
parent3cd3bfe5079f84fafb7dc217f5393d6ba947109c (diff)
downloadingen-8ba6bb943889bfdd58cf4a971a152041c1199cfe.tar.gz
ingen-8ba6bb943889bfdd58cf4a971a152041c1199cfe.tar.bz2
ingen-8ba6bb943889bfdd58cf4a971a152041c1199cfe.zip
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
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp9
-rw-r--r--src/gui/App.hpp17
-rw-r--r--src/gui/Configuration.cpp4
-rw-r--r--src/gui/ConnectWindow.cpp6
-rw-r--r--src/gui/ConnectWindow.hpp8
-rw-r--r--src/gui/ControlPanel.cpp2
-rw-r--r--src/gui/NodeModule.cpp4
-rw-r--r--src/gui/PatchPortModule.cpp2
-rw-r--r--src/gui/PortPropertiesWindow.cpp2
-rw-r--r--src/gui/PropertiesWindow.cpp2
10 files changed, 25 insertions, 31 deletions
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<SigClientInterface> client,
SharedPtr<Raul::Deletable> 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<Gdk::Pixbuf> icon_from_path(const std::string& path, int size);
- SharedPtr<Shared::EngineInterface> engine() const { return _world->engine(); }
+ SharedPtr<Ingen::EngineInterface> engine() const { return _world->engine(); }
SharedPtr<Client::SigClientInterface> client() const { return _client; }
SharedPtr<Client::ClientStore> store() const { return _store; }
SharedPtr<ThreadedLoader> 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<Shared::EngineInterface> engine)
+ConnectWindow::set_connected_to(SharedPtr<EngineInterface> engine)
{
App::instance().world()->set_engine(engine);
@@ -246,7 +246,7 @@ ConnectWindow::connect(bool existing)
SharedPtr<SigClientInterface> 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<Ingen::Shared::EngineInterface>());
+ set_connected_to(SharedPtr<Ingen::EngineInterface>());
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 <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
+
#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<Gnome::Glade::Xml>& xml);
- void set_connected_to(SharedPtr<Shared::EngineInterface> engine);
+ void set_connected_to(SharedPtr<EngineInterface> 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<PortModel> 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<Gnome::Glade::Xml> 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;