From 07ac920b1cf6b0f3a7087f84d826db92a64b1be2 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 17 Aug 2009 21:55:43 +0200 Subject: [PATCH] timer: export started status to Lua Signed-off-by: Julien Danjou --- common/tokenize.gperf | 1 + timer.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/common/tokenize.gperf b/common/tokenize.gperf index aa4d4d3d..dd284948 100644 --- a/common/tokenize.gperf +++ b/common/tokenize.gperf @@ -96,6 +96,7 @@ size_hints_honor skip_taskbar south start +started sticky system systray diff --git a/timer.c b/timer.c index b0857a25..c8922670 100644 --- a/timer.c +++ b/timer.c @@ -99,6 +99,8 @@ luaA_timer_stop(lua_State *L) return 0; } +LUA_OBJECT_EXPORT_PROPERTY(timer, atimer_t, started, lua_pushboolean) + void 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_get_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