filetype: Set "groovy" for Jenkinsfile
[vis.git] / vis-lua.h
blobda64233ad8c1b54e8a14f3d00eeedacc861c6b31
1 #ifndef VIS_LUA_H
2 #define VIS_LUA_H
4 #if CONFIG_LUA
5 #include <lua.h>
6 #include <lualib.h>
7 #include <lauxlib.h>
8 #else
9 typedef struct lua_State lua_State;
10 #endif
12 #include "vis.h"
14 /* add a directory to consider when loading lua files */
15 bool vis_lua_path_add(Vis*, const char *path);
16 /* get semicolon separated list of paths to load lua files
17 * (*lpath = package.path) and Lua C modules (*cpath = package.cpath)
18 * both these pointers need to be free(3)-ed by the caller */
19 bool vis_lua_paths_get(Vis*, char **lpath, char **cpath);
21 /* various event handlers, triggered by the vis core */
22 void vis_lua_init(Vis*);
23 void vis_lua_start(Vis*);
24 void vis_lua_quit(Vis*);
25 #if !CONFIG_LUA
26 #define vis_lua_mode_insert_input vis_insert_key
27 #define vis_lua_mode_replace_input vis_replace_key
28 #else
29 void vis_lua_mode_insert_input(Vis*, const char *key, size_t len);
30 void vis_lua_mode_replace_input(Vis*, const char *key, size_t len);
31 #endif
32 void vis_lua_file_open(Vis*, File*);
33 bool vis_lua_file_save_pre(Vis*, File*, const char *path);
34 void vis_lua_file_save_post(Vis*, File*, const char *path);
35 void vis_lua_file_close(Vis*, File*);
36 void vis_lua_win_open(Vis*, Win*);
37 void vis_lua_win_close(Vis*, Win*);
38 void vis_lua_win_highlight(Vis*, Win*);
39 void vis_lua_win_status(Vis*, Win*);
40 void vis_lua_term_csi(Vis*, const long *);
42 #endif