From a54f6ae81b54ca59bf913bba16f271a35ca08d9d Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 25 Mar 2025 21:11:42 +0530 Subject: Add web.tabs.list and web.tabs.select + example for tab next/prev and selection ui --- src/LuaRuntime.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/LuaRuntime.hpp') diff --git a/src/LuaRuntime.hpp b/src/LuaRuntime.hpp index a13fe1e..209f8b7 100644 --- a/src/LuaRuntime.hpp +++ b/src/LuaRuntime.hpp @@ -37,6 +37,7 @@ public: DEFINE_GETTER(get_state, state) DEFINE_FETCHER(qsizetype(), current_tab_id) + DEFINE_FETCHER(QList(), webview_data_list) signals: void url_opened(QString url, OpenType open_type); @@ -46,6 +47,7 @@ signals: void history_back_requested(WebViewId webview_id, qsizetype history_index); void history_forward_requested(WebViewId webview_id, qsizetype history_index); void webview_closed(WebViewId webview_id); + void webview_selected(WebViewId webview_id); // void output_produced(QVariant value); protected: @@ -59,6 +61,8 @@ protected: 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); private: lua_State *state; -- cgit v1.3.1