output: add redraw function
This commit is contained in:
parent
ca71a58462
commit
7c8f8a92ea
1 changed files with 18 additions and 0 deletions
|
@ -98,6 +98,23 @@ l_kiwmi_output_pos(lua_State *L)
|
|||
return 2;
|
||||
}
|
||||
|
||||
static int
|
||||
l_kiwmi_output_redraw(lua_State *L)
|
||||
{
|
||||
struct kiwmi_object *obj =
|
||||
*(struct kiwmi_object **)luaL_checkudata(L, 1, "kiwmi_output");
|
||||
|
||||
if (!obj->valid) {
|
||||
return luaL_error(L, "kiwmi_output no longer valid");
|
||||
}
|
||||
|
||||
struct kiwmi_output *output = obj->object;
|
||||
|
||||
output_damage(output);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
l_kiwmi_output_size(lua_State *L)
|
||||
{
|
||||
|
@ -151,6 +168,7 @@ static const luaL_Reg kiwmi_output_methods[] = {
|
|||
{"name", l_kiwmi_output_name},
|
||||
{"on", luaK_callback_register_dispatch},
|
||||
{"pos", l_kiwmi_output_pos},
|
||||
{"redraw", l_kiwmi_output_redraw},
|
||||
{"size", l_kiwmi_output_size},
|
||||
{"usable_area", l_kiwmi_output_usable_area},
|
||||
{NULL, NULL},
|
||||
|
|
Loading…
Reference in a new issue