forked from enlightenment/efl
efl_animation: Remove duration_only_set and total_duration_set methods
Remove unnecessary methods, duration_only_set and total_duration_set.
This commit is contained in:
parent
56a4d3037e
commit
9d1fad8dc1
|
@ -93,9 +93,6 @@ 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);
|
||||
|
||||
EOAPI void efl_animation_object_start_delay_set(Eo *obj, double delay_time);
|
||||
|
|
|
@ -27,12 +27,10 @@ _efl_animation_target_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_animation_duration_set(Eo *eo_obj,
|
||||
_efl_animation_duration_set(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Animation_Data *pd,
|
||||
double duration)
|
||||
{
|
||||
efl_animation_total_duration_set(eo_obj, duration);
|
||||
|
||||
pd->duration = duration;
|
||||
}
|
||||
|
||||
|
@ -42,27 +40,11 @@ _efl_animation_duration_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd)
|
|||
return pd->duration;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_animation_duration_only_set(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Animation_Data *pd,
|
||||
double duration)
|
||||
{
|
||||
pd->duration = duration;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_animation_total_duration_set(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Animation_Data *pd,
|
||||
double total_duration)
|
||||
{
|
||||
pd->total_duration = total_duration;
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_animation_total_duration_get(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Animation_Data *pd)
|
||||
{
|
||||
return pd->total_duration;
|
||||
return pd->duration;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -97,9 +79,6 @@ _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);
|
||||
|
||||
int repeat_count = efl_animation_repeat_count_get(eo_obj);
|
||||
efl_animation_object_repeat_count_set(anim_obj, repeat_count);
|
||||
|
||||
|
|
|
@ -32,15 +32,7 @@ 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 {
|
||||
|
|
|
@ -38,9 +38,6 @@ _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);
|
||||
|
||||
double start_delay_time = efl_animation_start_delay_get(eo_obj);
|
||||
efl_animation_object_start_delay_set(anim_obj, start_delay_time);
|
||||
|
||||
|
|
|
@ -72,11 +72,7 @@ _efl_animation_group_efl_animation_duration_set(Eo *eo_obj,
|
|||
}
|
||||
|
||||
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);
|
||||
efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -118,7 +114,7 @@ _efl_animation_group_efl_object_constructor(Eo *eo_obj,
|
|||
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_duration_set(efl_super(eo_obj, MY_CLASS),
|
||||
EFL_ANIMATION_GROUP_DURATION_NONE);
|
||||
|
||||
return eo_obj;
|
||||
|
|
|
@ -9,14 +9,6 @@ _efl_animation_group_parallel_efl_animation_group_animation_add(Eo *eo_obj,
|
|||
|
||||
efl_animation_group_animation_add(efl_super(eo_obj, MY_CLASS),
|
||||
animation);
|
||||
|
||||
/* Total duration is calculated in efl_animation_total_duration_get() based
|
||||
* on the current group animation list.
|
||||
* Therefore, the calculated total duration should be set to update total
|
||||
* duration. */
|
||||
double total_duration =
|
||||
efl_animation_total_duration_get(eo_obj);
|
||||
efl_animation_total_duration_set(eo_obj, total_duration);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -28,14 +20,6 @@ _efl_animation_group_parallel_efl_animation_group_animation_del(Eo *eo_obj,
|
|||
|
||||
efl_animation_group_animation_del(efl_super(eo_obj, MY_CLASS),
|
||||
animation);
|
||||
|
||||
/* Total duration is calculated in efl_animation_total_duration_get() based
|
||||
* on the current group animation list.
|
||||
* Therefore, the calculated total duration should be set to update total
|
||||
* duration. */
|
||||
double total_duration =
|
||||
efl_animation_total_duration_get(eo_obj);
|
||||
efl_animation_total_duration_set(eo_obj, total_duration);
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
|
@ -95,9 +79,6 @@ _efl_animation_group_parallel_efl_animation_object_create(Eo *eo_obj,
|
|||
double duration = efl_animation_duration_get(eo_obj);
|
||||
efl_animation_object_duration_set(group_anim_obj, duration);
|
||||
|
||||
double total_duration = efl_animation_total_duration_get(eo_obj);
|
||||
efl_animation_object_total_duration_set(group_anim_obj, total_duration);
|
||||
|
||||
double start_delay_time = efl_animation_start_delay_get(eo_obj);
|
||||
efl_animation_object_start_delay_set(group_anim_obj, start_delay_time);
|
||||
|
||||
|
|
|
@ -8,13 +8,6 @@ _efl_animation_group_sequential_efl_animation_group_animation_add(Eo *eo_obj,
|
|||
if (!animation) return;
|
||||
|
||||
efl_animation_group_animation_add(efl_super(eo_obj, MY_CLASS), animation);
|
||||
|
||||
/* Total duration is calculated in efl_animation_total_duration_get() based
|
||||
* on the current group animation list.
|
||||
* Therefore, the calculated total duration should be set to update total
|
||||
* duration. */
|
||||
double total_duration = efl_animation_total_duration_get(eo_obj);
|
||||
efl_animation_total_duration_set(eo_obj, total_duration);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -25,13 +18,6 @@ _efl_animation_group_sequential_efl_animation_group_animation_del(Eo *eo_obj,
|
|||
if (!animation) return;
|
||||
|
||||
efl_animation_group_animation_del(efl_super(eo_obj, MY_CLASS), animation);
|
||||
|
||||
/* Total duration is calculated in efl_animation_total_duration_get() based
|
||||
* on the current group animation list.
|
||||
* Therefore, the calculated total duration should be set to update total
|
||||
* duration. */
|
||||
double total_duration = efl_animation_total_duration_get(eo_obj);
|
||||
efl_animation_total_duration_set(eo_obj, total_duration);
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
|
@ -89,9 +75,6 @@ _efl_animation_group_sequential_efl_animation_object_create(Eo *eo_obj,
|
|||
double duration = efl_animation_duration_get(eo_obj);
|
||||
efl_animation_object_duration_set(group_anim_obj, duration);
|
||||
|
||||
double total_duration = efl_animation_total_duration_get(eo_obj);
|
||||
efl_animation_object_total_duration_set(group_anim_obj, total_duration);
|
||||
|
||||
double start_delay_time = efl_animation_start_delay_get(eo_obj);
|
||||
efl_animation_object_start_delay_set(group_anim_obj, start_delay_time);
|
||||
|
||||
|
|
|
@ -49,12 +49,10 @@ _efl_animation_object_target_get(Eo *eo_obj EINA_UNUSED,
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_animation_object_duration_set(Eo *eo_obj,
|
||||
_efl_animation_object_duration_set(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Animation_Object_Data *pd,
|
||||
double duration)
|
||||
{
|
||||
efl_animation_object_total_duration_set(eo_obj, duration);
|
||||
|
||||
pd->duration = duration;
|
||||
}
|
||||
|
||||
|
@ -65,27 +63,11 @@ _efl_animation_object_duration_get(Eo *eo_obj EINA_UNUSED,
|
|||
return pd->duration;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_animation_object_duration_only_set(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Animation_Object_Data *pd,
|
||||
double duration)
|
||||
{
|
||||
pd->duration = duration;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_animation_object_total_duration_set(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Animation_Object_Data *pd,
|
||||
double total_duration)
|
||||
{
|
||||
pd->total_duration = total_duration;
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_animation_object_total_duration_get(Eo *eo_obj EINA_UNUSED,
|
||||
Efl_Animation_Object_Data *pd)
|
||||
{
|
||||
return pd->total_duration;
|
||||
return pd->duration;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -262,7 +244,7 @@ _animator_cb(void *data)
|
|||
|
||||
double paused_time = pd->paused_time;
|
||||
|
||||
double total_duration = pd->total_duration;
|
||||
double total_duration = efl_animation_object_total_duration_get(eo_obj);
|
||||
|
||||
pd->time.current = ecore_loop_time_get();
|
||||
double elapsed_time = pd->time.current - pd->time.begin;
|
||||
|
@ -351,7 +333,8 @@ end:
|
|||
static void
|
||||
_start(Eo *eo_obj, Efl_Animation_Object_Data *pd)
|
||||
{
|
||||
if (pd->total_duration < 0.0) return;
|
||||
double total_duration = efl_animation_object_total_duration_get(eo_obj);
|
||||
if (total_duration < 0.0) return;
|
||||
|
||||
//Save the current state of the target
|
||||
efl_animation_object_target_state_save(eo_obj);
|
||||
|
@ -511,7 +494,6 @@ _efl_animation_object_efl_object_constructor(Eo *eo_obj,
|
|||
pd->progress = 0.0;
|
||||
|
||||
pd->duration = 0.0;
|
||||
pd->total_duration = 0.0;
|
||||
|
||||
pd->repeat_mode = EFL_ANIMATION_OBJECT_REPEAT_MODE_RESTART;
|
||||
pd->repeat_count = 0;
|
||||
|
@ -559,9 +541,6 @@ 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);
|
||||
|
||||
EOAPI EFL_VOID_FUNC_BODYV(efl_animation_object_start_delay_set, EFL_FUNC_CALL(delay_time), double delay_time);
|
||||
|
@ -583,8 +562,6 @@ EOAPI EFL_FUNC_BODY_CONST(efl_animation_object_interpolator_get, Efl_Interpolato
|
|||
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_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), \
|
||||
EFL_OBJECT_OP_FUNC(efl_animation_object_start_delay_set, _efl_animation_object_start_delay_set), \
|
||||
EFL_OBJECT_OP_FUNC(efl_animation_object_start_delay_get, _efl_animation_object_start_delay_get), \
|
||||
|
|
|
@ -74,13 +74,7 @@ _efl_animation_object_group_efl_animation_object_duration_set(Eo *eo_obj,
|
|||
}
|
||||
|
||||
end:
|
||||
efl_animation_object_duration_only_set(efl_super(eo_obj, MY_CLASS),
|
||||
duration);
|
||||
|
||||
/* efl_animation_object_total_duration_get() should calculate the new total
|
||||
* duration. */
|
||||
double total_duration = efl_animation_object_total_duration_get(eo_obj);
|
||||
efl_animation_object_total_duration_set(eo_obj, total_duration);
|
||||
efl_animation_object_duration_set(efl_super(eo_obj, MY_CLASS), duration);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -126,7 +120,7 @@ _efl_animation_object_group_efl_object_constructor(Eo *eo_obj,
|
|||
pd->anim_objs = NULL;
|
||||
|
||||
//group animation object does not affect its child duration by default.
|
||||
efl_animation_object_duration_only_set(efl_super(eo_obj, MY_CLASS),
|
||||
efl_animation_object_duration_set(efl_super(eo_obj, MY_CLASS),
|
||||
EFL_ANIMATION_OBJECT_GROUP_DURATION_NONE);
|
||||
|
||||
return eo_obj;
|
||||
|
|
|
@ -66,14 +66,6 @@ _efl_animation_object_group_parallel_efl_animation_object_group_object_add(Eo *e
|
|||
/* Add member object data and append the data to the member object data
|
||||
* list. */
|
||||
_member_anim_obj_data_add(pd, anim_obj, 0);
|
||||
|
||||
/* Total duration is calculated in
|
||||
* efl_animation_object_total_duration_get() based on the current group
|
||||
* animation object list.
|
||||
* Therefore, the calculated total duration should be set to update total
|
||||
* duration. */
|
||||
double total_duration = efl_animation_object_total_duration_get(eo_obj);
|
||||
efl_animation_object_total_duration_set(eo_obj, total_duration);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -88,14 +80,6 @@ _efl_animation_object_group_parallel_efl_animation_object_group_object_del(Eo *e
|
|||
/* Delete member object data and remove the data from the member object
|
||||
* data list. */
|
||||
_member_anim_obj_data_del(pd, anim_obj);
|
||||
|
||||
/* Total duration is calculated in
|
||||
* efl_animation_object_total_duration_get() based on the current group
|
||||
* animation object list.
|
||||
* Therefore, the calculated total duration should be set to update total
|
||||
* duration. */
|
||||
double total_duration = efl_animation_object_total_duration_get(eo_obj);
|
||||
efl_animation_object_total_duration_set(eo_obj, total_duration);
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
|
|
|
@ -68,14 +68,6 @@ _efl_animation_object_group_sequential_efl_animation_object_group_object_add(Eo
|
|||
/* Add member object data and append the data to the member object data
|
||||
* list. */
|
||||
_member_anim_obj_data_add(pd, anim_obj, 0);
|
||||
|
||||
/* Total duration is calculated in
|
||||
* efl_animation_object_total_duration_get() based on the current group
|
||||
* animation object list.
|
||||
* Therefore, the calculated total duration should be set to update total
|
||||
* duration. */
|
||||
double total_duration = efl_animation_object_total_duration_get(eo_obj);
|
||||
efl_animation_object_total_duration_set(eo_obj, total_duration);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -90,14 +82,6 @@ _efl_animation_object_group_sequential_efl_animation_object_group_object_del(Eo
|
|||
/* Delete member object data and remove the data from the member object
|
||||
* data list. */
|
||||
_member_anim_obj_data_del(pd, anim_obj);
|
||||
|
||||
/* Total duration is calculated in
|
||||
* efl_animation_object_total_duration_get() based on the current group
|
||||
* animation object list.
|
||||
* Therefore, the calculated total duration should be set to update total
|
||||
* duration. */
|
||||
double total_duration = efl_animation_object_total_duration_get(eo_obj);
|
||||
efl_animation_object_total_duration_set(eo_obj, total_duration);
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
|
|
|
@ -34,7 +34,6 @@ typedef struct _Efl_Animation_Object_Data
|
|||
double progress;
|
||||
|
||||
double duration;
|
||||
double total_duration;
|
||||
double paused_time;
|
||||
|
||||
Efl_Animation_Object_Repeat_Mode repeat_mode;
|
||||
|
|
|
@ -11,7 +11,6 @@ typedef struct _Efl_Animation_Data
|
|||
Efl_Canvas_Object *target;
|
||||
|
||||
double duration;
|
||||
double total_duration;
|
||||
|
||||
double start_delay_time;
|
||||
|
||||
|
|
|
@ -182,9 +182,6 @@ _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);
|
||||
|
||||
double start_delay_time = efl_animation_start_delay_get(eo_obj);
|
||||
efl_animation_object_start_delay_set(anim_obj, start_delay_time);
|
||||
|
||||
|
|
|
@ -208,9 +208,6 @@ _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);
|
||||
|
||||
double start_delay_time = efl_animation_start_delay_get(eo_obj);
|
||||
efl_animation_object_start_delay_set(anim_obj, start_delay_time);
|
||||
|
||||
|
|
|
@ -150,9 +150,6 @@ _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);
|
||||
|
||||
double start_delay_time = efl_animation_start_delay_get(eo_obj);
|
||||
efl_animation_object_start_delay_set(anim_obj, start_delay_time);
|
||||
|
||||
|
|
Loading…
Reference in New Issue