10 typedef struct lua_State lua_State
;
11 typedef void* lua_CFunction
;
15 #include "vis-subprocess.h"
17 /* add a directory to consider when loading lua files */
18 bool vis_lua_path_add(Vis
*, const char *path
);
19 /* get semicolon separated list of paths to load lua files
20 * (*lpath = package.path) and Lua C modules (*cpath = package.cpath)
21 * both these pointers need to be free(3)-ed by the caller */
22 bool vis_lua_paths_get(Vis
*, char **lpath
, char **cpath
);
24 /* various event handlers, triggered by the vis core */
25 void vis_lua_init(Vis
*);
26 void vis_lua_start(Vis
*);
27 void vis_lua_quit(Vis
*);
29 #define vis_lua_mode_insert_input vis_insert_key
30 #define vis_lua_mode_replace_input vis_replace_key
32 void vis_lua_mode_insert_input(Vis
*, const char *key
, size_t len
);
33 void vis_lua_mode_replace_input(Vis
*, const char *key
, size_t len
);
35 void vis_lua_file_open(Vis
*, File
*);
36 bool vis_lua_file_save_pre(Vis
*, File
*, const char *path
);
37 void vis_lua_file_save_post(Vis
*, File
*, const char *path
);
38 void vis_lua_file_close(Vis
*, File
*);
39 void vis_lua_win_open(Vis
*, Win
*);
40 void vis_lua_win_close(Vis
*, Win
*);
41 void vis_lua_win_highlight(Vis
*, Win
*);
42 void vis_lua_win_status(Vis
*, Win
*);
43 void vis_lua_term_csi(Vis
*, const long *);
44 void vis_lua_process_response(Vis
*, const char *, char *, size_t, ResponseType
);
45 void vis_lua_ui_draw(Vis
*);