jaehyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e1a73fffb9a8e3ededcf4a06c47b034536c33e9c

commit e1a73fffb9a8e3ededcf4a06c47b034536c33e9c
Author: Jaehyun Cho <[email protected]>
Date:   Fri Aug 25 17:08:59 2017 +0900

    efl_animation: Add group animation
    
    Efl.Animation.Group is an abstract class which provides methods for
    group animations such as parallel and sequential group animations.
---
 src/Makefile_Evas.am                               |   3 +
 src/lib/evas/Evas_Common.h                         |   9 ++
 src/lib/evas/Evas_Eo.h                             |   1 +
 src/lib/evas/Evas_Internal.h                       |   5 +
 src/lib/evas/canvas/efl_animation.c                |  33 +++++
 src/lib/evas/canvas/efl_animation.eo               |  15 +++
 src/lib/evas/canvas/efl_animation_alpha.c          |   3 +
 src/lib/evas/canvas/efl_animation_group.c          | 136 +++++++++++++++++++++
 src/lib/evas/canvas/efl_animation_group.eo         |  32 +++++
 ...ion_private.h => efl_animation_group_private.h} |  23 ++--
 src/lib/evas/canvas/efl_animation_object.c         |  59 +++++++--
 src/lib/evas/canvas/efl_animation_object_private.h |   1 +
 src/lib/evas/canvas/efl_animation_private.h        |   1 +
 src/lib/evas/canvas/efl_animation_rotate.c         |   3 +
 src/lib/evas/canvas/efl_animation_scale.c          |   3 +
 src/lib/evas/canvas/efl_animation_translate.c      |   3 +
 16 files changed, 306 insertions(+), 24 deletions(-)

diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index ac64a8816a..68c1b1817a 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -49,6 +49,7 @@ evas_eolian_pub_files = \
        lib/evas/canvas/efl_animation_rotate.eo \
        lib/evas/canvas/efl_animation_scale.eo \
        lib/evas/canvas/efl_animation_translate.eo \
+       lib/evas/canvas/efl_animation_group.eo \
        lib/evas/canvas/efl_animation_object.eo \
        lib/evas/canvas/efl_animation_object_alpha.eo \
        lib/evas/canvas/efl_animation_object_rotate.eo \
@@ -137,6 +138,7 @@ lib/evas/canvas/efl_animation_alpha_private.h \
 lib/evas/canvas/efl_animation_rotate_private.h \
 lib/evas/canvas/efl_animation_scale_private.h \
 lib/evas/canvas/efl_animation_translate_private.h \
+lib/evas/canvas/efl_animation_group_private.h \
 lib/evas/canvas/efl_animation_object_private.h \
 lib/evas/canvas/efl_animation_object_alpha_private.h \
 lib/evas/canvas/efl_animation_object_rotate_private.h \
@@ -232,6 +234,7 @@ lib/evas/canvas/efl_animation_alpha.c \
 lib/evas/canvas/efl_animation_rotate.c \
 lib/evas/canvas/efl_animation_scale.c \
 lib/evas/canvas/efl_animation_translate.c \
+lib/evas/canvas/efl_animation_group.c \
 lib/evas/canvas/efl_animation_object.c \
 lib/evas/canvas/efl_animation_object_alpha.c \
 lib/evas/canvas/efl_animation_object_rotate.c \
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 5407b782ed..7c39fb21df 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -3365,6 +3365,13 @@ typedef Eo Efl_Animation_Translate;
 
 #endif
 
+#ifndef _EFL_ANIMATION_GROUP_EO_CLASS_TYPE
+#define _EFL_ANIMATION_GROUP_EO_CLASS_TYPE
+
+typedef Eo Efl_Animation_Group;
+
+#endif
+
 #ifndef _EFL_ANIMATION_OBJECT_EO_CLASS_TYPE
 #define _EFL_ANIMATION_OBJECT_EO_CLASS_TYPE
 
@@ -3405,6 +3412,8 @@ struct _Efl_Animation_Object_Running_Event_Info
    double progress;
 };
 
