timer: export started status to Lua

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-08-17 21:55:43 +02:00
parent bbb61d027a
commit 07ac920b1c
2 changed files with 7 additions and 0 deletions

View File

@ -96,6 +96,7 @@ size_hints_honor
skip_taskbar skip_taskbar
south south
start start
started
sticky sticky
system system
systray systray

View File

@ -99,6 +99,8 @@ luaA_timer_stop(lua_State *L)
return 0; return 0;
} }
LUA_OBJECT_EXPORT_PROPERTY(timer, atimer_t, started, lua_pushboolean)
void void
timer_class_setup(lua_State *L) timer_class_setup(lua_State *L)
{ {
@ -125,6 +127,10 @@ timer_class_setup(lua_State *L)
(lua_class_propfunc_t) luaA_timer_set_timeout, (lua_class_propfunc_t) luaA_timer_set_timeout,
(lua_class_propfunc_t) luaA_timer_get_timeout, (lua_class_propfunc_t) luaA_timer_get_timeout,
(lua_class_propfunc_t) luaA_timer_set_timeout); (lua_class_propfunc_t) luaA_timer_set_timeout);
luaA_class_add_property(&timer_class, A_TK_STARTED, "started",
NULL,
(lua_class_propfunc_t) luaA_timer_get_started,
NULL);
} }
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80