aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_efl_anim_interpolator.c
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-01-16 09:49:13 -0500
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-16 11:17:13 -0600
commit6c8ab3fabca3c2ce8cc07b933540d2c9ddbfdba3 (patch)
tree5986b7ec8298ea6612955d7d05b62cf2ef68b919 /src/bin/elementary/test_efl_anim_interpolator.c
parentefl-mono: test on inout RwSlice. (diff)
downloadefl-6c8ab3fabca3c2ce8cc07b933540d2c9ddbfdba3.tar.gz
test_efl_anim_interpolator: Minor formatting fixes
NB: No functional changes Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Differential Revision: https://phab.enlightenment.org/D7643
Diffstat (limited to 'src/bin/elementary/test_efl_anim_interpolator.c')
-rw-r--r--src/bin/elementary/test_efl_anim_interpolator.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/bin/elementary/test_efl_anim_interpolator.c b/src/bin/elementary/test_efl_anim_interpolator.c
index 2eb30f69cf..ff5162e6ac 100644
--- a/src/bin/elementary/test_efl_anim_interpolator.c
+++ b/src/bin/elementary/test_efl_anim_interpolator.c
@@ -78,12 +78,12 @@ static void
_anim_ended_cb(void *data, const Efl_Event *event)
{
App_Data *ad = data;
+ int i;
printf("Animation has been ended!\n");
ad->running_anim_cnt--;
- int i;
for (i = 0; i < INTERP_NUM; i++)
{
if (ad->anim_obj[i] == event->object)
@@ -123,8 +123,8 @@ static void
_anim_start_all(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
App_Data *ad = data;
-
int i;
+
for (i = 0; i < INTERP_NUM; i++)
{
//Let Animation Object start animation
@@ -145,13 +145,16 @@ _win_del_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS
void
test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
+ int i;
+
App_Data *ad = calloc(1, sizeof(App_Data));
if (!ad) return;
const char *modes[] = {"LINEAR", "SINUSOIDAL", "DECELERATE", "ACCELERATE",
"DIVISOR_INTERP", "BOUNCE", "SPRING"};
- Evas_Object *win = elm_win_add(NULL, "Efl Animation Interpolator", ELM_WIN_BASIC);
+ Evas_Object *win =
+ elm_win_add(NULL, "Efl Animation Interpolator", ELM_WIN_BASIC);
elm_win_title_set(win, "Efl Animation Interpolator");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_smart_callback_add(win, "delete,request", _win_del_cb, ad);
@@ -162,10 +165,10 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
evas_object_resize(start_all_btn, WIN_W, BTN_H);
evas_object_move(start_all_btn, 0, (WIN_H - BTN_H));
evas_object_show(start_all_btn);
- evas_object_smart_callback_add(start_all_btn, "clicked", _anim_start_all, ad);
+ evas_object_smart_callback_add(start_all_btn, "clicked",
+ _anim_start_all, ad);
ad->start_all_btn = start_all_btn;
- int i;
for (i = 0; i < INTERP_NUM; i++)
{
Evas_Object *label = elm_label_add(win);
@@ -184,7 +187,8 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
evas_object_smart_callback_add(btn, "clicked", _anim_start, ad);
ad->btn[i] = btn;
- Efl_Canvas_Animation *anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win);
+ Efl_Canvas_Animation *anim =
+ efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win);
efl_animation_translate_set(anim, 0, 0, (WIN_W - BTN_W), 0);
efl_animation_duration_set(anim, 2.0);
efl_animation_final_state_keep_set(anim, EINA_FALSE);
@@ -194,19 +198,23 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
ad->anim[i] = anim;
//Create Animation Object from Animation
- Efl_Canvas_Animation_Player *anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
- efl_animation_player_animation_set(efl_added, anim),
- efl_animation_player_target_set(efl_added, btn));
+ Efl_Canvas_Animation_Player *anim_obj =
+ efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
+ efl_animation_player_animation_set(efl_added, anim),
+ efl_animation_player_target_set(efl_added, btn));
ad->anim_obj[i] = anim_obj;
//Register callback called when animation starts
- efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, ad);
+ efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED,
+ _anim_started_cb, ad);
//Register callback called when animation ends
- efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, ad);
+ efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED,
+ _anim_ended_cb, ad);
//Register callback called while animation is executed
- efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
+ efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING,
+ _anim_running_cb, NULL);
}
ad->running_anim_cnt = 0;