summaryrefslogtreecommitdiff
path: root/src/lib/ecore/ecore_animator.eo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore/ecore_animator.eo')
-rw-r--r--src/lib/ecore/ecore_animator.eo68
1 files changed, 54 insertions, 14 deletions
diff --git a/src/lib/ecore/ecore_animator.eo b/src/lib/ecore/ecore_animator.eo
index e9a3999dda..9a548c99cd 100644
--- a/src/lib/ecore/ecore_animator.eo
+++ b/src/lib/ecore/ecore_animator.eo
@@ -1,26 +1,66 @@
class Ecore.Animator (Eo.Base)
{
- eo_prefix: ecore_animator;
- constructors {
- timeline_constructor {
- /*@ Contructor. */
- params {
- @in double runtime;
- @in Ecore_Timeline_Cb func;
- @in const(void)* data;
+ 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 */
}
}
- constructor {
- /*@ Contructor. */
- params {
- @in Ecore_Task_Cb func;
- @in const(void)* data;
+ 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.constructor;
Eo.Base.destructor;
+ Eo.Base.finalize;
Eo.Base.event_freeze;
Eo.Base.event_thaw;
}