summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-28 16:12:41 +0100
committerDavid Robillard <d@drobilla.net>2020-11-28 17:39:10 +0100
commit8889e2c2d03a414c9e917a598ebfb213c5a28503 (patch)
treededb31032cb8a46e71a5b7f44f94ff9ba05fcc67
parent0f8bd14d3487c35280c33bbfd133dd9e37c8f07e (diff)
downloadpatchage-8889e2c2d03a414c9e917a598ebfb213c5a28503.tar.gz
patchage-8889e2c2d03a414c9e917a598ebfb213c5a28503.tar.bz2
patchage-8889e2c2d03a414c9e917a598ebfb213c5a28503.zip
Move handle_event() to separate files
-rw-r--r--src/AlsaDriver.cpp1
-rw-r--r--src/Driver.hpp1
-rw-r--r--src/JackDbusDriver.cpp1
-rw-r--r--src/JackDriver.cpp2
-rw-r--r--src/Patchage.cpp1
-rw-r--r--src/PatchageEvent.hpp9
-rw-r--r--src/handle_event.cpp (renamed from src/PatchageEvent.cpp)3
-rw-r--r--src/handle_event.hpp28
-rw-r--r--wscript2
9 files changed, 39 insertions, 9 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp
index 702cc00..ec5b24d 100644
--- a/src/AlsaDriver.cpp
+++ b/src/AlsaDriver.cpp
@@ -21,6 +21,7 @@
#include "PatchageCanvas.hpp"
#include "PatchageModule.hpp"
#include "PatchagePort.hpp"
+#include "handle_event.hpp"
PATCHAGE_DISABLE_FMT_WARNINGS
#include <fmt/core.h>
diff --git a/src/Driver.hpp b/src/Driver.hpp
index 664ed94..116b29f 100644
--- a/src/Driver.hpp
+++ b/src/Driver.hpp
@@ -23,6 +23,7 @@
#include <string>
+class Patchage;
class PatchagePort;
class PatchageCanvas;
diff --git a/src/JackDbusDriver.cpp b/src/JackDbusDriver.cpp
index 211b6ae..001b582 100644
--- a/src/JackDbusDriver.cpp
+++ b/src/JackDbusDriver.cpp
@@ -24,6 +24,7 @@
#include "PatchageCanvas.hpp"
#include "PatchageEvent.hpp"
#include "PatchageModule.hpp"
+#include "PatchagePort.hpp"
#include "PortNames.hpp"
PATCHAGE_DISABLE_FMT_WARNINGS
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp
index 36dfa47..7f2e4cb 100644
--- a/src/JackDriver.cpp
+++ b/src/JackDriver.cpp
@@ -22,7 +22,9 @@
#include "PatchageCanvas.hpp"
#include "PatchageEvent.hpp"
#include "PatchageModule.hpp"
+#include "PatchagePort.hpp"
#include "PortNames.hpp"
+#include "handle_event.hpp"
#include "patchage_config.h"
#ifdef HAVE_JACK_METADATA
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index fdd0ce9..915a4a1 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -20,6 +20,7 @@
#include "Legend.hpp"
#include "PatchageCanvas.hpp"
#include "PatchageEvent.hpp"
+#include "PatchagePort.hpp"
#include "UIFile.hpp"
#include "patchage_config.h"
#include "warnings.hpp"
diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp
index f2fa99d..02d224a 100644
--- a/src/PatchageEvent.hpp
+++ b/src/PatchageEvent.hpp
@@ -17,15 +17,12 @@
#ifndef PATCHAGE_PATCHAGEEVENT_HPP
#define PATCHAGE_PATCHAGEEVENT_HPP
-#include "PatchagePort.hpp"
+#include "ClientID.hpp"
#include "PortID.hpp"
#include <boost/variant/variant.hpp>
#include <string>
-#include <utility>
-
-class Patchage;
struct NoopEvent
{};
@@ -71,8 +68,4 @@ using PatchageEvent = boost::variant<NoopEvent,
ConnectionEvent,
DisconnectionEvent>;
-/// Handle an event in the GUI
-void
-handle_event(Patchage& patchage, const PatchageEvent& event);
-
#endif // PATCHAGE_PATCHAGEEVENT_HPP
diff --git a/src/PatchageEvent.cpp b/src/handle_event.cpp
index 0896b49..acd2420 100644
--- a/src/PatchageEvent.cpp
+++ b/src/handle_event.cpp
@@ -14,6 +14,8 @@
* along with Patchage. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "handle_event.hpp"
+
#include "PatchageEvent.hpp"
#include "patchage_config.h"
@@ -22,6 +24,7 @@
#include "Patchage.hpp"
#include "PatchageCanvas.hpp"
#include "PatchageModule.hpp"
+#include "PatchagePort.hpp"
#if defined(HAVE_JACK_DBUS)
# include "JackDbusDriver.hpp"
diff --git a/src/handle_event.hpp b/src/handle_event.hpp
new file mode 100644
index 0000000..b08bab2
--- /dev/null
+++ b/src/handle_event.hpp
@@ -0,0 +1,28 @@
+/* This file is part of Patchage.
+ * Copyright 2007-2020 David Robillard <d@drobilla.net>
+ *
+ * Patchage 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 3 of the License, or (at your option)
+ * any later version.
+ *
+ * Patchage 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 Patchage. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PATCHAGE_HANDLE_EVENT_HPP
+#define PATCHAGE_HANDLE_EVENT_HPP
+
+#include "PatchageEvent.hpp"
+
+class Patchage;
+
+/// Handle an event in the GUI
+void
+handle_event(Patchage& patchage, const PatchageEvent& event);
+
+#endif // PATCHAGE_HANDLE_EVENT_HPP
diff --git a/wscript b/wscript
index 7bf05e3..f305e3b 100644
--- a/wscript
+++ b/wscript
@@ -244,9 +244,9 @@ def build(bld):
src/Legend.cpp
src/Patchage.cpp
src/PatchageCanvas.cpp
- src/PatchageEvent.cpp
src/PatchageModule.cpp
src/TextViewLog.cpp
+ src/handle_event.cpp
src/main.cpp
'''
if bld.is_defined('HAVE_JACK_DBUS'):