summaryrefslogtreecommitdiffstats
path: root/src/gui/App.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/App.cpp')
-rw-r--r--src/gui/App.cpp75
1 files changed, 40 insertions, 35 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index ff9636b9..260afdba 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -27,31 +27,37 @@
#include "WindowFactory.hpp"
#include "rgba.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/ColorContext.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/QueuedInterface.hpp"
-#include "ingen/StreamWriter.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "ingen/client/SigClientInterface.hpp"
-#include "ingen/runtime_paths.hpp"
-#include "lilv/lilv.h"
-#include "suil/suil.h"
-
-#include <boost/variant/get.hpp>
+#include <ingen/Atom.hpp>
+#include <ingen/ColorContext.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/QueuedInterface.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/StreamWriter.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <ingen/client/SigClientInterface.hpp>
+#include <ingen/fmt.hpp>
+#include <ingen/runtime_paths.hpp>
+#include <lilv/lilv.h>
+#include <lv2/urid/urid.h>
+#include <suil/suil.h>
+
#include <glib.h>
#include <glibmm/main.h>
#include <glibmm/miscutils.h>
#include <glibmm/propertyproxy.h>
+#include <glibmm/ustring.h>
#include <gtk/gtk.h>
#include <gtkmm/aboutdialog.h>
#include <gtkmm/dialog.h>
@@ -62,20 +68,21 @@
#include <gtkmm/stock.h>
#include <gtkmm/widget.h>
#include <sigc++/functors/mem_fun.h>
+#include <sigc++/functors/slot.h>
#include <algorithm>
#include <cassert>
+#include <cstdarg>
#include <cstdio>
#include <exception>
-#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <string>
#include <utility>
+#include <variant>
-namespace ingen {
-namespace gui {
+namespace ingen::gui {
Gtk::Main* App::_main = nullptr;
@@ -99,11 +106,10 @@ App::App(ingen::World& world)
client::PluginModel::set_rdf_world(*world.rdf_world());
client::PluginModel::set_lilv_world(world.lilv_world());
- world.log().set_sink(std::bind(&MessagesWindow::log,
- _messages_window,
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3));
+ world.log().set_sink(
+ [this](const LV2_URID type, const char* fmt, va_list args) {
+ return _messages_window->log(type, fmt, args);
+ });
}
App::~App()
@@ -239,13 +245,13 @@ App::serialiser()
void
App::message(const Message& msg)
{
- if (const Response* const r = boost::get<Response>(&msg)) {
+ if (const Response* const r = std::get_if<Response>(&msg)) {
response(r->id, r->status, r->subject);
- } else if (const Error* const e = boost::get<Error>(&msg)) {
+ } else if (const Error* const e = std::get_if<Error>(&msg)) {
error_message(e->message);
- } else if (const Put* const p = boost::get<Put>(&msg)) {
+ } else if (const Put* const p = std::get_if<Put>(&msg)) {
put(p->uri, p->properties, p->ctx);
- } else if (const SetProperty* const s = boost::get<SetProperty>(&msg)) {
+ } else if (const SetProperty* const s = std::get_if<SetProperty>(&msg)) {
property_change(s->subject, s->predicate, s->value, s->ctx);
}
}
@@ -502,5 +508,4 @@ App::sample_rate() const
return _sample_rate;
}
-} // namespace gui
-} // namespace ingen
+} // namespace ingen::gui