rename Input:setTimeOut to Input:setTimtout

To keep consistent with Javascript setTimeout function...
pull/2/merge
Qingping Hou 12 years ago
parent a7b2215249
commit c701248a8d

@ -183,7 +183,7 @@ function GestureDetector:tapState(ev)
local deadline = self.cur_ev.timev + TimeVal:new{
sec = 0, usec = self.DOUBLE_TAP_INTERVAL,
}
Input:setTimeOut(function()
Input:setTimeout(function()
DEBUG("in tap timer", self.last_tap ~= nil)
-- double tap will set last_tap to nil so if it is not, then
-- user must only tapped once
@ -206,7 +206,7 @@ function GestureDetector:tapState(ev)
local deadline = self.cur_ev.timev + TimeVal:new{
sec = 0, usec = self.HOLD_INTERVAL
}
Input:setTimeOut(function()
Input:setTimeout(function()
print("hold timer", self.state == self.tapState)
if self.state == self.tapState then
-- timer set in tapState, so we switch to hold

@ -268,7 +268,7 @@ function Input:adjustKindle4EventMap()
self.event_map[104] = "LPgFwd"
end
function Input:setTimeOut(cb, tv_out)
function Input:setTimeout(cb, tv_out)
local item = {
callback = cb,
deadline = tv_out,
@ -304,7 +304,7 @@ function Input:waitEvent(timeout_us, timeout_s)
local ges = self.timer_callbacks[1].callback()
table.remove(self.timer_callbacks, 1)
if ges then
-- Do we really need to clear all setTimeOut after
-- Do we really need to clear all setTimeout after
-- decided a gesture? FIXME
Input.timer_callbacks = {}
return Event:new("Gesture", ges)

Loading…
Cancel
Save