summaryrefslogtreecommitdiff
path: root/src/managers/input/trackpad/gestures/DispatcherGesture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/input/trackpad/gestures/DispatcherGesture.cpp')
-rw-r--r--src/managers/input/trackpad/gestures/DispatcherGesture.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/managers/input/trackpad/gestures/DispatcherGesture.cpp b/src/managers/input/trackpad/gestures/DispatcherGesture.cpp
new file mode 100644
index 00000000..4d76a671
--- /dev/null
+++ b/src/managers/input/trackpad/gestures/DispatcherGesture.cpp
@@ -0,0 +1,22 @@
+#include "DispatcherGesture.hpp"
+
+#include "../../../../managers/KeybindManager.hpp"
+
+CDispatcherTrackpadGesture::CDispatcherTrackpadGesture(const std::string& dispatcher, const std::string& data) : m_dispatcher(dispatcher), m_data(data) {
+ ;
+}
+
+void CDispatcherTrackpadGesture::begin(const ITrackpadGesture::STrackpadGestureBegin& e) {
+ ; // intentionally blank
+}
+
+void CDispatcherTrackpadGesture::update(const ITrackpadGesture::STrackpadGestureUpdate& e) {
+ ; // intentionally blank
+}
+
+void CDispatcherTrackpadGesture::end(const ITrackpadGesture::STrackpadGestureEnd& e) {
+ if (!g_pKeybindManager->m_dispatchers.contains(m_dispatcher))
+ return;
+
+ g_pKeybindManager->m_dispatchers.at(m_dispatcher)(m_data);
+}