2019-03-11 10:50:51 -07:00
|
|
|
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
|
2016-05-06 15:32:32 -07:00
|
|
|
in the future and repeat that tick at a given interval.
|
2015-06-08 09:36:23 -07:00
|
|
|
|
2016-05-06 15:32:32 -07:00
|
|
|
Timers require the ecore main loop to be running and functioning
|
2017-12-20 01:41:41 -08:00
|
|
|
properly. They do not guarantee exact timing but try to work on a
|
2016-05-06 15:32:32 -07:00
|
|
|
"best effort" basis.
|
2019-02-21 06:56:16 -08:00
|
|
|
|
|
|
|
The @Efl.Object.event_freeze and @Efl.Object.event_thaw calls are used to pause and unpause the timer.
|
2019-03-22 08:25:22 -07:00
|
|
|
|
|
|
|
@since 1.22
|
2015-06-08 09:36:23 -07:00
|
|
|
]]
|
2015-05-07 08:36:45 -07:00
|
|
|
methods {
|
2019-03-08 07:33:05 -08:00
|
|
|
@property timer_interval {
|
2016-04-01 06:01:48 -07:00
|
|
|
[[Interval the timer ticks on.]]
|
2014-03-23 22:47:52 -07:00
|
|
|
set {
|
2017-12-20 01:41:41 -08:00
|
|
|
[[If set during a timer call this will affect the next interval.]]
|
2014-03-23 22:47:52 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2016-12-14 08:28:50 -08:00
|
|
|
in: double(-1.0); [[The new interval in seconds]]
|
2014-03-23 22:47:52 -07:00
|
|
|
}
|
|
|
|
}
|
2019-03-08 07:33:05 -08:00
|
|
|
@property time_pending {
|
2016-04-01 06:01:48 -07:00
|
|
|
[[Pending time regarding a timer.]]
|
2014-03-23 22:47:52 -07:00
|
|
|
get {
|
2019-11-06 18:47:39 -08:00
|
|
|
}
|
|
|
|
values {
|
|
|
|
pending: double; [[Pending time]]
|
2014-03-23 22:47:52 -07:00
|
|
|
}
|
|
|
|
}
|
2019-03-08 07:33:05 -08:00
|
|
|
timer_reset {
|
docs: Fix typos and some wrong expressions in Ecore, Ecore_Audio, Ecore_Cocoa, Ecore_Con, and Ector API reference doxygen.
Summary: I had fixed some typos and wrong expressions, such as capital letters, $simbols in .eo and singulars in Ecore, Ecore_Audio, Ecore_Cocoa, Ecore_Con, and Ector API reference doxygen.
Test Plan: Doxygen Revision
Reviewers: Jaehyun_Cho, stefan, jpeg, cedric, raster
Reviewed By: Jaehyun_Cho
Differential Revision: https://phab.enlightenment.org/D4943
2017-06-06 21:01:13 -07:00
|
|
|
[[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.
|
|
|
|
|
2019-02-21 06:56:16 -08:00
|
|
|
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
|
|
|
}
|
2019-03-08 07:33:05 -08:00
|
|
|
timer_loop_reset {
|
2017-12-20 01:41:41 -08:00
|
|
|
[[This effectively resets a timer but based on the time when this iteration of the main loop started.
|
2019-03-20 11:46:44 -07:00
|
|
|
]]
|
2016-05-04 13:37:39 -07:00
|
|
|
}
|
2019-03-08 07:33:05 -08:00
|
|
|
timer_delay {
|
2017-12-20 01:41:41 -08:00
|
|
|
[[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 {
|
2017-12-20 01:41:41 -08:00
|
|
|
@in add: double; [[The amount of time by which to delay the timer in seconds]]
|
2014-03-23 22:47:52 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-05-04 13:37:39 -07:00
|
|
|
events {
|
2019-03-08 07:33:05 -08:00
|
|
|
timer,tick: void; [[Event triggered when the specified time as passed.]]
|
2016-05-04 13:37:39 -07:00
|
|
|
}
|
2019-01-18 08:05:05 -08:00
|
|
|
constructors {
|
2019-03-08 07:33:05 -08:00
|
|
|
.timer_interval;
|
2019-01-18 08:05:05 -08:00
|
|
|
}
|
2014-03-23 22:47:52 -07:00
|
|
|
implements {
|
2016-08-10 07:23:04 -07:00
|
|
|
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; }
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.event_thaw;
|
2014-09-01 07:53:35 -07:00
|
|
|
}
|
2014-05-12 03:11:14 -07:00
|
|
|
}
|