From 13a95942b6e33033e4bbbe27cc8cafc98c6924a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 20 Dec 2015 11:04:20 +0100 Subject: 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. --- vis-lua.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 vis-lua.h (limited to 'vis-lua.h') 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 +#include +#include +#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 -- cgit v1.2.3