diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-05-01 22:38:12 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-05-02 16:21:23 +0530 |
| commit | f0faa92246c1f5fc58546051ace2d047869447df (patch) | |
| tree | 68ac05f65ca59915d5459b9957fe874e616fc2be /src/LuaRuntimeApi.hpp | |
| parent | 86496d0ce96f2e57f3f301c08488b6421321b3c9 (diff) | |
| download | null-browser-f0faa92246c1f5fc58546051ace2d047869447df.tar.gz null-browser-f0faa92246c1f5fc58546051ace2d047869447df.zip | |
Refactor events into separate files
Diffstat (limited to 'src/LuaRuntimeApi.hpp')
| -rw-r--r-- | src/LuaRuntimeApi.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/LuaRuntimeApi.hpp b/src/LuaRuntimeApi.hpp index 9994491..5ec72cc 100644 --- a/src/LuaRuntimeApi.hpp +++ b/src/LuaRuntimeApi.hpp @@ -4,6 +4,7 @@ #include "LuaRuntime.hpp" #include "WindowActionRouter.hpp" +#include "events/Event.hpp" int lua_api_view_set_url(lua_State *state) { const char *url = lua_tostring(state, 1); @@ -172,7 +173,7 @@ int lua_event_register(lua_State *state) { const int function_ref = luaL_ref(state, LUA_REGISTRYINDEX); event.function_ref = function_ref; // TODO: Delete ref on clear callback - event.handler = [state, function_ref](BrowserEvent *event) { + event.handler = [state, function_ref](Event *event) { preserve_top(state, { lua_rawgeti(state, LUA_REGISTRYINDEX, function_ref); event->lua_push(state); |
