aboutsummaryrefslogtreecommitdiff
path: root/src/LuaRuntime.hpp
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-03-25 21:11:42 +0530
committerAkshay Nair <phenax5@gmail.com>2025-03-25 21:11:42 +0530
commita54f6ae81b54ca59bf913bba16f271a35ca08d9d (patch)
treed8e5be08f87cc2d90b984fc6a9e8323457785606 /src/LuaRuntime.hpp
parent1284f8cf39e8ba44e837d4dac0bace89cb7a0c26 (diff)
downloadnull-browser-a54f6ae81b54ca59bf913bba16f271a35ca08d9d.tar.gz
null-browser-a54f6ae81b54ca59bf913bba16f271a35ca08d9d.zip
Add web.tabs.list and web.tabs.select + example for tab next/prev and selection ui
Diffstat (limited to 'src/LuaRuntime.hpp')
-rw-r--r--src/LuaRuntime.hpp4
1 files changed, 4 insertions, 0 deletions
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<WebViewData>(), 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;