diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-04-05 13:10:43 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-04-05 13:14:06 +0530 |
| commit | 1d9cd2bcb69ccbccea67166f9d42ec8ff6892fae (patch) | |
| tree | 622d1bb48d35f05b17ef69db1b5919be89b86aab /src/events.hpp | |
| parent | 2e051fcc4efcfe6af2d3ef22d6a4ba63c9f1c65d (diff) | |
| download | null-browser-1d9cd2bcb69ccbccea67166f9d42ec8ff6892fae.tar.gz null-browser-1d9cd2bcb69ccbccea67166f9d42ec8ff6892fae.zip | |
Connected url changed event
Diffstat (limited to 'src/events.hpp')
| -rw-r--r-- | src/events.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/events.hpp b/src/events.hpp index 6d10fc7..96b9008 100644 --- a/src/events.hpp +++ b/src/events.hpp @@ -14,10 +14,10 @@ class BrowserEvent { public: - std::string kind = "-"; + QString kind = "-"; virtual ~BrowserEvent() = default; - virtual void lua_push(lua_State *state) { lua_newtable(state); }; + virtual void lua_push(lua_State *state) const { lua_newtable(state); }; }; class UrlChangedEvent : public BrowserEvent { @@ -31,7 +31,7 @@ public: kind = "UrlChanged"; } - void lua_push(lua_State *state) override { + void lua_push(lua_State *state) const override { lua_newtable(state); SET_FIELD("tab", integer, webview_id) SET_FIELD("win", integer, win_id) @@ -40,8 +40,8 @@ public: }; struct EventHandlerRequest { - std::vector<std::string> event_names; - std::vector<std::string> patterns; - std::function<void(BrowserEvent &)> handler; + std::vector<QString> event_names; + std::vector<QString> patterns; + std::function<void(BrowserEvent *)> handler; int function_ref; }; |
