summaryrefslogtreecommitdiff
path: root/src/lib/ecore/ecore_animator.eo
blob: 9a548c99cd2ebbbba864c1455b67595c5c4b4642 (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
class Ecore.Animator (Eo.Base)
{
   legacy_prefix: null;
   eo_prefix: ecore_obj_animator;
   properties {
      task {
         set {
            /*@
            Set the @p func to be called at every animation tick during main loop execution.

            The function @p func will be called every N seconds where N is
            the @p frametime interval set by ecore_animator_frametime_set(). The
            function will be passed the @p data pointer as its parameter.

            When the animator @p func is called, it must return a boolean value.
            If it returns EINA_TRUE (or ECORE_CALLBACK_RENEW), it will be called again at
            the next tick, or if it returns EINA_FALSE (or ECORE_CALLBACK_CANCEL) it will be
            deleted automatically making any references/handles for it invalid.

            @note The default @p frametime value is 1/30th of a second.

            @see ecore_obj_animator_timeline_set()
            @see ecore_animator_frametime_set() */
         }
         values {
            Ecore_Task_Cb func; /*@ The function to call when it ticks off */
            const(void)* data; /*@ The data to pass to the function */
         }
      }
      timeline {
         set {
            /*@
            Set the @p func to be called at every animation tick during main loop execution, that runs for a limited time

            This function is just like ecore_obj_animator_task_set() except the animator only
            runs for a limited time specified in seconds by @p runtime. Once the
            runtime the animator has elapsed (animator finished) it will automatically
            be deleted. The callback function @p func can return ECORE_CALLBACK_RENEW
            to keep the animator running or ECORE_CALLBACK_CANCEL ro stop it and have
            it be deleted automatically at any time.

            The @p func will ALSO be passed a position parameter that will be in value
            from 0.0 to 1.0 to indicate where along the timeline (0.0 start, 1.0 end)
            the animator run is at. If the callback wishes not to have a linear
            transition it can "map" this value to one of several curves and mappings
            via ecore_animator_pos_map().

            @note The default @p frametime value is 1/30th of a second.

            @see ecore_obj_animator_task_set()
            @see ecore_animator_pos_map()
            @since 1.1.0 */
         }
         values {
            double runtime; /*@ The time to run in seconds */
            Ecore_Timeline_Cb func; /*@ The function to call when it ticks off */
            const(void)* data; /*@ The data to pass to the function */
         }
      }
   }
   implements {
      Eo.Base.destructor;
      Eo.Base.finalize;
      Eo.Base.event_freeze;
      Eo.Base.event_thaw;
   }
}