+#define EFL_ANIMATION_GROUP_DURATION_NONE -1
+
 /**
  * @}
  */
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index a2efd4611d..6f52e0c809 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -60,6 +60,7 @@
 #include "canvas/efl_animation_rotate.eo.h"
 #include "canvas/efl_animation_scale.eo.h"
 #include "canvas/efl_animation_translate.eo.h"
+#include "canvas/efl_animation_group.eo.h"
 #include "canvas/efl_animation_object.eo.h"
 #include "canvas/efl_animation_object_alpha.eo.h"
 #include "canvas/efl_animation_object_rotate.eo.h"
diff --git a/src/lib/evas/Evas_Internal.h b/src/lib/evas/Evas_Internal.h
index b9b1ce7db0..a406abc5e7 100644
--- a/src/lib/evas/Evas_Internal.h
+++ b/src/lib/evas/Evas_Internal.h
@@ -93,6 +93,11 @@ EOAPI Eina_Bool 
efl_animation_object_final_state_keep_get(const Eo *obj);
 EOAPI void efl_animation_object_duration_set(Eo *obj, double duration);
 EOAPI double efl_animation_object_duration_get(const Eo *obj);
 
+EOAPI void efl_animation_object_duration_only_set(Eo *obj, double duration);
+
+EOAPI void efl_animation_object_total_duration_set(Eo *obj, double 
total_duration);
+EOAPI double efl_animation_object_total_duration_get(const Eo *obj);
+
 EWAPI extern const Efl_Event_Description 
_EFL_ANIMATION_OBJECT_EVENT_PRE_STARTED;
 #define EFL_ANIMATION_OBJECT_EVENT_PRE_STARTED 
(&(_EFL_ANIMATION_OBJECT_EVENT_PRE_STARTED))
 /* Efl.Animation.Object END */
diff --git a/src/lib/evas/canvas/efl_animation.c 
b/src/lib/evas/canvas/efl_animation.c
index df5d4e6cad..22466848e7 100644
--- a/src/lib/evas/canvas/efl_animation.c
+++ b/src/lib/evas/canvas/efl_animation.c
@@ -38,6 +38,8 @@ _efl_animation_duration_set(Eo *eo_obj,
 {
    EFL_ANIMATION_CHECK_OR_RETURN(eo_obj);
 
+   efl_animation_total_duration_set(eo_obj, duration);
+
    pd->duration = duration;
 }
 
@@ -49,6 +51,34 @@ _efl_animation_duration_get(Eo *eo_obj, Efl_Animation_Data 
*pd)
    return pd->duration;
 }
 
+EOLIAN static void
+_efl_animation_duration_only_set(Eo *eo_obj,
+                                 Efl_Animation_Data *pd,
+                                 double duration)
+{
+   EFL_ANIMATION_CHECK_OR_RETURN(eo_obj);
+
+   pd->duration = duration;
+}
+
+EOLIAN static void
+_efl_animation_total_duration_set(Eo *eo_obj,
+                                  Efl_Animation_Data *pd,
+                                  double total_duration)
+{
+   EFL_ANIMATION_CHECK_OR_RETURN(eo_obj);
+
+   pd->total_duration = total_duration;
+}
+
+EOLIAN static double
+_efl_animation_total_duration_get(Eo *eo_obj, Efl_Animation_Data *pd)
+{
+   EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, 0.0);
+
+   return pd->total_duration;
+}
+
 EOLIAN static Eina_Bool
 _efl_animation_is_deleted(Eo *eo_obj, Efl_Animation_Data *pd)
 {
@@ -94,6 +124,9 @@ _efl_animation_object_create(Eo *eo_obj, Efl_Animation_Data 
*pd EINA_UNUSED)
    double duration = efl_animation_duration_get(eo_obj);
    efl_animation_object_duration_set(anim_obj, duration);
 
+   double total_duration = efl_animation_total_duration_get(eo_obj);
+   efl_animation_object_total_duration_set(anim_obj, total_duration);
+
    return anim_obj;
 }
 
