aboutsummaryrefslogtreecommitdiff
path: root/src/InputMediator.hpp
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-03-20 22:10:57 +0530
committerAkshay Nair <phenax5@gmail.com>2025-03-20 22:10:57 +0530
commitfdeb33d34a97d062a120f72da919f81d7b1d45bf (patch)
tree91165d5e3e718d4008bf73259f45d1705965f4b0 /src/InputMediator.hpp
parent9e3474b5d8ee4afdd9c03cfb4a151ffebfca36b7 (diff)
downloadnull-browser-fdeb33d34a97d062a120f72da919f81d7b1d45bf.tar.gz
null-browser-fdeb33d34a97d062a120f72da919f81d7b1d45bf.zip
Move header files to src
Diffstat (limited to 'src/InputMediator.hpp')
-rw-r--r--src/InputMediator.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/InputMediator.hpp b/src/InputMediator.hpp
new file mode 100644
index 0000000..7194ff9
--- /dev/null
+++ b/src/InputMediator.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <QWidget>
+#include <QtCore>
+
+#include "LuaRuntime.hpp"
+#include "keymap/KeymapEvaluator.hpp"
+#include "utils.hpp"
+#include "widgets/WebViewStack.hpp"
+
+class InputMediator : public QObject {
+ Q_OBJECT
+
+public:
+ InputMediator(WebViewStack *webViewStack, LuaRuntime *luaRuntime,
+ KeymapEvaluator *keymapEvaluator);
+ ~InputMediator();
+
+ DELEGATE(webViewStack, openUrl, openUrl)
+ DELEGATE(webViewStack, currentUrl, currentUrl)
+ DELEGATE(webViewStack, next, nextWebView)
+ DELEGATE(webViewStack, previous, previousWebView)
+ DELEGATE(webViewStack, closeCurrent, closeCurrentWebView)
+ DELEGATE(keymapEvaluator, evaluate, evaluateKeymap)
+
+private:
+ void evaluateCommand(QString command);
+
+private:
+ WebViewStack *webViewStack;
+ LuaRuntime *luaRuntime;
+ KeymapEvaluator *keymapEvaluator;
+};