efl/src/lib/ecore/efl_loop_timer.eo

70 lines
2.0 KiB
Plaintext
Raw Normal View History

class Efl.Loop_Timer extends Efl.Loop_Consumer
2014-03-23 22:47:52 -07:00
{
2015-06-08 09:36:23 -07:00
[[Timers are objects that will call a given callback at some point
in the future and repeat that tick at a given interval.
2015-06-08 09:36:23 -07:00
Timers require the ecore main loop to be running and functioning
properly. They do not guarantee exact timing but try to work on a
"best effort" basis.
The @Efl.Object.event_freeze and @Efl.Object.event_thaw calls are used to pause and unpause the timer.
@since 1.22
2015-06-08 09:36:23 -07:00
]]
methods {
@property timer_interval {
[[Interval the timer ticks on.]]
2014-03-23 22:47:52 -07:00
set {
[[If set during a timer call this will affect the next interval.]]
2014-03-23 22:47:52 -07:00
}
get {
}
values {
in: double(-1.0); [[The new interval in seconds]]
2014-03-23 22:47:52 -07:00
}
}
@property time_pending {
[[Pending time regarding a timer.]]
2014-03-23 22:47:52 -07:00
get {
}
values {
pending: double; [[Pending time]]
2014-03-23 22:47:52 -07:00
}
}
timer_reset {
[[Resets a timer to its full interval. This effectively makes the
2015-06-08 09:36:23 -07:00
timer start ticking off from zero now.
This is equal to delaying the timer by the already passed time, since the timer started ticking
2015-06-08 09:36:23 -07:00
]]
2014-03-23 22:47:52 -07:00
}
timer_loop_reset {
[[This effectively resets a timer but based on the time when this iteration of the main loop started.
]]
}
timer_delay {
[[Adds a delay to the next occurrence of a timer.
This doesn't affect the timer interval.
2015-06-08 09:36:23 -07:00
]]
2014-03-23 22:47:52 -07:00
params {
@in add: double; [[The amount of time by which to delay the timer in seconds]]
2014-03-23 22:47:52 -07:00
}
}
}
events {
timer,tick: void; [[Event triggered when the specified time as passed.]]
}
constructors {
.timer_interval;
}
2014-03-23 22:47:52 -07:00
implements {
Efl.Object.constructor;
Efl.Object.destructor;
Efl.Object.finalize;
Efl.Object.event_freeze;
2016-12-27 07:19:06 -08:00
Efl.Object.parent { set; }
Efl.Object.event_freeze_count { get; }
Efl.Object.event_thaw;
}
}