diff --git a/src/lib/evas/canvas/efl_animation.eo 
b/src/lib/evas/canvas/efl_animation.eo
index 09c01b6940..be899c4924 100644
--- a/src/lib/evas/canvas/efl_animation.eo
+++ b/src/lib/evas/canvas/efl_animation.eo
@@ -32,6 +32,21 @@ class Efl.Animation (Efl.Object)
             duration: double; [[Duration value.]]
          }
       }
+      duration_only_set @protected {
+         [[Set duration only without setting total duration.]]
+         params {
+            @in duration: double; [[Duration value.]]
+         }
+      }
+      @property total_duration {
+         set @protected {
+         }
+         get {
+         }
+         values {
+            total_duration: double; [[Total duration value.]]
+         }
+      }
       is_deleted @protected {
          return: bool; [[$true if animation is deleted, $false otherwise.]]
       }
diff --git a/src/lib/evas/canvas/efl_animation_alpha.c 
b/src/lib/evas/canvas/efl_animation_alpha.c
index c0148b6c55..deddafe194 100644
--- a/src/lib/evas/canvas/efl_animation_alpha.c
+++ b/src/lib/evas/canvas/efl_animation_alpha.c
@@ -44,6 +44,9 @@ _efl_animation_alpha_efl_animation_object_create(Eo *eo_obj,
    double duration = efl_animation_duration_get(eo_obj);
    efl_animation_object_duration_set(anim_obj, duration);
 
+   double total_duration = efl_animation_total_duration_get(eo_obj);
+   efl_animation_object_total_duration_set(anim_obj, total_duration);
+
    efl_animation_object_alpha_set(anim_obj, pd->from.alpha, pd->to.alpha);
 
    return anim_obj;
diff --git a/src/lib/evas/canvas/efl_animation_group.c 
b/src/lib/evas/canvas/efl_animation_group.c
new file mode 100644
index 0000000000..750a69de9f
--- /dev/null
+++ b/src/lib/evas/canvas/efl_animation_group.c
@@ -0,0 +1,136 @@
+#include "efl_animation_group_private.h"
+
+EOLIAN static void
+_efl_animation_group_animation_add(Eo *eo_obj,
+                                   Efl_Animation_Group_Data *pd,
+                                   Efl_Animation *animation)
+{
+   EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj);
+
+   if (!animation) return;
+
+   Efl_Canvas_Object *target = efl_animation_target_get(eo_obj);
+   if (target)
+     efl_animation_target_set(animation, target);
+
+   double duration = efl_animation_duration_get(eo_obj);
+   /* if group animation duration is available value, then the duration is
+    * propagated to its child. */
+   if (duration != EFL_ANIMATION_GROUP_DURATION_NONE)
+     efl_animation_duration_set(animation, duration);
+
+   Eina_Bool keep_final_state = efl_animation_final_state_keep_get(eo_obj);
+   efl_animation_final_state_keep_set(animation, keep_final_state);
+
+   pd->animations = eina_list_append(pd->animations, animation);
+}
+
+EOLIAN static void
+_efl_animation_group_animation_del(Eo *eo_obj,
+                                   Efl_Animation_Group_Data *pd,
+                                   Efl_Animation*animation)
+{
+   EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj);
+
+   if (!animation) return;
+
+   pd->animations = eina_list_remove(pd->animations, animation);
+}
+
+EOLIAN static Eina_List *
+_efl_animation_group_animations_get(Eo *eo_obj,
+                                    Efl_Animation_Group_Data *pd)
+{
+   EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj, NULL);
+
+   return pd->animations;
+}
+
+EOLIAN static void
+_efl_animation_group_efl_animation_target_set(Eo *eo_obj,
+                                              Efl_Animation_Group_Data *pd,
+                                              Efl_Canvas_Object *target)
+{
+   EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj);
+
+   Eina_List *l;
+   Efl_Animation *anim;
+   EINA_LIST_FOREACH(pd->animations, l, anim)
+     {
+        efl_animation_target_set(anim, target);
+     }
+
+   efl_animation_target_set(efl_super(eo_obj, MY_CLASS), target);
+}
+
+EOLIAN static void
+_efl_animation_group_efl_animation_duration_set(Eo *eo_obj,
+                                                Efl_Animation_Group_Data *pd,
+                                                double duration)
+{
+   EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj);
+
+   if (duration == EFL_ANIMATION_GROUP_DURATION_NONE) goto end;
+
+   if (duration < 0.0) return;
+
+   Eina_List *l;
+   Efl_Animation *anim;
+   EINA_LIST_FOREACH(pd->animations, l, anim)
+     {
+        efl_animation_duration_set(anim, duration);
+     }
+
+end:
+   efl_animation_duration_only_set(efl_super(eo_obj, MY_CLASS), duration);
+
+   //efl_animation_total_duration_get() should calculate the new total 
duration.
+   double total_duration = efl_animation_total_duration_get(eo_obj);
+   efl_animation_total_duration_set(eo_obj, total_duration);
+}
+
+EOLIAN static void
+_efl_animation_group_efl_animation_final_state_keep_set(Eo *eo_obj,
+                                                        
Efl_Animation_Group_Data *pd,
+                                                        Eina_Bool 
keep_final_state)
+{
+   EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj);
+
+   Eina_List *l;
+   Efl_Animation *anim;
+   EINA_LIST_FOREACH(pd->animations, l, anim)
+     {
+        efl_animation_final_state_keep_set(anim, keep_final_state);
+     }
+
+   efl_animation_final_state_keep_set(efl_super(eo_obj, MY_CLASS), 
keep_final_state);
+}
+
+EOLIAN static Efl_Object *
+_efl_animation_group_efl_object_constructor(Eo *eo_obj,
+                                            Efl_Animation_Group_Data *pd)
+{
+   eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
+
+   pd->animations = NULL;
+
+   //group animation does not affect its child duration by default.
+   efl_animation_duration_only_set(efl_super(eo_obj, MY_CLASS),
+                                   EFL_ANIMATION_GROUP_DURATION_NONE);
+
+   return eo_obj;
+}
+
+EOLIAN static void
+_efl_animation_group_efl_object_destructor(Eo *eo_obj,
+                                           Efl_Animation_Group_Data *pd)
+{
+   Efl_Animation *anim;
+
+   EINA_LIST_FREE(pd->animations, anim)
+      efl_del(anim);
+
+   efl_destructor(efl_super(eo_obj, MY_CLASS));
+}
+
+#include "efl_animation_group.eo.c"
diff --git a/src/lib/evas/canvas/efl_animation_group.eo 
b/src/lib/evas/canvas/efl_animation_group.eo
new file mode 100644
index 0000000000..c287490907
--- /dev/null
+++ b/src/lib/evas/canvas/efl_animation_group.eo
@@ -0,0 +1,32 @@
+import efl_animation_types;
+
+abstract Efl.Animation.Group (Efl.Animation)
+{
+   [[Efl group animation abstract class]]
+   data: Efl_Animation_Group_Data;
+   methods {
+      animation_add {
+         [[Add the given animation to the animation group.]]
+         params {
+            @in animation: Efl.Animation; [[The animation which needs to be 
added to the animation group]]
+         }
+      }
+      animation_del {
+         [[Delete the given animation from the animation group.]]
+         params {
+            @in animation: Efl.Animation; [[The animation which needs to be 
deleted from the animation group]]
+         }
+      }
+      animations_get {
+         [[Get the animations of the animation group.]]
+         return: list<Efl.Animation>; [[The animations of the animation group]]
+      }
+   }
+   implements {
+      Efl.Object.constructor;
+      Efl.Object.destructor;
+      Efl.Animation.target { set; }
+      Efl.Animation.duration { set; }
+      Efl.Animation.final_state_keep { set; }
+   }
+}
diff --git a/src/lib/evas/canvas/efl_animation_private.h 
b/src/lib/evas/canvas/efl_animation_group_private.h
similarity index 51%
copy from src/lib/evas/canvas/efl_animation_private.h
copy to src/lib/evas/canvas/efl_animation_group_private.h
index 44c48a0b88..0ce4728bf2 100644
--- a/src/lib/evas/canvas/efl_animation_private.h
+++ b/src/lib/evas/canvas/efl_animation_group_private.h
@@ -2,20 +2,10 @@
 
 #include "evas_common_private.h"
 
