diff --git a/src/tk_lua.c b/src/tk_lua.c index 49261a3..297e614 100644 --- a/src/tk_lua.c +++ b/src/tk_lua.c @@ -12147,6 +12147,28 @@ static int wrap_image_animation_set_unload_after_paint(lua_State* L) { return 1; } +static int wrap_image_animation_set_reverse(lua_State* L) { + ret_t ret = 0; + widget_t* widget = (widget_t*)tk_checkudata(L, 1, "widget_t"); + bool_t reverse = (bool_t)lua_toboolean(L, 2); + ret = (ret_t)image_animation_set_reverse(widget, reverse); + + lua_pushnumber(L, (lua_Number)(ret)); + + return 1; +} + +static int wrap_image_animation_set_show_when_done(lua_State* L) { + ret_t ret = 0; + widget_t* widget = (widget_t*)tk_checkudata(L, 1, "widget_t"); + bool_t show_when_done = (bool_t)lua_toboolean(L, 2); + ret = (ret_t)image_animation_set_show_when_done(widget, show_when_done); + + lua_pushnumber(L, (lua_Number)(ret)); + + return 1; +} + static int wrap_image_animation_cast(lua_State* L) { widget_t* ret = NULL; widget_t* widget = (widget_t*)tk_checkudata(L, 1, "widget_t"); @@ -12179,6 +12201,8 @@ static const struct luaL_Reg image_animation_t_member_funcs[] = { {"next", wrap_image_animation_next}, {"set_format", wrap_image_animation_set_format}, {"set_unload_after_paint", wrap_image_animation_set_unload_after_paint}, + {"set_reverse", wrap_image_animation_set_reverse}, + {"set_show_when_done", wrap_image_animation_set_show_when_done}, {"is_playing", wrap_image_animation_is_playing}, {NULL, NULL}}; @@ -12216,6 +12240,10 @@ static int wrap_image_animation_t_get_prop(lua_State* L) { } else if (strcmp(name, "end_index") == 0) { lua_pushinteger(L, (lua_Integer)(obj->end_index)); + return 1; + } else if (strcmp(name, "reverse") == 0) { + lua_pushboolean(L, (lua_Integer)(obj->reverse)); + return 1; } else if (strcmp(name, "loop") == 0) { lua_pushboolean(L, (lua_Integer)(obj->loop)); @@ -12240,6 +12268,10 @@ static int wrap_image_animation_t_get_prop(lua_State* L) { } else if (strcmp(name, "delay") == 0) { lua_pushinteger(L, (lua_Integer)(obj->delay)); + return 1; + } else if (strcmp(name, "show_when_done") == 0) { + lua_pushboolean(L, (lua_Integer)(obj->show_when_done)); + return 1; } else { return wrap_widget_t_get_prop(L);