From badb616c967f78aaae0939d794606599395ae6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 21 May 2016 22:30:40 +0200 Subject: vis-lua: add win:status function --- vis-lua.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index f1cc453..e893885 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -718,6 +718,15 @@ static int window_style(lua_State *L) { return 0; } +static int window_status(lua_State *L) { + Win *win = obj_ref_check(L, 1, "vis.window"); + if (win) { + const char *status = luaL_checkstring(L, 2); + vis_window_status(win, status); + } + return 0; +} + static const struct luaL_Reg window_funcs[] = { { "__index", window_index }, { "__newindex", window_newindex }, @@ -725,6 +734,7 @@ static const struct luaL_Reg window_funcs[] = { { "map", window_map }, { "style_define", window_style_define }, { "style", window_style }, + { "status", window_status }, { NULL, NULL }, }; -- cgit v1.2.3