#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