From 46a7fee95a010f20490d7f66f0c2c82ed936ca5e Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 27 Mar 2025 13:08:20 +0530 Subject: Refactor and fix tab id use for focus/close --- src/LuaRuntime.hpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/LuaRuntime.hpp') diff --git a/src/LuaRuntime.hpp b/src/LuaRuntime.hpp index 209f8b7..e534d0e 100644 --- a/src/LuaRuntime.hpp +++ b/src/LuaRuntime.hpp @@ -40,29 +40,30 @@ public: DEFINE_FETCHER(QList(), webview_data_list) signals: - void url_opened(QString url, OpenType open_type); void evaluation_completed(QVariant value); void evaluation_failed(QString value); - void keymap_added(QString mode, QString keyseq, std::function); void history_back_requested(WebViewId webview_id, qsizetype history_index); void history_forward_requested(WebViewId webview_id, qsizetype history_index); + void keymap_added(QString mode, QString keyseq, std::function); + void url_opened(QString url, OpenType open_type); void webview_closed(WebViewId webview_id); void webview_selected(WebViewId webview_id); - // void output_produced(QVariant value); protected: LuaRuntime(); ~LuaRuntime() override; void init_web_lib(); - static int lua_on_url_open(lua_State *state); - static int lua_on_url_tab_open(lua_State *state); - static int lua_add_keymap(lua_State *state); - static int lua_get_current_tab_id(lua_State *state); + + // Lua api static int lua_history_back(lua_State *state); static int lua_history_forward(lua_State *state); - static int lua_tab_closed(lua_State *state); - static int lua_get_tab_list(lua_State *state); - static int lua_tab_selected(lua_State *state); + static int lua_keymap_set(lua_State *state); + static int lua_open_url(lua_State *state); + static int lua_tab_close(lua_State *state); + static int lua_tab_create(lua_State *state); + static int lua_tab_current(lua_State *state); + static int lua_tab_list(lua_State *state); + static int lua_tab_select(lua_State *state); private: lua_State *state; -- cgit v1.3.1