diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-07-27 16:17:21 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-07-27 19:46:01 +0530 |
| commit | c95ee83c24b79e64a91a6d3a55addcb6e7ebd11b (patch) | |
| tree | 1289227e74d6ec955ec039c2a35d8660b0e0533f /src/events/ViewClosedEvent.hpp | |
| parent | 72a47c4eecb31a4976bfd4c47a36cd0ab9811a55 (diff) | |
| download | null-browser-c95ee83c24b79e64a91a6d3a55addcb6e7ebd11b.tar.gz null-browser-c95ee83c24b79e64a91a6d3a55addcb6e7ebd11b.zip | |
Add viewselected/closed/created events
Diffstat (limited to 'src/events/ViewClosedEvent.hpp')
| -rw-r--r-- | src/events/ViewClosedEvent.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/events/ViewClosedEvent.hpp b/src/events/ViewClosedEvent.hpp new file mode 100644 index 0000000..905159e --- /dev/null +++ b/src/events/ViewClosedEvent.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include <QtCore> +#include <lua.hpp> + +#include "WebViewData.hpp" +#include "events/Event.hpp" +#include "widgets/BrowserWindow.hpp" + +class ViewClosedEvent : public Event { +public: + const WebViewId view_id; + const WindowId win_id; + + ViewClosedEvent(WebViewId view_id, WindowId win_id) : view_id(view_id), win_id(win_id) { + kind = "ViewClosed"; + } + + void lua_push(lua_State *state) const override { + Event::lua_push(state); + SET_FIELD("view", integer, view_id) + SET_FIELD("win", integer, win_id) + } +}; |
