blob: d1dc1227d0cdf7817d0a51ac3bdc6d3d6dc0793b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#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 *webview_stack, LuaRuntime *lua_runtime,
KeymapEvaluator *keymap_evaluator);
~InputMediator() override;
// DELEGATE(webview_stack, open_url, open_url)
// DELEGATE(webview_stack, current_url, current_url)
// DELEGATE(webview_stack, close_current, close_current_webview)
DELEGATE(keymap_evaluator, evaluate, evaluate_keymap)
protected:
void add_keymap(const QString &mode_string, const QString &keyseq,
std::function<void()> action);
private:
WebViewStack *webview_stack;
LuaRuntime *lua_runtime;
KeymapEvaluator *keymap_evaluator;
};
|