diff options
author | David Robillard <d@drobilla.net> | 2007-05-04 03:59:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-05-04 03:59:38 +0000 |
commit | a96166710faf2447ed10194d1829db5564b0dff9 (patch) | |
tree | 4eb792fcceee17f188566fc6e6bee11e5a8c4336 | |
parent | cf14d321e8f084f742b03e09c086d5ef30297492 (diff) | |
download | ingen-a96166710faf2447ed10194d1829db5564b0dff9.tar.gz ingen-a96166710faf2447ed10194d1829db5564b0dff9.tar.bz2 ingen-a96166710faf2447ed10194d1829db5564b0dff9.zip |
Made engine, serialisation, client library, and GUI all dynamically loaded modules.
Combined all executables into a single "ingen" program which can do everything.
git-svn-id: http://svn.drobilla.net/lad/ingen@493 a436a847-0d15-0410-975c-d299462d15a1
200 files changed, 1269 insertions, 1932 deletions
diff --git a/configure.ac b/configure.ac index ad46411b..ff60df7e 100644 --- a/configure.ac +++ b/configure.ac @@ -7,10 +7,9 @@ AC_CONFIG_SRCDIR([src/libs/engine/JackAudioDriver.cpp]) AC_CONFIG_SRCDIR([src/libs/engine/tests/node_tree_test.cpp]) AC_CONFIG_SRCDIR([src/libs/serialisation/Loader.cpp]) AC_CONFIG_SRCDIR([src/libs/client/OSCController.cpp]) -AC_CONFIG_SRCDIR([src/progs/server/main.cpp]) -AC_CONFIG_SRCDIR([src/progs/patch_loader/patch_loader.cpp]) +AC_CONFIG_SRCDIR([src/libs/gui/App.cpp]) +AC_CONFIG_SRCDIR([src/progs/ingen/main.cpp]) AC_CONFIG_SRCDIR([src/progs/demolition/demolition.cpp]) -AC_CONFIG_SRCDIR([src/progs/ingenuity/main.cpp]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE @@ -365,15 +364,13 @@ AC_CONFIG_FILES([src/libs/engine/tests/Makefile]) AC_CONFIG_FILES([src/libs/engine/events/Makefile]) AC_CONFIG_FILES([src/libs/serialisation/Makefile]) AC_CONFIG_FILES([src/libs/client/Makefile]) +AC_CONFIG_FILES([src/libs/gui/Makefile]) AC_CONFIG_FILES([src/progs/Makefile]) -AC_CONFIG_FILES([src/progs/server/Makefile]) +AC_CONFIG_FILES([src/progs/ingen/Makefile]) AC_CONFIG_FILES([src/progs/supercollider/Makefile]) AC_CONFIG_FILES([src/progs/python/Makefile]) AC_CONFIG_FILES([src/progs/python/scripts/Makefile]) -AC_CONFIG_FILES([src/progs/demolition/Makefile]) -AC_CONFIG_FILES([src/progs/patch_loader/Makefile]) -AC_CONFIG_FILES([src/progs/ingenuity/Makefile]) -AC_CONFIG_FILES([src/progs/ingenuity/ingenuity.desktop]) +AC_CONFIG_FILES([src/progs/ingen/ingen.desktop]) AC_CONFIG_FILES([patches/Makefile]) AC_CONFIG_FILES([doc/Doxyfile]) AC_OUTPUT @@ -382,7 +379,8 @@ AC_MSG_RESULT([]) AC_MSG_RESULT([**********************************************************************]) AC_MSG_RESULT([Ingen build configuration:]) AC_MSG_RESULT([]) -AC_MSG_RESULT([Building server: $build_engine]) +AC_MSG_RESULT([Building engine: $build_engine]) +AC_MSG_RESULT([ JACK in-process support: $build_in_process_engine]) AC_MSG_RESULT([ Jack MIDI support: $build_jack_midi]) AC_MSG_RESULT([ ALSA MIDI support: $build_alsa_midi]) AC_MSG_RESULT([ LV2 Plugin support: $build_lv2]) @@ -390,11 +388,9 @@ AC_MSG_RESULT([ DSSI Plugin support: $build_dssi]) AC_MSG_RESULT([ LADSPA Plugin support: $build_ladspa]) AC_MSG_RESULT([ LASH support: $build_lash]) AC_MSG_RESULT([]) -AC_MSG_RESULT([Building in-process engine: $build_in_process_engine]) -AC_MSG_RESULT([]) AC_MSG_RESULT([Building console clients: $build_console_clients]) AC_MSG_RESULT([]) -AC_MSG_RESULT([Building Ingenuity (GTK): $build_gtk_client]) +AC_MSG_RESULT([Building GUI: $build_gtk_client]) AC_MSG_RESULT([]) AC_MSG_RESULT([AGAIN, LASH SUPPORT IS NOT AVAILABLE.]) AC_MSG_RESULT([THERE IS NO LASH SUPPORT IN INGEN AT THIS TIME]) diff --git a/src/Makefile.am b/src/Makefile.am index 48cb026b..c9d9fc9b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,5 @@ +EXTRA_DIST = set_dev_environment.sh + SUBDIRS = libs progs DIST_SUBDIRS = $(SUBDIRS) common diff --git a/src/common/interface/EngineInterface.h b/src/common/interface/EngineInterface.h index 8a10c840..1701a78e 100644 --- a/src/common/interface/EngineInterface.h +++ b/src/common/interface/EngineInterface.h @@ -29,6 +29,7 @@ namespace Ingen { namespace Shared { class ClientKey; +class Responder; /** The (only) interface clients use to communicate with the engine. @@ -41,6 +42,7 @@ public: virtual ~EngineInterface() {} // Responses + virtual void set_responder(SharedPtr<Responder> responder) = 0; virtual void set_next_response_id(int32_t id) = 0; virtual void disable_responses() = 0; diff --git a/src/common/interface/Makefile.am b/src/common/interface/Makefile.am index 8719cccd..347e8186 100644 --- a/src/common/interface/Makefile.am +++ b/src/common/interface/Makefile.am @@ -2,4 +2,5 @@ EXTRA_DIST = \ README \ ClientInterface.h \ ClientKey.h \ + Responder.h \ EngineInterface.h diff --git a/src/libs/engine/Responder.h b/src/common/interface/Responder.h index f111b02a..6e809e1a 100644 --- a/src/libs/engine/Responder.h +++ b/src/common/interface/Responder.h @@ -26,6 +26,7 @@ using std::string; namespace Ingen { +namespace Shared { using Shared::ClientKey; using Shared::ClientInterface; @@ -67,6 +68,7 @@ public: }; +} // namespace Shared } // namespace Ingen #endif // RESPONDER_H diff --git a/src/libs/Makefile.am b/src/libs/Makefile.am index 81422435..9e80a248 100644 --- a/src/libs/Makefile.am +++ b/src/libs/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = module engine serialisation client +SUBDIRS = module engine serialisation client gui diff --git a/src/libs/client/Makefile.am b/src/libs/client/Makefile.am index 1a0aa61d..20822e8a 100644 --- a/src/libs/client/Makefile.am +++ b/src/libs/client/Makefile.am @@ -1,12 +1,25 @@ if BUILD_CLIENT_LIB -noinst_LTLIBRARIES = libingen_client.la -libingen_client_la_CXXFLAGS = @RAUL_CFLAGS@ @SLV2_CFLAGS@ @LXML2_CFLAGS@ @RASQAL_CFLAGS@ @RAPTOR_CFLAGS@ @LSIGCPP_CFLAGS@ @GLIBMM_CFLAGS@ -I$(top_srcdir)/src/common -DPKGDATADIR=\"$(pkgdatadir)\" +moduledir = $(libdir)/ingen -libingen_client_la_LIBADD = @RAUL_LIBS@ @SLV2_LIBS@ @LXML2_LIBS@ @LOSC_LIBS@ @RASQAL_LIBS@ @RAPTOR_LIBS@ @LSIGCPP_LIBS@ @GLIBMM_LIBS@ +module_LTLIBRARIES = libingen_client.la + +libingen_client_la_CXXFLAGS = \ + @RAUL_CFLAGS@ @SLV2_CFLAGS@ @LOSC_CFLAGS@ \ + @LXML2_CFLAGS@ @RASQAL_CFLAGS@ @RAPTOR_CFLAGS@ \ + @LSIGCPP_CFLAGS@ @GLIBMM_CFLAGS@ \ + -I$(top_srcdir)/src/common \ + -DPKGDATADIR=\"$(pkgdatadir)\" + +libingen_client_la_LIBADD = \ + @RAUL_LIBS@ @SLV2_LIBS@ @LOSC_LIBS@ \ + @LXML2_LIBS@ @RASQAL_LIBS@ @RAPTOR_LIBS@ \ + @LSIGCPP_LIBS@ @GLIBMM_LIBS@ libingen_client_la_SOURCES = \ + client.h \ + client.cpp \ OSCEngineSender.h \ OSCEngineSender.cpp \ OSCClientReceiver.h \ diff --git a/src/libs/client/OSCEngineSender.h b/src/libs/client/OSCEngineSender.h index 30df18fa..68163ec6 100644 --- a/src/libs/client/OSCEngineSender.h +++ b/src/libs/client/OSCEngineSender.h @@ -22,10 +22,12 @@ #include <string> #include <lo/lo.h> #include "interface/EngineInterface.h" +#include "interface/Responder.h" using std::string; using Ingen::Shared::EngineInterface; using Ingen::Shared::ClientInterface; using Ingen::Shared::ClientKey; +using Ingen::Shared::Responder; namespace Ingen { namespace Client { @@ -38,7 +40,7 @@ namespace Client { * * \ingroup IngenClient */ -class OSCEngineSender : virtual public EngineInterface +class OSCEngineSender : public EngineInterface { public: OSCEngineSender(const string& engine_url); @@ -50,6 +52,7 @@ public: inline size_t next_id() { int32_t ret = (_id == -1) ? -1 : _id++; return ret; } + void set_responder(SharedPtr<Responder> responder) { throw; } void set_next_response_id(int32_t id) { _id = id; } void disable_responses() { _id = -1; } diff --git a/src/libs/client/client.cpp b/src/libs/client/client.cpp new file mode 100644 index 00000000..99fa116c --- /dev/null +++ b/src/libs/client/client.cpp @@ -0,0 +1,36 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard <http://drobilla.net> + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "client.h" +#include "OSCEngineSender.h" + +namespace Ingen { +namespace Client { + + +SharedPtr<Ingen::Shared::EngineInterface> +new_osc_interface(const std::string& url) +{ + OSCEngineSender* oes = new OSCEngineSender(url); + oes->attach(rand(), true); + return SharedPtr<Shared::EngineInterface>(oes); +} + + +} // namespace Client +} // namespace Ingen + diff --git a/src/libs/client/client.h b/src/libs/client/client.h new file mode 100644 index 00000000..c2b19d12 --- /dev/null +++ b/src/libs/client/client.h @@ -0,0 +1,40 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard <http://drobilla.net> + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef INGEN_CLIENT_H +#define INGEN_CLIENT_H + +#include <raul/SharedPtr.h> + +namespace Ingen { + +namespace Shared { class EngineInterface; } + +namespace Client { + +extern "C" { + + SharedPtr<Shared::EngineInterface> new_osc_interface(const std::string& url); + +} + + +} // namespace Client +} // namespace Ingen + +#endif // INGEN_CLIENT_H + diff --git a/src/libs/engine/ClientBroadcaster.h b/src/libs/engine/ClientBroadcaster.h index 8b6d4616..cef7b397 100644 --- a/src/libs/engine/ClientBroadcaster.h +++ b/src/libs/engine/ClientBroadcaster.h @@ -24,9 +24,9 @@ #include <list> #include <lo/lo.h> #include <pthread.h> -#include "types.h" -#include "interface/ClientInterface.h" #include <raul/SharedPtr.h> +#include "interface/ClientInterface.h" +#include "types.h" using std::list; using std::string; using std::pair; @@ -37,8 +37,7 @@ class Port; class Plugin; class Patch; class Connection; -class Responder; -namespace Shared { class ClientKey; } +namespace Shared { class ClientKey; class Responder; } using Shared::ClientKey; using Shared::ClientInterface; diff --git a/src/libs/engine/DirectResponder.h b/src/libs/engine/DirectResponder.h index c9e50f76..79dc1f81 100644 --- a/src/libs/engine/DirectResponder.h +++ b/src/libs/engine/DirectResponder.h @@ -21,17 +21,17 @@ #include <raul/SharedPtr.h> #include "interface/ClientInterface.h" -#include "Responder.h" +#include "interface/Responder.h" namespace Ingen { /** Responder for Direct clients (directly calls methods on a ClientInterface). */ -class DirectResponder : public Responder +class DirectResponder : public Shared::Responder { public: - DirectResponder(SharedPtr<ClientInterface> client, int32_t id) + DirectResponder(SharedPtr<Shared::ClientInterface> client, int32_t id) : _client(client), _id(id) {} @@ -40,10 +40,10 @@ public: void respond_ok() { _client->response(_id, true, ""); } void respond_error(const string& msg) { _client->response(_id, false, msg); } - SharedPtr<ClientInterface> client() { return _client; } + SharedPtr<Shared::ClientInterface> client() { return _client; } private: - SharedPtr<ClientInterface> _client; + SharedPtr<Shared::ClientInterface> _client; int32_t _id; }; diff --git a/src/libs/engine/Engine.cpp b/src/libs/engine/Engine.cpp index d9481786..1d54aef6 100644 --- a/src/libs/engine/Engine.cpp +++ b/src/libs/engine/Engine.cpp @@ -111,12 +111,11 @@ Engine::main() } cout << "[Main] Done main loop." << endl; + _event_source->deactivate(); + if (_activated) deactivate(); - sleep(1); - cout << "[Main] Exiting..." << endl; - return 0; } @@ -148,17 +147,24 @@ Engine::start_jack_driver() void -Engine::start_osc_driver(const std::string& port) +Engine::start_osc_driver(int port) { _event_source = SharedPtr<EventSource>(new OSCEngineReceiver( - *this, pre_processor_queue_size, port.c_str())); + *this, pre_processor_queue_size, port)); } -void -Engine::set_event_source(SharedPtr<EventSource> source) +SharedPtr<QueuedEngineInterface> +Engine::new_queued_interface() { - _event_source = source; + assert(!_event_source); + + SharedPtr<QueuedEngineInterface> result(new QueuedEngineInterface( + *this, Ingen::event_queue_size, Ingen::event_queue_size)); + + _event_source = result; + + return result; } diff --git a/src/libs/engine/Engine.h b/src/libs/engine/Engine.h index e66e1125..ad4332ee 100644 --- a/src/libs/engine/Engine.h +++ b/src/libs/engine/Engine.h @@ -39,6 +39,7 @@ class EventSource; class PostProcessor; class Event; class QueuedEvent; +class QueuedEngineInterface; class LashDriver; class Driver; @@ -64,8 +65,9 @@ public: virtual void quit() { _quit_flag = true; } virtual void start_jack_driver(); - virtual void start_osc_driver(const std::string& port); - virtual void set_event_source(SharedPtr<EventSource> source); + virtual void start_osc_driver(int port); + + virtual SharedPtr<QueuedEngineInterface> new_queued_interface(); virtual bool activate(); virtual void deactivate(); diff --git a/src/libs/engine/Event.h b/src/libs/engine/Event.h index 9fd398e2..01b14abc 100644 --- a/src/libs/engine/Event.h +++ b/src/libs/engine/Event.h @@ -20,14 +20,16 @@ #include <cassert> #include <raul/SharedPtr.h> -#include "types.h" #include <raul/Deletable.h> -#include "Responder.h" +#include "interface/Responder.h" +#include "types.h" #include "ThreadManager.h" namespace Raul { class Path; } using Raul::Path; +using Ingen::Shared::Responder; + namespace Ingen { class Engine; @@ -73,17 +75,17 @@ public: inline SampleCount time() { return _time; } protected: - Event(Engine& engine, SharedPtr<Responder> responder, FrameTime time) + Event(Engine& engine, SharedPtr<Shared::Responder> responder, FrameTime time) : _engine(engine) , _responder(responder) , _time(time) , _executed(false) {} - Engine& _engine; - SharedPtr<Responder> _responder; - FrameTime _time; - bool _executed; + Engine& _engine; + SharedPtr<Shared::Responder> _responder; + FrameTime _time; + bool _executed; }; diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am index 5529898d..d11609b9 100644 --- a/src/libs/engine/Makefile.am +++ b/src/libs/engine/Makefile.am @@ -31,7 +31,6 @@ libingen_engine_la_SOURCES = \ JackAudioDriver.cpp \ OSCEngineReceiver.h \ OSCEngineReceiver.cpp \ - Responder.h \ DirectResponder.h \ OSCResponder.h \ OSCResponder.cpp \ diff --git a/src/libs/engine/MidiBuffer.cpp b/src/libs/engine/MidiBuffer.cpp index 9842b28c..41feb3df 100644 --- a/src/libs/engine/MidiBuffer.cpp +++ b/src/libs/engine/MidiBuffer.cpp @@ -34,7 +34,7 @@ MidiBuffer::MidiBuffer(size_t capacity) clear(); assert(_local_state.midi == _buf); - cerr << "Creating MIDI Buffer " << _buf << ", capacity = " << _buf->capacity << endl; + //cerr << "Creating MIDI Buffer " << _buf << ", capacity = " << _buf->capacity << endl; } diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index 763574d1..5565505b 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -19,6 +19,7 @@ #include <cassert> #include <iostream> #include <unistd.h> +#include <raul/AtomLiblo.h> #include "ObjectStore.h" #include "NodeFactory.h" #include "util.h" @@ -29,8 +30,7 @@ #include "Connection.h" #include "AudioDriver.h" #include "interface/ClientInterface.h" -#include "Responder.h" -#include <raul/AtomLiblo.h> +#include "interface/Responder.h" using std::cout; using std::cerr; using std::endl; namespace Ingen { diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp index 1d835190..260721d4 100644 --- a/src/libs/engine/OSCEngineReceiver.cpp +++ b/src/libs/engine/OSCEngineReceiver.cpp @@ -48,14 +48,15 @@ using Shared::ClientKey; */ -OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, const char* const port) -: EngineInterface(), - QueuedEngineInterface(engine, queue_size, queue_size), // FIXME - _port(port), +OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t port) +: QueuedEngineInterface(engine, queue_size, queue_size), // FIXME _server(NULL), _osc_responder(SharedPtr<OSCResponder>()) { - _server = lo_server_new(port, error_cb); + char port_str[6]; + snprintf(port_str, 6, "%u", port); + + _server = lo_server_new(port_str, error_cb); if (_server == NULL) { cerr << "[OSC] Could not start OSC server. Aborting." << endl; diff --git a/src/libs/engine/OSCEngineReceiver.h b/src/libs/engine/OSCEngineReceiver.h index 04448fdf..ba9d2544 100644 --- a/src/libs/engine/OSCEngineReceiver.h +++ b/src/libs/engine/OSCEngineReceiver.h @@ -20,6 +20,7 @@ #include "config.h" #include <string> +#include <stdint.h> #include <lo/lo.h> #include <raul/SharedPtr.h> #include "QueuedEngineInterface.h" @@ -61,7 +62,7 @@ inline static int name##_cb(LO_HANDLER_ARGS, void* myself)\ class OSCEngineReceiver : public QueuedEngineInterface { public: - OSCEngineReceiver(Engine& engine, size_t queue_size, const char* const port); + OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t port); ~OSCEngineReceiver(); void activate(); @@ -114,8 +115,7 @@ private: LO_HANDLER(dssi); #endif - const char* const _port; - lo_server _server; + lo_server _server; /** Cached OSC responder (for most recent incoming message) */ SharedPtr<OSCResponder> _osc_responder; diff --git a/src/libs/engine/OSCResponder.h b/src/libs/engine/OSCResponder.h index 11e5901c..41158c14 100644 --- a/src/libs/engine/OSCResponder.h +++ b/src/libs/engine/OSCResponder.h @@ -21,7 +21,7 @@ #include <inttypes.h> #include <memory> #include <lo/lo.h> -#include "Responder.h" +#include "interface/Responder.h" namespace Ingen { @@ -38,7 +38,7 @@ class ClientBroadcaster; * Creation of the lo_address is deferred until needed to avoid bogging down * the receiving thread as much as possible. */ -class OSCResponder : public Responder +class OSCResponder : public Shared::Responder { public: OSCResponder(ClientBroadcaster* broadcaster, int32_t id, char* url); @@ -51,10 +51,10 @@ public: const char* url() const { return _url; } - ClientKey client_key() { return ClientKey(ClientKey::OSC_URL, _url); } + Shared::ClientKey client_key() + { return Shared::ClientKey(Shared::ClientKey::OSC_URL, _url); } - SharedPtr<ClientInterface> client(); - + SharedPtr<Shared::ClientInterface> client(); private: ClientBroadcaster* _broadcaster; diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp index a81b9ee7..dad3431b 100644 --- a/src/libs/engine/Patch.cpp +++ b/src/libs/engine/Patch.cpp @@ -343,7 +343,7 @@ Patch::build_process_order() const { assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS); - cerr << "*********** Building process order for " << path() << endl; + //cerr << "*********** Building process order for " << path() << endl; Raul::Array<Node*>* const process_order = new Raul::Array<Node*>(_nodes.size(), NULL); diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp index b38692ea..8ee3851b 100644 --- a/src/libs/engine/QueuedEngineInterface.cpp +++ b/src/libs/engine/QueuedEngineInterface.cpp @@ -26,7 +26,7 @@ namespace Ingen { QueuedEngineInterface::QueuedEngineInterface(Engine& engine, size_t queued_size, size_t stamped_size) : QueuedEventSource(queued_size, stamped_size) -, _responder(SharedPtr<Responder>(new Responder())) // NULL responder +, _responder(SharedPtr<Shared::Responder>(new Shared::Responder())) // NULL responder , _engine(engine) { } @@ -47,7 +47,7 @@ QueuedEngineInterface::now() const * Ownership of @a responder is taken. */ void -QueuedEngineInterface::set_responder(SharedPtr<Responder> responder) +QueuedEngineInterface::set_responder(SharedPtr<Shared::Responder> responder) { _responder = responder; } @@ -64,7 +64,7 @@ QueuedEngineInterface::set_next_response_id(int32_t id) void QueuedEngineInterface::disable_responses() { - static SharedPtr<Responder> null_responder(new Responder()); + static SharedPtr<Shared::Responder> null_responder(new Shared::Responder()); //cerr << "DISABLE\n"; set_responder(null_responder); } @@ -93,7 +93,6 @@ void QueuedEngineInterface::load_plugins() { push_queued(new LoadPluginsEvent(_engine, _responder, now())); - } diff --git a/src/libs/engine/QueuedEngineInterface.h b/src/libs/engine/QueuedEngineInterface.h index ddf293dc..0d2ba5d9 100644 --- a/src/libs/engine/QueuedEngineInterface.h +++ b/src/libs/engine/QueuedEngineInterface.h @@ -25,9 +25,9 @@ #include "interface/EngineInterface.h" #include "interface/ClientInterface.h" #include "interface/ClientKey.h" +#include "interface/Responder.h" #include "QueuedEventSource.h" #include "Engine.h" -#include "Responder.h" using std::string; namespace Ingen { @@ -58,7 +58,7 @@ class Engine; * events and get pushed directly into the realtime event queue. Should that * be separated into a different interface/client? */ -class QueuedEngineInterface : public QueuedEventSource, public virtual EngineInterface +class QueuedEngineInterface : public QueuedEventSource, public EngineInterface { public: QueuedEngineInterface(Engine& engine, size_t queued_size, size_t stamped_size); @@ -66,7 +66,7 @@ public: void set_next_response_id(int32_t id); - virtual void set_responder(SharedPtr<Responder> responder); + virtual void set_responder(SharedPtr<Shared::Responder> responder); virtual void disable_responses(); // Client registration @@ -156,7 +156,7 @@ public: protected: /** Where responses to current messages will go. */ - SharedPtr<Responder> _responder; + SharedPtr<Shared::Responder> _responder; Engine& _engine; diff --git a/src/libs/engine/QueuedEvent.h b/src/libs/engine/QueuedEvent.h index ab987c13..f1b82735 100644 --- a/src/libs/engine/QueuedEvent.h +++ b/src/libs/engine/QueuedEvent.h @@ -22,7 +22,6 @@ namespace Ingen { -class Responder; class QueuedEventSource; @@ -71,11 +70,11 @@ public: bool is_prepared() { return _pre_processed; } protected: - QueuedEvent(Engine& engine, - SharedPtr<Responder> responder, - FrameTime time, - bool blocking = false, - QueuedEventSource* source = NULL) + QueuedEvent(Engine& engine, + SharedPtr<Shared::Responder> responder, + FrameTime time, + bool blocking = false, + QueuedEventSource* source = NULL) : Event(engine, responder, time) , _pre_processed(false), _blocking(blocking), _source(source) { @@ -85,7 +84,7 @@ protected: // NULL event base (for internal events only!) QueuedEvent(Engine& engine) - : Event(engine, SharedPtr<Ingen::Responder>(), 0) + : Event(engine, SharedPtr<Shared::Responder>(), 0) , _pre_processed(false), _blocking(false), _source(NULL) {} diff --git a/src/libs/engine/engine.cpp b/src/libs/engine/engine.cpp index a2ba26da..bb482e47 100644 --- a/src/libs/engine/engine.cpp +++ b/src/libs/engine/engine.cpp @@ -15,28 +15,74 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <raul/Process.h> #include "engine.h" #include "Engine.h" #include "QueuedEngineInterface.h" #include "tuning.h" +#include "util.h" namespace Ingen { +/* +void +catch_int(int) +{ + signal(SIGINT, catch_int); + signal(SIGTERM, catch_int); + + std::cout << "[Main] Ingen interrupted." << std::endl; + engine->quit(); +} +*/ Engine* new_engine() { + set_denormal_flags(); return new Engine(); } -QueuedEngineInterface* -new_queued_engine_interface(Engine& engine) +bool +launch_osc_engine(int port) { - return new QueuedEngineInterface(engine, - Ingen::event_queue_size, Ingen::event_queue_size); + char port_str[6]; + snprintf(port_str, 6, "%u", port); + const string cmd = string("ingen -e --engine-port=").append(port_str); + + if (Raul::Process::launch(cmd)) { + return true; + //return SharedPtr<EngineInterface>(new OSCEngineSender( + // string("osc.udp://localhost:").append(port_str))); + } else { + cerr << "Failed to launch engine process." << endl; + //return SharedPtr<EngineInterface>(); + return false; + } } +/* +void +run(int port) +{ + signal(SIGINT, catch_int); + signal(SIGTERM, catch_int); + + set_denormal_flags(); + + Engine* engine = new_engine(); + + engine->start_jack_driver(); + engine->start_osc_driver(port); + + engine->activate(); + + engine->main(); + + delete engine; +} +*/ } // namespace Ingen diff --git a/src/libs/engine/engine.h b/src/libs/engine/engine.h index aac69661..588ab047 100644 --- a/src/libs/engine/engine.h +++ b/src/libs/engine/engine.h @@ -21,13 +21,20 @@ namespace Ingen { class Engine; -class QueuedEngineInterface; +namespace Shared { class EngineInterface; } extern "C" { - extern Engine* new_engine(); - extern QueuedEngineInterface* new_queued_interface(Engine& engine); + //void run(int argc, char** argv); + + /** Create a new engine in this process */ + Engine* new_engine(); + + /** Launch an OSC engine as a completely separate process + * \return true if successful + */ + bool launch_osc_engine(int port); } diff --git a/src/libs/engine/events/AddNodeEvent.cpp b/src/libs/engine/events/AddNodeEvent.cpp index 88efbb45..1ea2b596 100644 --- a/src/libs/engine/events/AddNodeEvent.cpp +++ b/src/libs/engine/events/AddNodeEvent.cpp @@ -16,7 +16,7 @@ */ #include "AddNodeEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Patch.h" #include "Node.h" #include "Tree.h" @@ -34,7 +34,7 @@ namespace Ingen { -AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, +AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& plugin_uri, bool poly) : QueuedEvent(engine, responder, timestamp), _path(path), @@ -52,7 +52,7 @@ AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, Sampl * * Do not use. */ -AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, +AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& plugin_type, const string& plugin_lib, const string& plugin_label, bool poly) : QueuedEvent(engine, responder, timestamp), _path(path), diff --git a/src/libs/engine/events/AddNodeEvent.h b/src/libs/engine/events/AddNodeEvent.h index 7a88cd1c..68d518ae 100644 --- a/src/libs/engine/events/AddNodeEvent.h +++ b/src/libs/engine/events/AddNodeEvent.h @@ -41,7 +41,7 @@ class AddNodeEvent : public QueuedEvent { public: AddNodeEvent(Engine& engine, - SharedPtr<Responder> responder, + SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, const string& plugin_uri, @@ -49,7 +49,7 @@ public: // DEPRECATED AddNodeEvent(Engine& engine, - SharedPtr<Responder> responder, + SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, const string& plugin_type, diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp index 1157d06a..b1925b07 100644 --- a/src/libs/engine/events/AddPortEvent.cpp +++ b/src/libs/engine/events/AddPortEvent.cpp @@ -16,7 +16,7 @@ */ #include "AddPortEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Patch.h" #include "Tree.h" #include "Plugin.h" @@ -40,7 +40,7 @@ namespace Ingen { AddPortEvent::AddPortEvent(Engine& engine, - SharedPtr<Responder> responder, + SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& type, diff --git a/src/libs/engine/events/AddPortEvent.h b/src/libs/engine/events/AddPortEvent.h index 84302029..ed382286 100644 --- a/src/libs/engine/events/AddPortEvent.h +++ b/src/libs/engine/events/AddPortEvent.h @@ -42,7 +42,7 @@ class DriverPort; class AddPortEvent : public QueuedEvent { public: - AddPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source); + AddPortEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/AllNotesOffEvent.cpp b/src/libs/engine/events/AllNotesOffEvent.cpp index 6c87e52a..1b7a40e1 100644 --- a/src/libs/engine/events/AllNotesOffEvent.cpp +++ b/src/libs/engine/events/AllNotesOffEvent.cpp @@ -16,7 +16,7 @@ */ #include "AllNotesOffEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "ObjectStore.h" @@ -25,7 +25,7 @@ namespace Ingen { /** Note off with patch explicitly passed - triggered by MIDI. */ -AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Patch* patch) +AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, Patch* patch) : Event(engine, responder, timestamp), _patch(patch) { @@ -34,7 +34,7 @@ AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responde /** Note off event with lookup - triggered by OSC. */ -AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path) +AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& patch_path) : Event(engine, responder, timestamp), _patch(NULL), _patch_path(patch_path) diff --git a/src/libs/engine/events/AllNotesOffEvent.h b/src/libs/engine/events/AllNotesOffEvent.h index c4a0d3c2..299e9760 100644 --- a/src/libs/engine/events/AllNotesOffEvent.h +++ b/src/libs/engine/events/AllNotesOffEvent.h @@ -34,8 +34,8 @@ class Patch; class AllNotesOffEvent : public Event { public: - AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Patch* patch); - AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path); + AllNotesOffEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, Patch* patch); + AllNotesOffEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& patch_path); void execute(SampleCount nframes, FrameTime start, FrameTime end); void post_process(); diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp index e07ceb5c..44a23267 100644 --- a/src/libs/engine/events/ClearPatchEvent.cpp +++ b/src/libs/engine/events/ClearPatchEvent.cpp @@ -16,7 +16,7 @@ */ #include "ClearPatchEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Patch.h" #include "ClientBroadcaster.h" @@ -31,7 +31,7 @@ namespace Ingen { -ClearPatchEvent::ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path) +ClearPatchEvent::ClearPatchEvent(Engine& engine, SharedPtr<Shared::Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path) : QueuedEvent(engine, responder, time, true, source), _patch_path(patch_path), _patch(NULL), diff --git a/src/libs/engine/events/ClearPatchEvent.h b/src/libs/engine/events/ClearPatchEvent.h index c3570518..21b227ca 100644 --- a/src/libs/engine/events/ClearPatchEvent.h +++ b/src/libs/engine/events/ClearPatchEvent.h @@ -36,7 +36,7 @@ class Patch; class ClearPatchEvent : public QueuedEvent { public: - ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path); + ClearPatchEvent(Engine& engine, SharedPtr<Shared::Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp index 7c4b4422..dc4033cc 100644 --- a/src/libs/engine/events/ConnectionEvent.cpp +++ b/src/libs/engine/events/ConnectionEvent.cpp @@ -19,7 +19,7 @@ #include <string> #include <raul/Maid.h> #include <raul/Path.h> -#include "Responder.h" +#include "interface/Responder.h" #include "types.h" #include "Engine.h" #include "Connection.h" @@ -34,7 +34,7 @@ using std::string; namespace Ingen { -ConnectionEvent::ConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path) +ConnectionEvent::ConnectionEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path) : QueuedEvent(engine, responder, timestamp), _src_port_path(src_port_path), _dst_port_path(dst_port_path), diff --git a/src/libs/engine/events/ConnectionEvent.h b/src/libs/engine/events/ConnectionEvent.h index 9565d79f..d294657b 100644 --- a/src/libs/engine/events/ConnectionEvent.h +++ b/src/libs/engine/events/ConnectionEvent.h @@ -48,7 +48,7 @@ class OutputPort; class ConnectionEvent : public QueuedEvent { public: - ConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path); + ConnectionEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp index 81d05368..f42b895e 100644 --- a/src/libs/engine/events/CreatePatchEvent.cpp +++ b/src/libs/engine/events/CreatePatchEvent.cpp @@ -16,7 +16,7 @@ */ #include "CreatePatchEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Patch.h" #include "Node.h" #include "Tree.h" @@ -31,7 +31,7 @@ namespace Ingen { -CreatePatchEvent::CreatePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly) +CreatePatchEvent::CreatePatchEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, int poly) : QueuedEvent(engine, responder, timestamp), _path(path), _patch(NULL), diff --git a/src/libs/engine/events/CreatePatchEvent.h b/src/libs/engine/events/CreatePatchEvent.h index dd492a33..c63fd566 100644 --- a/src/libs/engine/events/CreatePatchEvent.h +++ b/src/libs/engine/events/CreatePatchEvent.h @@ -41,7 +41,7 @@ class Plugin; class CreatePatchEvent : public QueuedEvent { public: - CreatePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly); + CreatePatchEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, int poly); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp index d3847eb0..4f388558 100644 --- a/src/libs/engine/events/DSSIConfigureEvent.cpp +++ b/src/libs/engine/events/DSSIConfigureEvent.cpp @@ -25,7 +25,7 @@ namespace Ingen { -DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val) +DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val) : QueuedEvent(engine, responder, timestamp), _node_path(node_path), _key(key), diff --git a/src/libs/engine/events/DSSIConfigureEvent.h b/src/libs/engine/events/DSSIConfigureEvent.h index f19c51b6..944f6239 100644 --- a/src/libs/engine/events/DSSIConfigureEvent.h +++ b/src/libs/engine/events/DSSIConfigureEvent.h @@ -31,7 +31,7 @@ namespace Ingen { class DSSIConfigureEvent : public QueuedEvent { public: - DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val); + DSSIConfigureEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/DSSIControlEvent.cpp b/src/libs/engine/events/DSSIControlEvent.cpp index 2a6caab6..94f504a7 100644 --- a/src/libs/engine/events/DSSIControlEvent.cpp +++ b/src/libs/engine/events/DSSIControlEvent.cpp @@ -24,7 +24,7 @@ namespace Ingen { -DSSIControlEvent::DSSIControlEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val) +DSSIControlEvent::DSSIControlEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val) : QueuedEvent(engine, responder, timestamp), _node_path(node_path), _port_num(port_num), diff --git a/src/libs/engine/events/DSSIControlEvent.h b/src/libs/engine/events/DSSIControlEvent.h index 97d1c213..e6800bb2 100644 --- a/src/libs/engine/events/DSSIControlEvent.h +++ b/src/libs/engine/events/DSSIControlEvent.h @@ -33,7 +33,7 @@ namespace Ingen { class DSSIControlEvent : public QueuedEvent { public: - DSSIControlEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val); + DSSIControlEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp index 48195cb9..436ab2c6 100644 --- a/src/libs/engine/events/DSSIProgramEvent.cpp +++ b/src/libs/engine/events/DSSIProgramEvent.cpp @@ -29,7 +29,7 @@ using std::cout; using std::cerr; using std::endl; namespace Ingen { -DSSIProgramEvent::DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program) +DSSIProgramEvent::DSSIProgramEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program) : QueuedEvent(engine, responder, timestamp), _node_path(node_path), _bank(bank), diff --git a/src/libs/engine/events/DSSIProgramEvent.h b/src/libs/engine/events/DSSIProgramEvent.h index 91946173..8acdea81 100644 --- a/src/libs/engine/events/DSSIProgramEvent.h +++ b/src/libs/engine/events/DSSIProgramEvent.h @@ -31,7 +31,7 @@ namespace Ingen { class DSSIProgramEvent : public QueuedEvent { public: - DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program); + DSSIProgramEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/DSSIUpdateEvent.cpp b/src/libs/engine/events/DSSIUpdateEvent.cpp index e3a73260..5851e065 100644 --- a/src/libs/engine/events/DSSIUpdateEvent.cpp +++ b/src/libs/engine/events/DSSIUpdateEvent.cpp @@ -28,7 +28,7 @@ using std::cerr; using std::endl; namespace Ingen { -DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url) +DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& url) : QueuedEvent(engine, responder, timestamp), _path(path), _url(url), diff --git a/src/libs/engine/events/DSSIUpdateEvent.h b/src/libs/engine/events/DSSIUpdateEvent.h index 3db562cb..8274bb71 100644 --- a/src/libs/engine/events/DSSIUpdateEvent.h +++ b/src/libs/engine/events/DSSIUpdateEvent.h @@ -37,7 +37,7 @@ class DSSINode; class DSSIUpdateEvent : public QueuedEvent { public: - DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url); + DSSIUpdateEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& url); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/DeactivateEvent.cpp b/src/libs/engine/events/DeactivateEvent.cpp index e93ec800..e6440570 100644 --- a/src/libs/engine/events/DeactivateEvent.cpp +++ b/src/libs/engine/events/DeactivateEvent.cpp @@ -16,13 +16,13 @@ */ #include "DeactivateEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" namespace Ingen { -DeactivateEvent::DeactivateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp) +DeactivateEvent::DeactivateEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) { } diff --git a/src/libs/engine/events/DeactivateEvent.h b/src/libs/engine/events/DeactivateEvent.h index 82990b54..92276918 100644 --- a/src/libs/engine/events/DeactivateEvent.h +++ b/src/libs/engine/events/DeactivateEvent.h @@ -30,7 +30,7 @@ namespace Ingen { class DeactivateEvent : public QueuedEvent { public: - DeactivateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp); + DeactivateEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index c00306d8..ecccaa8a 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -16,7 +16,7 @@ */ #include "DestroyEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Patch.h" #include "Tree.h" @@ -37,7 +37,7 @@ namespace Ingen { -DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool block) +DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Shared::Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool block) : QueuedEvent(engine, responder, time, source, source), _path(path), _object(NULL), @@ -56,7 +56,7 @@ DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, Frame } -DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, Node* node, bool block) +DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Shared::Responder> responder, FrameTime time, QueuedEventSource* source, Node* node, bool block) : QueuedEvent(engine, responder, block, source), _path(node->path()), _object(node), diff --git a/src/libs/engine/events/DestroyEvent.h b/src/libs/engine/events/DestroyEvent.h index 435736aa..421a2dcd 100644 --- a/src/libs/engine/events/DestroyEvent.h +++ b/src/libs/engine/events/DestroyEvent.h @@ -50,8 +50,8 @@ class DisconnectPortEvent; class DestroyEvent : public QueuedEvent { public: - DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true); - DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, Node* node, bool block = true); + DestroyEvent(Engine& engine, SharedPtr<Shared::Responder> responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true); + DestroyEvent(Engine& engine, SharedPtr<Shared::Responder> responder, FrameTime timestamp, QueuedEventSource* source, Node* node, bool block = true); ~DestroyEvent(); void pre_process(); diff --git a/src/libs/engine/events/DisablePatchEvent.cpp b/src/libs/engine/events/DisablePatchEvent.cpp index fa032528..ce78cf7e 100644 --- a/src/libs/engine/events/DisablePatchEvent.cpp +++ b/src/libs/engine/events/DisablePatchEvent.cpp @@ -16,7 +16,7 @@ */ #include "DisablePatchEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Patch.h" #include "ClientBroadcaster.h" @@ -27,7 +27,7 @@ namespace Ingen { -DisablePatchEvent::DisablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path) +DisablePatchEvent::DisablePatchEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& patch_path) : QueuedEvent(engine, responder, timestamp), _patch_path(patch_path), _patch(NULL) diff --git a/src/libs/engine/events/DisablePatchEvent.h b/src/libs/engine/events/DisablePatchEvent.h index 8e6be5ea..1999ece0 100644 --- a/src/libs/engine/events/DisablePatchEvent.h +++ b/src/libs/engine/events/DisablePatchEvent.h @@ -35,7 +35,7 @@ class Patch; class DisablePatchEvent : public QueuedEvent { public: - DisablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path); + DisablePatchEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& patch_path); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp index f304f0b1..bc97dff4 100644 --- a/src/libs/engine/events/DisconnectNodeEvent.cpp +++ b/src/libs/engine/events/DisconnectNodeEvent.cpp @@ -20,7 +20,7 @@ #include <raul/List.h> #include <raul/Array.h> #include <raul/Maid.h> -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Node.h" #include "Connection.h" @@ -39,7 +39,7 @@ using std::cerr; using std::endl; namespace Ingen { -DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path) +DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path) : QueuedEvent(engine, responder, timestamp), _node_path(node_path), _patch(NULL), @@ -99,7 +99,7 @@ DisconnectNodeEvent::pre_process() for (ConnectionListIterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) { c = (*i); if ((c->src_port()->parent_node() == _node || c->dst_port()->parent_node() == _node) && !c->pending_disconnection()) { - DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time, + DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Shared::Responder>(new Responder()), _time, c->src_port(), c->dst_port()); ev->pre_process(); _disconnection_events.push_back(new Raul::ListNode<DisconnectionEvent*>(ev)); diff --git a/src/libs/engine/events/DisconnectNodeEvent.h b/src/libs/engine/events/DisconnectNodeEvent.h index 270fa960..a70f9e8c 100644 --- a/src/libs/engine/events/DisconnectNodeEvent.h +++ b/src/libs/engine/events/DisconnectNodeEvent.h @@ -43,7 +43,7 @@ class OutputPort; class DisconnectNodeEvent : public QueuedEvent { public: - DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path); + DisconnectNodeEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path); DisconnectNodeEvent(Engine& engine, Node* node); ~DisconnectNodeEvent(); diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp index 08266de6..1373d9b8 100644 --- a/src/libs/engine/events/DisconnectPortEvent.cpp +++ b/src/libs/engine/events/DisconnectPortEvent.cpp @@ -20,7 +20,7 @@ #include <raul/List.h> #include <raul/Path.h> #include <raul/Array.h> -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Node.h" #include "Connection.h" @@ -39,7 +39,7 @@ using std::cerr; using std::endl; namespace Ingen { -DisconnectPortEvent::DisconnectPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path) +DisconnectPortEvent::DisconnectPortEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path) : QueuedEvent(engine, responder, timestamp), _port_path(port_path), _patch(NULL), @@ -104,7 +104,7 @@ DisconnectPortEvent::pre_process() for (Raul::List<Connection*>::const_iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) { c = (*i); if ((c->src_port() == _port || c->dst_port() == _port) && !c->pending_disconnection()) { - DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time, + DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Shared::Responder>(new Responder()), _time, c->src_port(), c->dst_port()); ev->pre_process(); _disconnection_events.push_back(new Raul::ListNode<DisconnectionEvent*>(ev)); diff --git a/src/libs/engine/events/DisconnectPortEvent.h b/src/libs/engine/events/DisconnectPortEvent.h index 089508ea..647ee1da 100644 --- a/src/libs/engine/events/DisconnectPortEvent.h +++ b/src/libs/engine/events/DisconnectPortEvent.h @@ -44,7 +44,7 @@ using std::string; class DisconnectPortEvent : public QueuedEvent { public: - DisconnectPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path); + DisconnectPortEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path); DisconnectPortEvent(Engine& engine, Port* port); ~DisconnectPortEvent(); diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp index 7ac7e236..2fafb98e 100644 --- a/src/libs/engine/events/DisconnectionEvent.cpp +++ b/src/libs/engine/events/DisconnectionEvent.cpp @@ -19,7 +19,7 @@ #include <string> #include <raul/Maid.h> #include <raul/Path.h> -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Connection.h" #include "InputPort.h" @@ -36,7 +36,7 @@ namespace Ingen { //// DisconnectionEvent //// -DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path) +DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path) : QueuedEvent(engine, responder, timestamp), _src_port_path(src_port_path), _dst_port_path(dst_port_path), @@ -50,7 +50,7 @@ DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> resp } -DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port) +DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port) : QueuedEvent(engine, responder, timestamp), _src_port_path(src_port->path()), _dst_port_path(dst_port->path()), diff --git a/src/libs/engine/events/DisconnectionEvent.h b/src/libs/engine/events/DisconnectionEvent.h index 3faeb23e..23f1526e 100644 --- a/src/libs/engine/events/DisconnectionEvent.h +++ b/src/libs/engine/events/DisconnectionEvent.h @@ -48,8 +48,8 @@ class OutputPort; class DisconnectionEvent : public QueuedEvent { public: - DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path); - DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port); + DisconnectionEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path); + DisconnectionEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp index f1970f4d..74d4a52b 100644 --- a/src/libs/engine/events/EnablePatchEvent.cpp +++ b/src/libs/engine/events/EnablePatchEvent.cpp @@ -16,7 +16,7 @@ */ #include "EnablePatchEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Patch.h" #include "util.h" @@ -26,7 +26,7 @@ namespace Ingen { -EnablePatchEvent::EnablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path) +EnablePatchEvent::EnablePatchEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& patch_path) : QueuedEvent(engine, responder, timestamp), _patch_path(patch_path), _patch(NULL), diff --git a/src/libs/engine/events/EnablePatchEvent.h b/src/libs/engine/events/EnablePatchEvent.h index 350c9f3e..c63c9db3 100644 --- a/src/libs/engine/events/EnablePatchEvent.h +++ b/src/libs/engine/events/EnablePatchEvent.h @@ -38,7 +38,7 @@ class Node; class EnablePatchEvent : public QueuedEvent { public: - EnablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path); + EnablePatchEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& patch_path); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/LashRestoreDoneEvent.h b/src/libs/engine/events/LashRestoreDoneEvent.h index 8e45cb6b..fd33d813 100644 --- a/src/libs/engine/events/LashRestoreDoneEvent.h +++ b/src/libs/engine/events/LashRestoreDoneEvent.h @@ -40,7 +40,7 @@ class Port; class LashRestoreDoneEvent : public QueuedEvent { public: - LashRestoreDoneEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) {} + LashRestoreDoneEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) {} void post_process() { diff --git a/src/libs/engine/events/LoadPluginsEvent.cpp b/src/libs/engine/events/LoadPluginsEvent.cpp index 78461ff5..a126e3b2 100644 --- a/src/libs/engine/events/LoadPluginsEvent.cpp +++ b/src/libs/engine/events/LoadPluginsEvent.cpp @@ -16,7 +16,7 @@ */ #include "LoadPluginsEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "NodeFactory.h" #include "ClientBroadcaster.h" @@ -27,7 +27,7 @@ using std::cerr; namespace Ingen { -LoadPluginsEvent::LoadPluginsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp) +LoadPluginsEvent::LoadPluginsEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) { } diff --git a/src/libs/engine/events/LoadPluginsEvent.h b/src/libs/engine/events/LoadPluginsEvent.h index 296904e6..b6de5e5c 100644 --- a/src/libs/engine/events/LoadPluginsEvent.h +++ b/src/libs/engine/events/LoadPluginsEvent.h @@ -33,7 +33,7 @@ class Plugin; class LoadPluginsEvent : public QueuedEvent { public: - LoadPluginsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp); + LoadPluginsEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp); void pre_process(); void post_process(); diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp index d00a0a9f..6204ed4a 100644 --- a/src/libs/engine/events/MidiLearnEvent.cpp +++ b/src/libs/engine/events/MidiLearnEvent.cpp @@ -16,7 +16,7 @@ */ #include "MidiLearnEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "ObjectStore.h" #include "Node.h" @@ -38,7 +38,7 @@ MidiLearnResponseEvent::post_process() // MidiLearnEvent -MidiLearnEvent::MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path) +MidiLearnEvent::MidiLearnEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path) : QueuedEvent(engine, responder, timestamp), _node_path(node_path), _node(NULL), diff --git a/src/libs/engine/events/MidiLearnEvent.h b/src/libs/engine/events/MidiLearnEvent.h index ba11aadb..d28413c7 100644 --- a/src/libs/engine/events/MidiLearnEvent.h +++ b/src/libs/engine/events/MidiLearnEvent.h @@ -39,7 +39,7 @@ class MidiLearnResponseEvent : public Event { public: MidiLearnResponseEvent(Engine& engine, const string& port_path, SampleCount timestamp) - : Event(engine, SharedPtr<Responder>(), timestamp), + : Event(engine, SharedPtr<Shared::Responder>(), timestamp), _port_path(port_path), _value(0.0f) {} @@ -65,7 +65,7 @@ private: class MidiLearnEvent : public QueuedEvent { public: - MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path); + MidiLearnEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/NoteOffEvent.cpp b/src/libs/engine/events/NoteOffEvent.cpp index cd780bb2..cb081534 100644 --- a/src/libs/engine/events/NoteOffEvent.cpp +++ b/src/libs/engine/events/NoteOffEvent.cpp @@ -16,7 +16,7 @@ */ #include "NoteOffEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "ObjectStore.h" #include "Node.h" @@ -28,7 +28,7 @@ namespace Ingen { /** Note off with patch explicitly passed - triggered by MIDI. */ -NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num) +NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, Node* node, uchar note_num) : Event(engine, responder, timestamp), _node(node), _note_num(note_num) @@ -38,7 +38,7 @@ NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, Sampl /** Note off event with lookup - triggered by OSC. */ -NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num) +NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num) : Event(engine, responder, timestamp), _node(NULL), _node_path(node_path), diff --git a/src/libs/engine/events/NoteOffEvent.h b/src/libs/engine/events/NoteOffEvent.h index a8a85c29..423ddcdc 100644 --- a/src/libs/engine/events/NoteOffEvent.h +++ b/src/libs/engine/events/NoteOffEvent.h @@ -35,8 +35,8 @@ class Node; class NoteOffEvent : public Event { public: - NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num); - NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num); + NoteOffEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, Node* node, uchar note_num); + NoteOffEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num); void execute(SampleCount nframes, FrameTime start, FrameTime end); void post_process(); diff --git a/src/libs/engine/events/NoteOnEvent.cpp b/src/libs/engine/events/NoteOnEvent.cpp index 84482c0f..313dbccd 100644 --- a/src/libs/engine/events/NoteOnEvent.cpp +++ b/src/libs/engine/events/NoteOnEvent.cpp @@ -16,7 +16,7 @@ */ #include "NoteOnEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "ObjectStore.h" #include "Node.h" @@ -31,7 +31,7 @@ namespace Ingen { * * Used to be triggered by MIDI. Not used anymore. */ -NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity) +NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity) : Event(engine, responder, timestamp), _node(patch), _note_num(note_num), @@ -45,7 +45,7 @@ NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleC * * Triggered by OSC. */ -NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity) +NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity) : Event(engine, responder, timestamp), _node(NULL), _node_path(node_path), diff --git a/src/libs/engine/events/NoteOnEvent.h b/src/libs/engine/events/NoteOnEvent.h index 12aea963..a3ee4210 100644 --- a/src/libs/engine/events/NoteOnEvent.h +++ b/src/libs/engine/events/NoteOnEvent.h @@ -35,8 +35,8 @@ class Node; class NoteOnEvent : public Event { public: - NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity); - NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity); + NoteOnEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity); + NoteOnEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity); void execute(SampleCount nframes, FrameTime start, FrameTime end); void post_process(); diff --git a/src/libs/engine/events/PingQueuedEvent.h b/src/libs/engine/events/PingQueuedEvent.h index 621fea27..3d331ccf 100644 --- a/src/libs/engine/events/PingQueuedEvent.h +++ b/src/libs/engine/events/PingQueuedEvent.h @@ -20,7 +20,7 @@ #include "QueuedEvent.h" #include "types.h" -#include "Responder.h" +#include "interface/Responder.h" namespace Ingen { @@ -35,7 +35,9 @@ class Port; class PingQueuedEvent : public QueuedEvent { public: - PingQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) {} + PingQueuedEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp) + : QueuedEvent(engine, responder, timestamp) + {} void post_process() { _responder->respond_ok(); } }; diff --git a/src/libs/engine/events/RegisterClientEvent.cpp b/src/libs/engine/events/RegisterClientEvent.cpp index 0144ed97..3ba36cc7 100644 --- a/src/libs/engine/events/RegisterClientEvent.cpp +++ b/src/libs/engine/events/RegisterClientEvent.cpp @@ -15,15 +15,15 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "interface/Responder.h" #include "RegisterClientEvent.h" -#include "Responder.h" #include "Engine.h" #include "ClientBroadcaster.h" namespace Ingen { -RegisterClientEvent::RegisterClientEvent(Engine& engine, SharedPtr<Responder> responder, +RegisterClientEvent::RegisterClientEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, ClientKey key, SharedPtr<ClientInterface> client) diff --git a/src/libs/engine/events/RegisterClientEvent.h b/src/libs/engine/events/RegisterClientEvent.h index b1dabf2a..f32093a4 100644 --- a/src/libs/engine/events/RegisterClientEvent.h +++ b/src/libs/engine/events/RegisterClientEvent.h @@ -25,6 +25,7 @@ using std::string; using Ingen::Shared::ClientInterface; using Ingen::Shared::ClientKey; +using Ingen::Shared::Responder; namespace Ingen { @@ -36,10 +37,11 @@ namespace Ingen { class RegisterClientEvent : public QueuedEvent { public: - RegisterClientEvent(Engine& engine, SharedPtr<Responder> responder, - SampleCount timestamp, - ClientKey key, - SharedPtr<ClientInterface> client); + RegisterClientEvent(Engine& engine, + SharedPtr<Shared::Responder> responder, + SampleCount timestamp, + ClientKey key, + SharedPtr<ClientInterface> client); void pre_process(); void post_process(); diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp index a833c42e..ac9082e6 100644 --- a/src/libs/engine/events/RenameEvent.cpp +++ b/src/libs/engine/events/RenameEvent.cpp @@ -16,7 +16,7 @@ */ #include "RenameEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Patch.h" #include "Node.h" #include "Tree.h" @@ -28,7 +28,7 @@ namespace Ingen { -RenameEvent::RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name) +RenameEvent::RenameEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& name) : QueuedEvent(engine, responder, timestamp), _old_path(path), _name(name), diff --git a/src/libs/engine/events/RenameEvent.h b/src/libs/engine/events/RenameEvent.h index 9cba840d..c0d1e538 100644 --- a/src/libs/engine/events/RenameEvent.h +++ b/src/libs/engine/events/RenameEvent.h @@ -44,7 +44,7 @@ class DisconnectPortEvent; class RenameEvent : public QueuedEvent { public: - RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name); + RenameEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& name); ~RenameEvent(); void pre_process(); diff --git a/src/libs/engine/events/RequestAllObjectsEvent.cpp b/src/libs/engine/events/RequestAllObjectsEvent.cpp index 1a2a1243..ccf5a6a1 100644 --- a/src/libs/engine/events/RequestAllObjectsEvent.cpp +++ b/src/libs/engine/events/RequestAllObjectsEvent.cpp @@ -16,7 +16,7 @@ */ #include "RequestAllObjectsEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "ObjectSender.h" #include "ClientBroadcaster.h" @@ -25,7 +25,7 @@ namespace Ingen { -RequestAllObjectsEvent::RequestAllObjectsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp) +RequestAllObjectsEvent::RequestAllObjectsEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) { } diff --git a/src/libs/engine/events/RequestAllObjectsEvent.h b/src/libs/engine/events/RequestAllObjectsEvent.h index cb5eb60d..a0d10c49 100644 --- a/src/libs/engine/events/RequestAllObjectsEvent.h +++ b/src/libs/engine/events/RequestAllObjectsEvent.h @@ -36,7 +36,7 @@ namespace Shared { class RequestAllObjectsEvent : public QueuedEvent { public: - RequestAllObjectsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp); + RequestAllObjectsEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp); void pre_process(); void post_process(); diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp index 0722a19f..b2f189f6 100644 --- a/src/libs/engine/events/RequestMetadataEvent.cpp +++ b/src/libs/engine/events/RequestMetadataEvent.cpp @@ -17,7 +17,7 @@ #include "RequestMetadataEvent.h" #include <string> -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "GraphObject.h" #include "ObjectStore.h" @@ -28,7 +28,7 @@ using std::string; namespace Ingen { -RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key) +RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, const string& key) : QueuedEvent(engine, responder, timestamp), _path(node_path), _key(key), diff --git a/src/libs/engine/events/RequestMetadataEvent.h b/src/libs/engine/events/RequestMetadataEvent.h index 497a94bf..45592e88 100644 --- a/src/libs/engine/events/RequestMetadataEvent.h +++ b/src/libs/engine/events/RequestMetadataEvent.h @@ -38,7 +38,7 @@ namespace Shared { class RequestMetadataEvent : public QueuedEvent { public: - RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key); + RequestMetadataEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& key); void pre_process(); void post_process(); diff --git a/src/libs/engine/events/RequestObjectEvent.cpp b/src/libs/engine/events/RequestObjectEvent.cpp index bd25f514..30ef6f85 100644 --- a/src/libs/engine/events/RequestObjectEvent.cpp +++ b/src/libs/engine/events/RequestObjectEvent.cpp @@ -18,7 +18,7 @@ #include "RequestObjectEvent.h" #include <string> #include "interface/ClientInterface.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "ObjectStore.h" #include "ClientBroadcaster.h" @@ -32,7 +32,7 @@ using std::string; namespace Ingen { -RequestObjectEvent::RequestObjectEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path) +RequestObjectEvent::RequestObjectEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path) : QueuedEvent(engine, responder, timestamp), _path(path), _object(NULL) diff --git a/src/libs/engine/events/RequestObjectEvent.h b/src/libs/engine/events/RequestObjectEvent.h index 56b11cb5..b769aee3 100644 --- a/src/libs/engine/events/RequestObjectEvent.h +++ b/src/libs/engine/events/RequestObjectEvent.h @@ -38,7 +38,7 @@ using Shared::ClientInterface; class RequestObjectEvent : public QueuedEvent { public: - RequestObjectEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path); + RequestObjectEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/RequestPluginEvent.cpp b/src/libs/engine/events/RequestPluginEvent.cpp index 64a63aea..da70cd8c 100644 --- a/src/libs/engine/events/RequestPluginEvent.cpp +++ b/src/libs/engine/events/RequestPluginEvent.cpp @@ -18,7 +18,7 @@ #include "RequestPluginEvent.h" #include <string> #include "interface/ClientInterface.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Port.h" #include "ObjectStore.h" @@ -31,7 +31,7 @@ using std::string; namespace Ingen { -RequestPluginEvent::RequestPluginEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& uri) +RequestPluginEvent::RequestPluginEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& uri) : QueuedEvent(engine, responder, timestamp), _uri(uri), _plugin(NULL) diff --git a/src/libs/engine/events/RequestPluginEvent.h b/src/libs/engine/events/RequestPluginEvent.h index 17f1fd92..7047e2fa 100644 --- a/src/libs/engine/events/RequestPluginEvent.h +++ b/src/libs/engine/events/RequestPluginEvent.h @@ -38,7 +38,7 @@ using Shared::ClientInterface; class RequestPluginEvent : public QueuedEvent { public: - RequestPluginEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& uri); + RequestPluginEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& uri); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/RequestPluginsEvent.cpp b/src/libs/engine/events/RequestPluginsEvent.cpp index a6e470b5..1d71b6fa 100644 --- a/src/libs/engine/events/RequestPluginsEvent.cpp +++ b/src/libs/engine/events/RequestPluginsEvent.cpp @@ -16,7 +16,7 @@ */ #include "RequestPluginsEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "ClientBroadcaster.h" #include "NodeFactory.h" @@ -24,7 +24,7 @@ namespace Ingen { -RequestPluginsEvent::RequestPluginsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp) +RequestPluginsEvent::RequestPluginsEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) { } diff --git a/src/libs/engine/events/RequestPluginsEvent.h b/src/libs/engine/events/RequestPluginsEvent.h index f43acbf5..3d795081 100644 --- a/src/libs/engine/events/RequestPluginsEvent.h +++ b/src/libs/engine/events/RequestPluginsEvent.h @@ -26,7 +26,7 @@ using std::string; namespace Ingen { class Plugin; -class Responder; +class Shared::Responder; namespace Shared { class ClientInterface; } using Shared::ClientInterface; @@ -39,7 +39,7 @@ namespace Shared { class RequestPluginsEvent : public QueuedEvent { public: - RequestPluginsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp); + RequestPluginsEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp); void pre_process(); void post_process(); diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp index 533cac38..79a7093a 100644 --- a/src/libs/engine/events/RequestPortValueEvent.cpp +++ b/src/libs/engine/events/RequestPortValueEvent.cpp @@ -18,7 +18,7 @@ #include "RequestPortValueEvent.h" #include <string> #include "interface/ClientInterface.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Port.h" #include "ObjectStore.h" @@ -30,7 +30,7 @@ using std::string; namespace Ingen { -RequestPortValueEvent::RequestPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path) +RequestPortValueEvent::RequestPortValueEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path) : QueuedEvent(engine, responder, timestamp), _port_path(port_path), _port(NULL), diff --git a/src/libs/engine/events/RequestPortValueEvent.h b/src/libs/engine/events/RequestPortValueEvent.h index 32b56691..87a6373c 100644 --- a/src/libs/engine/events/RequestPortValueEvent.h +++ b/src/libs/engine/events/RequestPortValueEvent.h @@ -38,7 +38,7 @@ using Shared::ClientInterface; class RequestPortValueEvent : public QueuedEvent { public: - RequestPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path); + RequestPortValueEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp index 63f28eb7..6d303915 100644 --- a/src/libs/engine/events/SetMetadataEvent.cpp +++ b/src/libs/engine/events/SetMetadataEvent.cpp @@ -17,7 +17,7 @@ #include "SetMetadataEvent.h" #include <string> -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "ClientBroadcaster.h" #include "GraphObject.h" @@ -28,7 +28,7 @@ using std::string; namespace Ingen { -SetMetadataEvent::SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value) +SetMetadataEvent::SetMetadataEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value) : QueuedEvent(engine, responder, timestamp), _path(path), _key(key), diff --git a/src/libs/engine/events/SetMetadataEvent.h b/src/libs/engine/events/SetMetadataEvent.h index fae167a4..63a73a6d 100644 --- a/src/libs/engine/events/SetMetadataEvent.h +++ b/src/libs/engine/events/SetMetadataEvent.h @@ -36,7 +36,7 @@ class GraphObject; class SetMetadataEvent : public QueuedEvent { public: - SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Raul::Atom& value); + SetMetadataEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& path, const string& key, const Raul::Atom& value); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp index 5d8127e6..f78dca7f 100644 --- a/src/libs/engine/events/SetPortValueEvent.cpp +++ b/src/libs/engine/events/SetPortValueEvent.cpp @@ -15,8 +15,8 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "interface/Responder.h" #include "SetPortValueEvent.h" -#include "Responder.h" #include "Engine.h" #include "Port.h" #include "ClientBroadcaster.h" @@ -29,7 +29,7 @@ namespace Ingen { /** Voice-specific control setting */ -SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val) +SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val) : Event(engine, responder, timestamp), _voice_num(voice_num), _port_path(port_path), @@ -40,7 +40,7 @@ SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> respon } -SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val) +SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path, Sample val) : Event(engine, responder, timestamp), _voice_num(-1), _port_path(port_path), diff --git a/src/libs/engine/events/SetPortValueEvent.h b/src/libs/engine/events/SetPortValueEvent.h index 7425b71f..d5f5735f 100644 --- a/src/libs/engine/events/SetPortValueEvent.h +++ b/src/libs/engine/events/SetPortValueEvent.h @@ -35,8 +35,8 @@ class Port; class SetPortValueEvent : public Event { public: - SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val); - SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); + SetPortValueEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path, Sample val); + SetPortValueEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); void execute(SampleCount nframes, FrameTime start, FrameTime end); void post_process(); diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp index 1eaa33cb..d713ae8a 100644 --- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp +++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp @@ -16,7 +16,7 @@ */ #include "SetPortValueQueuedEvent.h" -#include "Responder.h" +#include "interface/Responder.h" #include "Engine.h" #include "Port.h" #include "ClientBroadcaster.h" @@ -30,7 +30,7 @@ namespace Ingen { /** Voice-specific control setting */ -SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val) +SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val) : QueuedEvent(engine, responder, timestamp), _voice_num(voice_num), _port_path(port_path), @@ -41,7 +41,7 @@ SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Respo } -SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val) +SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path, Sample val) : QueuedEvent(engine, responder, timestamp), _voice_num(-1), _port_path(port_path), diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.h b/src/libs/engine/events/SetPortValueQueuedEvent.h index 734bb00f..4cbebe0e 100644 --- a/src/libs/engine/events/SetPortValueQueuedEvent.h +++ b/src/libs/engine/events/SetPortValueQueuedEvent.h @@ -35,8 +35,8 @@ class Port; class SetPortValueQueuedEvent : public QueuedEvent { public: - SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val); - SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); + SetPortValueQueuedEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& port_path, Sample val); + SetPortValueQueuedEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/UnregisterClientEvent.cpp b/src/libs/engine/events/UnregisterClientEvent.cpp index 216f63f8..4248fdcb 100644 --- a/src/libs/engine/events/UnregisterClientEvent.cpp +++ b/src/libs/engine/events/UnregisterClientEvent.cpp @@ -15,16 +15,16 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "interface/ClientInterface.h" +#include "interface/Responder.h" #include "UnregisterClientEvent.h" -#include "Responder.h" #include "Engine.h" #include "ClientBroadcaster.h" -#include "interface/ClientInterface.h" namespace Ingen { -UnregisterClientEvent::UnregisterClientEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, ClientKey key) +UnregisterClientEvent::UnregisterClientEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, ClientKey key) : QueuedEvent(engine, responder, timestamp) , _key(key) { diff --git a/src/libs/engine/events/UnregisterClientEvent.h b/src/libs/engine/events/UnregisterClientEvent.h index cc3c0991..159bd160 100644 --- a/src/libs/engine/events/UnregisterClientEvent.h +++ b/src/libs/engine/events/UnregisterClientEvent.h @@ -40,7 +40,10 @@ using Shared::ClientKey; class UnregisterClientEvent : public QueuedEvent { public: - UnregisterClientEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, ClientKey key); + UnregisterClientEvent(Engine& engine, + SharedPtr<Shared::Responder> responder, + SampleCount timestamp, + ClientKey key); void post_process(); diff --git a/src/progs/ingenuity/App.cpp b/src/libs/gui/App.cpp index 20b61da6..928e5f5e 100644 --- a/src/progs/ingenuity/App.cpp +++ b/src/libs/gui/App.cpp @@ -49,7 +49,8 @@ using std::string; namespace Ingen { namespace Client { class PluginModel; } } using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class Port; @@ -94,10 +95,22 @@ App::~App() void -App::instantiate() +App::run(int argc, char** argv) { + Gnome::Canvas::init(); + Gtk::Main main(argc, argv); + if (!_instance) _instance = new App(); + + /* Load settings */ + _instance->configuration()->load_settings(); + _instance->configuration()->apply_settings(); + + Gtk::Window::set_default_icon_from_file(PKGDATADIR "/ingen.svg"); + App::instance().connect_window()->start(); + + main.run(); } @@ -242,5 +255,6 @@ App::quit() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/App.h b/src/libs/gui/App.h index 2ef0891d..504c6920 100644 --- a/src/progs/ingenuity/App.h +++ b/src/libs/gui/App.h @@ -45,15 +45,14 @@ namespace Ingen { using namespace Ingen::Client; using Ingen::Shared::EngineInterface; -/** \defgroup Ingenuity GTK Client +/** \defgroup GUI GTK GUI */ -/** GTK Graphical client */ -namespace Ingenuity { +namespace Ingen { +namespace GUI { class MessagesWindow; class ConfigWindow; -class IngenuityObject; class PatchCanvas; class PatchTreeView; class PatchTreeWindow; @@ -68,7 +67,7 @@ class WindowFactory; * 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.. * - * \ingroup Ingenuity + * \ingroup GUI */ class App { @@ -100,11 +99,14 @@ public: const SharedPtr<ThreadedLoader>& loader() const { return _loader; } static inline App& instance() { assert(_instance); return *_instance; } - static void instantiate(); + + static void run(int argc, char** argv); protected: App(); static App* _instance; + + static void instantiate(int argc, char** argv); SharedPtr<EngineInterface> _engine; SharedPtr<SigClientInterface> _client; @@ -131,7 +133,8 @@ protected: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // APP_H diff --git a/src/progs/ingenuity/BreadCrumb.h b/src/libs/gui/BreadCrumb.h index 1e8b4c9b..96464b50 100644 --- a/src/progs/ingenuity/BreadCrumb.h +++ b/src/libs/gui/BreadCrumb.h @@ -23,7 +23,8 @@ #include <raul/SharedPtr.h> #include "PatchView.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Breadcrumb button in a PatchWindow. @@ -33,7 +34,7 @@ namespace Ingenuity { * number of visible breadcrumbs (which is the perfect cache for GUI * responsiveness balanced with mem consumption). * - * \ingroup Ingenuity + * \ingroup GUI */ class BreadCrumb : public Gtk::ToggleButton { @@ -74,6 +75,7 @@ private: SharedPtr<PatchView> _view; }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // BREADCRUMB_H diff --git a/src/progs/ingenuity/BreadCrumbBox.cpp b/src/libs/gui/BreadCrumbBox.cpp index a82a4325..79a0bf69 100644 --- a/src/progs/ingenuity/BreadCrumbBox.cpp +++ b/src/libs/gui/BreadCrumbBox.cpp @@ -17,7 +17,8 @@ #include "BreadCrumbBox.h" #include "BreadCrumb.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { BreadCrumbBox::BreadCrumbBox() @@ -200,5 +201,6 @@ BreadCrumbBox::object_renamed(const Path& old_path, const Path& new_path) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/BreadCrumbBox.h b/src/libs/gui/BreadCrumbBox.h index 952e04f1..8b806f5a 100644 --- a/src/progs/ingenuity/BreadCrumbBox.h +++ b/src/libs/gui/BreadCrumbBox.h @@ -26,7 +26,8 @@ #include <raul/SharedPtr.h> #include "PatchView.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { class BreadCrumb; @@ -35,7 +36,7 @@ class BreadCrumb; * * This doubles as a cache for PatchViews. * - * \ingroup Ingenuity + * \ingroup GUI */ class BreadCrumbBox : public Gtk::HBox { @@ -63,6 +64,7 @@ private: std::list<BreadCrumb*> _breadcrumbs; }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // BREADCRUMBBOX_H diff --git a/src/progs/ingenuity/ConfigWindow.cpp b/src/libs/gui/ConfigWindow.cpp index eef81ce3..c8b29f1a 100644 --- a/src/progs/ingenuity/ConfigWindow.cpp +++ b/src/libs/gui/ConfigWindow.cpp @@ -24,7 +24,8 @@ using namespace std; -namespace Ingenuity { +namespace Ingen { +namespace GUI { ConfigWindow::ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -83,4 +84,5 @@ ConfigWindow::ok_clicked() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/ConfigWindow.h b/src/libs/gui/ConfigWindow.h index 31e564bd..d1a2cff6 100644 --- a/src/progs/ingenuity/ConfigWindow.h +++ b/src/libs/gui/ConfigWindow.h @@ -28,14 +28,15 @@ using std::list; using Ingen::Client::PluginModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** 'Configuration' window. * * Loaded by glade as a derived object. * - * \ingroup Ingenuity + * \ingroup GUI */ class ConfigWindow : public Gtk::Window { @@ -58,6 +59,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // CONFIGWINDOW_H diff --git a/src/progs/ingenuity/Configuration.cpp b/src/libs/gui/Configuration.cpp index d3d7f295..d641ea98 100644 --- a/src/progs/ingenuity/Configuration.cpp +++ b/src/libs/gui/Configuration.cpp @@ -31,7 +31,8 @@ using std::cerr; using std::cout; using std::endl; using std::map; using std::string; using Ingen::Client::PatchModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { using namespace Ingen::Client; @@ -182,4 +183,5 @@ Configuration::set_window_size(const string& id, Coord size) }*/ -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/Configuration.h b/src/libs/gui/Configuration.h index 786af3d3..b1a861cb 100644 --- a/src/progs/ingenuity/Configuration.h +++ b/src/libs/gui/Configuration.h @@ -26,7 +26,8 @@ using std::string; struct Coord { double x; double y; }; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class Controller; @@ -36,7 +37,7 @@ class Controller; * Stores settings like color preferences, search paths, etc. * (ie any user-defined preferences to be stoed in the rc file). * - * \ingroup Ingenuity + * \ingroup GUI */ class Configuration { @@ -70,7 +71,8 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // CONFIG_H diff --git a/src/progs/ingenuity/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp index 322750ea..367a38fc 100644 --- a/src/progs/ingenuity/ConnectWindow.cpp +++ b/src/libs/gui/ConnectWindow.cpp @@ -41,7 +41,8 @@ using Ingen::QueuedEngineInterface; using Ingen::Client::ThreadedSigClientInterface; -namespace Ingenuity { +namespace Ingen { +namespace GUI { // Paste together some interfaces to get the combination we want @@ -67,7 +68,6 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome:: , _attached(false) , _connect_stage(0) , _new_engine(NULL) - , _new_queued_engine_interface(NULL) { xml->get_widget("connect_icon", _icon); xml->get_widget("connect_progress_bar", _progress_bar); @@ -95,11 +95,9 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome:: cerr << "If you are running from the source tree, run ingenuity_dev." << endl; } - bool found1 = _engine_module->get_symbol("new_engine", (void*&)_new_engine); - bool found2 = _engine_module->get_symbol("new_queued_engine_interface", - (void*&)_new_queued_engine_interface); + bool found = _engine_module->get_symbol("new_engine", (void*&)_new_engine); - if (!found1 || !found2) { + if (!found) { cerr << "Unable to find module entry point, internal engine unavailable." << endl; _engine_module.reset(); } @@ -196,19 +194,19 @@ ConnectWindow::connect() } else if (_mode == INTERNAL) { assert(_new_engine); SharedPtr<Ingen::Engine> engine(_new_engine()); + engine->start_jack_driver(); - assert(_new_queued_engine_interface); - SharedPtr<Ingen::QueuedEngineInterface> engine_interface(_new_queued_engine_interface(*engine.get())); + SharedPtr<Ingen::EngineInterface> engine_interface = engine->new_queued_interface(); ThreadedSigClientInterface* tsci = new ThreadedSigClientInterface(Ingen::event_queue_size); SharedPtr<SigClientInterface> client(tsci); App::instance().attach(engine_interface, client); - engine_interface->set_responder(SharedPtr<Ingen::Responder>(new Ingen::DirectResponder(client, 1))); + engine_interface->set_responder(SharedPtr<Ingen::Shared::Responder>(new Ingen::DirectResponder(client, 1))); - engine->set_event_source(engine_interface); + //engine->set_event_source(engine_interface); engine->activate(); @@ -247,7 +245,7 @@ void ConnectWindow::quit() { if (_attached) { - Gtk::MessageDialog d(*this, "This will exit Ingenuity, but the engine will " + Gtk::MessageDialog d(*this, "This will exit the GUI, but the engine will " "remain running (if it is remote).\n\nAre you sure you want to quit?", true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE, true); d.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); @@ -424,4 +422,5 @@ ConnectWindow::gtk_callback() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/ConnectWindow.h b/src/libs/gui/ConnectWindow.h index fb1a012f..1a4a654e 100644 --- a/src/progs/ingenuity/ConnectWindow.h +++ b/src/libs/gui/ConnectWindow.h @@ -27,7 +27,8 @@ using Ingen::Client::SigClientInterface; namespace Ingen { class Engine; class QueuedEngineInterface; } -namespace Ingenuity { +namespace Ingen { +namespace GUI { class App; class Controller; @@ -38,7 +39,7 @@ class Controller; * This handles actually connecting to the engine and making sure everything * is ready before really launching the app (eg wait for the root patch). * - * \ingroup Ingenuity + * \ingroup GUI */ class ConnectWindow : public Gtk::Dialog { @@ -70,7 +71,6 @@ private: SharedPtr<Glib::Module> _engine_module; Ingen::Engine* (*_new_engine)(); - Ingen::QueuedEngineInterface* (*_new_queued_engine_interface)(Ingen::Engine&); Gtk::Image* _icon; Gtk::ProgressBar* _progress_bar; @@ -86,6 +86,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // CONNECT_WINDOW_H diff --git a/src/progs/ingenuity/Connection.h b/src/libs/gui/Connection.h index d7b3a9cc..d4d5c10c 100644 --- a/src/progs/ingenuity/Connection.h +++ b/src/libs/gui/Connection.h @@ -25,12 +25,13 @@ #include "client/ConnectionModel.h" using Ingen::Client::ConnectionModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** A Connection in a Patch. * - * \ingroup Ingenuity + * \ingroup GUI */ class Connection : public LibFlowCanvas::Connection { @@ -53,6 +54,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // CONNECTION_H diff --git a/src/progs/ingenuity/ControlGroups.cpp b/src/libs/gui/ControlGroups.cpp index 2cdbf0a3..7af9011b 100644 --- a/src/progs/ingenuity/ControlGroups.cpp +++ b/src/libs/gui/ControlGroups.cpp @@ -31,7 +31,8 @@ using std::cerr; using std::cout; using std::endl; using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { // ////////////////////// ControlGroup ///////////////////////////////// // @@ -425,4 +426,5 @@ ToggleControlGroup::update_value() } #endif -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/ControlGroups.h b/src/libs/gui/ControlGroups.h index 70b8bb72..4a1f758e 100644 --- a/src/progs/ingenuity/ControlGroups.h +++ b/src/libs/gui/ControlGroups.h @@ -28,7 +28,8 @@ namespace Ingen { namespace Client { class PortModel; } } using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class ControlPanel; class PortPropertiesWindow; @@ -36,7 +37,7 @@ class PortPropertiesWindow; /** A group of controls (for a single Port) in a NodeControlWindow. * - * \ingroup Ingenuity + * \ingroup GUI */ class ControlGroup : public Gtk::VBox { @@ -62,7 +63,7 @@ protected: /** A slider for a continuous control. * - * \ingroup Ingenuity + * \ingroup GUI */ class SliderControlGroup : public ControlGroup { @@ -107,7 +108,7 @@ private: /** A spinbutton for integer controls. * - * \ingroup Ingenuity + * \ingroup GUI */ class IntegerControlGroup : public ControlGroup { @@ -132,7 +133,7 @@ private: /** A radio button for toggle controls. * - * \ingroup Ingenuity + * \ingroup GUI */ class ToggleControlGroup : public ControlGroup { @@ -155,6 +156,7 @@ private: }; #endif -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // CONTROLGROUPS_H diff --git a/src/progs/ingenuity/ControlPanel.cpp b/src/libs/gui/ControlPanel.cpp index 7e153ba5..6f3638a8 100644 --- a/src/progs/ingenuity/ControlPanel.cpp +++ b/src/libs/gui/ControlPanel.cpp @@ -25,7 +25,8 @@ #include "ControlGroups.h" #include "GladeFactory.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { ControlPanel::ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -254,4 +255,5 @@ ControlPanel::voice_selected() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/ControlPanel.h b/src/libs/gui/ControlPanel.h index f7da37ad..230b9b65 100644 --- a/src/progs/ingenuity/ControlPanel.h +++ b/src/libs/gui/ControlPanel.h @@ -39,14 +39,15 @@ namespace Ingen { namespace Client { } } using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** A group of controls for a node (or patch). * * Used by both NodeControlWindow and the main window (for patch controls). * - * \ingroup Ingenuity + * \ingroup GUI */ class ControlPanel : public Gtk::HBox { public: @@ -87,6 +88,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // CONTROLPANEL_H diff --git a/src/progs/ingenuity/DSSIController.cpp b/src/libs/gui/DSSIController.cpp index 01ef96c4..f245d61f 100644 --- a/src/progs/ingenuity/DSSIController.cpp +++ b/src/libs/gui/DSSIController.cpp @@ -26,7 +26,8 @@ #include "App.h" #include "DSSIModule.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { DSSIController::DSSIController(SharedPtr<NodeModel> model) @@ -273,5 +274,6 @@ DSSIController::show_menu(GdkEventButton* event) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/DSSIController.h b/src/libs/gui/DSSIController.h index 3d5922c9..fdb0c1c0 100644 --- a/src/progs/ingenuity/DSSIController.h +++ b/src/libs/gui/DSSIController.h @@ -32,7 +32,8 @@ namespace Ingen { namespace Client { class PortModel; } } -namespace Ingenuity { +namespace Ingen { +namespace GUI { class NodeControlWindow; class NodePropertiesWindow; @@ -42,7 +43,7 @@ class NodePropertiesWindow; * FIXME: legacy cruft. move this code to the appropriate places and nuke * this class. * - * \ingroup Ingenuity + * \ingroup GUI */ class DSSIController { @@ -70,6 +71,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // DSSICONTROLLER_H diff --git a/src/progs/ingenuity/DSSIModule.cpp b/src/libs/gui/DSSIModule.cpp index 38706de6..57cbd03f 100644 --- a/src/progs/ingenuity/DSSIModule.cpp +++ b/src/libs/gui/DSSIModule.cpp @@ -18,7 +18,8 @@ #include "DSSIModule.h" #include "DSSIController.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { DSSIModule::DSSIModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node) @@ -38,4 +39,5 @@ DSSIModule::on_double_click(GdkEventButton* ev) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/DSSIModule.h b/src/libs/gui/DSSIModule.h index f41ce889..1c041900 100644 --- a/src/progs/ingenuity/DSSIModule.h +++ b/src/libs/gui/DSSIModule.h @@ -20,15 +20,16 @@ #include "NodeModule.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { class DSSIController; /* Module for a DSSI node. * - * \ingroup Ingenuity + * \ingroup GUI */ -class DSSIModule : public Ingenuity::NodeModule +class DSSIModule : public NodeModule { public: DSSIModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node); @@ -38,7 +39,8 @@ public: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // DSSIMODULE_H diff --git a/src/progs/ingenuity/GladeFactory.cpp b/src/libs/gui/GladeFactory.cpp index dcb3e941..ac796d9f 100644 --- a/src/progs/ingenuity/GladeFactory.cpp +++ b/src/libs/gui/GladeFactory.cpp @@ -21,7 +21,8 @@ using std::cout; using std::cerr; using std::endl; using std::ifstream; -namespace Ingenuity { +namespace Ingen { +namespace GUI { Glib::ustring GladeFactory::glade_filename = ""; @@ -67,4 +68,5 @@ GladeFactory::new_glade_reference(const string& toplevel_widget) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/GladeFactory.h b/src/libs/gui/GladeFactory.h index 0b7e8198..0a2e88fc 100644 --- a/src/progs/ingenuity/GladeFactory.h +++ b/src/libs/gui/GladeFactory.h @@ -23,13 +23,14 @@ using std::string; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Creates glade references, so various objects can create widgets. * Purely static. * - * \ingroup Ingenuity + * \ingroup GUI */ class GladeFactory { public: @@ -44,6 +45,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // GLADEFACTORY_H diff --git a/src/progs/ingenuity/LashController.cpp b/src/libs/gui/LashController.cpp index 6ede8335..b62ec818 100644 --- a/src/progs/ingenuity/LashController.cpp +++ b/src/libs/gui/LashController.cpp @@ -28,7 +28,8 @@ using std::cerr; using std::cout; using std::endl; using std::string; -namespace Ingenuity { +namespace Ingen { +namespace GUI { LashController::LashController(lash_args_t* args) @@ -43,7 +44,7 @@ LashController::LashController(lash_args_t* args) } lash_event_t* event = lash_event_new_with_type(LASH_Client_Name); - lash_event_set_string(event, "Ingenuity"); + lash_event_set_string(event, "Ingen"); lash_send_event(_client, event); } @@ -165,4 +166,5 @@ LashController::save(const string& dir) */ } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/LashController.h b/src/libs/gui/LashController.h index 7721e5b2..f47eb5e9 100644 --- a/src/progs/ingenuity/LashController.h +++ b/src/libs/gui/LashController.h @@ -22,13 +22,14 @@ #include <lash/lash.h> using std::string; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class App; /* Old and unused LASH controller. * - * \ingroup Ingenuity + * \ingroup GUI */ class LashController { @@ -49,6 +50,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // LASHCONTROLLER_H diff --git a/src/progs/ingenuity/LoadPatchWindow.cpp b/src/libs/gui/LoadPatchWindow.cpp index 70d5c409..faaa519a 100644 --- a/src/progs/ingenuity/LoadPatchWindow.cpp +++ b/src/libs/gui/LoadPatchWindow.cpp @@ -28,7 +28,8 @@ using namespace Ingen::Serialisation; using boost::optional; -namespace Ingenuity { +namespace Ingen { +namespace GUI { LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -144,4 +145,5 @@ LoadPatchWindow::cancel_clicked() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/LoadPatchWindow.h b/src/libs/gui/LoadPatchWindow.h index 7f17cef7..47f0bc8f 100644 --- a/src/progs/ingenuity/LoadPatchWindow.h +++ b/src/libs/gui/LoadPatchWindow.h @@ -26,7 +26,8 @@ using Ingen::Client::PatchModel; using Ingen::Client::MetadataMap; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** 'Load Patch' window. @@ -37,7 +38,7 @@ namespace Ingenuity { * * This is not for loading subpatches. See @a LoadSubpatchWindow for that. * - * \ingroup Ingenuity + * \ingroup GUI */ class LoadPatchWindow : public Gtk::FileChooserDialog { @@ -74,6 +75,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // LOADPATCHWINDOW_H diff --git a/src/progs/ingenuity/LoadPluginWindow.cpp b/src/libs/gui/LoadPluginWindow.cpp index 5d314db2..a4b24e5f 100644 --- a/src/progs/ingenuity/LoadPluginWindow.cpp +++ b/src/libs/gui/LoadPluginWindow.cpp @@ -31,7 +31,8 @@ using std::cout; using std::cerr; using std::endl; -namespace Ingenuity { +namespace Ingen { +namespace GUI { LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) : Gtk::Window(cobject), @@ -341,7 +342,7 @@ LoadPluginWindow::add_clicked() dialog.run(); } else { Path path = _patch->path().base() + Path::nameify(name); - App::instance().engine()->create_node(plugin->uri(), path, polyphonic); + App::instance().engine()->create_node(path, plugin->uri(), polyphonic); for (MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i) App::instance().engine()->set_metadata(path, i->first, i->second); ++_plugin_name_offset; @@ -453,4 +454,5 @@ LoadPluginWindow::on_key_press_event(GdkEventKey* event) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/LoadPluginWindow.h b/src/libs/gui/LoadPluginWindow.h index 7bfb63e1..1b39d314 100644 --- a/src/progs/ingenuity/LoadPluginWindow.h +++ b/src/libs/gui/LoadPluginWindow.h @@ -30,14 +30,15 @@ using Ingen::Client::PluginModel; using Ingen::Client::PatchModel; using Ingen::Client::MetadataMap; -namespace Ingenuity { +namespace Ingen { +namespace GUI { // Gtkmm _really_ needs to add some helper to abstract away this stupid nonsense /** Columns for the plugin list in the load plugin window. * - * \ingroup Ingenuity + * \ingroup GUI */ class ModelColumns : public Gtk::TreeModel::ColumnRecord { @@ -64,7 +65,7 @@ public: /** Column for the criteria combo box in the load plugin window. * - * \ingroup Ingenuity + * \ingroup GUI */ class CriteriaColumns : public Gtk::TreeModel::ColumnRecord { @@ -82,7 +83,7 @@ public: * * Loaded by glade as a derived object. * - * \ingroup Ingenuity + * \ingroup GUI */ class LoadPluginWindow : public Gtk::Window { @@ -144,6 +145,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // LOADPLUGINWINDOW_H diff --git a/src/progs/ingenuity/LoadRemotePatchWindow.cpp b/src/libs/gui/LoadRemotePatchWindow.cpp index f42c0849..534a6949 100644 --- a/src/progs/ingenuity/LoadRemotePatchWindow.cpp +++ b/src/libs/gui/LoadRemotePatchWindow.cpp @@ -29,7 +29,8 @@ using boost::optional; using namespace Raul; -namespace Ingenuity { +namespace Ingen { +namespace GUI { LoadRemotePatchWindow::LoadRemotePatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -158,4 +159,5 @@ LoadRemotePatchWindow::cancel_clicked() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/LoadRemotePatchWindow.h b/src/libs/gui/LoadRemotePatchWindow.h index 5a9de63a..bbb3d93e 100644 --- a/src/progs/ingenuity/LoadRemotePatchWindow.h +++ b/src/libs/gui/LoadRemotePatchWindow.h @@ -26,12 +26,13 @@ using Ingen::Client::PatchModel; using Ingen::Client::MetadataMap; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Columns for the remote patch list. * - * \ingroup Ingenuity + * \ingroup GUI */ class PatchColumns : public Gtk::TreeModel::ColumnRecord { @@ -49,7 +50,7 @@ public: /* Load remote patch ("import location") dialog. * - * \ingroup Ingenuity + * \ingroup GUI */ class LoadRemotePatchWindow : public Gtk::Dialog { @@ -86,6 +87,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // LOADREMOTEPATCHWINDOW_H diff --git a/src/progs/ingenuity/LoadSubpatchWindow.cpp b/src/libs/gui/LoadSubpatchWindow.cpp index d1f4b953..57fa9adc 100644 --- a/src/progs/ingenuity/LoadSubpatchWindow.cpp +++ b/src/libs/gui/LoadSubpatchWindow.cpp @@ -29,7 +29,8 @@ #include "ThreadedLoader.h" using boost::optional; -namespace Ingenuity { +namespace Ingen { +namespace GUI { LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -170,4 +171,5 @@ LoadSubpatchWindow::cancel_clicked() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/LoadSubpatchWindow.h b/src/libs/gui/LoadSubpatchWindow.h index 54693504..08a6f7db 100644 --- a/src/progs/ingenuity/LoadSubpatchWindow.h +++ b/src/libs/gui/LoadSubpatchWindow.h @@ -26,14 +26,15 @@ using Ingen::Client::PatchModel; using Ingen::Client::MetadataMap; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** 'Add Subpatch' window. * * Loaded by glade as a derived object. * - * \ingroup Ingenuity + * \ingroup GUI */ class LoadSubpatchWindow : public Gtk::FileChooserDialog { @@ -72,6 +73,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // LOADSUBPATCHWINDOW_H diff --git a/src/progs/ingenuity/Makefile.am b/src/libs/gui/Makefile.am index 82d96b15..c94ebbb5 100644 --- a/src/progs/ingenuity/Makefile.am +++ b/src/libs/gui/Makefile.am @@ -1,98 +1,104 @@ -if BUILD_GTK_CLIENT - -EXTRA_DIST = ingenuity.gladep ingenuity_dev MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = ingen_gui.gladep + +globalpixmapsdir = $(datadir)/pixmaps +dist_globalpixmaps_DATA = ingen.svg ingen-icon.svg sharefilesdir = $(pkgdatadir) -dist_sharefiles_DATA = ingenuity.glade ingen.svg +dist_sharefiles_DATA = ingen_gui.glade ingen.svg ingen-icon.svg -desktopfilesdir = $(datadir)/applications -dist_desktopfiles_DATA = ingenuity.desktop +moduledir = $(libdir)/ingen -globalpixmapsdir = $(datadir)/pixmaps -dist_globalpixmaps_DATA = ingen.svg +module_LTLIBRARIES = libingen_gui.la -ingenuity_CXXFLAGS = -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs -DPKGDATADIR=\"$(pkgdatadir)\" @RAUL_CFLAGS@ @GTKMM_CFLAGS@ @LIBGLADEMM_CFLAGS@ @GNOMECANVASMM_CFLAGS@ @LOSC_CFLAGS@ @LASH_CFLAGS@ @FLOWCANVAS_CFLAGS@ @SLV2_CFLAGS@ @CURL_CFLAGS@ -DINGEN_MODULE_DIR=\"$(libdir)/ingen\" -ingenuity_LDADD = @RAUL_LIBS@ @GTKMM_LIBS@ @LIBGLADEMM_LIBS@ @GNOMECANVASMM_LIBS@ @LOSC_LIBS@ @LASH_LIBS@ @FLOWCANVAS_LIBS@ @SLV2_LIBS@ @CURL_LIBS@ ../../libs/client/libingen_client.la ../../libs/module/libingen_module.la -ingenuity_DEPENDENCIES = ../../libs/client/libingen_client.la ../../libs/module/libingen_module.la +libingen_gui_la_CXXFLAGS = \ + -DPKGDATADIR=\"$(pkgdatadir)\" \ + -DINGEN_MODULE_DIR=\"$(libdir)/ingen\" \ + -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED \ + @RAUL_CFLAGS@ @LOSC_CFLAGS@ @SLV2_CFLAGS@ @CURL_CFLAGS@ \ + @GTKMM_CFLAGS@ @LIBGLADEMM_CFLAGS@ @FLOWCANVAS_CFLAGS@ @GNOMECANVASMM_CFLAGS@ \ + -I$(top_srcdir)/src/common \ + -I$(top_srcdir)/src/libs -bin_PROGRAMS = ingenuity -ingenuity_SOURCES = \ - cmdline.h \ - cmdline.c \ - main.cpp \ - NodeMenu.h \ - NodeMenu.cpp \ - PatchCanvas.h \ - PatchCanvas.cpp \ +libingen_gui_la_LDFLAGS = -no-undefined -module -avoid-version + +libingen_gui_la_LIBADD = \ + @RAUL_LIBS@ @LOSC_LIBS@ @SLV2_LIBS@ @CURL_LIBS@ \ + @GTKMM_LIBS@ @LIBGLADEMM_LIBS@ @FLOWCANVAS_LIBS@ @GNOMECANVASMM_LIBS@ \ + ../module/libingen_module.la \ + ../client/libingen_client.la + + +libingen_gui_la_SOURCES = \ + gui.h \ + gui.cpp \ + App.cpp \ + App.h \ BreadCrumb.h \ - BreadCrumbBox.h \ BreadCrumbBox.cpp \ - ConnectWindow.h \ - ConnectWindow.cpp \ - App.h \ - App.cpp \ - Configuration.h \ + BreadCrumbBox.h \ + ConfigWindow.cpp \ + ConfigWindow.h \ Configuration.cpp \ - GladeFactory.h \ + Configuration.h \ + ConnectWindow.cpp \ + ConnectWindow.h \ + Connection.h \ + ControlGroups.cpp \ + ControlGroups.h \ + ControlPanel.cpp \ + ControlPanel.h \ + DSSIController.cpp \ + DSSIController.h \ + DSSIModule.cpp \ + DSSIModule.h \ GladeFactory.cpp \ - LoadPluginWindow.h \ - LoadPluginWindow.cpp \ - LoadPatchWindow.h \ + GladeFactory.h \ LoadPatchWindow.cpp \ - LoadRemotePatchWindow.h \ + LoadPatchWindow.h \ + LoadPluginWindow.cpp \ + LoadPluginWindow.h \ LoadRemotePatchWindow.cpp \ - UploadPatchWindow.h \ - UploadPatchWindow.cpp \ - MessagesWindow.h \ - MessagesWindow.cpp \ - LoadSubpatchWindow.h \ + LoadRemotePatchWindow.h \ LoadSubpatchWindow.cpp \ - NodeControlWindow.h \ + LoadSubpatchWindow.h \ + MessagesWindow.cpp \ + MessagesWindow.h \ + NewSubpatchWindow.cpp \ + NewSubpatchWindow.h \ NodeControlWindow.cpp \ - ControlPanel.h \ - ControlPanel.cpp \ - ControlGroups.h \ - ControlGroups.cpp \ - PatchView.h \ - PatchView.cpp \ - PatchWindow.h \ - PatchWindow.cpp \ - WindowFactory.h \ - WindowFactory.cpp \ - NodeModule.h \ + NodeControlWindow.h \ + NodeMenu.cpp \ + NodeMenu.h \ NodeModule.cpp \ - PatchPortModule.h \ + NodeModule.h \ + NodePropertiesWindow.cpp \ + NodePropertiesWindow.h \ + PatchCanvas.cpp \ + PatchCanvas.h \ PatchPortModule.cpp \ - DSSIModule.h \ - DSSIModule.cpp \ - DSSIController.h \ - DSSIController.cpp \ - SubpatchModule.h \ - SubpatchModule.cpp \ - Port.h \ - Port.cpp \ - Connection.h \ - NewSubpatchWindow.h \ - NewSubpatchWindow.cpp \ - ConfigWindow.h \ - ConfigWindow.cpp \ - PatchPropertiesWindow.h \ + PatchPortModule.h \ PatchPropertiesWindow.cpp \ - ThreadedLoader.h \ - ThreadedLoader.cpp \ - RenameWindow.h \ - RenameWindow.cpp \ - NodePropertiesWindow.h \ - NodePropertiesWindow.cpp \ - PortPropertiesWindow.h \ - PortPropertiesWindow.cpp \ + PatchPropertiesWindow.h \ + PatchTreeWindow.cpp \ PatchTreeWindow.h \ - PatchTreeWindow.cpp - -if WITH_LASH -ingenuity_SOURCES += LashController.h LashController.cpp -endif + PatchView.cpp \ + PatchView.h \ + PatchWindow.cpp \ + PatchWindow.h \ + Port.cpp \ + Port.h \ + PortPropertiesWindow.cpp \ + PortPropertiesWindow.h \ + RenameWindow.cpp \ + RenameWindow.h \ + SubpatchModule.cpp \ + SubpatchModule.h \ + ThreadedLoader.cpp \ + ThreadedLoader.h \ + UploadPatchWindow.cpp \ + UploadPatchWindow.h \ + WindowFactory.cpp \ + WindowFactory.h -endif # WITH_GTK_CLIENT diff --git a/src/progs/ingenuity/MessagesWindow.cpp b/src/libs/gui/MessagesWindow.cpp index 6f54ac57..b8a83c20 100644 --- a/src/progs/ingenuity/MessagesWindow.cpp +++ b/src/libs/gui/MessagesWindow.cpp @@ -18,7 +18,8 @@ #include "MessagesWindow.h" #include <string> -namespace Ingenuity { +namespace Ingen { +namespace GUI { using std::string; @@ -62,4 +63,5 @@ MessagesWindow::clear_clicked() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/MessagesWindow.h b/src/libs/gui/MessagesWindow.h index 642b63c6..dea0fdd4 100644 --- a/src/progs/ingenuity/MessagesWindow.h +++ b/src/libs/gui/MessagesWindow.h @@ -24,7 +24,8 @@ using std::string; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Messages Window. @@ -32,7 +33,7 @@ namespace Ingenuity { * Loaded by libglade as a derived object. * This is shown when errors occur (ie during patch loading). * - * \ingroup Ingenuity + * \ingroup GUI */ class MessagesWindow : public Gtk::Window { @@ -51,6 +52,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // MESSAGESWINDOW_H diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/libs/gui/NewSubpatchWindow.cpp index e49340b8..f0bc7caa 100644 --- a/src/progs/ingenuity/NewSubpatchWindow.cpp +++ b/src/libs/gui/NewSubpatchWindow.cpp @@ -22,7 +22,8 @@ #include "NewSubpatchWindow.h" #include "PatchView.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -106,4 +107,5 @@ NewSubpatchWindow::cancel_clicked() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/NewSubpatchWindow.h b/src/libs/gui/NewSubpatchWindow.h index 28730137..e70b7f91 100644 --- a/src/progs/ingenuity/NewSubpatchWindow.h +++ b/src/libs/gui/NewSubpatchWindow.h @@ -26,14 +26,15 @@ using Ingen::Client::PatchModel; using Ingen::Client::MetadataMap; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** 'New Subpatch' window. * * Loaded by glade as a derived object. * - * \ingroup Ingenuity + * \ingroup GUI */ class NewSubpatchWindow : public Gtk::Window { @@ -60,6 +61,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // NEWSUBPATCHWINDOW_H diff --git a/src/progs/ingenuity/NodeControlWindow.cpp b/src/libs/gui/NodeControlWindow.cpp index 8d324a65..26108833 100644 --- a/src/progs/ingenuity/NodeControlWindow.cpp +++ b/src/libs/gui/NodeControlWindow.cpp @@ -28,7 +28,8 @@ using namespace std; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Create a node control window and load a new ControlPanel for it. @@ -131,4 +132,5 @@ NodeControlWindow::on_hide() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/NodeControlWindow.h b/src/libs/gui/NodeControlWindow.h index 62ab497d..bd6f9fc9 100644 --- a/src/progs/ingenuity/NodeControlWindow.h +++ b/src/libs/gui/NodeControlWindow.h @@ -31,7 +31,8 @@ namespace Ingen { namespace Client { } } using Ingen::Client::NodeModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class ControlGroup; class ControlPanel; @@ -39,7 +40,7 @@ class ControlPanel; /** Window with controls (sliders) for all control-rate ports on a Node. * - * \ingroup Ingenuity + * \ingroup GUI */ class NodeControlWindow : public Gtk::Window { @@ -69,6 +70,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // NODECONTROLWINDOW_H diff --git a/src/progs/ingenuity/NodeMenu.cpp b/src/libs/gui/NodeMenu.cpp index a0efe441..cf71989c 100644 --- a/src/progs/ingenuity/NodeMenu.cpp +++ b/src/libs/gui/NodeMenu.cpp @@ -25,7 +25,8 @@ using std::cerr; using std::endl; -namespace Ingenuity { +namespace Ingen { +namespace GUI { NodeMenu::NodeMenu(SharedPtr<NodeModel> node) @@ -256,5 +257,6 @@ NodeMenu::disable_controls_menuitem() -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/NodeMenu.h b/src/libs/gui/NodeMenu.h index d6f598ad..65044608 100644 --- a/src/progs/ingenuity/NodeMenu.h +++ b/src/libs/gui/NodeMenu.h @@ -27,7 +27,8 @@ using Ingen::Client::NodeModel; using std::string; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class Controller; class NodeControlWindow; @@ -36,7 +37,7 @@ class PatchCanvas; /** Controller for a Node. * - * \ingroup Ingenuity + * \ingroup GUI */ class NodeMenu : public Gtk::Menu { @@ -71,6 +72,7 @@ protected: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // NODEMENU_H diff --git a/src/progs/ingenuity/NodeModule.cpp b/src/libs/gui/NodeModule.cpp index dd03fde8..3c80f5e2 100644 --- a/src/progs/ingenuity/NodeModule.cpp +++ b/src/libs/gui/NodeModule.cpp @@ -31,7 +31,8 @@ #include "SubpatchModule.h" #include "NodeControlWindow.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node) @@ -148,4 +149,5 @@ NodeModule::metadata_update(const string& key, const Atom& value) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/NodeModule.h b/src/libs/gui/NodeModule.h index d87bcfcc..8e88b34c 100644 --- a/src/progs/ingenuity/NodeModule.h +++ b/src/libs/gui/NodeModule.h @@ -34,7 +34,8 @@ namespace Ingen { namespace Client { } } using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class PatchCanvas; class Port; @@ -45,7 +46,7 @@ class Port; * This base class is extended for various types of modules - SubpatchModule, * DSSIModule, etc. * - * \ingroup Ingenuity + * \ingroup GUI */ class NodeModule : public LibFlowCanvas::Module { @@ -55,7 +56,7 @@ public: virtual ~NodeModule(); boost::shared_ptr<Port> port(const string& port_name) { - return boost::dynamic_pointer_cast<Ingenuity::Port>( + return boost::dynamic_pointer_cast<Ingen::GUI::Port>( Module::get_port(port_name)); } @@ -83,6 +84,7 @@ protected: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // NODEMODULE_H diff --git a/src/progs/ingenuity/NodePropertiesWindow.cpp b/src/libs/gui/NodePropertiesWindow.cpp index 428119a3..0cd59e80 100644 --- a/src/progs/ingenuity/NodePropertiesWindow.cpp +++ b/src/libs/gui/NodePropertiesWindow.cpp @@ -21,7 +21,8 @@ #include "client/PluginModel.h" #include "NodePropertiesWindow.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { using std::string; @@ -61,5 +62,6 @@ NodePropertiesWindow::set_node(SharedPtr<NodeModel> node_model) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/NodePropertiesWindow.h b/src/libs/gui/NodePropertiesWindow.h index eae9bfdc..057de4ec 100644 --- a/src/progs/ingenuity/NodePropertiesWindow.h +++ b/src/libs/gui/NodePropertiesWindow.h @@ -24,14 +24,15 @@ #include "client/NodeModel.h" using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Node properties window. * * Loaded by libglade as a derived object. * - * \ingroup Ingenuity + * \ingroup GUI */ class NodePropertiesWindow : public Gtk::Window { @@ -51,6 +52,7 @@ private: Gtk::Label* _plugin_name_label; }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // NODEPROPERTIESWINDOW_H diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index e6397a3d..623d0c7c 100644 --- a/src/progs/ingenuity/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -41,7 +41,8 @@ using Ingen::Client::Store; using Ingen::Client::Serializer; using Ingen::Client::PluginModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height) @@ -302,11 +303,11 @@ void PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Connectable> src_port, boost::shared_ptr<LibFlowCanvas::Connectable> dst_port) { - const boost::shared_ptr<Ingenuity::Port> src - = boost::dynamic_pointer_cast<Ingenuity::Port>(src_port); + const boost::shared_ptr<Ingen::GUI::Port> src + = boost::dynamic_pointer_cast<Ingen::GUI::Port>(src_port); - const boost::shared_ptr<Ingenuity::Port> dst - = boost::dynamic_pointer_cast<Ingenuity::Port>(dst_port); + const boost::shared_ptr<Ingen::GUI::Port> dst + = boost::dynamic_pointer_cast<Ingen::GUI::Port>(dst_port); if (!src || !dst) return; @@ -345,11 +346,11 @@ void PatchCanvas::disconnect(boost::shared_ptr<LibFlowCanvas::Connectable> src_port, boost::shared_ptr<LibFlowCanvas::Connectable> dst_port) { - const boost::shared_ptr<Ingenuity::Port> src - = boost::dynamic_pointer_cast<Ingenuity::Port>(src_port); + const boost::shared_ptr<Ingen::GUI::Port> src + = boost::dynamic_pointer_cast<Ingen::GUI::Port>(src_port); - const boost::shared_ptr<Ingenuity::Port> dst - = boost::dynamic_pointer_cast<Ingenuity::Port>(dst_port); + const boost::shared_ptr<Ingen::GUI::Port> dst + = boost::dynamic_pointer_cast<Ingen::GUI::Port>(dst_port); App::instance().engine()->disconnect(src->model()->path(), dst->model()->path()); @@ -468,7 +469,7 @@ PatchCanvas::load_plugin(SharedPtr<PluginModel> plugin) { const Path& path = _patch->path().base() + plugin->default_node_name(_patch); // FIXME: polyphony? - App::instance().engine()->create_node(plugin->uri(), path, false); + App::instance().engine()->create_node(path, plugin->uri(), false); MetadataMap data = get_initial_data(); for (MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i) App::instance().engine()->set_metadata(path, i->first, i->second); @@ -520,4 +521,5 @@ PatchCanvas::menu_new_patch() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/libs/gui/PatchCanvas.h index 297e9874..8634b7bf 100644 --- a/src/progs/ingenuity/PatchCanvas.h +++ b/src/libs/gui/PatchCanvas.h @@ -39,14 +39,15 @@ using Ingen::Client::NodeModel; using Ingen::Client::PortModel; using Ingen::Client::MetadataMap; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class NodeModule; /** Patch canvas widget. * - * \ingroup Ingenuity + * \ingroup GUI */ class PatchCanvas : public LibFlowCanvas::FlowCanvas { @@ -122,6 +123,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // PATCHCANVAS_H diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/libs/gui/PatchPortModule.cpp index 08e7dbbd..2a812296 100644 --- a/src/progs/ingenuity/PatchPortModule.cpp +++ b/src/libs/gui/PatchPortModule.cpp @@ -27,7 +27,8 @@ #include "RenameWindow.h" #include "PatchWindow.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port) @@ -108,4 +109,5 @@ PatchPortModule::metadata_update(const string& key, const Atom& value) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/libs/gui/PatchPortModule.h index f42b7592..ac39eadf 100644 --- a/src/progs/ingenuity/PatchPortModule.h +++ b/src/libs/gui/PatchPortModule.h @@ -33,7 +33,8 @@ namespace Ingen { namespace Client { } } using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class PatchCanvas; class Port; @@ -43,7 +44,7 @@ class Port; * * Translation: This is the nameless single port pseudo module thingy. * - * \ingroup Ingenuity + * \ingroup GUI */ class PatchPortModule : public boost::enable_shared_from_this<LibFlowCanvas::Module>, public LibFlowCanvas::Module @@ -73,6 +74,7 @@ protected: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // PATCHPORTMODULE_H diff --git a/src/progs/ingenuity/PatchPropertiesWindow.cpp b/src/libs/gui/PatchPropertiesWindow.cpp index 17b28d34..1e310f0b 100644 --- a/src/progs/ingenuity/PatchPropertiesWindow.cpp +++ b/src/libs/gui/PatchPropertiesWindow.cpp @@ -19,7 +19,8 @@ #include "client/PatchModel.h" #include "PatchPropertiesWindow.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { using std::string; @@ -84,4 +85,5 @@ PatchPropertiesWindow::ok_clicked() -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/PatchPropertiesWindow.h b/src/libs/gui/PatchPropertiesWindow.h index 8e461381..0640a198 100644 --- a/src/progs/ingenuity/PatchPropertiesWindow.h +++ b/src/libs/gui/PatchPropertiesWindow.h @@ -27,14 +27,15 @@ using std::string; namespace Ingen { namespace Client { class PatchModel; } } using Ingen::Client::PatchModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Patch Properties Window. * * Loaded by libglade as a derived object. * - * \ingroup Ingenuity + * \ingroup GUI */ class PatchPropertiesWindow : public Gtk::Window { @@ -57,6 +58,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // PATCHPROPERTIESWINDOW_H diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/libs/gui/PatchTreeWindow.cpp index 77caf6dd..b77508c1 100644 --- a/src/progs/ingenuity/PatchTreeWindow.cpp +++ b/src/libs/gui/PatchTreeWindow.cpp @@ -25,7 +25,8 @@ #include "SubpatchModule.h" #include "WindowFactory.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject, @@ -265,4 +266,5 @@ PatchTreeWindow::patch_renamed(const Path& old_path, const Path& new_path) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/PatchTreeWindow.h b/src/libs/gui/PatchTreeWindow.h index c7fc3c10..9868d363 100644 --- a/src/progs/ingenuity/PatchTreeWindow.h +++ b/src/libs/gui/PatchTreeWindow.h @@ -27,7 +27,8 @@ namespace Ingen { namespace Client { } } using Ingen::Client::Store; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class PatchWindow; class PatchTreeView; @@ -35,7 +36,7 @@ class PatchTreeView; /** Window with a TreeView of all loaded patches. * - * \ingroup Ingenuity + * \ingroup GUI */ class PatchTreeWindow : public Gtk::Window { @@ -105,6 +106,7 @@ private: }; // struct PatchTreeView -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // PATCHTREEWINDOW_H diff --git a/src/progs/ingenuity/PatchView.cpp b/src/libs/gui/PatchView.cpp index 076eaa40..7b12fe40 100644 --- a/src/progs/ingenuity/PatchView.cpp +++ b/src/libs/gui/PatchView.cpp @@ -31,7 +31,8 @@ #include "PatchTreeWindow.h" #include "GladeFactory.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { PatchView::PatchView(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -157,4 +158,5 @@ PatchView::disable() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/PatchView.h b/src/libs/gui/PatchView.h index 95683251..72d773fa 100644 --- a/src/progs/ingenuity/PatchView.h +++ b/src/libs/gui/PatchView.h @@ -35,7 +35,8 @@ namespace Ingen { namespace Client { using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class PatchCanvas; class LoadPluginWindow; @@ -50,7 +51,7 @@ class OmPort; /** The patch specific contents of a PatchWindow (ie the canvas and whatever else). * - * \ingroup Ingenuity + * \ingroup GUI */ class PatchView : public Gtk::Box { @@ -95,6 +96,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // PATCHVIEW_H diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp index 2e764ff0..ff2a6a4a 100644 --- a/src/progs/ingenuity/PatchWindow.cpp +++ b/src/libs/gui/PatchWindow.cpp @@ -39,7 +39,8 @@ #include "WindowFactory.h" #include "PatchView.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -462,4 +463,5 @@ PatchWindow::event_fullscreen_toggled() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/PatchWindow.h b/src/libs/gui/PatchWindow.h index f4399a20..6e95c3d8 100644 --- a/src/progs/ingenuity/PatchWindow.h +++ b/src/libs/gui/PatchWindow.h @@ -41,7 +41,8 @@ namespace Ingen { namespace Client { using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class LoadPluginWindow; class LoadPatchWindow; @@ -57,7 +58,7 @@ class BreadCrumbBox; /** A window for a patch. * - * \ingroup Ingenuity + * \ingroup GUI */ class PatchWindow : public Gtk::Window { @@ -136,6 +137,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // PATCHWINDOW_H diff --git a/src/progs/ingenuity/Port.cpp b/src/libs/gui/Port.cpp index b13ccda9..9b21b8be 100644 --- a/src/progs/ingenuity/Port.cpp +++ b/src/libs/gui/Port.cpp @@ -28,7 +28,8 @@ using std::cerr; using std::endl; using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** @param flip Make an input port appear as an output port, and vice versa. @@ -56,4 +57,5 @@ Port::on_menu_destroy() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/Port.h b/src/libs/gui/Port.h index b006ba45..b798cbca 100644 --- a/src/progs/ingenuity/Port.h +++ b/src/libs/gui/Port.h @@ -26,12 +26,13 @@ namespace Ingen { namespace Client { class PortModel; } } using Ingen::Client::PortModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** A Port on an Module. * - * \ingroup Ingenuity + * \ingroup GUI */ class Port : public LibFlowCanvas::Port { @@ -50,6 +51,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // PORT_H diff --git a/src/progs/ingenuity/PortPropertiesWindow.cpp b/src/libs/gui/PortPropertiesWindow.cpp index eb23c542..10b65641 100644 --- a/src/progs/ingenuity/PortPropertiesWindow.cpp +++ b/src/libs/gui/PortPropertiesWindow.cpp @@ -26,7 +26,8 @@ using std::string; -namespace Ingenuity { +namespace Ingen { +namespace GUI { PortPropertiesWindow::PortPropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -169,5 +170,6 @@ PortPropertiesWindow::ok() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/PortPropertiesWindow.h b/src/libs/gui/PortPropertiesWindow.h index adb0a2f0..b7900bc6 100644 --- a/src/progs/ingenuity/PortPropertiesWindow.h +++ b/src/libs/gui/PortPropertiesWindow.h @@ -24,7 +24,8 @@ #include "client/PortModel.h" using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class ControlGroup; @@ -33,7 +34,7 @@ class ControlGroup; * * Loaded by libglade as a derived object. * - * \ingroup Ingenuity + * \ingroup GUI */ class PortPropertiesWindow : public Gtk::Dialog { @@ -63,6 +64,7 @@ private: Gtk::Button* _ok_button; }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // PORTPROPERTIESWINDOW_H diff --git a/src/progs/ingenuity/RenameWindow.cpp b/src/libs/gui/RenameWindow.cpp index 28a8ddfe..d9c474a8 100644 --- a/src/progs/ingenuity/RenameWindow.cpp +++ b/src/libs/gui/RenameWindow.cpp @@ -25,7 +25,8 @@ using std::string; -namespace Ingenuity { +namespace Ingen { +namespace GUI { RenameWindow::RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml) @@ -112,4 +113,5 @@ RenameWindow::ok_clicked() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/RenameWindow.h b/src/libs/gui/RenameWindow.h index 04f765d4..56ee3d5a 100644 --- a/src/progs/ingenuity/RenameWindow.h +++ b/src/libs/gui/RenameWindow.h @@ -24,12 +24,13 @@ #include "client/ObjectModel.h" using Ingen::Client::ObjectModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Rename window. Handles renaming of any (Ingen) object. * - * \ingroup Ingenuity + * \ingroup GUI */ class RenameWindow : public Gtk::Window { @@ -53,6 +54,7 @@ private: Gtk::Button* _ok_button; }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // RENAMEWINDOW_H diff --git a/src/progs/ingenuity/SubpatchModule.cpp b/src/libs/gui/SubpatchModule.cpp index 53958375..475774bc 100644 --- a/src/progs/ingenuity/SubpatchModule.cpp +++ b/src/libs/gui/SubpatchModule.cpp @@ -29,7 +29,8 @@ #include "WindowFactory.h" using std::cerr; using std::cout; using std::endl; -namespace Ingenuity { +namespace Ingen { +namespace GUI { SubpatchModule::SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PatchModel> patch) @@ -90,4 +91,5 @@ SubpatchModule::menu_remove() App::instance().engine()->destroy(_patch->path()); } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/SubpatchModule.h b/src/libs/gui/SubpatchModule.h index 36e9a2d3..4dc17e8b 100644 --- a/src/progs/ingenuity/SubpatchModule.h +++ b/src/libs/gui/SubpatchModule.h @@ -35,7 +35,8 @@ namespace Ingen { namespace Client { } } using namespace Ingen::Client; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class PatchCanvas; class NodeControlWindow; @@ -43,7 +44,7 @@ class NodeControlWindow; /** A module to represent a subpatch * - * \ingroup Ingenuity + * \ingroup GUI */ class SubpatchModule : public NodeModule { @@ -64,6 +65,7 @@ protected: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // SUBPATCHMODULE_H diff --git a/src/progs/ingenuity/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp index 43bc76c8..120d9b6c 100644 --- a/src/progs/ingenuity/ThreadedLoader.cpp +++ b/src/libs/gui/ThreadedLoader.cpp @@ -24,7 +24,8 @@ #include "ThreadedLoader.h" using std::cout; using std::endl; -namespace Ingenuity { +namespace Ingen { +namespace GUI { ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine) @@ -136,4 +137,5 @@ ThreadedLoader::save_patch_event(SharedPtr<PatchModel> model, const string& file } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/ThreadedLoader.h b/src/libs/gui/ThreadedLoader.h index 1846cece..58a18fae 100644 --- a/src/progs/ingenuity/ThreadedLoader.h +++ b/src/libs/gui/ThreadedLoader.h @@ -38,7 +38,8 @@ using boost::optional; using namespace Ingen::Client; using namespace Ingen::Serialisation; -namespace Ingenuity { +namespace Ingen { +namespace GUI { /** Thread for loading patch files. @@ -50,7 +51,7 @@ namespace Ingenuity { * Implemented as a slave with a list of closures (events) which processes * all events in the (mutex protected) list each time it's whipped. * - * \ingroup Ingenuity + * \ingroup GUI */ class ThreadedLoader : public Raul::Slave { @@ -92,6 +93,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // LOADERRTHREAD_H diff --git a/src/progs/ingenuity/UploadPatchWindow.cpp b/src/libs/gui/UploadPatchWindow.cpp index 400c2369..7def01a0 100644 --- a/src/progs/ingenuity/UploadPatchWindow.cpp +++ b/src/libs/gui/UploadPatchWindow.cpp @@ -34,7 +34,8 @@ using boost::optional; using namespace Raul; using namespace std; -namespace Ingenuity { +namespace Ingen { +namespace GUI { UploadPatchWindow::UploadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) @@ -278,4 +279,5 @@ UploadPatchWindow::cancel_clicked() } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/UploadPatchWindow.h b/src/libs/gui/UploadPatchWindow.h index 36b39b07..13272215 100644 --- a/src/progs/ingenuity/UploadPatchWindow.h +++ b/src/libs/gui/UploadPatchWindow.h @@ -30,7 +30,8 @@ using Ingen::Client::PatchModel; using Ingen::Client::MetadataMap; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class UploadPatchWindow; @@ -58,7 +59,7 @@ private: /* Upload patch dialog. * - * \ingroup Ingenuity + * \ingroup GUI */ class UploadPatchWindow : public Gtk::Dialog { @@ -98,6 +99,7 @@ private: }; -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen #endif // UPLOADPATCHWINDOW_H diff --git a/src/progs/ingenuity/WindowFactory.cpp b/src/libs/gui/WindowFactory.cpp index 14a7554f..7c2e3eaa 100644 --- a/src/progs/ingenuity/WindowFactory.cpp +++ b/src/libs/gui/WindowFactory.cpp @@ -30,7 +30,8 @@ #include "RenameWindow.h" #include "NewSubpatchWindow.h" -namespace Ingenuity { +namespace Ingen { +namespace GUI { WindowFactory::WindowFactory() @@ -352,4 +353,5 @@ WindowFactory::present_properties(SharedPtr<NodeModel> node) } -} // namespace Ingenuity +} // namespace GUI +} // namespace Ingen diff --git a/src/progs/ingenuity/WindowFactory.h b/src/libs/gui/WindowFactory.h index 085ff9b6..c3170dce 100644 --- a/src/progs/ingenuity/WindowFactory.h +++ b/src/libs/gui/WindowFactory.h @@ -26,7 +26,8 @@ using Ingen::Client::PatchModel; -namespace Ingenuity { +namespace Ingen { +namespace GUI { class PatchWindow; class NodeControlWindow; @@ -41,8 +42,8 @@ class RenameWindow; /** Manager/Factory for all windows. * * This serves as a nice centralized spot for all window management issues, - * as well as an enumeration of all the windows in Ingenuity (the goal being - * to reduce that number as much as possible). + * as well as an enumeration of all windows (the goal being to reduce that + * number as much as possible). */ class WindowFactory { public: @@ -97,6 +98,8 @@ private: RenameWindow* _rename_win; }; -} + +} // namespace GUI +} // namespace Ingen #endif // WINDOW_FACTORY_H diff --git a/src/libs/gui/cmdline.h b/src/libs/gui/cmdline.h new file mode 100644 index 00000000..6f1f9259 --- /dev/null +++ b/src/libs/gui/cmdline.h @@ -0,0 +1,86 @@ +/* cmdline.h */ + +/* File autogenerated by gengetopt version 2.19.1 */ + +#ifndef CMDLINE_H +#define CMDLINE_H + +/* If we use autoconf. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#ifndef CMDLINE_PARSER_PACKAGE +#define CMDLINE_PARSER_PACKAGE "ingen" +#endif + +#ifndef CMDLINE_PARSER_VERSION +#define CMDLINE_PARSER_VERSION VERSION +#endif + +struct gengetopt_args_info +{ + const char *help_help; /* Print help and exit help description. */ + const char *version_help; /* Print version and exit help description. */ + int engine_flag; /* Run (JACK) engine (default=off). */ + const char *engine_help; /* Run (JACK) engine help description. */ + int engine_port_arg; /* Engine OSC port (default='16180'). */ + char * engine_port_orig; /* Engine OSC port original value given at command line. */ + const char *engine_port_help; /* Engine OSC port help description. */ + char * connect_arg; /* Connect to existing engine at OSC URI (default='osc.udp://localhost:16180'). */ + char * connect_orig; /* Connect to existing engine at OSC URI original value given at command line. */ + const char *connect_help; /* Connect to existing engine at OSC URI help description. */ + int gui_flag; /* Launch the GTK graphical interface (default=on). */ + const char *gui_help; /* Launch the GTK graphical interface help description. */ + int client_port_arg; /* Client OSC port. */ + char * client_port_orig; /* Client OSC port original value given at command line. */ + const char *client_port_help; /* Client OSC port help description. */ + char * load_arg; /* Load patch. */ + char * load_orig; /* Load patch original value given at command line. */ + const char *load_help; /* Load patch help description. */ + char * path_arg; /* Target path for loaded patch. */ + char * path_orig; /* Target path for loaded patch original value given at command line. */ + const char *path_help; /* Target path for loaded patch help description. */ + + int help_given ; /* Whether help was given. */ + int version_given ; /* Whether version was given. */ + int engine_given ; /* Whether engine was given. */ + int engine_port_given ; /* Whether engine-port was given. */ + int connect_given ; /* Whether connect was given. */ + int gui_given ; /* Whether gui was given. */ + int client_port_given ; /* Whether client-port was given. */ + int load_given ; /* Whether load was given. */ + int path_given ; /* Whether path was given. */ + +} ; + +extern const char *gengetopt_args_info_purpose; +extern const char *gengetopt_args_info_usage; +extern const char *gengetopt_args_info_help[]; + +int cmdline_parser (int argc, char * const *argv, + struct gengetopt_args_info *args_info); +int cmdline_parser2 (int argc, char * const *argv, + struct gengetopt_args_info *args_info, + int override, int initialize, int check_required); +int cmdline_parser_file_save(const char *filename, + struct gengetopt_args_info *args_info); + +void cmdline_parser_print_help(void); +void cmdline_parser_print_version(void); + +void cmdline_parser_init (struct gengetopt_args_info *args_info); +void cmdline_parser_free (struct gengetopt_args_info *args_info); + +int cmdline_parser_required (struct gengetopt_args_info *args_info, + const char *prog_name); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif /* CMDLINE_H */ diff --git a/src/progs/ingenuity/ingen.svg b/src/libs/gui/ingen-icon.svg index a15ed7e7..a15ed7e7 100644 --- a/src/progs/ingenuity/ingen.svg +++ b/src/libs/gui/ingen-icon.svg diff --git a/src/libs/gui/ingen.svg b/src/libs/gui/ingen.svg new file mode 100644 index 00000000..a15ed7e7 --- /dev/null +++ b/src/libs/gui/ingen.svg @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.44.1" + width="64" + height="64" + version="1.0" + sodipodi:docbase="/home/dave/code/codesonnet/ingen/src/progs/ingenuity" + sodipodi:docname="ingen-icon.svg"> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs5" /> + <sodipodi:namedview + inkscape:window-height="575" + inkscape:window-width="853" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + guidetolerance="10.0" + gridtolerance="10.0" + objecttolerance="10.0" + borderopacity="1.0" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + inkscape:zoom="5.921875" + inkscape:cx="32" + inkscape:cy="31.915567" + inkscape:window-x="569" + inkscape:window-y="167" + inkscape:current-layer="svg2" /> + <path + style="fill:black" + d="M 7.3978252,58.655244 C 3.8646112,57.233665 3.1688652,52.819494 3.1688652,31.824538 C 3.1688652,10.379073 3.8359622,6.4337347 7.7136682,4.9457196 C 9.8253032,4.135409 54.512427,4.135409 56.624063,4.9457196 C 60.501768,6.4337347 61.168865,10.379073 61.168865,31.824538 C 61.168865,53.270003 60.501768,57.215342 56.624063,58.703357 C 54.702346,59.440788 9.2397932,59.396354 7.3978252,58.655244 z M 55.234606,55.289354 C 57.058692,54.313133 57.168865,52.976602 57.168865,31.824538 C 57.168865,10.672474 57.058692,9.3359433 55.234606,8.3597221 C 52.64791,6.9753642 11.68982,6.9753642 9.1031242,8.3597221 C 7.2790962,9.3359123 7.1688652,10.672309 7.1688652,31.810032 C 7.1688652,52.102806 7.3345622,54.321667 8.9188652,55.244439 C 11.279929,56.619633 52.673952,56.659775 55.234606,55.289354 z M 37.168865,48.891926 C 37.168865,47.331323 36.446365,46.230001 35.153333,45.819608 C 34.04479,45.46777 31.607131,42.787082 29.736313,39.862522 C 25.549347,33.31724 24.555639,32.64737 23.756486,35.831449 C 23.178349,38.13493 22.684027,38.324538 17.256802,38.324538 C 10.799575,38.324538 10.168865,37.746144 10.168865,31.824538 C 10.168865,25.902932 10.799575,25.324538 17.256802,25.324538 C 22.684027,25.324538 23.178349,25.514146 23.756486,27.817627 C 24.555639,31.001706 25.549347,30.331836 29.736313,23.786554 C 31.607131,20.861994 34.04479,18.181306 35.153333,17.829468 C 36.446365,17.419075 37.168865,16.317753 37.168865,14.75715 C 37.168865,12.479647 37.514343,12.324538 42.587078,12.324538 C 50.54284,12.324538 51.168865,12.761099 51.168865,18.309082 C 51.168865,24.371452 49.795116,25.518459 43.000041,25.129613 C 38.343077,24.86312 37.628453,24.53999 37.349314,22.574538 C 36.852569,19.076888 35.536131,19.853195 31.414126,26.074538 L 27.604413,31.824538 L 31.418918,37.574538 C 35.547694,43.798272 36.853067,44.568677 37.349314,41.074538 C 37.628453,39.109086 38.343077,38.785956 43.000041,38.519463 C 49.795116,38.130617 51.168865,39.277624 51.168865,45.339994 C 51.168865,50.887977 50.54284,51.324538 42.587078,51.324538 C 37.514343,51.324538 37.168865,51.169429 37.168865,48.891926 z " + id="path1873" /> +</svg> diff --git a/src/progs/ingenuity/ingenuity.glade b/src/libs/gui/ingen_gui.glade index 6eaf300e..6eaf300e 100644 --- a/src/progs/ingenuity/ingenuity.glade +++ b/src/libs/gui/ingen_gui.glade diff --git a/src/progs/ingenuity/ingenuity.gladep b/src/libs/gui/ingen_gui.gladep index 7cd9c6ce..7cd9c6ce 100644 --- a/src/progs/ingenuity/ingenuity.gladep +++ b/src/libs/gui/ingen_gui.gladep diff --git a/src/libs/module/Module.cpp b/src/libs/module/Module.cpp index d92ee97a..073e612d 100644 --- a/src/libs/module/Module.cpp +++ b/src/libs/module/Module.cpp @@ -20,6 +20,7 @@ #include <iostream> #include <glibmm/module.h> #include <glibmm/miscutils.h> +#include <glibmm/fileutils.h> #include <raul/SharedPtr.h> #ifndef INGEN_MODULE_DIR @@ -43,7 +44,7 @@ namespace Shared { SharedPtr<Glib::Module> load_module(const string& name) { - SharedPtr<Glib::Module> module; + Glib::Module* module = NULL; // Search INGEN_MODULE_PATH first bool module_path_found; @@ -52,24 +53,30 @@ load_module(const string& name) string dir; istringstream iss(module_path); while (getline(iss, dir, ':')) { - module = SharedPtr<Glib::Module>(new Glib::Module( - Glib::Module::build_path(dir, name), - Glib::MODULE_BIND_LAZY)); + + string filename = Glib::Module::build_path(dir, name); + if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) { + module = new Glib::Module(filename, Glib::MODULE_BIND_LAZY); - if (module && *module.get()) - return module; + if (*module) { + return SharedPtr<Glib::Module>(module); + } else { + delete module; + cerr << Glib::Module::get_last_error() << endl; + } + } } } // Try default directory if not found - module = SharedPtr<Glib::Module>(new Glib::Module( + module = new Glib::Module( Glib::Module::build_path(INGEN_MODULE_DIR, name), - Glib::MODULE_BIND_LAZY)); + Glib::MODULE_BIND_LAZY); - if (*module.get()) { - return module; + if (*module) { + return SharedPtr<Glib::Module>(module); } else { - cerr << "Unable to load module \"" << name << "\" (you may want to set INGEN_MODULE_PATH)." << endl; + cerr << "Unable to load module \"" << name << "\" (try setting INGEN_MODULE_PATH)." << endl; return SharedPtr<Glib::Module>(); } } diff --git a/src/progs/Makefile.am b/src/progs/Makefile.am index aa28c47d..f2e1e8ef 100644 --- a/src/progs/Makefile.am +++ b/src/progs/Makefile.am @@ -1,15 +1,15 @@ AM_CXXFLAGS = -I$(top_srcdir)/src/common -DIST_SUBDIRS = python supercollider patch_loader ingenuity server demolition +DIST_SUBDIRS = python supercollider demolition -SUBDIRS = server +SUBDIRS = ingen if BUILD_CONSOLE_CLIENTS SUBDIRS += patch_loader # demolition endif -if BUILD_GTK_CLIENT -SUBDIRS += ingenuity -endif +#if BUILD_GTK_CLIENT +#SUBDIRS += ingenuity +#endif diff --git a/src/progs/ingen/Makefile.am b/src/progs/ingen/Makefile.am new file mode 100644 index 00000000..9915cae5 --- /dev/null +++ b/src/progs/ingen/Makefile.am @@ -0,0 +1,16 @@ +AM_CXXFLAGS = @RAUL_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs -DINGEN_MODULE_DIR=\"$(libdir)/ingen\" + +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = ingen_dev + +desktopfilesdir = $(datadir)/applications +dist_desktopfiles_DATA = ingen.desktop + +bin_PROGRAMS = ingen +ingen_LDADD = @RAUL_LIBS@ ../../libs/module/libingen_module.la +ingen_DEPENDENCIES = ../../libs/module/libingen_module.la + +ingen_SOURCES = \ + main.cpp \ + cmdline.h \ + cmdline.c diff --git a/src/progs/ingen/cmdline.ggo b/src/progs/ingen/cmdline.ggo new file mode 100644 index 00000000..45eae5b0 --- /dev/null +++ b/src/progs/ingen/cmdline.ggo @@ -0,0 +1,19 @@ +# Process this file with gengetopt to generate the necessary code (in cmdline.h, cmdline.c) + +package "ingen" +purpose "A modular realtime audio processing system" + +description "This executable can be used to launch any configuration of Ingen. +Ingen can run as a stand-alone server controlled by OSC, or internal to +another process. The GUI can communicate with the engine via either method, +and many GUIs (or other things) may connect to an engine via OSC. +" + +option "engine" e "Run (JACK) engine" flag off +option "engine-port" E "Engine OSC port" int no default="16180" +option "connect" c "Connect to existing engine at OSC URI" string no default="osc.udp://localhost:16180" +option "gui" g "Launch the GTK graphical interface" flag on +option "client-port" C "Client OSC port" int no +option "load" l "Load patch" string no +option "path" p "Target path for loaded patch" string no + diff --git a/src/progs/ingenuity/ingenuity.desktop.in b/src/progs/ingen/ingen.desktop.in index 40fc7e56..63f07b67 100644 --- a/src/progs/ingenuity/ingenuity.desktop.in +++ b/src/progs/ingen/ingen.desktop.in @@ -1,9 +1,9 @@ [Desktop Entry] Encoding=UTF-8 -Name=Ingenuity +Name=Ingen Version=@PACKAGE_VERSION@ Comment=Create synthesizers and effects processors in a modular environment -Exec=ingenuity +Exec=ingen -g Terminal=false Icon=ingen-icon.svg Type=Application diff --git a/src/progs/server/ingen_dev b/src/progs/ingen/ingen_dev index bd8857f7..bd8857f7 100755 --- a/src/progs/server/ingen_dev +++ b/src/progs/ingen/ingen_dev diff --git a/src/progs/ingen/main.cpp b/src/progs/ingen/main.cpp new file mode 100644 index 00000000..1ca1311a --- /dev/null +++ b/src/progs/ingen/main.cpp @@ -0,0 +1,194 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard <http://drobilla.net> + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <iostream> +#include <string> +#include <signal.h> +#include <boost/optional.hpp> +#include <raul/Path.h> +#include <raul/RDFWorld.h> +#include "config.h" +#include "module/Module.h" +#include "engine/Engine.h" +#include "engine/QueuedEngineInterface.h" +#include "serialisation/Loader.h" +#include "cmdline.h" + +using namespace std; +using namespace Ingen; + +SharedPtr<Engine> engine; + + +void +catch_int(int) +{ + signal(SIGINT, catch_int); + signal(SIGTERM, catch_int); + + cout << "[Main] Ingen interrupted." << endl; + engine->quit(); +} + + +int +main(int argc, char** argv) +{ + /* Parse command line options */ + gengetopt_args_info args; + if (cmdline_parser (argc, argv, &args) != 0) + return 1; + + if (argc <= 1) { + cout << "No arguments provided. Try something like:" << endl << endl; + cout << "Run an engine: ingen -e" << endl; + cout << "Run the GUI: ingen -g" << endl; + cout << "Pring full help: ingen -h" << endl << endl; + cmdline_parser_print_help(); + return 0; + } + + SharedPtr<Glib::Module> engine_module; + SharedPtr<Glib::Module> gui_module; + + SharedPtr<Shared::EngineInterface> engine_interface; + + /* Run engine */ + if (args.engine_flag) { + + engine_module = Ingen::Shared::load_module("ingen_engine"); + + if (engine_module) { + /*if (args.engine_port_given) { + bool (*launch_engine)(int) = NULL; + if ( ! module->get_symbol("launch_osc_engine", (void*&)launch_engine)) + module.reset(); + else + launch_engine(args.engine_port_arg); + + } else if (args.gui_given || args.load_given) {*/ + Engine* (*new_engine)() = NULL; + if (engine_module->get_symbol("new_engine", (void*&)new_engine)) { + engine = SharedPtr<Engine>(new_engine()); + engine->start_jack_driver(); + //engine->launch_osc_interface(args.engine_port_arg); + } else { + engine_module.reset(); + } + engine_interface = engine->new_queued_interface(); + /*} else { + cerr << "Nonsense command line parameters, engine not loaded." << endl; + }*/ + } else { + cerr << "Unable to load engine module, engine not loaded." << endl; + cerr << "Try running ingen_dev or setting INGEN_MODULE_PATH." << endl; + } + + } + + + /* Connect to remote engine */ + if (args.connect_given || (args.load_given && !engine_interface)) { + bool found = false; + SharedPtr<Glib::Module> client_module + = Ingen::Shared::load_module("ingen_client"); + + SharedPtr<Shared::EngineInterface> (*new_osc_interface)(const std::string&) = NULL; + + if (client_module) + found = client_module->get_symbol("new_osc_interface", (void*&)new_osc_interface); + + if (client_module && found) { + engine_interface = new_osc_interface(args.connect_arg); + } else { + cerr << "Unable to load ingen_client module, aborting." << endl; + return -1; + } + } + + + /* Load a patch */ + if (args.load_given) { + + Raul::RDF::World rdf_world; + rdf_world.add_prefix("xsd", "http://www.w3.org/2001/XMLSchema#"); + rdf_world.add_prefix("ingen", "http://drobilla.net/ns/ingen#"); + rdf_world.add_prefix("ingenuity", "http://drobilla.net/ns/ingenuity#"); + rdf_world.add_prefix("lv2", "http://lv2plug.in/ontology#"); + rdf_world.add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); + rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#"); + + boost::optional<Raul::Path> parent_path; + if (args.path_given) + parent_path = args.path_arg; + + bool found = false; + SharedPtr<Glib::Module> serialisation_module + = Ingen::Shared::load_module("ingen_serialisation"); + + Serialisation::Loader* (*new_loader)() = NULL; + + if (serialisation_module) + found = serialisation_module->get_symbol("new_loader", (void*&)new_loader); + + if (serialisation_module && found) { + SharedPtr<Serialisation::Loader> loader(new_loader()); + loader->load(engine_interface, &rdf_world, + string("file:") + args.load_arg, parent_path, ""); + } else { + cerr << "Unable to load serialisation module, aborting." << endl; + return -1; + } + } + + + /* Run GUI */ + bool ran_gui = false; + if (args.gui_given) { + gui_module = Ingen::Shared::load_module("ingen_gui"); + void (*run)(int, char**) = NULL; + bool found = gui_module->get_symbol("run", (void*&)run); + + if (found) { + ran_gui = true; + run(argc, argv); + } else { + cerr << "Unable to find GUI module, GUI not loaded." << endl; + cerr << "Try running ingen_dev or setting INGEN_MODULE_PATH." << endl; + } + } + + + /* Didn't run the GUI, do our own main thing. */ + if (engine && !ran_gui) { + + signal(SIGINT, catch_int); + signal(SIGTERM, catch_int); + + engine->start_jack_driver(); + engine->start_osc_driver(args.engine_port_arg); + + engine->activate(); + + engine->main(); + + engine.reset(); + } + + return 0; +} + diff --git a/src/progs/ingenuity/cmdline.c b/src/progs/ingenuity/cmdline.c deleted file mode 100644 index 85c580d5..00000000 --- a/src/progs/ingenuity/cmdline.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - File autogenerated by gengetopt version 2.10 - generated with the following command: - gengetopt - - The developers of gengetopt consider the fixed text that goes in all - gengetopt output files to be in the public domain: - we make no copyright claims on it. -*/ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -/* If we use autoconf. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "getopt.h" - -#include "cmdline.h" - -void -cmdline_parser_print_version (void) -{ - printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION); -} - -void -cmdline_parser_print_help (void) -{ - cmdline_parser_print_version (); - printf("\n" - "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE); - printf(" -h --help Print help and exit\n"); - printf(" -V --version Print version and exit\n"); - printf(" -uSTRING --engine-url=STRING Ingen OSC URL to connect to\n"); - printf(" -pINT --client-port=INT Client port to listen on\n"); -} - - -static char *gengetopt_strdup (const char *s); - -/* gengetopt_strdup() */ -/* strdup.c replacement of strdup, which is not standard */ -char * -gengetopt_strdup (const char *s) -{ - char *result = (char*)malloc(strlen(s) + 1); - if (result == (char*)0) - return (char*)0; - strcpy(result, s); - return result; -} - -int -cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info) -{ - int c; /* Character of the parsed option. */ - int missing_required_options = 0; - - args_info->help_given = 0 ; - args_info->version_given = 0 ; - args_info->engine_url_given = 0 ; - args_info->client_port_given = 0 ; -#define clear_args() { \ - args_info->engine_url_arg = NULL; \ -} - - clear_args(); - - optarg = 0; - optind = 1; - opterr = 1; - optopt = '?'; - - while (1) - { - int option_index = 0; - char *stop_char; - - static struct option long_options[] = { - { "help", 0, NULL, 'h' }, - { "version", 0, NULL, 'V' }, - { "engine-url", 1, NULL, 'u' }, - { "client-port", 1, NULL, 'p' }, - { NULL, 0, NULL, 0 } - }; - - stop_char = 0; - c = getopt_long (argc, argv, "hVu:p:", long_options, &option_index); - - if (c == -1) break; /* Exit from `while (1)' loop. */ - - switch (c) - { - case 'h': /* Print help and exit. */ - clear_args (); - cmdline_parser_print_help (); - exit (EXIT_SUCCESS); - - case 'V': /* Print version and exit. */ - clear_args (); - cmdline_parser_print_version (); - exit (EXIT_SUCCESS); - - case 'u': /* Ingen OSC URL to connect to. */ - if (args_info->engine_url_given) - { - fprintf (stderr, "%s: `--engine-url' (`-u') option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->engine_url_given = 1; - args_info->engine_url_arg = gengetopt_strdup (optarg); - break; - - case 'p': /* Client port to listen on. */ - if (args_info->client_port_given) - { - fprintf (stderr, "%s: `--client-port' (`-p') option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->client_port_given = 1; - args_info->client_port_arg = strtol (optarg,&stop_char,0); - break; - - - case 0: /* Long option with no short option */ - - case '?': /* Invalid option. */ - /* `getopt_long' already printed an error message. */ - exit (EXIT_FAILURE); - - default: /* bug: option not considered. */ - fprintf (stderr, "%s: option unknown: %c\n", CMDLINE_PARSER_PACKAGE, c); - abort (); - } /* switch */ - } /* while */ - - - if ( missing_required_options ) - exit (EXIT_FAILURE); - - return 0; -} diff --git a/src/progs/ingenuity/cmdline.ggo b/src/progs/ingenuity/cmdline.ggo deleted file mode 100644 index 432fb646..00000000 --- a/src/progs/ingenuity/cmdline.ggo +++ /dev/null @@ -1,7 +0,0 @@ -# Process this file with gengetopt -u to generate the necessary code (in cmdline.h, cmdline.c) - -package "ingenuity - A GUI client for the Ingen realtime audio processor" - -option "engine-url" u "Ingen OSC URL to connect to" string no -option "client-port" p "Client port to listen on" int no - diff --git a/src/progs/ingenuity/cmdline.h b/src/progs/ingenuity/cmdline.h deleted file mode 100644 index dca25a89..00000000 --- a/src/progs/ingenuity/cmdline.h +++ /dev/null @@ -1,45 +0,0 @@ -/* cmdline.h */ - -/* File autogenerated by gengetopt version 2.10 */ - -#ifndef CMDLINE_H -#define CMDLINE_H - -/* If we use autoconf. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifndef CMDLINE_PARSER_PACKAGE -#define CMDLINE_PARSER_PACKAGE "ingenuity - A GUI client for the Ingen realtime audio processor" -#endif - -#ifndef CMDLINE_PARSER_VERSION -#define CMDLINE_PARSER_VERSION VERSION -#endif - -struct gengetopt_args_info -{ - char * engine_url_arg; /* Ingen OSC URL to connect to. */ - int client_port_arg; /* Client port to listen on. */ - - int help_given ; /* Whether help was given. */ - int version_given ; /* Whether version was given. */ - int engine_url_given ; /* Whether engine-url was given. */ - int client_port_given ; /* Whether client-port was given. */ - -} ; - -int cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info); - -void cmdline_parser_print_help(void); -void cmdline_parser_print_version(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* CMDLINE_H */ diff --git a/src/progs/ingenuity/ingenuity.desktop b/src/progs/ingenuity/ingenuity.desktop deleted file mode 100644 index 0db837dd..00000000 --- a/src/progs/ingenuity/ingenuity.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Ingenuity -Version=0.4.0pre -Comment=Create synthesizers and effects processors in a modular environment -Exec=ingenuity -Terminal=false -Icon=ingen-icon.svg -Type=Application -Categories=Application;AudioVideo;Sound;Audio diff --git a/src/progs/ingenuity/ingenuity_dev b/src/progs/ingenuity/ingenuity_dev deleted file mode 100755 index b77d2fe6..00000000 --- a/src/progs/ingenuity/ingenuity_dev +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -INGEN_MODULE_PATH=../../libs/engine/.libs:../../libs/serialisation/.libs ./ingenuity diff --git a/src/progs/ingenuity/main.cpp b/src/progs/ingenuity/main.cpp deleted file mode 100644 index 8170833f..00000000 --- a/src/progs/ingenuity/main.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard <http://drobilla.net> - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "cmdline.h" -#include "ConnectWindow.h" -#include "App.h" -#include "Configuration.h" -#ifdef HAVE_LASH - #include "LashController.h" -#endif - -using namespace Ingenuity; - - -int -main(int argc, char** argv) -{ - string engine_url = "osc.udp://localhost:16180"; - int client_port = 0; - - /* **** Parse command line options **** */ - gengetopt_args_info args_info; - if (cmdline_parser (argc, argv, &args_info) != 0) - return 1; - - if (args_info.engine_url_given) - engine_url = args_info.engine_url_arg; - if (args_info.client_port_given) - client_port = args_info.client_port_arg; - - Gnome::Canvas::init(); - Gtk::Main gtk_main(argc, argv); - Gtk::Window::set_default_icon_from_file(PKGDATADIR "/ingen-icon.svg"); - - /* Instantiate all singletons */ - App::instantiate(); - - /* Load settings */ - App::instance().configuration()->load_settings(); - App::instance().configuration()->apply_settings(); - -#ifdef HAVE_LASH - lash_args_t* lash_args = lash_extract_args(&argc, &argv); - LashController* lash_controller = new LashController(lash_args); -#endif - - App::instance().connect_window()->start(); - gtk_main.run(); - - return 0; -} - diff --git a/src/progs/patch_loader/Makefile.am b/src/progs/patch_loader/Makefile.am deleted file mode 100644 index f16cc495..00000000 --- a/src/progs/patch_loader/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -EXTRA_DIST = README - -ingen_load_CXXFLAGS = -I$(top_srcdir)/src/libs -I$(top_srcdir)/src/common @LSIGCPP_CFLAGS@ @RAUL_CFLAGS@ @GLIBMM_CFLAGS@ @RASQAL_CFLAGS@ -DINGEN_MODULE_DIR=\"$(libdir)/ingen\" -ingen_load_LDADD = ../../libs/client/libingen_client.la ../../libs/module/libingen_module.la @RAUL_LIBS@ @LSIGCPP_LIBS@ @GLIBMM_LIBS@ @RASQAL_LIBS@ - -bin_PROGRAMS = ingen_load - -#ingen_load_DEPENDENCIES = ../../libs/client/libingen_client.la - -ingen_load_SOURCES = \ - patch_loader.cpp \ - cmdline.h \ - cmdline.c diff --git a/src/progs/patch_loader/README b/src/progs/patch_loader/README deleted file mode 100644 index 9f3b6f4b..00000000 --- a/src/progs/patch_loader/README +++ /dev/null @@ -1,5 +0,0 @@ -This is a stand-alone patch loader for Om. It has no user interface, it -just launches, loads the patch(es) passed as a parameter, and exits. - -Useful for loading patches from scripts, other apps, etc. or just using -Om patches without loading the GUI. diff --git a/src/progs/patch_loader/cmdline.c b/src/progs/patch_loader/cmdline.c deleted file mode 100644 index 0606cb7b..00000000 --- a/src/progs/patch_loader/cmdline.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - File autogenerated by gengetopt version 2.10 - generated with the following command: - gengetopt -u - - The developers of gengetopt consider the fixed text that goes in all - gengetopt output files to be in the public domain: - we make no copyright claims on it. -*/ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -/* If we use autoconf. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "getopt.h" - -#include "cmdline.h" - -void -cmdline_parser_print_version (void) -{ - printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION); -} - -void -cmdline_parser_print_help (void) -{ - cmdline_parser_print_version (); - printf("\n" - "Usage: %s [OPTIONS]... [FILES]...\n", CMDLINE_PARSER_PACKAGE); - printf(" -h --help Print help and exit\n"); - printf(" -V --version Print version and exit\n"); - printf(" -uSTRING --engine-url=STRING Om engine URL to connect to\n"); - printf(" -pINT --client-port=INT Client port to listen on\n"); -} - - -static char *gengetopt_strdup (const char *s); - -/* gengetopt_strdup() */ -/* strdup.c replacement of strdup, which is not standard */ -char * -gengetopt_strdup (const char *s) -{ - char *result = (char*)malloc(strlen(s) + 1); - if (result == (char*)0) - return (char*)0; - strcpy(result, s); - return result; -} - -int -cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info) -{ - int c; /* Character of the parsed option. */ - int missing_required_options = 0; - - args_info->help_given = 0 ; - args_info->version_given = 0 ; - args_info->engine_url_given = 0 ; - args_info->client_port_given = 0 ; -#define clear_args() { \ - args_info->engine_url_arg = NULL; \ -} - - clear_args(); - - args_info->inputs = NULL; - args_info->inputs_num = 0; - - optarg = 0; - optind = 1; - opterr = 1; - optopt = '?'; - - while (1) - { - int option_index = 0; - char *stop_char; - - static struct option long_options[] = { - { "help", 0, NULL, 'h' }, - { "version", 0, NULL, 'V' }, - { "engine-url", 1, NULL, 'u' }, - { "client-port", 1, NULL, 'p' }, - { NULL, 0, NULL, 0 } - }; - - stop_char = 0; - c = getopt_long (argc, argv, "hVu:p:", long_options, &option_index); - - if (c == -1) break; /* Exit from `while (1)' loop. */ - - switch (c) - { - case 'h': /* Print help and exit. */ - clear_args (); - cmdline_parser_print_help (); - exit (EXIT_SUCCESS); - - case 'V': /* Print version and exit. */ - clear_args (); - cmdline_parser_print_version (); - exit (EXIT_SUCCESS); - - case 'u': /* Om engine URL to connect to. */ - if (args_info->engine_url_given) - { - fprintf (stderr, "%s: `--engine-url' (`-u') option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->engine_url_given = 1; - args_info->engine_url_arg = gengetopt_strdup (optarg); - break; - - case 'p': /* Client port to listen on. */ - if (args_info->client_port_given) - { - fprintf (stderr, "%s: `--client-port' (`-p') option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->client_port_given = 1; - args_info->client_port_arg = strtol (optarg,&stop_char,0); - break; - - - case 0: /* Long option with no short option */ - - case '?': /* Invalid option. */ - /* `getopt_long' already printed an error message. */ - exit (EXIT_FAILURE); - - default: /* bug: option not considered. */ - fprintf (stderr, "%s: option unknown: %c\n", CMDLINE_PARSER_PACKAGE, c); - abort (); - } /* switch */ - } /* while */ - - - if ( missing_required_options ) - exit (EXIT_FAILURE); - - if (optind < argc) - { - int i = 0 ; - - args_info->inputs_num = argc - optind ; - args_info->inputs = - (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; - while (optind < argc) - args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ; - } - - return 0; -} diff --git a/src/progs/patch_loader/cmdline.ggo b/src/progs/patch_loader/cmdline.ggo deleted file mode 100644 index 5acd6737..00000000 --- a/src/progs/patch_loader/cmdline.ggo +++ /dev/null @@ -1,7 +0,0 @@ -# Process this file with gengetopt -u to generate the necessary code (in cmdline.h, cmdline.c) - -package "om_patch_loader - A command line patch loading client for Om" - -option "engine-url" u "Om engine URL to connect to" string no -option "client-port" p "Client port to listen on" int no - diff --git a/src/progs/patch_loader/cmdline.h b/src/progs/patch_loader/cmdline.h deleted file mode 100644 index b417c664..00000000 --- a/src/progs/patch_loader/cmdline.h +++ /dev/null @@ -1,47 +0,0 @@ -/* cmdline.h */ - -/* File autogenerated by gengetopt version 2.10 */ - -#ifndef CMDLINE_H -#define CMDLINE_H - -/* If we use autoconf. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifndef CMDLINE_PARSER_PACKAGE -#define CMDLINE_PARSER_PACKAGE "om_patch_loader - A command line patch loading client for the Om realtime modular synthesizer" -#endif - -#ifndef CMDLINE_PARSER_VERSION -#define CMDLINE_PARSER_VERSION VERSION -#endif - -struct gengetopt_args_info -{ - char * engine_url_arg; /* Om engine URL to connect to. */ - int client_port_arg; /* Client port to listen on. */ - - int help_given ; /* Whether help was given. */ - int version_given ; /* Whether version was given. */ - int engine_url_given ; /* Whether engine-url was given. */ - int client_port_given ; /* Whether client-port was given. */ - - char **inputs ; /* unamed options */ - unsigned inputs_num ; /* unamed options number */ -} ; - -int cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info); - -void cmdline_parser_print_help(void); -void cmdline_parser_print_version(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* CMDLINE_H */ diff --git a/src/progs/patch_loader/new_patch_loader.cpp b/src/progs/patch_loader/new_patch_loader.cpp deleted file mode 100644 index cee48827..00000000 --- a/src/progs/patch_loader/new_patch_loader.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard <http://drobilla.net> - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include <iostream> -#include <unistd.h> -#include <raul/Path.h> -#include "cmdline.h" // generated by gengetopt -#include "OSCEngineInterface.h" -#include "PatchLibrarian.h" - -using std::cout; using std::cerr; using std::endl; - -using namespace Ingen::Client; - - -int -main(int argc, char** argv) -{ - const char* engine_url = NULL; - int client_port = 0; - - /* Parse command line options */ - gengetopt_args_info args_info; - if (cmdline_parser (argc, argv, &args_info) != 0) - return 1; - - if (args_info.engine_url_given) { - engine_url = args_info.engine_url_arg; - } else { - cout << "[Main] No engine URL specified. Attempting to use osc.udp://localhost:16180" << endl; - engine_url = "osc.udp://localhost:16180"; - } - - if (args_info.client_port_given) - client_port = args_info.client_port_arg; - else - client_port = 0; // will choose a free port automatically - - OSCEngineInterface engine(engine_url); - - /* Connect to engine */ - if (!engine.attach()) { - cerr << "Unable to connect to engine" << endl; - return 1; - } - - engine.activate(); - engine.register_client(); - - /*int id = engine.get_next_request_id(); - engine.set_wait_response_id(id); - engine.load_plugins(id); - engine.wait_for_response(); - */ - engine.load_plugins(); - - // Load patches - for (uint i=0; i < args_info.inputs_num; ++i) - PatchLibrarian::load_patch(&engine, args_info.inputs[i]); - - return 0; -} diff --git a/src/progs/patch_loader/patch_loader.cpp b/src/progs/patch_loader/patch_loader.cpp deleted file mode 100644 index 57bba0e0..00000000 --- a/src/progs/patch_loader/patch_loader.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard <http://drobilla.net> - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include <iostream> -#include <unistd.h> -#include <glibmm/module.h> -#include <raul/Path.h> -#include <raul/RDFWorld.h> -#include "client/OSCEngineSender.h" -#include "client/PatchModel.h" -#include "module/Module.h" -#include "serialisation/serialisation.h" -#include "serialisation/Loader.h" -#include "cmdline.h" // generated by gengetopt - -using namespace std; -using namespace Ingen::Client; -using namespace Ingen::Serialisation; - - -int main(int argc, char** argv) -{ - const char* engine_url = NULL; - int client_port = 0; - - /* **** Parse command line options **** */ - - gengetopt_args_info args_info; - if (cmdline_parser (argc, argv, &args_info) != 0) - return 1; - - if (args_info.engine_url_given) { - engine_url = args_info.engine_url_arg; - } else { - cout << "[Main] No engine URL specified. Attempting to use osc.udp://localhost:16180" << endl; - engine_url = "osc.udp://localhost:16180"; - } - - if (args_info.client_port_given) - client_port = args_info.client_port_arg; - - - /* **** Mr. Spock.. Engage **** */ - - Raul::RDF::World rdf_world; - rdf_world.add_prefix("xsd", "http://www.w3.org/2001/XMLSchema#"); - rdf_world.add_prefix("ingen", "http://drobilla.net/ns/ingen#"); - rdf_world.add_prefix("ingenuity", "http://drobilla.net/ns/ingenuity#"); - rdf_world.add_prefix("lv2", "http://lv2plug.in/ontology#"); - rdf_world.add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); - rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#"); - - SharedPtr<OSCEngineSender> engine(new OSCEngineSender(engine_url)); - - /* Connect to engine */ - engine->attach(-1, client_port); - engine->activate(); - //engine->register_client(NULL); // FIXME - - //int id = engine->get_next_request_id(); - //engine->set_wait_response_id(id); - //engine->load_plugins(id); - //engine->wait_for_response(); - /* FIXME: Make this work like this: - * engine->load_plugins(); - * engine->wait_for_response(); - */ - - SharedPtr<Glib::Module> module = Ingen::Shared::load_module("ingen_serialisation"); - - if (!module) { - cerr << "Unable to load ingen_serialisation module, exiting." << endl; - return -1; - } - - Loader* (*new_loader)() = NULL; - - bool found = module->get_symbol("new_loader", (void*&)new_loader); - - if (!found) { - cerr << "Unable to find module entry point, exiting." << endl; - return -1; - } - - SharedPtr<Loader> loader(new_loader()); - - // Load patches - for (uint i=0; i < args_info.inputs_num; ++i) { - cerr << "FIXME: load patch under root" << endl; - cerr << "Load " << args_info.inputs[i] << endl; - loader->load(engine, &rdf_world, - string("file:") + args_info.inputs[i], Path("/"), ""); - } - - return 0; -} diff --git a/src/progs/python/ingen.py b/src/progs/python/ingen.py index 5e013e5f..07698719 100644 --- a/src/progs/python/ingen.py +++ b/src/progs/python/ingen.py @@ -367,22 +367,22 @@ class Environment: for connection in self.getConnections(): print ">>> %s -> %s" % (connection.getSrcPort().getPath(), connection.getDstPort().getPath()) - #~ /om/engine_enabled - Notification engine's DSP has been enabled. + #~ /ingen/engine_enabled - Notification engine's DSP has been enabled. def __ingen__engine_enabled(self): self.enabled = True - #~ /om/engine_disabled - Notification engine's DSP has been disabled. + #~ /ingen/engine_disabled - Notification engine's DSP has been disabled. def __ingen__engine_disabled(self): self.enabled = False - #~ /om/new_node - Notification of a new node's creation. + #~ /ingen/new_node - Notification of a new node's creation. #~ * path (string) - Path of the new node #~ * polyphonic (integer-boolean) - Node is polyphonic (1 for yes, 0 for no) #~ * type (string) - Type of plugin (LADSPA, DSSI, Internal, Patch) #~ * lib-name (string) - Name of library if a plugin (ie cmt.so) #~ * plug-label (string) - Label of plugin in library (ie adsr_env) - #~ * New nodes are sent as a blob. The first message in the blob will be this one (/om/new_node), followed by a series of /om/new_port commands, followed by /om/new_node_end. + #~ * New nodes are sent as a blob. The first message in the blob will be this one (/ingen/new_node), followed by a series of /om/new_port commands, followed by /om/new_node_end. def __ingen__new_node(self,path,polyphonic,plugintype,libname,pluginlabel): node = self.getNode(path) node.setPolyphonic(polyphonic) @@ -393,13 +393,13 @@ class Environment: def __ingen__new_node_end(self): pass - #~ /om/node_removal - Notification of a node's destruction. + #~ /ingen/node_removal - Notification of a node's destruction. #~ * path (string) - Path of node (which no longer exists) def __ingen__node_removal(self,path): node = self.getNode(path) node.remove() - #~ /om/new_port - Notification of a node's destruction. + #~ /ingen/new_port - Notification of a node's destruction. #~ * path (string) - Path of new port #~ * type (string) - Type of port (CONTROL or AUDIO) @@ -420,37 +420,37 @@ class Environment: port.setMinValue(minvalue) port.setMaxValue(maxvalue) - #~ /om/port_removal - Notification of a port's destruction. + #~ /ingen/port_removal - Notification of a port's destruction. #~ * path (string) - Path of port (which no longer exists) def __ingen__port_removal(self,path): port = self.getPort(path) port.remove() - #~ /om/patch_destruction - Notification of a patch's destruction. + #~ /ingen/patch_destruction - Notification of a patch's destruction. #~ * path (string) - Path of patch (which no longer exists) def __ingen__patch_destruction(self,path): patch = self.getPatch(path) patch.remove() - #~ /om/patch_enabled - Notification a patch's DSP processing has been enabled. + #~ /ingen/patch_enabled - Notification a patch's DSP processing has been enabled. #~ * path (string) - Path of enabled patch def __ingen__patch_enabled(self,path): patch = self.getPatch(path) patch.setEnabled(True) - #~ /om/patch_disabled - Notification a patch's DSP processing has been disabled. + #~ /ingen/patch_disabled - Notification a patch's DSP processing has been disabled. #~ * path (string) - Path of disabled patch def __ingen__patch_disabled(self,path): patch = self.getPatch(path) patch.setEnabled(False) - #~ /om/new_connection - Notification a new connection has been made. + #~ /ingen/new_connection - Notification a new connection has been made. #~ * src-path (string) - Path of the source port #~ * dst-path (string) - Path of the destination port def __ingen__new_connection(self,srcpath,dstpath): self.getConnection(srcpath,dstpath) - #~ /om/disconnection - Notification a connection has been unmade. + #~ /ingen/disconnection - Notification a connection has been unmade. #~ * src-path (string) - Path of the source port #~ * dst-path (string) - Path of the destination port def __ingen__disconnection(self,srcpath,dstpath): @@ -459,7 +459,7 @@ class Environment: connection.remove() del self.connections[portpair] - #~ /om/metadata/update - Notification of a piece of metadata. + #~ /ingen/metadata/update - Notification of a piece of metadata. #~ * path (string) - Path of the object associated with metadata (can be a node, patch, or port) #~ * key (string) #~ * value (string) @@ -467,7 +467,7 @@ class Environment: object = self.getObject(path) object.setMetaData(key,value) - #~ /om/control_change - Notification the value of a port has changed + #~ /ingen/control_change - Notification the value of a port has changed #~ * path (string) - Path of port #~ * value (float) - New value of port #~ * This will only send updates for values set by clients of course - not values changing because of connections to other ports! @@ -475,7 +475,7 @@ class Environment: port = self.getPort(path) port.setValue(value) - #~ /om/new_patch - Notification of a new patch + #~ /ingen/new_patch - Notification of a new patch #~ * path (string) - Path of new patch #~ * poly (int) - Polyphony of new patch (not a boolean like new_node) def __ingen__new_patch(self,path,poly): @@ -502,7 +502,7 @@ class ClientProxy: result = self.om.sendMsgBlocking(self.name, *args) if not result: return None - if result[0] == "/om/response/ok": + if result[0] == "/ingen/response/ok": return True print "ERROR: %s" % result[1][1] return False @@ -519,7 +519,7 @@ class ClientProxy: class Client(DatagramProtocol, ClientProxy): def __init__(self): - ClientProxy.__init__(self, self, "/om") + ClientProxy.__init__(self, self, "/ingen") def startProtocol(self): self.transport.connect("127.0.0.1", 16180) @@ -550,15 +550,15 @@ class Client(DatagramProtocol, ClientProxy): os._exit(-1) def messageReceived(self, (msg, args)): - if msg == "/om/error": + if msg == "/ingen/error": print "ERROR: %r" % args return - if msg == "/om/response/ok": + if msg == "/ingen/response/ok": omcall = self.calls[args[0]] omcall.result = (msg,args) omcall.done = True return - if msg == "/om/response/error": + if msg == "/ingen/response/error": omcall = self.calls[args[0]] omcall.result = (msg,args) omcall.done = True diff --git a/src/progs/python/ingenecho.py b/src/progs/python/ingenecho.py index 7ed2cef5..1dcfc313 100644 --- a/src/progs/python/ingenecho.py +++ b/src/progs/python/ingenecho.py @@ -17,11 +17,11 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import omsynth +import ingen import os,time,sys def main(om): - om.setEnvironment(omsynth.Environment()) + om.setEnvironment(ingen.Environment()) om.engine.activate() om.engine.register_client(om.getAddressAsString()) om.request.all_objects(om.getAddressAsString()) @@ -30,11 +30,11 @@ def main(om): time.sleep(3) om.getEnvironment().printPatch() om.getEnvironment().printConnections() - print "omecho will now monitor and mirror changes in the structure" + print "ingenecho will now monitor and mirror changes in the structure" print "hit return to exit when youre done" sys.stdin.readline() om.engine.unregister_client(om.getAddressAsString()) os._exit(0) if __name__ == "__main__": - omsynth.startClient(main) + ingen.startClient(main) diff --git a/src/progs/server/Makefile.am b/src/progs/server/Makefile.am deleted file mode 100644 index ab384494..00000000 --- a/src/progs/server/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -AM_CXXFLAGS = @RAUL_CFLAGS@ @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs -DINGEN_MODULE_DIR=\"$(libdir)/ingen\" - -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = ingen_dev - -# -# Stand-alone engine -# -if BUILD_SERVER - -bin_PROGRAMS = ingen -ingen_LDADD = @RAUL_LIBS@ @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@ -lrt ../../libs/module/libingen_module.la -ingen_DEPENDENCIES = ../../libs/module/libingen_module.la - -ingen_SOURCES = \ - main.cpp \ - cmdline.h \ - cmdline.c - -endif # BUILD_SERVER - - -## -## Jack internal client -## -#if BUILD_IN_PROCESS_ENGINE -# -# -## FIXME: broken -# -# -## FIXME: Figure out how to get this properly -#omdir = $(prefix)/lib/jack -# -#om_la_CFLAGS = -fPIC -#om_LTLIBRARIES = om.la -#om_la_LDFLAGS = -module -avoid-version @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@ -#om_la_SOURCES = OmInProcess.cpp -# -#endif # BUILD_IN_PROCESS_ENGINE - - - - diff --git a/src/progs/server/cmdline.c b/src/progs/server/cmdline.c deleted file mode 100644 index 1e97e1ef..00000000 --- a/src/progs/server/cmdline.c +++ /dev/null @@ -1,355 +0,0 @@ -/* - File autogenerated by gengetopt version 2.19.1 - generated with the following command: - gengetopt -u - - The developers of gengetopt consider the fixed text that goes in all - gengetopt output files to be in the public domain: - we make no copyright claims on it. -*/ - -/* If we use autoconf. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "getopt.h" - -#include "cmdline.h" - -const char *gengetopt_args_info_purpose = ""; - -const char *gengetopt_args_info_usage = "Usage: Om - An OSC controlled realtime modular synthesizer [OPTIONS]... \n [FILES]..."; - -const char *gengetopt_args_info_description = ""; - -const char *gengetopt_args_info_help[] = { - " -h, --help Print help and exit", - " -V, --version Print version and exit", - " -p, --port=STRING OSC port to listen on (default=`16180')", - " -i, --in-jackd Run engine as in-process JACK client (default=off)", - 0 -}; - -static -void clear_given (struct gengetopt_args_info *args_info); -static -void clear_args (struct gengetopt_args_info *args_info); - -static int -cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required, const char *additional_error); - - -static char * -gengetopt_strdup (const char *s); - -static -void clear_given (struct gengetopt_args_info *args_info) -{ - args_info->help_given = 0 ; - args_info->version_given = 0 ; - args_info->port_given = 0 ; - args_info->in_jackd_given = 0 ; -} - -static -void clear_args (struct gengetopt_args_info *args_info) -{ - args_info->port_arg = gengetopt_strdup ("16180"); - args_info->port_orig = NULL; - args_info->in_jackd_flag = 0; - -} - -static -void init_args_info(struct gengetopt_args_info *args_info) -{ - args_info->help_help = gengetopt_args_info_help[0] ; - args_info->version_help = gengetopt_args_info_help[1] ; - args_info->port_help = gengetopt_args_info_help[2] ; - args_info->in_jackd_help = gengetopt_args_info_help[3] ; - -} - -void -cmdline_parser_print_version (void) -{ - printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION); -} - -void -cmdline_parser_print_help (void) -{ - int i = 0; - cmdline_parser_print_version (); - - if (strlen(gengetopt_args_info_purpose) > 0) - printf("\n%s\n", gengetopt_args_info_purpose); - - printf("\n%s\n\n", gengetopt_args_info_usage); - - if (strlen(gengetopt_args_info_description) > 0) - printf("%s\n", gengetopt_args_info_description); - - while (gengetopt_args_info_help[i]) - printf("%s\n", gengetopt_args_info_help[i++]); -} - -void -cmdline_parser_init (struct gengetopt_args_info *args_info) -{ - clear_given (args_info); - clear_args (args_info); - init_args_info (args_info); - - args_info->inputs = NULL; - args_info->inputs_num = 0; -} - -static void -cmdline_parser_release (struct gengetopt_args_info *args_info) -{ - - unsigned int i; - if (args_info->port_arg) - { - free (args_info->port_arg); /* free previous argument */ - args_info->port_arg = 0; - } - if (args_info->port_orig) - { - free (args_info->port_orig); /* free previous argument */ - args_info->port_orig = 0; - } - - for (i = 0; i < args_info->inputs_num; ++i) - free (args_info->inputs [i]); - - if (args_info->inputs_num) - free (args_info->inputs); - - clear_given (args_info); -} - -int -cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info) -{ - FILE *outfile; - int i = 0; - - outfile = fopen(filename, "w"); - - if (!outfile) - { - fprintf (stderr, "%s: cannot open file for writing: %s\n", CMDLINE_PARSER_PACKAGE, filename); - return EXIT_FAILURE; - } - - if (args_info->help_given) { - fprintf(outfile, "%s\n", "help"); - } - if (args_info->version_given) { - fprintf(outfile, "%s\n", "version"); - } - if (args_info->port_given) { - if (args_info->port_orig) { - fprintf(outfile, "%s=\"%s\"\n", "port", args_info->port_orig); - } else { - fprintf(outfile, "%s\n", "port"); - } - } - if (args_info->in_jackd_given) { - fprintf(outfile, "%s\n", "in-jackd"); - } - - fclose (outfile); - - i = EXIT_SUCCESS; - return i; -} - -void -cmdline_parser_free (struct gengetopt_args_info *args_info) -{ - cmdline_parser_release (args_info); -} - - -/* gengetopt_strdup() */ -/* strdup.c replacement of strdup, which is not standard */ -char * -gengetopt_strdup (const char *s) -{ - char *result = NULL; - if (!s) - return result; - - result = (char*)malloc(strlen(s) + 1); - if (result == (char*)0) - return (char*)0; - strcpy(result, s); - return result; -} - -int -cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info) -{ - return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); -} - -int -cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) -{ - int result; - - result = cmdline_parser_internal (argc, argv, args_info, override, initialize, check_required, NULL); - - if (result == EXIT_FAILURE) - { - cmdline_parser_free (args_info); - exit (EXIT_FAILURE); - } - - return result; -} - -int -cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name) -{ - return EXIT_SUCCESS; -} - -int -cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required, const char *additional_error) -{ - int c; /* Character of the parsed option. */ - - int error = 0; - struct gengetopt_args_info local_args_info; - - if (initialize) - cmdline_parser_init (args_info); - - cmdline_parser_init (&local_args_info); - - optarg = 0; - optind = 0; - opterr = 1; - optopt = '?'; - - while (1) - { - int option_index = 0; - char *stop_char; - - static struct option long_options[] = { - { "help", 0, NULL, 'h' }, - { "version", 0, NULL, 'V' }, - { "port", 1, NULL, 'p' }, - { "in-jackd", 0, NULL, 'i' }, - { NULL, 0, NULL, 0 } - }; - - stop_char = 0; - c = getopt_long (argc, argv, "hVp:i", long_options, &option_index); - - if (c == -1) break; /* Exit from `while (1)' loop. */ - - switch (c) - { - case 'h': /* Print help and exit. */ - cmdline_parser_print_help (); - cmdline_parser_free (&local_args_info); - exit (EXIT_SUCCESS); - - case 'V': /* Print version and exit. */ - cmdline_parser_print_version (); - cmdline_parser_free (&local_args_info); - exit (EXIT_SUCCESS); - - case 'p': /* OSC port to listen on. */ - if (local_args_info.port_given) - { - fprintf (stderr, "%s: `--port' (`-p') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); - goto failure; - } - if (args_info->port_given && ! override) - continue; - local_args_info.port_given = 1; - args_info->port_given = 1; - if (args_info->port_arg) - free (args_info->port_arg); /* free previous string */ - args_info->port_arg = gengetopt_strdup (optarg); - if (args_info->port_orig) - free (args_info->port_orig); /* free previous string */ - args_info->port_orig = gengetopt_strdup (optarg); - break; - - case 'i': /* Run engine as in-process JACK client. */ - if (local_args_info.in_jackd_given) - { - fprintf (stderr, "%s: `--in-jackd' (`-i') option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); - goto failure; - } - if (args_info->in_jackd_given && ! override) - continue; - local_args_info.in_jackd_given = 1; - args_info->in_jackd_given = 1; - args_info->in_jackd_flag = !(args_info->in_jackd_flag); - break; - - - case 0: /* Long option with no short option */ - case '?': /* Invalid option. */ - /* `getopt_long' already printed an error message. */ - goto failure; - - default: /* bug: option not considered. */ - fprintf (stderr, "%s: option unknown: %c%s\n", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : "")); - abort (); - } /* switch */ - } /* while */ - - - - - cmdline_parser_release (&local_args_info); - - if ( error ) - return (EXIT_FAILURE); - - if (optind < argc) - { - int i = 0 ; - int found_prog_name = 0; - /* whether program name, i.e., argv[0], is in the remaining args - (this may happen with some implementations of getopt, - but surely not with the one included by gengetopt) */ - - i = optind; - while (i < argc) - if (argv[i++] == argv[0]) { - found_prog_name = 1; - break; - } - i = 0; - - args_info->inputs_num = argc - optind - found_prog_name; - args_info->inputs = - (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; - while (optind < argc) - if (argv[optind++] != argv[0]) - args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; - } - - return 0; - -failure: - - cmdline_parser_release (&local_args_info); - return (EXIT_FAILURE); -} diff --git a/src/progs/server/cmdline.ggo b/src/progs/server/cmdline.ggo deleted file mode 100644 index 9635a8f5..00000000 --- a/src/progs/server/cmdline.ggo +++ /dev/null @@ -1,7 +0,0 @@ -# Process this file with gengetopt -u to generate the necessary code (in cmdline.h, cmdline.c) - -package "Om - An OSC controlled realtime modular synthesizer" - -option "port" p "OSC port to listen on" string default="16180" no -option "in-jackd" i "Run engine as in-process JACK client" flag off - diff --git a/src/progs/server/cmdline.h b/src/progs/server/cmdline.h deleted file mode 100644 index 5253162c..00000000 --- a/src/progs/server/cmdline.h +++ /dev/null @@ -1,69 +0,0 @@ -/* cmdline.h */ - -/* File autogenerated by gengetopt version 2.19.1 */ - -#ifndef CMDLINE_H -#define CMDLINE_H - -/* If we use autoconf. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#ifndef CMDLINE_PARSER_PACKAGE -#define CMDLINE_PARSER_PACKAGE "Om - An OSC controlled realtime modular synthesizer" -#endif - -#ifndef CMDLINE_PARSER_VERSION -#define CMDLINE_PARSER_VERSION VERSION -#endif - -struct gengetopt_args_info -{ - const char *help_help; /* Print help and exit help description. */ - const char *version_help; /* Print version and exit help description. */ - char * port_arg; /* OSC port to listen on (default='16180'). */ - char * port_orig; /* OSC port to listen on original value given at command line. */ - const char *port_help; /* OSC port to listen on help description. */ - int in_jackd_flag; /* Run engine as in-process JACK client (default=off). */ - const char *in_jackd_help; /* Run engine as in-process JACK client help description. */ - - int help_given ; /* Whether help was given. */ - int version_given ; /* Whether version was given. */ - int port_given ; /* Whether port was given. */ - int in_jackd_given ; /* Whether in-jackd was given. */ - - char **inputs ; /* unamed options */ - unsigned inputs_num ; /* unamed options number */ -} ; - -extern const char *gengetopt_args_info_purpose; -extern const char *gengetopt_args_info_usage; -extern const char *gengetopt_args_info_help[]; - -int cmdline_parser (int argc, char * const *argv, - struct gengetopt_args_info *args_info); -int cmdline_parser2 (int argc, char * const *argv, - struct gengetopt_args_info *args_info, - int override, int initialize, int check_required); -int cmdline_parser_file_save(const char *filename, - struct gengetopt_args_info *args_info); - -void cmdline_parser_print_help(void); -void cmdline_parser_print_version(void); - -void cmdline_parser_init (struct gengetopt_args_info *args_info); -void cmdline_parser_free (struct gengetopt_args_info *args_info); - -int cmdline_parser_required (struct gengetopt_args_info *args_info, - const char *prog_name); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* CMDLINE_H */ diff --git a/src/progs/server/main.cpp b/src/progs/server/main.cpp deleted file mode 100644 index e92b635f..00000000 --- a/src/progs/server/main.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard <http://drobilla.net> - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include <iostream> -#include <cstddef> -#include <signal.h> -#include "config.h" -#include "module/Module.h" -#include "engine/util.h" -#include "engine/Engine.h" -#include "engine/EventSource.h" -#ifdef HAVE_LASH -#include "engine/LashDriver.h" -#endif -#ifdef BUILD_IN_PROCESS_ENGINE -#include <jack/jack.h> -#include <jack/intclient.h> -#endif -#include "cmdline.h" - -using std::cout; using std::endl; using std::cerr; -using namespace Ingen; - -SharedPtr<Engine> engine; - - -void -catch_int(int) -{ - signal(SIGINT, catch_int); - signal(SIGTERM, catch_int); - - std::cout << "[Main] Ingen interrupted." << std::endl; - engine->quit(); -} - - -#ifdef BUILD_IN_PROCESS_ENGINE - -jack_client_t* jack_client; -jack_intclient_t jack_intclient; - - -void -unload_in_process_engine(int) -{ - jack_status_t status; - int ret = EXIT_SUCCESS; - - cout << "Unloading..."; - status = jack_internal_client_unload(jack_client, jack_intclient); - if (status & JackFailure) { - cout << "failed" << endl; - ret = EXIT_FAILURE; - } else { - cout << "done" << endl; - } - jack_client_close(jack_client); - exit(ret); -} - - -int -load_in_process_engine(const char* port) -{ - int ret = EXIT_SUCCESS; - - jack_status_t status; - - if ((jack_client = jack_client_open("om_load", JackNoStartServer, - &status)) != NULL) { - jack_intclient = - jack_internal_client_load(jack_client, "Ingen", - (jack_options_t)(JackLoadName|JackLoadInit), - &status, "om", port); - if (status == 0) { - cout << "Engine loaded" << endl; - signal(SIGINT, unload_in_process_engine); - signal(SIGTERM, unload_in_process_engine); - - while (1) { - sleep(1); - } - } else if (status & JackFailure) { - cerr << "Could not load om.so" << endl; - ret = EXIT_FAILURE; - } - - jack_client_close(jack_client); - } else { - cerr << "jack_client_open failed" << endl; - ret = EXIT_FAILURE; - } -} - -#endif // BUILD_IN_PROCESS_ENGINE - - -int -main(int argc, char** argv) -{ -#ifdef HAVE_LASH - lash_args_t* lash_args = lash_extract_args(&argc, &argv); -#endif - - int ret = EXIT_SUCCESS; - - /* Parse command line options */ - gengetopt_args_info args_info; - if (cmdline_parser (argc, argv, &args_info) != 0) - return EXIT_FAILURE; - - - if (args_info.in_jackd_flag) { -#ifdef BUILD_IN_PROCESS_ENGINE - ret = load_in_process_engine(args_info.port_arg); -#else - cerr << "In-process Jack client support not enabled in this build." << endl; - ret = EXIT_FAILURE; -#endif - } else { - signal(SIGINT, catch_int); - signal(SIGTERM, catch_int); - - set_denormal_flags(); - - SharedPtr<Glib::Module> module = Ingen::Shared::load_module("ingen_engine"); - - if (!module) { - cerr << "Aborting. If you are running from the source tree, run ingen_dev." << endl; - return -1; - } - - Engine* (*new_engine)() = NULL; - - bool found = module->get_symbol("new_engine", (void*&)new_engine); - - if (!found) { - cerr << "Unable to find module entry point, exiting." << endl; - return -1; - } - - SharedPtr<Engine> engine(new_engine()); - - engine->start_jack_driver(); - engine->start_osc_driver(args_info.port_arg); - - engine->activate(); - -#ifdef HAVE_LASH - lash_driver = new LashDriver(engine, lash_args); -#endif - - engine->main(); - - engine->event_source()->deactivate(); - -#ifdef HAVE_LASH - delete lash_driver; -#endif - - } - - return ret; -} - diff --git a/src/progs/supercollider/Ingen.sc b/src/progs/supercollider/Ingen.sc index cb366d58..873c8c2b 100644 --- a/src/progs/supercollider/Ingen.sc +++ b/src/progs/supercollider/Ingen.sc @@ -1,6 +1,6 @@ // TODO: // * Keep track of established connections. -Om : Model { +Ingen : Model { classvar <>program = "om", <>patchLoader = "om_patch_loader"; classvar <>oscURL, <nodeTypeMap, <>uiClass; var <addr; @@ -55,11 +55,11 @@ Om : Model { }; oscURL="osc.udp://"++NetAddr.localAddr.ip++$:++NetAddr.localAddr.port; nodeTypeMap = IdentityDictionary[ - \Internal -> OmInternalNode, - \LADSPA -> OmLADSPANode, - \DSSI -> OmDSSINode + \Internal -> IngenInternalNode, + \LADSPA -> IngenLADSPANode, + \DSSI -> IngenDSSINode ]; - uiClass = OmEmacsUI + uiClass = IngenEmacsUI } *new { | netaddr | ^super.new.init(netaddr) @@ -76,7 +76,7 @@ Om : Model { "response/error" -> {|id,text| requestHandlers.removeAt(id); allocator.free(id); - ("Om"+text).error } + ("Ingen"+text).error } ].collect({|a| var func = a.value; OSCresponder(addr, "/om/"++a.key, {|time,resp,msg| @@ -110,11 +110,11 @@ Om : Model { patch.changed(\newNode, node); } { if (patch.getNode(nodeName).class != nodeTypeMap[type]) { - ("Om sent an existng node with differing type"+path).warn + ("Ingen sent an existng node with differing type"+path).warn } } } { - ("Om tried to create node in non-existing patch"+patchPath).warn + ("Ingen tried to create node in non-existing patch"+patchPath).warn } } { ("Invalid path in node creation"+path).warn @@ -135,17 +135,17 @@ Om : Model { parent = this.getNode(basePath) ? this.getPatch(basePath); if (parent.notNil) { if (parent.hasPort(portName).not) { - port = OmPort.new(portName, parent, type, dir, hint, def, min, max); + port = IngenPort.new(portName, parent, type, dir, hint, def, min, max); parent.ports[portName.asSymbol] = port; parent.changed(\newPort, port) } { if (parent.getPort(portName).porttype != type) { - ("Om tried to create an already existing port with differing type" + ("Ingen tried to create an already existing port with differing type" +path).warn } } } { - ("Om tried to create port on non-existing object"+basePath).warn + ("Ingen tried to create port on non-existing object"+basePath).warn } } { ("Invalid path in port creation"+path).warn @@ -163,7 +163,7 @@ Om : Model { if (node.notNil) { node.parent.nodes.removeAt(node.name.asSymbol).free } { - ("Om attempting to remove non-existing node"+path).warn + ("Ingen attempting to remove non-existing node"+path).warn } }, "port_removal" -> {|path| @@ -171,7 +171,7 @@ Om : Model { if (port.notNil) { port.parent.ports.removeAt(port.name.asSymbol).free } { - ("Om attempting to remove non-existing port"+path).warn + ("Ingen attempting to remove non-existing port"+path).warn } }, "patch_destruction" -> {|path| @@ -179,7 +179,7 @@ Om : Model { if (patch.notNil) { patch.parent.patches.removeAt(patch.name.asSymbol).free } { - ("Om attempting to remove non-existing patch"+path).warn + ("Ingen attempting to remove non-existing patch"+path).warn } }, "program_add" -> {|path,bank,program,name| @@ -187,7 +187,7 @@ Om : Model { if (node.respondsTo(\prProgramAdd)) { node.prProgramAdd(bank,program,name) } { - ("Om tried to add program info to"+node).warn + ("Ingen tried to add program info to"+node).warn } } ].collect({|a| @@ -217,7 +217,7 @@ Om : Model { addr.sendMsg("/om/ping", id) }; requestHandlers.removeAt(id); - "Om engine boot failed".error; + "Ingen engine boot failed".error; } } getPatch {|path, mustExist=true| @@ -267,7 +267,7 @@ Om : Model { } at {|path|^this.getObject(path.asString)} *boot {|func| - ^Om.new.waitForBoot {|e| + ^Ingen.new.waitForBoot {|e| e.activate { e.register { e.loadPlugins { @@ -286,18 +286,18 @@ Om : Model { booting = true; if (addr.addr == 2130706433) { if (loadIntoJack) { - ("jack_load"+"-i"+addr.port+"Om"+"om").unixCmd + ("jack_load"+"-i"+addr.port+"Ingen"+"om").unixCmd } { (program+"-p"+addr.port).unixCmd } } { - "You have to manually boot Om now".postln + "You have to manually boot Ingen now".postln } } loadPatch {|patchPath| (patchLoader + patchPath).unixCmd } activate { | handler | this.sendReq("engine/activate", { - root = OmPatch("",nil,this); + root = IngenPatch("",nil,this); this.changed(\newPatch, root); handler.value }) @@ -377,7 +377,7 @@ Om : Model { } quit { if (loadIntoJack) { - ("jack_unload"+"Om").unixCmd; + ("jack_unload"+"Ingen").unixCmd; booting=false; requestResponders.do(_.remove); notificationResponders.do(_.remove); @@ -445,7 +445,7 @@ Om : Model { } } -OmMetadata { +IngenMetadata { var object, dict; *new {|obj|^super.new.metadataInit(obj)} metadataInit {|obj| @@ -463,22 +463,22 @@ OmMetadata { } } -OmObject : Model { +IngenObject : Model { var <name, <parent, <metadata; *new {|name, parent| - ^super.new.initOmObject(name,parent); + ^super.new.initIngenObject(name,parent); } - initOmObject {|argName, argParent| + initIngenObject {|argName, argParent| name = argName; parent = argParent; - metadata=OmMetadata(this) + metadata=IngenMetadata(this) } path { ^parent.notNil.if({ parent.path ++ $/ ++ name }, name).asString } depth { ^parent.notNil.if({ parent.depth + 1 }, 0) } engine { ^parent.engine } } -OmPort : OmObject { +IngenPort : IngenObject { var <porttype, <direction, <spec, <value, <connections; *new {|name,parent,type,dir,hint,def,min,max| ^super.new(name,parent).initPort(type,dir,hint,def,min,max) @@ -497,7 +497,7 @@ OmPort : OmObject { || direction.asSymbol!=\OUTPUT) { Error("Not a audio output port").throw }; - ("jack_connect" + "Om:"++(this.path) + jackPort).unixCmd + ("jack_connect" + "Ingen:"++(this.path) + jackPort).unixCmd } value_ {|val| if (porttype == \CONTROL and: {direction == \INPUT}) { @@ -523,7 +523,7 @@ OmPort : OmObject { } } -OmNode : OmObject { // Abstract class +IngenNode : IngenObject { // Abstract class var <ports, <polyphonic; *new {|name,parent,poly| ^super.new(name,parent).initNode(poly) @@ -551,7 +551,7 @@ OmNode : OmObject { // Abstract class } } -OmInternalNode : OmNode { +IngenInternalNode : IngenNode { var <pluginlabel; *new {|name,parent,poly,label| ^super.new(name,parent,poly).initInternalNode(label) @@ -577,7 +577,7 @@ OmInternalNode : OmNode { } } -OmLADSPANode : OmNode { +IngenLADSPANode : IngenNode { var <pluginlabel, <libname; *new {|name, parent, poly, label, lib| ^super.new(name,parent,poly).initLADSPANode(label,lib) @@ -588,7 +588,7 @@ OmLADSPANode : OmNode { } } -OmDSSINode : OmLADSPANode { +IngenDSSINode : IngenLADSPANode { var programs; *new {|name,parent,poly,label,lib| ^super.new(name,parent,poly,label,lib).initDSSI @@ -608,7 +608,7 @@ OmDSSINode : OmLADSPANode { } } -OmPatch : OmNode { +IngenPatch : IngenNode { var <nodes, <patches, <poly, <enabled; var om; *new {|name,parent,engine| @@ -631,7 +631,7 @@ OmPatch : OmNode { getPatch {|name,mustExist=false| if (this.hasPatch(name).not) { if (mustExist) { ^nil }; - patches[name.asSymbol] = OmPatch(name,this); + patches[name.asSymbol] = IngenPatch(name,this); }; ^patches[name.asSymbol] } @@ -654,7 +654,7 @@ OmPatch : OmNode { noteOn {|note,vel| var targetNode; this.nodes.do{|node| - if (node.class == OmInternalNode) { + if (node.class == IngenInternalNode) { node.pluginlabel.switch( \trigger_in, { if (node.ports['Note Number'].value == note) { @@ -676,7 +676,7 @@ OmPatch : OmNode { noteOff {|note| var targetNode; this.nodes.do{|node| - if (node.class == OmInternalNode) { + if (node.class == IngenInternalNode) { node.pluginlabel.switch( \trigger_in, { if (node.ports['Note Number'].value == note) { @@ -722,11 +722,11 @@ OmPatch : OmNode { } -OmEmacsUI { +IngenEmacsUI { var engine, window, bootBtn; *new {|engine| ^super.newCopyArgs(engine).init } init { - window = EmacsBuffer("*Om -"+engine.addr.ip++$:++engine.addr.port); + window = EmacsBuffer("*Ingen -"+engine.addr.ip++$:++engine.addr.port); bootBtn = EmacsButton(window, ["Boot","Quit"], {|value| if (value==1) { engine.boot diff --git a/src/set_dev_environment.sh b/src/set_dev_environment.sh index 09807f5c..b451daed 100755 --- a/src/set_dev_environment.sh +++ b/src/set_dev_environment.sh @@ -4,5 +4,5 @@ # environment so dynamic modules in the source tree will be found and the # executables can be run directly, or in gdb/valgrind/etc. -export INGEN_MODULE_PATH="`pwd`/libs/engine/.libs:`pwd`/libs/serialisation/.libs" +export INGEN_MODULE_PATH="`pwd`/libs/engine/.libs:`pwd`/libs/serialisation/.libs:`pwd`/libs/gui/.libs:`pwd`/libs/client/.libs" |