From b4b6a646b3a7a7f6c7e990c67f208b76f4b5f748 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 20 Apr 2025 12:57:07 +0530 Subject: Refactor + expose managing mode to inside lua --- src/WindowActionRouter.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/WindowActionRouter.hpp') diff --git a/src/WindowActionRouter.hpp b/src/WindowActionRouter.hpp index 65124ef..b749642 100644 --- a/src/WindowActionRouter.hpp +++ b/src/WindowActionRouter.hpp @@ -7,6 +7,8 @@ #include #include "EventQueue.hpp" +#include "keymap/KeymapEvaluator.hpp" +#include "utils.hpp" #include "widgets/BrowserWindow.hpp" #include "widgets/WebViewStack.hpp" @@ -35,15 +37,18 @@ public: WebViewId fetch_current_view_id(WindowId win_id = 0); QList fetch_webview_data_list(WindowId win_id = 0); QVariant fetch_config_value(const QString &key); - QString fetch_current_search_text() const; + KeyMode fetch_current_mode() const; - DELEGATE((&event_queue), dispatch_event, dispatch_event); - DELEGATE((&event_queue), register_event, register_event) + DEFINE_GETTER(fetch_current_search_text, current_search_text) + + DELEGATE(&event_queue, dispatch_event, dispatch_event) + DELEGATE(&event_queue, register_event, register_event) protected: WindowActionRouter() = default; void add_keymap(const QString &mode_string, const QString &keyseq, std::function action); + void find_current_search_text(WebViewId webview_id, bool forward); signals: void new_window_requested(const QUrl &url); -- cgit v1.3.1