diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-12-20 11:04:20 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-12-26 21:29:15 +0100 |
| commit | 13a95942b6e33033e4bbbe27cc8cafc98c6924a2 (patch) | |
| tree | 04acfeef0b83b4d6e08212948313242b57779f73 /vis-lua.h | |
| parent | 39e2b6f1b7a750af55ceeadab977354919d0ccf5 (diff) | |
| download | vis-13a95942b6e33033e4bbbe27cc8cafc98c6924a2.tar.gz vis-13a95942b6e33033e4bbbe27cc8cafc98c6924a2.tar.xz | |
vis: refactor Lua integration
Lua support can now be disabled at compile time using:
$ make CONFIG_LUA=0
This commit also adds an initial Lua API and provides a few
default hooks.
We now also require Lua >= 5.2 due to the uservalue constructs.
In principle the same functionality could be implemented using
function environments from Lua 5.1.
Diffstat (limited to 'vis-lua.h')
| -rw-r--r-- | vis-lua.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vis-lua.h b/vis-lua.h new file mode 100644 index 0000000..b0f1293 --- /dev/null +++ b/vis-lua.h @@ -0,0 +1,22 @@ +#ifndef VIS_LUA_H +#define VIS_LUA_H + +#if CONFIG_LUA +#include <lua.h> +#include <lualib.h> +#include <lauxlib.h> +#else +typedef struct lua_State lua_State; +#endif + +#include "vis.h" + +void vis_lua_start(Vis*); +void vis_lua_quit(Vis*); +void vis_lua_file_open(Vis*, File*); +void vis_lua_file_save(Vis*, File*); +void vis_lua_file_close(Vis*, File*); +void vis_lua_win_open(Vis*, Win*); +void vis_lua_win_close(Vis*, Win*); + +#endif
\ No newline at end of file |
