From f0faa92246c1f5fc58546051ace2d047869447df Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 1 May 2025 22:38:12 +0530 Subject: Refactor events into separate files --- src/LuaRuntimeApi.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/LuaRuntimeApi.hpp') 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); -- cgit v1.3.1