textclock: Add missing documentation
This commit is contained in:
parent
c62ca6c665
commit
18500838d9
|
@ -33,13 +33,13 @@ function textclock.new(format, timeout)
|
||||||
|
|
||||||
local w = textbox()
|
local w = textbox()
|
||||||
local t
|
local t
|
||||||
function w._textclock_update_cb()
|
function w._private.textclock_update_cb()
|
||||||
w:set_markup(DateTime.new_now_local():format(format))
|
w:set_markup(DateTime.new_now_local():format(format))
|
||||||
t.timeout = calc_timeout(timeout)
|
t.timeout = calc_timeout(timeout)
|
||||||
t:again()
|
t:again()
|
||||||
return true -- Continue the timer
|
return true -- Continue the timer
|
||||||
end
|
end
|
||||||
t = timer.weak_start_new(timeout, w._textclock_update_cb)
|
t = timer.weak_start_new(timeout, w._private.textclock_update_cb)
|
||||||
t:emit_signal("timeout")
|
t:emit_signal("timeout")
|
||||||
return w
|
return w
|
||||||
end
|
end
|
||||||
|
@ -48,6 +48,10 @@ function textclock.mt:__call(...)
|
||||||
return textclock.new(...)
|
return textclock.new(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--@DOC_widget_COMMON@
|
||||||
|
|
||||||
|
--@DOC_object_COMMON@
|
||||||
|
|
||||||
return setmetatable(textclock, textclock.mt)
|
return setmetatable(textclock, textclock.mt)
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue