summaryrefslogtreecommitdiff
path: root/src/lib/ecore/efl_loop_timer.eo
blob: 2b5ce084f6af06e94dc1d509dbf895ae9d85bc86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
class Efl.Loop_Timer (Efl.Loop_Consumer)
{
   [[Timers are objects that will call a given callback at some point
     in the future and repeat that tick at a given interval.

     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.
   ]]
   legacy_prefix: ecore_timer;
   methods {
      @property interval {
         [[Interval the timer ticks on.]]
         set {
            [[If set during a timer call this will affect the next interval.]]
         }
         get {
         }
         values {
            in: double(-1.0); [[The new interval in seconds]]
         }
      }
      @property pending {
         [[Pending time regarding a timer.]]
         get {
            return: double; [[Pending time]]
         }
      }
      reset {
         /* FIXME-doc:
          * @note This is equivalent to (but faster than)
          * @code
          * ecore_timer_delay(timer, ecore_timer_interval_get(timer) - ecore_timer_pending_get(timer));
          * @endcode
          */
          [[Resets a timer to its full interval. This effectively makes the
            timer start ticking off from zero now.

            @since 1.2
          ]]
      }
      loop_reset {
         [[This effectively resets a timer but based on the time when this iteration of the main loop started.
           @since 1.18
    ]]
      }
      delay {
         [[Adds a delay to the next occurrence of a timer.
           This doesn't affect the timer interval.
         ]]
         params {
            @in add: double; [[The amount of time by which to delay the timer in seconds]]
         }
      }
   }
   events {
      tick: void; [[Event triggered when the specified time as passed.]]
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
      Efl.Object.finalize;
      Efl.Object.event_freeze;
      Efl.Object.parent { set; }
      /* XXX: can't document overridden methods
       * Pauses a running timer.
       *
       * @param timer The timer to be paused.
       *
       * The timer callback won't be called while the timer is paused. The remaining
       * time until the timer expires will be saved so the timer can be resumed with
       * that same remaining time to expire, instead of expiring instantly. Use
       * ecore_timer_thaw() to resume.
       *
       * @note Nothing happens if the timer was already paused.
       *
       * @see ecore_timer_thaw()
       */
      Efl.Object.event_freeze_count { get; }
      Efl.Object.event_thaw;
      /* XXX: can't document overridden methods
       * Resumes a frozen (paused) timer.
       *
       * @param timer The timer to be resumed.
       *
       * The timer will be resumed from its previous relative position. This
       * means if it had X seconds remaining until expiry when paused, it will
       * now start with those same X seconds remaining.
       * The interval time won't be affected by this call nor by
       * ecore_timer_freeze().
       *
       * @see ecore_timer_freeze()
       */
   }
}