From cebb280fe546190e55e071b6adbf37cd47950f34 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Mon, 11 May 2026 15:07:55 -0500 Subject: initial commit --- src/core/lua_bridge.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/core/lua_bridge.h (limited to 'src/core/lua_bridge.h') diff --git a/src/core/lua_bridge.h b/src/core/lua_bridge.h new file mode 100644 index 0000000..9ff9123 --- /dev/null +++ b/src/core/lua_bridge.h @@ -0,0 +1,26 @@ +#ifndef LEMACS_LUA_BRIDGE_H +#define LEMACS_LUA_BRIDGE_H + +#include + +#include + +#include "core/editor.h" + +typedef struct { + lua_State *L; + Editor *editor; + char runtime_init_path[1024]; +} LuaBridge; + +bool lua_bridge_init(LuaBridge *bridge, Editor *editor); +void lua_bridge_free(LuaBridge *bridge); + +bool lua_bridge_load_runtime(LuaBridge *bridge, const char *init_script_path); +bool lua_bridge_load_optional_init(LuaBridge *bridge, const char *script_path); +bool lua_bridge_call_key(LuaBridge *bridge, const char *key_name); +bool lua_bridge_call_tick(LuaBridge *bridge); +bool lua_bridge_call_open_file(LuaBridge *bridge, const char *path); +bool lua_bridge_call_text(LuaBridge *bridge, const char *text); + +#endif -- cgit v1.3.1