-#define MY_CLASS EFL_ANIMATION_CLASS
+#define MY_CLASS EFL_ANIMATION_GROUP_CLASS
 #define MY_CLASS_NAME efl_class_name_get(MY_CLASS)
 
-typedef struct _Efl_Animation_Data
-{
-   Efl_Canvas_Object *target;
-
-   double             duration;
-
-   Eina_Bool          is_deleted : 1;
-   Eina_Bool          keep_final_state : 1;
-} Efl_Animation_Data;
-
-#define EFL_ANIMATION_CHECK_OR_RETURN(anim, ...) \
+#define EFL_ANIMATION_GROUP_CHECK_OR_RETURN(anim, ...) \
    do { \
       if (!anim) { \
          CRI("Efl_Animation " # anim " is NULL!"); \
@@ -27,5 +17,10 @@ typedef struct _Efl_Animation_Data
       } \
    } while (0)
 
-#define EFL_ANIMATION_DATA_GET(o, pd) \
-   Efl_Animation_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_CLASS)
+#define EFL_ANIMATION_GROUP_DATA_GET(o, pd) \
+   Efl_Animation_Group_Data *pd = efl_data_scope_get(o, 
EFL_ANIMATION_GROUP_CLASS)
+
+typedef struct _Efl_Animation_Group_Data
+{
+   Eina_List *animations;
+} Efl_Animation_Group_Data;
diff --git a/src/lib/evas/canvas/efl_animation_object.c 
b/src/lib/evas/canvas/efl_animation_object.c
index 6f134d881a..3fe829b0f6 100644
--- a/src/lib/evas/canvas/efl_animation_object.c
+++ b/src/lib/evas/canvas/efl_animation_object.c
@@ -63,6 +63,8 @@ _efl_animation_object_duration_set(Eo *eo_obj,
 {
    EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj);
 
+   efl_animation_object_total_duration_set(eo_obj, duration);
+
    pd->duration = duration;
 }
 
