efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
#include "efl_canvas_group_animation_private.h"
|
2017-08-25 01:08:59 -07:00
|
|
|
|
|
|
|
EOLIAN static void
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
_efl_canvas_group_animation_animation_add(Eo *eo_obj,
|
|
|
|
Efl_Canvas_Group_Animation_Data *pd,
|
2018-02-21 10:38:39 -08:00
|
|
|
Efl_Canvas_Animation *animation)
|
2017-08-25 01:08:59 -07:00
|
|
|
{
|
|
|
|
if (!animation) return;
|
|
|
|
|
2020-01-15 01:44:30 -08:00
|
|
|
/* To preserve each animation's duration, group animation's duration is
|
|
|
|
* copied to each animation's duration only if group animation's duration is
|
|
|
|
* set. */
|
|
|
|
if (pd->is_duration_set)
|
|
|
|
{
|
|
|
|
double duration = efl_animation_duration_get(efl_super(eo_obj, MY_CLASS));
|
|
|
|
efl_animation_duration_set(animation, duration);
|
|
|
|
}
|
2017-08-25 01:08:59 -07:00
|
|
|
|
|
|
|
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);
|
2018-01-16 03:31:15 -08:00
|
|
|
efl_ref(animation);
|
2017-08-25 01:08:59 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
_efl_canvas_group_animation_animation_del(Eo *eo_obj EINA_UNUSED,
|
|
|
|
Efl_Canvas_Group_Animation_Data *pd,
|
2018-02-21 10:38:39 -08:00
|
|
|
Efl_Canvas_Animation *animation)
|
2017-08-25 01:08:59 -07:00
|
|
|
{
|
2018-01-16 03:31:15 -08:00
|
|
|
Eina_List *list;
|
2017-08-25 01:08:59 -07:00
|
|
|
if (!animation) return;
|
|
|
|
|
2018-01-16 03:31:15 -08:00
|
|
|
list = eina_list_data_find_list(pd->animations, animation);
|
|
|
|
if (list)
|
|
|
|
{
|
|
|
|
pd->animations = eina_list_remove_list(pd->animations, list);
|
|
|
|
efl_unref(animation);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-01-16 03:34:48 -08:00
|
|
|
ERR("Animation(%s@%p) is not in the group animation.",
|
|
|
|
efl_class_name_get(animation), animation);
|
2018-01-16 03:31:15 -08:00
|
|
|
}
|
2017-08-25 01:08:59 -07:00
|
|
|
}
|
|
|
|
|
2019-12-03 07:00:29 -08:00
|
|
|
EOLIAN static Eina_Iterator*
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
_efl_canvas_group_animation_animations_get(const Eo *eo_obj EINA_UNUSED,
|
|
|
|
Efl_Canvas_Group_Animation_Data *pd)
|
2017-08-25 01:08:59 -07:00
|
|
|
{
|
2019-12-03 07:00:29 -08:00
|
|
|
return eina_list_iterator_new(pd->animations);
|
2017-08-25 01:08:59 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
_efl_canvas_group_animation_efl_canvas_animation_duration_set(Eo *eo_obj,
|
|
|
|
Efl_Canvas_Group_Animation_Data *pd,
|
2017-08-25 01:08:59 -07:00
|
|
|
double duration)
|
|
|
|
{
|
2020-01-15 01:44:30 -08:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(duration >= 0.0);
|
|
|
|
|
2019-12-04 05:20:43 -08:00
|
|
|
efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
|
|
|
|
duration = efl_animation_duration_get(eo_obj);
|
2017-08-25 01:08:59 -07:00
|
|
|
|
|
|
|
Eina_List *l;
|
2018-02-21 10:38:39 -08:00
|
|
|
Efl_Canvas_Animation *anim;
|
2017-08-25 01:08:59 -07:00
|
|
|
EINA_LIST_FOREACH(pd->animations, l, anim)
|
|
|
|
{
|
|
|
|
efl_animation_duration_set(anim, duration);
|
|
|
|
}
|
2020-01-15 01:44:30 -08:00
|
|
|
|
|
|
|
pd->is_duration_set = EINA_TRUE;
|
2017-08-25 01:08:59 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
_efl_canvas_group_animation_efl_canvas_animation_final_state_keep_set(Eo *eo_obj,
|
|
|
|
Efl_Canvas_Group_Animation_Data *pd,
|
2017-08-25 01:08:59 -07:00
|
|
|
Eina_Bool keep_final_state)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
2018-02-21 10:38:39 -08:00
|
|
|
Efl_Canvas_Animation *anim;
|
2017-08-25 01:08:59 -07:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2017-09-12 22:59:22 -07:00
|
|
|
EOLIAN static void
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
_efl_canvas_group_animation_efl_canvas_animation_interpolator_set(Eo *eo_obj,
|
|
|
|
Efl_Canvas_Group_Animation_Data *pd,
|
2017-09-12 22:59:22 -07:00
|
|
|
Efl_Interpolator *interpolator)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
2018-02-21 10:38:39 -08:00
|
|
|
Efl_Canvas_Animation *anim;
|
2017-09-12 22:59:22 -07:00
|
|
|
EINA_LIST_FOREACH(pd->animations, l, anim)
|
|
|
|
{
|
|
|
|
efl_animation_interpolator_set(anim, interpolator);
|
|
|
|
}
|
|
|
|
|
|
|
|
efl_animation_interpolator_set(efl_super(eo_obj, MY_CLASS), interpolator);
|
|
|
|
}
|
|
|
|
|
2017-08-25 01:08:59 -07:00
|
|
|
EOLIAN static Efl_Object *
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
_efl_canvas_group_animation_efl_object_constructor(Eo *eo_obj,
|
|
|
|
Efl_Canvas_Group_Animation_Data *pd)
|
2017-08-25 01:08:59 -07:00
|
|
|
{
|
|
|
|
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
|
|
|
|
pd->animations = NULL;
|
|
|
|
|
|
|
|
return eo_obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
_efl_canvas_group_animation_efl_object_destructor(Eo *eo_obj,
|
|
|
|
Efl_Canvas_Group_Animation_Data *pd)
|
2017-08-25 01:08:59 -07:00
|
|
|
{
|
2018-02-21 10:38:39 -08:00
|
|
|
Efl_Canvas_Animation *anim;
|
2017-08-25 01:08:59 -07:00
|
|
|
|
2018-01-16 03:34:48 -08:00
|
|
|
EINA_LIST_FREE(pd->animations, anim)
|
2018-01-16 03:31:15 -08:00
|
|
|
efl_unref(anim);
|
2017-08-25 01:08:59 -07:00
|
|
|
|
|
|
|
efl_destructor(efl_super(eo_obj, MY_CLASS));
|
|
|
|
}
|
|
|
|
|
efl_canvas_animation: rename Animation_XXX to XXX_Animation
Summary:
In animation classes, "Animation" is not used as a namespace but it is
used as a prefix in the class names.
e.g. Efl.Canvas.Animation_Alpha
However, those classes are basically animation classes with different
features. Therefore, "Animation" should be used as a postfix in the
class names.
e.g. Efl.Canvas.Animation_Alpha -> Efl.Canvas.Alpha_Animation
However, for the easier usage of C APIs, c_prefix of animation classes
are remained to be "efl_animation_xxx".
Reviewers: segfaultxavi, bu5hm4n, zmike, Hermet, jsuya
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11108
2020-01-19 19:53:09 -08:00
|
|
|
#include "efl_canvas_group_animation.eo.c"
|