diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2018-01-31 13:22:18 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-02-24 11:15:24 +0100 |
| commit | 30c6ceb2447be5b8b73958271972ba98457dc0b7 (patch) | |
| tree | 53bcc5766ccfde78084a90628cae160dd8441c72 /vis-lua.c | |
| parent | 15d213e4b6e33670cb50d472ad3f532245ebcc3b (diff) | |
| download | vis-30c6ceb2447be5b8b73958271972ba98457dc0b7.tar.gz vis-30c6ceb2447be5b8b73958271972ba98457dc0b7.tar.xz | |
vis-lua: implement vis:redraw()
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1359,6 +1359,18 @@ static int pipe_func(lua_State *L) { return 3; } /*** + * Redraw complete user interface. + * + * Will trigger redraw events, make sure to avoid recursive events. + * + * @function draw + */ +static int redraw(lua_State *L) { + Vis *vis = obj_ref_check(L, 1, "vis"); + vis_redraw(vis); + return 0; +} +/*** * Currently active window. * @tfield Window win * @see windows @@ -1480,6 +1492,7 @@ static const struct luaL_Reg vis_lua[] = { { "action_register", action_register }, { "exit", exit_func }, { "pipe", pipe_func }, + { "redraw", redraw }, { "__index", vis_index }, { "__newindex", vis_newindex }, { NULL, NULL }, |