@@ -75,6 +77,34 @@ _efl_animation_object_duration_get(Eo *eo_obj,
    return pd->duration;
 }
 
+EOLIAN static void
+_efl_animation_object_duration_only_set(Eo *eo_obj,
+                                        Efl_Animation_Object_Data *pd,
+                                        double duration)
+{
+   EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj);
+
+   pd->duration = duration;
+}
+
+EOLIAN static void
+_efl_animation_object_total_duration_set(Eo *eo_obj,
+                                         Efl_Animation_Object_Data *pd,
+                                         double total_duration)
+{
+   EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj);
+
+   pd->total_duration = total_duration;
+}
+
+EOLIAN static double
+_efl_animation_object_total_duration_get(Eo *eo_obj, Efl_Animation_Object_Data 
*pd)
+{
+   EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj, 0.0);
+
+   return pd->total_duration;
+}
+
 EOLIAN static Eina_Bool
 _efl_animation_object_is_deleted(Eo *eo_obj,
                                  Efl_Animation_Object_Data *pd)
@@ -181,17 +211,17 @@ _animator_cb(void *data)
 
    if (pd->is_cancelled) goto end;
 
-   double elapsed_time, duration;
+   double elapsed_time, total_duration;
 
    pd->time.current = ecore_loop_time_get();
    elapsed_time = pd->time.current - pd->time.begin;
