blob: 9ff9123887fdb0a2200f5857e2da8a8ac9102b83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef LEMACS_LUA_BRIDGE_H
#define LEMACS_LUA_BRIDGE_H
#include <stdbool.h>
#include <lua.h>
#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
|