vis-single: add missing header include for signal(2)
[vis.git] / vis-lua.h
blobc9ef1ec4b93625a31f3ba2dc245e45c31195357a
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*);
41 #endif