-   duration = pd->duration;
-   if (elapsed_time > duration)
-     elapsed_time = duration;
+   total_duration = pd->total_duration;
+   if (elapsed_time > total_duration)
+     elapsed_time = total_duration;
 
-   if (duration < 0.0) goto end;
+   if (total_duration < 0.0) goto end;
 
-   if (duration == 0.0)
+   if (total_duration == 0.0)
      {
         ecore_animator_del(pd->animator);
         pd->animator = NULL;
@@ -199,7 +229,7 @@ _animator_cb(void *data)
         pd->progress = 1.0;
      }
    else
-     pd->progress = elapsed_time / duration;
+     pd->progress = elapsed_time / total_duration;
 
    //Reset previous animation effect before applying animation effect
    efl_animation_object_target_state_reset(eo_obj);
@@ -207,7 +237,7 @@ _animator_cb(void *data)
    efl_animation_object_progress_set(eo_obj, pd->progress);
 
    //Not end. Keep going.
-   if (elapsed_time < duration) return ECORE_CALLBACK_RENEW;
+   if (elapsed_time < total_duration) return ECORE_CALLBACK_RENEW;
 
 end:
    pd->animator = NULL;
@@ -226,7 +256,7 @@ end:
 static void
 _start(Eo *eo_obj, Efl_Animation_Object_Data *pd)
 {
-   if (pd->duration < 0.0) return;
+   if (pd->total_duration < 0.0) return;
 
    //Save the current state of the target
    efl_animation_object_target_state_save(eo_obj);
@@ -311,6 +341,7 @@ _efl_animation_object_efl_object_constructor(Eo *eo_obj,
    pd->progress = 0.0;
 
    pd->duration = 0.0;
+   pd->total_duration = 0.0;
 
    pd->auto_del = EINA_TRUE;
    pd->is_deleted = EINA_FALSE;
@@ -358,13 +389,21 @@ EOAPI 
EFL_FUNC_BODY_CONST(efl_animation_object_final_state_keep_get, Eina_Bool,
 EOAPI EFL_VOID_FUNC_BODYV(efl_animation_object_duration_set, 
EFL_FUNC_CALL(duration), double duration);
 EOAPI EFL_FUNC_BODY_CONST(efl_animation_object_duration_get, double, 0);
 
+EOAPI EFL_VOID_FUNC_BODYV(efl_animation_object_duration_only_set, 
EFL_FUNC_CALL(duration), double duration);
+
+EOAPI EFL_VOID_FUNC_BODYV(efl_animation_object_total_duration_set, 
EFL_FUNC_CALL(total_duration), double total_duration);
+EOAPI EFL_FUNC_BODY_CONST(efl_animation_object_total_duration_get, double, 0);
+
 #define EFL_ANIMATION_OBJECT_EXTRA_OPS \
    EFL_OBJECT_OP_FUNC(efl_animation_object_target_set, 
_efl_animation_object_target_set), \
    EFL_OBJECT_OP_FUNC(efl_animation_object_target_get, 
_efl_animation_object_target_get), \
    EFL_OBJECT_OP_FUNC(efl_animation_object_final_state_keep_set, 
_efl_animation_object_final_state_keep_set), \
    EFL_OBJECT_OP_FUNC(efl_animation_object_final_state_keep_get, 
_efl_animation_object_final_state_keep_get), \
    EFL_OBJECT_OP_FUNC(efl_animation_object_duration_set, 
_efl_animation_object_duration_set), \
-   EFL_OBJECT_OP_FUNC(efl_animation_object_duration_get, 
_efl_animation_object_duration_get)
+   EFL_OBJECT_OP_FUNC(efl_animation_object_duration_get, 
_efl_animation_object_duration_get), \
+   EFL_OBJECT_OP_FUNC(efl_animation_object_duration_only_set, 
_efl_animation_object_duration_only_set), \
+   EFL_OBJECT_OP_FUNC(efl_animation_object_total_duration_set, 
_efl_animation_object_total_duration_set), \
+   EFL_OBJECT_OP_FUNC(efl_animation_object_total_duration_get, 
_efl_animation_object_total_duration_get)
 
 EWAPI const Efl_Event_Description _EFL_ANIMATION_OBJECT_EVENT_PRE_STARTED =
    EFL_EVENT_DESCRIPTION("pre_started");
diff --git a/src/lib/evas/canvas/efl_animation_object_private.h 
b/src/lib/evas/canvas/efl_animation_object_private.h
index 616d8c6407..3309e31efb 100644
--- a/src/lib/evas/canvas/efl_animation_object_private.h
+++ b/src/lib/evas/canvas/efl_animation_object_private.h
@@ -30,6 +30,7 @@ typedef struct _Efl_Animation_Object_Data
    double             progress;
 
    double             duration;
+   double             total_duration;
 
    Eina_Bool          auto_del : 1;
    Eina_Bool          is_deleted : 1;
diff --git a/src/lib/evas/canvas/efl_animation_private.h 
b/src/lib/evas/canvas/efl_animation_private.h
index 44c48a0b88..0c3cea17c1 100644
--- a/src/lib/evas/canvas/efl_animation_private.h
+++ b/src/lib/evas/canvas/efl_animation_private.h
@@ -10,6 +10,7 @@ typedef struct _Efl_Animation_Data
    Efl_Canvas_Object *target;
 
    double             duration;
+   double             total_duration;
 
    Eina_Bool          is_deleted : 1;
    Eina_Bool          keep_final_state : 1;
diff --git a/src/lib/evas/canvas/efl_animation_rotate.c 
b/src/lib/evas/canvas/efl_animation_rotate.c
index d92cf2f96a..2d6399f482 100644
--- a/src/lib/evas/canvas/efl_animation_rotate.c
+++ b/src/lib/evas/canvas/efl_animation_rotate.c
@@ -192,6 +192,9 @@ _efl_animation_rotate_efl_animation_object_create(Eo 
*eo_obj,
    double duration = efl_animation_duration_get(eo_obj);
    efl_animation_object_duration_set(anim_obj, duration);
 
+   double total_duration = efl_animation_total_duration_get(eo_obj);
+   efl_animation_object_total_duration_set(anim_obj, total_duration);
+
    if (pd->use_rel_pivot)
      {
         efl_animation_object_rotate_set(anim_obj,
diff --git a/src/lib/evas/canvas/efl_animation_scale.c 
b/src/lib/evas/canvas/efl_animation_scale.c
index 7dfed311c9..ec04c45d3b 100644
--- a/src/lib/evas/canvas/efl_animation_scale.c
+++ b/src/lib/evas/canvas/efl_animation_scale.c
@@ -218,6 +218,9 @@ _efl_animation_scale_efl_animation_object_create(Eo *eo_obj,
    double duration = efl_animation_duration_get(eo_obj);
    efl_animation_object_duration_set(anim_obj, duration);
 
+   double total_duration = efl_animation_total_duration_get(eo_obj);
+   efl_animation_object_total_duration_set(anim_obj, total_duration);
+
    if (pd->use_rel_pivot)
      {
         efl_animation_object_scale_set(anim_obj,
diff --git a/src/lib/evas/canvas/efl_animation_translate.c 
b/src/lib/evas/canvas/efl_animation_translate.c
index a952a04f67..1b0f0e340e 100644
--- a/src/lib/evas/canvas/efl_animation_translate.c
+++ b/src/lib/evas/canvas/efl_animation_translate.c
@@ -160,6 +160,9 @@ _efl_animation_translate_efl_animation_object_create(Eo 
*eo_obj,
    double duration = efl_animation_duration_get(eo_obj);
    efl_animation_object_duration_set(anim_obj, duration);
 
+   double total_duration = efl_animation_total_duration_get(eo_obj);
+   efl_animation_object_total_duration_set(anim_obj, total_duration);
+
    if (pd->use_rel_move)
      {
         efl_animation_object_translate_set(anim_obj,

-- 


Reply via email to