diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-21 22:30:40 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-22 00:05:31 +0200 |
| commit | badb616c967f78aaae0939d794606599395ae6cc (patch) | |
| tree | 9c09bf203f2dd1ce3f9e9c2acc9a4f2ea7885462 /vis-lua.c | |
| parent | d974dedbfd80e051fc26f9a42ea4f5059823bb86 (diff) | |
| download | vis-badb616c967f78aaae0939d794606599395ae6cc.tar.gz vis-badb616c967f78aaae0939d794606599395ae6cc.tar.xz | |
vis-lua: add win:status function
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 }, }; |
