diff options
54 files changed, 686 insertions, 657 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index d5418d461c..4902319f4e 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -43,15 +43,15 @@ evas_canvas_eolian_pub_files = \ lib/evas/canvas/efl_input_hold.eo \ lib/evas/canvas/efl_input_focus.eo \ lib/evas/canvas/efl_gfx_map.eo \ - lib/evas/canvas/efl_animation.eo \ - lib/evas/canvas/efl_animation_alpha.eo \ - 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_group_parallel.eo \ - lib/evas/canvas/efl_animation_group_sequential.eo \ - lib/evas/canvas/efl_animation_player.eo \ + lib/evas/canvas/efl_canvas_animation.eo \ + lib/evas/canvas/efl_canvas_animation_alpha.eo \ + lib/evas/canvas/efl_canvas_animation_rotate.eo \ + lib/evas/canvas/efl_canvas_animation_scale.eo \ + lib/evas/canvas/efl_canvas_animation_translate.eo \ + lib/evas/canvas/efl_canvas_animation_group.eo \ + lib/evas/canvas/efl_canvas_animation_group_parallel.eo \ + lib/evas/canvas/efl_canvas_animation_group_sequential.eo \ + lib/evas/canvas/efl_canvas_animation_player.eo \ $(NULL) evas_gesture_eolian_pub_files = \ @@ -83,7 +83,7 @@ evas_gesture_eolian_priv_files = \ evas_canvas_eolian_type_files = \ lib/evas/canvas/evas_canvas3d_types.eot \ - lib/evas/canvas/efl_animation_types.eot + lib/evas/canvas/efl_canvas_animation_types.eot evas_gesture_eolian_type_files = \ lib/evas/gesture/efl_gesture_types.eot @@ -172,15 +172,15 @@ lib/evas/canvas/evas_image_private.h \ lib/evas/canvas/evas_polygon_private.h \ lib/evas/canvas/efl_canvas_surface.h \ lib/evas/common3d/primitives/primitive_common.h \ -lib/evas/canvas/efl_animation_private.h \ -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_group_parallel_private.h \ -lib/evas/canvas/efl_animation_group_sequential_private.h \ -lib/evas/canvas/efl_animation_player_private.h \ +lib/evas/canvas/efl_canvas_animation_private.h \ +lib/evas/canvas/efl_canvas_animation_alpha_private.h \ +lib/evas/canvas/efl_canvas_animation_rotate_private.h \ +lib/evas/canvas/efl_canvas_animation_scale_private.h \ +lib/evas/canvas/efl_canvas_animation_translate_private.h \ +lib/evas/canvas/efl_canvas_animation_group_private.h \ +lib/evas/canvas/efl_canvas_animation_group_parallel_private.h \ +lib/evas/canvas/efl_canvas_animation_group_sequential_private.h \ +lib/evas/canvas/efl_canvas_animation_player_private.h \ lib/evas/canvas/evas_stack.x \ lib/evas/gesture/efl_gesture_private.h @@ -267,15 +267,15 @@ lib/evas/canvas/efl_input_key.c \ lib/evas/canvas/efl_input_pointer.c \ lib/evas/canvas/efl_input_hold.c \ lib/evas/canvas/efl_input_focus.c \ -lib/evas/canvas/efl_animation.c \ -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_group_parallel.c \ -lib/evas/canvas/efl_animation_group_sequential.c \ -lib/evas/canvas/efl_animation_player.c \ +lib/evas/canvas/efl_canvas_animation.c \ +lib/evas/canvas/efl_canvas_animation_alpha.c \ +lib/evas/canvas/efl_canvas_animation_rotate.c \ +lib/evas/canvas/efl_canvas_animation_scale.c \ +lib/evas/canvas/efl_canvas_animation_translate.c \ +lib/evas/canvas/efl_canvas_animation_group.c \ +lib/evas/canvas/efl_canvas_animation_group_parallel.c \ +lib/evas/canvas/efl_canvas_animation_group_sequential.c \ +lib/evas/canvas/efl_canvas_animation_player.c \ lib/evas/gesture/efl_gesture_touch.c \ lib/evas/gesture/efl_gesture.c \ lib/evas/gesture/efl_gesture_tap.c \ diff --git a/src/bin/elementary/test_efl_anim_alpha.c b/src/bin/elementary/test_efl_anim_alpha.c index 90e0f43fc8..f98793cd71 100644 --- a/src/bin/elementary/test_efl_anim_alpha.c +++ b/src/bin/elementary/test_efl_anim_alpha.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *show_anim; - Efl_Animation *hide_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *show_anim; + Efl_Canvas_Animation *hide_anim; + Efl_Canvas_Animation_Player *anim_obj; Eina_Bool is_btn_visible; } App_Data; @@ -27,7 +27,7 @@ _anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -83,13 +83,13 @@ test_efl_anim_alpha(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * evas_object_show(btn); //Show Animation - Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(show_anim, 0.0, 1.0); efl_animation_duration_set(show_anim, 1.0); efl_animation_final_state_keep_set(show_anim, EINA_TRUE); //Hide Animation - Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(hide_anim, 1.0, 0.0); efl_animation_duration_set(hide_anim, 1.0); efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); @@ -97,7 +97,7 @@ test_efl_anim_alpha(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * //Initialize App Data ad->show_anim = show_anim; ad->hide_anim = hide_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts diff --git a/src/bin/elementary/test_efl_anim_event_anim.c b/src/bin/elementary/test_efl_anim_event_anim.c index 88c465ef03..29b4f2850e 100644 --- a/src/bin/elementary/test_efl_anim_event_anim.c +++ b/src/bin/elementary/test_efl_anim_event_anim.c @@ -5,7 +5,7 @@ typedef struct _App_Data { - Efl_Animation_Player *target; + Efl_Canvas_Animation_Player *target; Eina_Bool is_btn_visible; } App_Data; @@ -57,7 +57,7 @@ test_efl_anim_event_anim(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v evas_object_move(btn, 100, 50); //Show Animation - Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(show_anim, 0.0, 1.0); efl_animation_duration_set(show_anim, 1.0); efl_animation_final_state_keep_set(show_anim, EINA_TRUE); @@ -67,7 +67,7 @@ test_efl_anim_event_anim(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v evas_object_show(btn); //Hide Animation - Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(hide_anim, 1.0, 0.0); efl_animation_duration_set(hide_anim, 1.0); efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); diff --git a/src/bin/elementary/test_efl_anim_group_parallel.c b/src/bin/elementary/test_efl_anim_group_parallel.c index 1250d223ca..c1c5d1a157 100644 --- a/src/bin/elementary/test_efl_anim_group_parallel.c +++ b/src/bin/elementary/test_efl_anim_group_parallel.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *parallel_show_anim; - Efl_Animation *parallel_hide_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *parallel_show_anim; + Efl_Canvas_Animation *parallel_hide_anim; + Efl_Canvas_Animation_Player *anim_obj; Eina_Bool is_btn_visible; } App_Data; @@ -28,7 +28,7 @@ _anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -85,19 +85,19 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE //Show Animation - Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(show_anim, 0.0, 1.0); //Rotate from 45 to 0 degrees Animation - Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5); //Scale Animation to zoom out - Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); //Show Parallel Group Animation - Efl_Animation *parallel_show_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, win); + Efl_Canvas_Animation *parallel_show_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win); efl_animation_duration_set(parallel_show_anim, 1.0); efl_animation_final_state_keep_set(parallel_show_anim, EINA_TRUE); @@ -108,19 +108,19 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE //Hide Animation - Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(hide_anim, 1.0, 0.0); //Rotate from 0 to 45 degrees Animation - Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5); //Scale Animation to zoom in - Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); //Hide Parallel Group Animation - Efl_Animation *parallel_hide_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, win); + Efl_Canvas_Animation *parallel_hide_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win); efl_animation_duration_set(parallel_hide_anim, 1.0); efl_animation_final_state_keep_set(parallel_hide_anim, EINA_TRUE); @@ -133,7 +133,7 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE //Initialize App Data ad->parallel_show_anim = parallel_show_anim; ad->parallel_hide_anim = parallel_hide_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts diff --git a/src/bin/elementary/test_efl_anim_group_sequential.c b/src/bin/elementary/test_efl_anim_group_sequential.c index abb6056f01..fe2d32324d 100644 --- a/src/bin/elementary/test_efl_anim_group_sequential.c +++ b/src/bin/elementary/test_efl_anim_group_sequential.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *sequential_show_anim; - Efl_Animation *sequential_hide_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *sequential_show_anim; + Efl_Canvas_Animation *sequential_hide_anim; + Efl_Canvas_Animation_Player *anim_obj; Eina_Bool is_btn_visible; } App_Data; @@ -27,7 +27,7 @@ _anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -85,19 +85,19 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU /* Animations to hide button */ //Rotate from 0 to 45 degrees Animation - Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5); //Scale Animation to zoom in - Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); //Hide Animation - Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(hide_anim, 1.0, 0.0); //Hide Sequential Group Animation - Efl_Animation *sequential_hide_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, win); + Efl_Canvas_Animation *sequential_hide_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS, win); efl_animation_duration_set(sequential_hide_anim, 1.0); efl_animation_final_state_keep_set(sequential_hide_anim, EINA_TRUE); @@ -109,22 +109,22 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU /* Animations to show button */ //Show Animation - Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(show_anim, 0.0, 1.0); efl_animation_duration_set(show_anim, 1.0); //Scale Animation to zoom out - Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); efl_animation_duration_set(scale_half_anim, 1.0); //Rotate from 45 to 0 degrees Animation - Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5); efl_animation_duration_set(ccw_45_degrees_anim, 1.0); //Show Sequential Group Animation - Efl_Animation *sequential_show_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, win); + Efl_Canvas_Animation *sequential_show_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS, win); efl_animation_final_state_keep_set(sequential_show_anim, EINA_TRUE); //efl_animation_duration_set() is called for each animation not to set the same duration @@ -138,7 +138,7 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU //Initialize App Data ad->sequential_show_anim = sequential_show_anim; ad->sequential_hide_anim = sequential_hide_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts diff --git a/src/bin/elementary/test_efl_anim_interpolator.c b/src/bin/elementary/test_efl_anim_interpolator.c index 376e726fd1..d70fb561f8 100644 --- a/src/bin/elementary/test_efl_anim_interpolator.c +++ b/src/bin/elementary/test_efl_anim_interpolator.c @@ -12,8 +12,8 @@ typedef struct _App_Data { - Efl_Animation *anim[INTERP_NUM]; - Efl_Animation_Player *anim_obj[INTERP_NUM]; + Efl_Canvas_Animation *anim[INTERP_NUM]; + Efl_Canvas_Animation_Player *anim_obj[INTERP_NUM]; Evas_Object *btn[INTERP_NUM]; Evas_Object *start_all_btn; @@ -100,7 +100,7 @@ _anim_ended_cb(void *data, const Efl_Event *event) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -184,7 +184,7 @@ 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_Animation *anim = efl_add(EFL_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,7 +194,7 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, ad->anim[i] = anim; //Create Animation Object from Animation - Efl_Animation_Player *anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + 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; diff --git a/src/bin/elementary/test_efl_anim_pause.c b/src/bin/elementary/test_efl_anim_pause.c index ae5b3a50ed..3ba71cf71a 100644 --- a/src/bin/elementary/test_efl_anim_pause.c +++ b/src/bin/elementary/test_efl_anim_pause.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *show_anim; - Efl_Animation *hide_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *show_anim; + Efl_Canvas_Animation *hide_anim; + Efl_Canvas_Animation_Player *anim_obj; Evas_Object *pause_btn; @@ -38,7 +38,7 @@ _anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -120,13 +120,13 @@ test_efl_anim_pause(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * evas_object_show(btn); //Show Animation - Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(show_anim, 0.0, 1.0); efl_animation_duration_set(show_anim, 2.0); efl_animation_final_state_keep_set(show_anim, EINA_TRUE); //Hide Animation - Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(hide_anim, 1.0, 0.0); efl_animation_duration_set(hide_anim, 2.0); efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); @@ -156,7 +156,7 @@ test_efl_anim_pause(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * //Initialize App Data ad->show_anim = show_anim; ad->hide_anim = hide_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts diff --git a/src/bin/elementary/test_efl_anim_repeat.c b/src/bin/elementary/test_efl_anim_repeat.c index 47da4f1a92..e02ba75aa5 100644 --- a/src/bin/elementary/test_efl_anim_repeat.c +++ b/src/bin/elementary/test_efl_anim_repeat.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *show_anim; - Efl_Animation *hide_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *show_anim; + Efl_Canvas_Animation *hide_anim; + Efl_Canvas_Animation_Player *anim_obj; Evas_Object *start_btn; Evas_Object *repeat_count_spin; @@ -16,15 +16,15 @@ typedef struct _App_Data Eina_Bool is_btn_visible; } App_Data; -Efl_Animation_Repeat_Mode +Efl_Canvas_Animation_Repeat_Mode _anim_repeat_mode_get(Evas_Object *spinner) { int value = elm_spinner_value_get(spinner); if (value == 0) - return EFL_ANIMATION_REPEAT_MODE_RESTART; + return EFL_CANVAS_ANIMATION_REPEAT_MODE_RESTART; else - return EFL_ANIMATION_REPEAT_MODE_REVERSE; + return EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE; } static void @@ -40,8 +40,8 @@ _anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED) printf("Animation has been ended!\n"); - Efl_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin); - if (repeat_mode == EFL_ANIMATION_REPEAT_MODE_REVERSE) + Efl_Canvas_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin); + if (repeat_mode == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) { int repeat_count = elm_spinner_value_get(ad->repeat_count_spin); if (repeat_count % 2 == 1) @@ -62,7 +62,7 @@ _anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -77,7 +77,7 @@ _start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED int repeat_count = elm_spinner_value_get(ad->repeat_count_spin); elm_object_disabled_set(ad->repeat_count_spin, EINA_TRUE); - Efl_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin); + Efl_Canvas_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin); elm_object_disabled_set(ad->repeat_mode_spin, EINA_TRUE); if (ad->is_btn_visible) @@ -136,13 +136,13 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void evas_object_show(btn); //Show Animation - Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(show_anim, 0.0, 1.0); efl_animation_duration_set(show_anim, 1.0); efl_animation_final_state_keep_set(show_anim, EINA_TRUE); //Hide Animation - Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(hide_anim, 1.0, 0.0); efl_animation_duration_set(hide_anim, 1.0); efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); @@ -183,7 +183,7 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void //Initialize App Data ad->show_anim = show_anim; ad->hide_anim = hide_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL); diff --git a/src/bin/elementary/test_efl_anim_rotate.c b/src/bin/elementary/test_efl_anim_rotate.c index 888e7ef1e4..ff19b4cf97 100644 --- a/src/bin/elementary/test_efl_anim_rotate.c +++ b/src/bin/elementary/test_efl_anim_rotate.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *cw_45_degrees_anim; - Efl_Animation *ccw_45_degrees_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *cw_45_degrees_anim; + Efl_Canvas_Animation *ccw_45_degrees_anim; + Efl_Canvas_Animation_Player *anim_obj; Eina_Bool is_btn_rotated; } App_Data; @@ -27,7 +27,7 @@ _anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -83,13 +83,13 @@ test_efl_anim_rotate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void evas_object_show(btn); //Rotate from 0 to 45 degrees Animation - Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0,NULL, 0.5, 0.5); efl_animation_duration_set(cw_45_degrees_anim, 1.0); efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); //Rotate from 45 to 0 degrees Animation - Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5); efl_animation_duration_set(ccw_45_degrees_anim, 1.0); efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); @@ -98,7 +98,7 @@ test_efl_anim_rotate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void ad->cw_45_degrees_anim = cw_45_degrees_anim; ad->ccw_45_degrees_anim = ccw_45_degrees_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL); @@ -150,13 +150,13 @@ test_efl_anim_rotate_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS evas_object_show(pivot); //Rotate from 0 to 45 degrees Animation - Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, pivot, 0.5, 0.5); efl_animation_duration_set(cw_45_degrees_anim, 1.0); efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); //Rotate from 45 to 0 degrees Animation - Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, pivot, 0.5, 0.5); efl_animation_duration_set(ccw_45_degrees_anim, 1.0); efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); @@ -164,7 +164,7 @@ test_efl_anim_rotate_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS //Initialize App Data ad->cw_45_degrees_anim = cw_45_degrees_anim; ad->ccw_45_degrees_anim = ccw_45_degrees_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts @@ -218,13 +218,13 @@ test_efl_anim_rotate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS evas_object_show(abs_center); //Rotate from 0 to 45 degrees Animation - Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_absolute_set(cw_45_degrees_anim, 0.0, 45.0, 0, 0); efl_animation_duration_set(cw_45_degrees_anim, 1.0); efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); //Rotate from 45 to 0 degrees Animation - Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win); + Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); efl_animation_rotate_absolute_set(ccw_45_degrees_anim, 45.0, 0.0, 0, 0); efl_animation_duration_set(ccw_45_degrees_anim, 1.0); efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); @@ -232,7 +232,7 @@ test_efl_anim_rotate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS //Initialize App Data ad->cw_45_degrees_anim = cw_45_degrees_anim; ad->ccw_45_degrees_anim = ccw_45_degrees_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts diff --git a/src/bin/elementary/test_efl_anim_scale.c b/src/bin/elementary/test_efl_anim_scale.c index 9cc0f768e7..d3641bf02c 100644 --- a/src/bin/elementary/test_efl_anim_scale.c +++ b/src/bin/elementary/test_efl_anim_scale.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *scale_double_anim; - Efl_Animation *scale_half_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *scale_double_anim; + Efl_Canvas_Animation *scale_half_anim; + Efl_Canvas_Animation_Player *anim_obj; Eina_Bool is_btn_scaled; } App_Data; @@ -27,7 +27,7 @@ _anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -83,13 +83,13 @@ test_efl_anim_scale(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * evas_object_show(btn); //Scale Animation to zoom in - Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); efl_animation_duration_set(scale_double_anim, 1.0); efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); //Scale Animation to zoom out - Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); efl_animation_duration_set(scale_half_anim, 1.0); efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); @@ -97,7 +97,7 @@ test_efl_anim_scale(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * //Initialize App Data ad->scale_double_anim = scale_double_anim; ad->scale_half_anim = scale_half_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts @@ -152,13 +152,13 @@ test_efl_anim_scale_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE evas_object_show(pivot); //Scale Animation to zoom in - Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, pivot, 0.5, 0.5); efl_animation_duration_set(scale_double_anim, 1.0); efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); //Scale Animation to zoom out - Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, pivot, 0.5, 0.5); efl_animation_duration_set(scale_half_anim, 1.0); efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); @@ -166,7 +166,7 @@ test_efl_anim_scale_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE //Initialize App Data ad->scale_double_anim = scale_double_anim; ad->scale_half_anim = scale_half_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL); @@ -218,13 +218,13 @@ test_efl_anim_scale_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE evas_object_show(abs_center); //Scale Animation to zoom in - Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_absolute_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, 0, 0); efl_animation_duration_set(scale_double_anim, 1.0); efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); //Scale Animation to zoom out - Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win); + Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); efl_animation_scale_absolute_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, 0, 0); efl_animation_duration_set(scale_half_anim, 1.0); efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); @@ -232,7 +232,7 @@ test_efl_anim_scale_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE //Initialize App Data ad->scale_double_anim = scale_double_anim; ad->scale_half_anim = scale_half_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL); diff --git a/src/bin/elementary/test_efl_anim_start_delay.c b/src/bin/elementary/test_efl_anim_start_delay.c index 06101e2eeb..768ba0c694 100644 --- a/src/bin/elementary/test_efl_anim_start_delay.c +++ b/src/bin/elementary/test_efl_anim_start_delay.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *show_anim; - Efl_Animation *hide_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *show_anim; + Efl_Canvas_Animation *hide_anim; + Efl_Canvas_Animation_Player *anim_obj; Evas_Object *start_delay_spin; @@ -33,7 +33,7 @@ _anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -98,13 +98,13 @@ test_efl_anim_start_delay(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, evas_object_show(btn); //Show Animation - Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(show_anim, 0.0, 1.0); efl_animation_duration_set(show_anim, 1.0); efl_animation_final_state_keep_set(show_anim, EINA_TRUE); //Hide Animation - Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win); + Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); efl_animation_alpha_set(hide_anim, 1.0, 0.0); efl_animation_duration_set(hide_anim, 1.0); efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); @@ -134,7 +134,7 @@ test_efl_anim_start_delay(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, //Initialize App Data ad->show_anim = show_anim; ad->hide_anim = hide_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts diff --git a/src/bin/elementary/test_efl_anim_translate.c b/src/bin/elementary/test_efl_anim_translate.c index 2ba1ff4e19..e3faebebe8 100644 --- a/src/bin/elementary/test_efl_anim_translate.c +++ b/src/bin/elementary/test_efl_anim_translate.c @@ -5,9 +5,9 @@ typedef struct _App_Data { - Efl_Animation *translate_rb_anim; - Efl_Animation *translate_lt_anim; - Efl_Animation_Player *anim_obj; + Efl_Canvas_Animation *translate_rb_anim; + Efl_Canvas_Animation *translate_lt_anim; + Efl_Canvas_Animation_Player *anim_obj; Eina_Bool is_btn_translated; } App_Data; @@ -27,7 +27,7 @@ _anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) static void _anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) { - Efl_Animation_Player_Running_Event_Info *event_info = event->info; + Efl_Canvas_Animation_Player_Running_Event_Info *event_info = event->info; double progress = event_info->progress; printf("Animation is running! Current progress(%lf)\n", progress); } @@ -83,13 +83,13 @@ test_efl_anim_translate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo evas_object_show(btn); //Translate Animation to right bottom relatively - Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win); + Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); efl_animation_translate_set(translate_rb_anim, 0, 0, 100, 100); efl_animation_duration_set(translate_rb_anim, 1.0); efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE); //Translate Animation to left top relatively - Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win); + Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); efl_animation_translate_set(translate_lt_anim, 100, 100, 0, 0); efl_animation_duration_set(translate_lt_anim, 1.0); efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE); @@ -97,7 +97,7 @@ test_efl_anim_translate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo //Initialize App Data ad->translate_rb_anim = translate_rb_anim; ad->translate_lt_anim = translate_lt_anim; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL); @@ -149,13 +149,13 @@ test_efl_anim_translate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_U evas_object_show(abs_center); //Translate Animation to right bottom absolutely - Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win); + Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); efl_animation_translate_absolute_set(translate_rb_anim, 0, 0, 100, 100); efl_animation_duration_set(translate_rb_anim, 1.0); efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE); //Translate Animation to left top absolutely - Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win); + Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); efl_animation_translate_absolute_set(translate_lt_anim, 100, 100, 0, 0); efl_animation_duration_set(translate_lt_anim, 1.0); efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE); @@ -164,7 +164,7 @@ test_efl_anim_translate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_U ad->translate_rb_anim = translate_rb_anim; ad->translate_lt_anim = translate_lt_anim; ad->is_btn_translated = EINA_FALSE; - ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win, + ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, efl_animation_player_target_set(efl_added, btn)); //Register callback called when animation starts efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL); diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h index f69d69d12f..5c54312c61 100644 --- a/src/lib/evas/Evas_Common.h +++ b/src/lib/evas/Evas_Common.h @@ -3329,6 +3329,10 @@ EAPI const Eina_List *evas_font_path_global_list(void) EINA_WARN_UNUSED_R */ EAPI void evas_font_reinit(void); + +/* this is now public, non-beta api forever because someone didn't add a beta + api guard. + */ #ifndef _EFL_ANIMATION_EO_CLASS_TYPE #define _EFL_ANIMATION_EO_CLASS_TYPE @@ -3452,7 +3456,13 @@ struct _Efl_Animation_Player_Running_Event_Info #define EFL_ANIMATION_REPEAT_INFINITE -1 #define EFL_ANIMATION_PLAYER_REPEAT_INFINITE -1 + +#ifdef EFL_BETA_API_SUPPORT +struct _Efl_Canvas_Animation_Player_Running_Event_Info +{ + double progress; +}; +#endif /** * @} */ - diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index da7553d176..eafe8bbcbf 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -50,19 +50,19 @@ * @} */ -#include "canvas/efl_animation_types.eot.h" +#include "canvas/efl_canvas_animation_types.eot.h" #include "canvas/efl_canvas_object.eo.h" -#include "canvas/efl_animation.eo.h" -#include "canvas/efl_animation_alpha.eo.h" -#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_group_parallel.eo.h" -#include "canvas/efl_animation_group_sequential.eo.h" -#include "canvas/efl_animation_player.eo.h" +#include "canvas/efl_canvas_animation.eo.h" +#include "canvas/efl_canvas_animation_alpha.eo.h" +#include "canvas/efl_canvas_animation_rotate.eo.h" +#include "canvas/efl_canvas_animation_scale.eo.h" +#include "canvas/efl_canvas_animation_translate.eo.h" +#include "canvas/efl_canvas_animation_group.eo.h" +#include "canvas/efl_canvas_animation_group_parallel.eo.h" +#include "canvas/efl_canvas_animation_group_sequential.eo.h" +#include "canvas/efl_canvas_animation_player.eo.h" #endif /* EFL_EO_API_SUPPORT */ diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index c6a3b5f63b..e5c70334ab 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -8088,4 +8088,15 @@ EAPI void evas_object_text_filter_source_set(Evas_Object *obj, const char *name, */ EAPI Evas_Object *evas_object_event_grabber_add(Evas *e); #include "canvas/efl_canvas_object_event_grabber.eo.legacy.h" + +#include "canvas/efl_canvas_animation_alpha.eo.legacy.h" +#include "canvas/efl_canvas_animation.eo.legacy.h" +#include "canvas/efl_canvas_animation_group.eo.legacy.h" +#include "canvas/efl_canvas_animation_group_parallel.eo.legacy.h" +#include "canvas/efl_canvas_animation_group_sequential.eo.legacy.h" +#include "canvas/efl_canvas_animation_player.eo.legacy.h" +#include "canvas/efl_canvas_animation_rotate.eo.legacy.h" +#include "canvas/efl_canvas_animation_scale.eo.legacy.h" +#include "canvas/efl_canvas_animation_translate.eo.legacy.h" + #endif diff --git a/src/lib/evas/canvas/efl_animation.c b/src/lib/evas/canvas/efl_animation.c deleted file mode 100644 index f1ad508517..0000000000 --- a/src/lib/evas/canvas/efl_animation.c +++ /dev/null @@ -1,138 +0,0 @@ -#include "efl_animation_private.h" - -#define MY_CLASS EFL_ANIMATION_CLASS - -EOLIAN static void -_efl_animation_duration_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd, - double sec) -{ - pd->duration = sec; -} - -EOLIAN static double -_efl_animation_duration_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd) -{ - return pd->duration; -} - -EOLIAN static void -_efl_animation_final_state_keep_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd, - Eina_Bool keep) -{ - if (pd->keep_final_state == keep) return; - - pd->keep_final_state = !!keep; -} - -EOLIAN static Eina_Bool -_efl_animation_final_state_keep_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd) -{ - return pd->keep_final_state; -} - -EOLIAN static void -_efl_animation_repeat_mode_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd, - Efl_Animation_Repeat_Mode mode) -{ - if ((mode == EFL_ANIMATION_REPEAT_MODE_RESTART) || - (mode == EFL_ANIMATION_REPEAT_MODE_REVERSE)) - pd->repeat_mode = mode; -} - -EOLIAN static Efl_Animation_Repeat_Mode -_efl_animation_repeat_mode_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd) -{ - return pd->repeat_mode; -} - -EOLIAN static void -_efl_animation_repeat_count_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd, - int count) -{ - //EFL_ANIMATION_REPEAT_INFINITE repeats animation infinitely - if ((count < 0) && (count != EFL_ANIMATION_REPEAT_INFINITE)) return; - - pd->repeat_count = count; -} - -EOLIAN static int -_efl_animation_repeat_count_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd) -{ - return pd->repeat_count; -} - -EOLIAN static void -_efl_animation_start_delay_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd, - double sec) -{ - if (sec < 0.0) return; - - pd->start_delay_time = sec; -} - -EOLIAN static double -_efl_animation_start_delay_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd) -{ - return pd->start_delay_time; -} - -EOLIAN static void -_efl_animation_interpolator_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd, - Efl_Interpolator *interpolator) -{ - pd->interpolator = interpolator; -} - -EOLIAN static Efl_Interpolator * -_efl_animation_interpolator_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Data *pd) -{ - return pd->interpolator; -} - -EOLIAN static double -_efl_animation_animation_apply(Eo *eo_obj, - Efl_Animation_Data *pd EINA_UNUSED, - double progress, - Efl_Canvas_Object *target EINA_UNUSED) -{ - Efl_Interpolator *interpolator = efl_animation_interpolator_get(eo_obj); - if (interpolator) - progress = efl_interpolator_interpolate(interpolator, progress); - - return progress; -} - -EOLIAN static double -_efl_animation_efl_playable_length_get(Eo *eo_obj, Efl_Animation_Data *pd EINA_UNUSED) -{ - if (efl_animation_repeat_count_get(eo_obj) == EFL_ANIMATION_REPEAT_INFINITE) - { - //TODO: what's correct? - return (double)EFL_ANIMATION_REPEAT_INFINITE; - } - - return (efl_animation_duration_get(eo_obj) * (efl_animation_repeat_count_get(eo_obj) + 1)); -} - -EOLIAN static Eina_Bool -_efl_animation_efl_playable_playable_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd EINA_UNUSED) -{ - return EINA_TRUE; -} - -EOLIAN static Eina_Bool -_efl_animation_efl_playable_seekable_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd EINA_UNUSED) -{ - return EINA_TRUE; -} - -#include "efl_animation.eo.c" diff --git a/src/lib/evas/canvas/efl_animation_alpha_private.h b/src/lib/evas/canvas/efl_animation_alpha_private.h deleted file mode 100644 index d1861df092..0000000000 --- a/src/lib/evas/canvas/efl_animation_alpha_private.h +++ /dev/null @@ -1,19 +0,0 @@ -#define EFL_ANIMATION_PROTECTED - -#include "evas_common_private.h" -#include <Ecore.h> -#include "efl_animation_private.h" - -#define EFL_ANIMATION_ALPHA_DATA_GET(o, pd) \ - Efl_Animation_Alpha_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_ALPHA_CLASS) - -typedef struct _Efl_Animation_Alpha_Property -{ - double alpha; -} Efl_Animation_Alpha_Property; - -typedef struct _Efl_Animation_Alpha_Data -{ - Efl_Animation_Alpha_Property from; - Efl_Animation_Alpha_Property to; -} Efl_Animation_Alpha_Data; diff --git a/src/lib/evas/canvas/efl_animation_group.eo b/src/lib/evas/canvas/efl_animation_group.eo deleted file mode 100644 index ab42604821..0000000000 --- a/src/lib/evas/canvas/efl_animation_group.eo +++ /dev/null @@ -1,32 +0,0 @@ -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.duration { set; } - Efl.Animation.final_state_keep { set; } - Efl.Animation.interpolator { set; } - } -} diff --git a/src/lib/evas/canvas/efl_animation_group_parallel.eo b/src/lib/evas/canvas/efl_animation_group_parallel.eo deleted file mode 100644 index 944e2ad451..0000000000 --- a/src/lib/evas/canvas/efl_animation_group_parallel.eo +++ /dev/null @@ -1,13 +0,0 @@ -import efl_animation_types; - -class Efl.Animation.Group.Parallel (Efl.Animation.Group) -{ - [[Efl group parallel animation class]] - data: null; - methods { - } - implements { - Efl.Animation.duration { get; } - Efl.Animation.animation_apply; - } -} diff --git a/src/lib/evas/canvas/efl_animation_group_private.h b/src/lib/evas/canvas/efl_animation_group_private.h deleted file mode 100644 index 28c6b8b947..0000000000 --- a/src/lib/evas/canvas/efl_animation_group_private.h +++ /dev/null @@ -1,15 +0,0 @@ -#define EFL_ANIMATION_PROTECTED - -#include "evas_common_private.h" -#include <Ecore.h> - -#define MY_CLASS EFL_ANIMATION_GROUP_CLASS -#define MY_CLASS_NAME efl_class_name_get(MY_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_group_sequential.eo b/src/lib/evas/canvas/efl_animation_group_sequential.eo deleted file mode 100644 index 2124f23494..0000000000 --- a/src/lib/evas/canvas/efl_animation_group_sequential.eo +++ /dev/null @@ -1,13 +0,0 @@ -import efl_animation_types; - -class Efl.Animation.Group.Sequential (Efl.Animation.Group) -{ - [[Efl group sequential animation class]] - data: null; - methods { - } - implements { - Efl.Animation.duration { get; } - Efl.Animation.animation_apply; - } -} diff --git a/src/lib/evas/canvas/efl_animation_rotate_private.h b/src/lib/evas/canvas/efl_animation_rotate_private.h deleted file mode 100644 index 5cbd64848a..0000000000 --- a/src/lib/evas/canvas/efl_animation_rotate_private.h +++ /dev/null @@ -1,35 +0,0 @@ -#define EFL_ANIMATION_PROTECTED - -#include "evas_common_private.h" -#include <Ecore.h> -#include "efl_animation_private.h" - -#define EFL_ANIMATION_ROTATE_DATA_GET(o, pd) \ - Efl_Animation_Rotate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_ROTATE_CLASS) - -typedef struct _Efl_Animation_Rotate_Property -{ - double degree; -} Efl_Animation_Rotate_Property; - -typedef struct _Efl_Animation_Rotate_Absolute_Pivot -{ - Evas_Coord cx, cy; -} Efl_Animation_Rotate_Absolute_Pivot; - -typedef struct _Efl_Animation_Rotate_Relative_Pivot -{ - Efl_Canvas_Object *obj; - double cx, cy; -} Efl_Animation_Rotate_Relative_Pivot; - -typedef struct _Efl_Animation_Rotate_Data -{ - Efl_Animation_Rotate_Property from; - Efl_Animation_Rotate_Property to; - - Efl_Animation_Rotate_Absolute_Pivot abs_pivot; - Efl_Animation_Rotate_Relative_Pivot rel_pivot; - - Eina_Bool use_rel_pivot; -} Efl_Animation_Rotate_Data; diff --git a/src/lib/evas/canvas/efl_animation_scale_private.h b/src/lib/evas/canvas/efl_animation_scale_private.h deleted file mode 100644 index 603eac3cc8..0000000000 --- a/src/lib/evas/canvas/efl_animation_scale_private.h +++ /dev/null @@ -1,35 +0,0 @@ -#define EFL_ANIMATION_PROTECTED - -#include "evas_common_private.h" -#include <Ecore.h> -#include "efl_animation_private.h" - -#define EFL_ANIMATION_SCALE_DATA_GET(o, pd) \ - Efl_Animation_Scale_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_SCALE_CLASS) - -typedef struct _Efl_Animation_Scale_Property -{ - double scale_x, scale_y; -} Efl_Animation_Scale_Property; - -typedef struct _Efl_Animation_Scale_Absolute_Pivot -{ - Evas_Coord cx, cy; -} Efl_Animation_Scale_Absolute_Pivot; - -typedef struct _Efl_Animation_Scale_Relative_Pivot -{ - Efl_Canvas_Object *obj; - double cx, cy; -} Efl_Animation_Scale_Relative_Pivot; - -typedef struct _Efl_Animation_Scale_Data -{ - Efl_Animation_Scale_Property from; - Efl_Animation_Scale_Property to; - - Efl_Animation_Scale_Absolute_Pivot abs_pivot; - Efl_Animation_Scale_Relative_Pivot rel_pivot; - - Eina_Bool use_rel_pivot; -} Efl_Animation_Scale_Data; diff --git a/src/lib/evas/canvas/efl_animation_translate_private.h b/src/lib/evas/canvas/efl_animation_translate_private.h deleted file mode 100644 index 05f2f7c6f9..0000000000 --- a/src/lib/evas/canvas/efl_animation_translate_private.h +++ /dev/null @@ -1,22 +0,0 @@ -#define EFL_ANIMATION_PROTECTED - -#include "evas_common_private.h" -#include <Ecore.h> -#include "efl_animation_private.h" - -#define EFL_ANIMATION_TRANSLATE_DATA_GET(o, pd) \ - Efl_Animation_Translate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_TRANSLATE_CLASS) - -typedef struct _Efl_Animation_Translate_Property -{ - Evas_Coord move_x, move_y; - Evas_Coord x, y; -} Efl_Animation_Translate_Property; - -typedef struct _Efl_Animation_Translate_Data -{ - Efl_Animation_Translate_Property from; - Efl_Animation_Translate_Property to; - - Eina_Bool use_rel_move; -} Efl_Animation_Translate_Data; diff --git a/src/lib/evas/canvas/efl_canvas_animation.c b/src/lib/evas/canvas/efl_canvas_animation.c new file mode 100644 index 0000000000..8aee04d4d6 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation.c @@ -0,0 +1,138 @@ +#include "efl_canvas_animation_private.h" + +#define MY_CLASS EFL_CANVAS_ANIMATION_CLASS + +EOLIAN static void +_efl_canvas_animation_duration_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd, + double sec) +{ + pd->duration = sec; +} + +EOLIAN static double +_efl_canvas_animation_duration_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Data *pd) +{ + return pd->duration; +} + +EOLIAN static void +_efl_canvas_animation_final_state_keep_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd, + Eina_Bool keep) +{ + if (pd->keep_final_state == keep) return; + + pd->keep_final_state = !!keep; +} + +EOLIAN static Eina_Bool +_efl_canvas_animation_final_state_keep_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd) +{ + return pd->keep_final_state; +} + +EOLIAN static void +_efl_canvas_animation_repeat_mode_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd, + Efl_Canvas_Animation_Repeat_Mode mode) +{ + if ((mode == EFL_CANVAS_ANIMATION_REPEAT_MODE_RESTART) || + (mode == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE)) + pd->repeat_mode = mode; +} + +EOLIAN static Efl_Canvas_Animation_Repeat_Mode +_efl_canvas_animation_repeat_mode_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Data *pd) +{ + return pd->repeat_mode; +} + +EOLIAN static void +_efl_canvas_animation_repeat_count_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd, + int count) +{ + //EFL_ANIMATION_REPEAT_INFINITE repeats animation infinitely + if ((count < 0) && (count != EFL_ANIMATION_REPEAT_INFINITE)) return; + + pd->repeat_count = count; +} + +EOLIAN static int +_efl_canvas_animation_repeat_count_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Data *pd) +{ + return pd->repeat_count; +} + +EOLIAN static void +_efl_canvas_animation_start_delay_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd, + double sec) +{ + if (sec < 0.0) return; + + pd->start_delay_time = sec; +} + +EOLIAN static double +_efl_canvas_animation_start_delay_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd) +{ + return pd->start_delay_time; +} + +EOLIAN static void +_efl_canvas_animation_interpolator_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd, + Efl_Interpolator *interpolator) +{ + pd->interpolator = interpolator; +} + +EOLIAN static Efl_Interpolator * +_efl_canvas_animation_interpolator_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Data *pd) +{ + return pd->interpolator; +} + +EOLIAN static double +_efl_canvas_animation_animation_apply(Eo *eo_obj, + Efl_Canvas_Animation_Data *pd EINA_UNUSED, + double progress, + Efl_Canvas_Object *target EINA_UNUSED) +{ + Efl_Interpolator *interpolator = efl_animation_interpolator_get(eo_obj); + if (interpolator) + progress = efl_interpolator_interpolate(interpolator, progress); + + return progress; +} + +EOLIAN static double +_efl_canvas_animation_efl_playable_length_get(Eo *eo_obj, Efl_Canvas_Animation_Data *pd EINA_UNUSED) +{ + if (efl_animation_repeat_count_get(eo_obj) == EFL_ANIMATION_REPEAT_INFINITE) + { + //TODO: what's correct? + return (double)EFL_ANIMATION_REPEAT_INFINITE; + } + + return (efl_animation_duration_get(eo_obj) * (efl_animation_repeat_count_get(eo_obj) + 1)); +} + +EOLIAN static Eina_Bool +_efl_canvas_animation_efl_playable_playable_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Data *pd EINA_UNUSED) +{ + return EINA_TRUE; +} + +EOLIAN static Eina_Bool +_efl_canvas_animation_efl_playable_seekable_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Data *pd EINA_UNUSED) +{ + return EINA_TRUE; +} + +#include "efl_canvas_animation.eo.c" diff --git a/src/lib/evas/canvas/efl_animation.eo b/src/lib/evas/canvas/efl_canvas_animation.eo index 35f5739f0d..b3a2b22646 100644 --- a/src/lib/evas/canvas/efl_animation.eo +++ b/src/lib/evas/canvas/efl_canvas_animation.eo @@ -1,8 +1,9 @@ -import efl_animation_types; +import efl_canvas_animation_types; -class Efl.Animation (Efl.Object, Efl.Playable) +class Efl.Canvas.Animation (Efl.Object, Efl.Playable) { [[Efl animation class]] + eo_prefix: efl_animation; methods { @property final_state_keep { [[Keep final state property]] @@ -31,7 +32,7 @@ class Efl.Animation (Efl.Object, Efl.Playable) get { } values { - mode: Efl.Animation.Repeat_Mode; [[Repeat mode. EFL_ANIMATION_REPEAT_MODE_RESTART restarts animation when the animation ends and EFL_ANIMATION_REPEAT_MODE_REVERSE reverses animation when the animation ends.]] + mode: Efl.Canvas.Animation.Repeat_Mode; [[Repeat mode. EFL_ANIMATION_REPEAT_MODE_RESTART restarts animation when the animation ends and EFL_ANIMATION_REPEAT_MODE_REVERSE reverses animation when the animation ends.]] } } @property repeat_count { diff --git a/src/lib/evas/canvas/efl_animation_alpha.c b/src/lib/evas/canvas/efl_canvas_animation_alpha.c index 4da7165bac..82101423d8 100644 --- a/src/lib/evas/canvas/efl_animation_alpha.c +++ b/src/lib/evas/canvas/efl_canvas_animation_alpha.c @@ -1,10 +1,10 @@ -#include "efl_animation_alpha_private.h" +#include "efl_canvas_animation_alpha_private.h" -#define MY_CLASS EFL_ANIMATION_ALPHA_CLASS +#define MY_CLASS EFL_CANVAS_ANIMATION_ALPHA_CLASS EOLIAN static void -_efl_animation_alpha_alpha_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Alpha_Data *pd, +_efl_canvas_animation_alpha_alpha_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Alpha_Data *pd, double from_alpha, double to_alpha) { @@ -13,8 +13,8 @@ _efl_animation_alpha_alpha_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_alpha_alpha_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Alpha_Data *pd, +_efl_canvas_animation_alpha_alpha_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Alpha_Data *pd, double *from_alpha, double *to_alpha) { @@ -26,8 +26,8 @@ _efl_animation_alpha_alpha_get(Eo *eo_obj EINA_UNUSED, EOLIAN static double -_efl_animation_alpha_efl_animation_animation_apply(Eo *eo_obj, - Efl_Animation_Alpha_Data *pd EINA_UNUSED, +_efl_canvas_animation_alpha_efl_canvas_animation_animation_apply(Eo *eo_obj, + Efl_Canvas_Animation_Alpha_Data *pd EINA_UNUSED, double progress, Efl_Canvas_Object *target) { @@ -50,8 +50,8 @@ _efl_animation_alpha_efl_animation_animation_apply(Eo *eo_obj, } EOLIAN static Efl_Object * -_efl_animation_alpha_efl_object_constructor(Eo *eo_obj, - Efl_Animation_Alpha_Data *pd) +_efl_canvas_animation_alpha_efl_object_constructor(Eo *eo_obj, + Efl_Canvas_Animation_Alpha_Data *pd) { eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); @@ -61,4 +61,4 @@ _efl_animation_alpha_efl_object_constructor(Eo *eo_obj, return eo_obj; } -#include "efl_animation_alpha.eo.c" +#include "efl_canvas_animation_alpha.eo.c" diff --git a/src/lib/evas/canvas/efl_animation_alpha.eo b/src/lib/evas/canvas/efl_canvas_animation_alpha.eo index ab10138b13..78e2792619 100644 --- a/src/lib/evas/canvas/efl_animation_alpha.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_alpha.eo @@ -1,9 +1,10 @@ -import efl_animation_types; +import efl_canvas_animation_types; -class Efl.Animation.Alpha (Efl.Animation) +class Efl.Canvas.Animation.Alpha (Efl.Canvas.Animation) { [[Efl alpha animation class]] - data: Efl_Animation_Alpha_Data; + eo_prefix: efl_animation_alpha; + data: Efl_Canvas_Animation_Alpha_Data; methods { @property alpha { [[Alpha property]] @@ -19,6 +20,6 @@ class Efl.Animation.Alpha (Efl.Animation) } implements { Efl.Object.constructor; - Efl.Animation.animation_apply; + Efl.Canvas.Animation.animation_apply; } } diff --git a/src/lib/evas/canvas/efl_canvas_animation_alpha_private.h b/src/lib/evas/canvas/efl_canvas_animation_alpha_private.h new file mode 100644 index 0000000000..fc0b9e655f --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation_alpha_private.h @@ -0,0 +1,19 @@ +#define EFL_ANIMATION_PROTECTED + +#include "evas_common_private.h" +#include <Ecore.h> +#include "efl_canvas_animation_private.h" + +#define EFL_ANIMATION_ALPHA_DATA_GET(o, pd) \ + Efl_Canvas_Animation_Alpha_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_ALPHA_CLASS) + +typedef struct _Efl_Canvas_Animation_Alpha_Property +{ + double alpha; +} Efl_Canvas_Animation_Alpha_Property; + +typedef struct _Efl_Canvas_Animation_Alpha_Data +{ + Efl_Canvas_Animation_Alpha_Property from; + Efl_Canvas_Animation_Alpha_Property to; +} Efl_Canvas_Animation_Alpha_Data; diff --git a/src/lib/evas/canvas/efl_animation_group.c b/src/lib/evas/canvas/efl_canvas_animation_group.c index 1792f0e572..9049e5b831 100644 --- a/src/lib/evas/canvas/efl_animation_group.c +++ b/src/lib/evas/canvas/efl_canvas_animation_group.c @@ -1,9 +1,9 @@ -#include "efl_animation_group_private.h" +#include "efl_canvas_animation_group_private.h" EOLIAN static void -_efl_animation_group_animation_add(Eo *eo_obj, - Efl_Animation_Group_Data *pd, - Efl_Animation *animation) +_efl_canvas_animation_group_animation_add(Eo *eo_obj, + Efl_Canvas_Animation_Group_Data *pd, + Efl_Canvas_Animation *animation) { if (!animation) return; @@ -21,9 +21,9 @@ _efl_animation_group_animation_add(Eo *eo_obj, } EOLIAN static void -_efl_animation_group_animation_del(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Group_Data *pd, - Efl_Animation *animation) +_efl_canvas_animation_group_animation_del(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Group_Data *pd, + Efl_Canvas_Animation *animation) { Eina_List *list; if (!animation) return; @@ -42,15 +42,15 @@ _efl_animation_group_animation_del(Eo *eo_obj EINA_UNUSED, } EOLIAN static Eina_List * -_efl_animation_group_animations_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Group_Data *pd) +_efl_canvas_animation_group_animations_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Group_Data *pd) { return pd->animations; } EOLIAN static void -_efl_animation_group_efl_animation_duration_set(Eo *eo_obj, - Efl_Animation_Group_Data *pd, +_efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj, + Efl_Canvas_Animation_Group_Data *pd, double duration) { if (duration == EFL_ANIMATION_GROUP_DURATION_NONE) goto end; @@ -58,7 +58,7 @@ _efl_animation_group_efl_animation_duration_set(Eo *eo_obj, if (duration < 0.0) return; Eina_List *l; - Efl_Animation *anim; + Efl_Canvas_Animation *anim; EINA_LIST_FOREACH(pd->animations, l, anim) { efl_animation_duration_set(anim, duration); @@ -69,12 +69,12 @@ end: } EOLIAN static void -_efl_animation_group_efl_animation_final_state_keep_set(Eo *eo_obj, - Efl_Animation_Group_Data *pd, +_efl_canvas_animation_group_efl_canvas_animation_final_state_keep_set(Eo *eo_obj, + Efl_Canvas_Animation_Group_Data *pd, Eina_Bool keep_final_state) { Eina_List *l; - Efl_Animation *anim; + Efl_Canvas_Animation *anim; EINA_LIST_FOREACH(pd->animations, l, anim) { efl_animation_final_state_keep_set(anim, keep_final_state); @@ -84,12 +84,12 @@ _efl_animation_group_efl_animation_final_state_keep_set(Eo *eo_obj, } EOLIAN static void -_efl_animation_group_efl_animation_interpolator_set(Eo *eo_obj, - Efl_Animation_Group_Data *pd, +_efl_canvas_animation_group_efl_canvas_animation_interpolator_set(Eo *eo_obj, + Efl_Canvas_Animation_Group_Data *pd, Efl_Interpolator *interpolator) { Eina_List *l; - Efl_Animation *anim; + Efl_Canvas_Animation *anim; EINA_LIST_FOREACH(pd->animations, l, anim) { efl_animation_interpolator_set(anim, interpolator); @@ -99,8 +99,8 @@ _efl_animation_group_efl_animation_interpolator_set(Eo *eo_obj, } EOLIAN static Efl_Object * -_efl_animation_group_efl_object_constructor(Eo *eo_obj, - Efl_Animation_Group_Data *pd) +_efl_canvas_animation_group_efl_object_constructor(Eo *eo_obj, + Efl_Canvas_Animation_Group_Data *pd) { eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); @@ -113,10 +113,10 @@ _efl_animation_group_efl_object_constructor(Eo *eo_obj, } EOLIAN static void -_efl_animation_group_efl_object_destructor(Eo *eo_obj, - Efl_Animation_Group_Data *pd) +_efl_canvas_animation_group_efl_object_destructor(Eo *eo_obj, + Efl_Canvas_Animation_Group_Data *pd) { - Efl_Animation *anim; + Efl_Canvas_Animation *anim; EINA_LIST_FREE(pd->animations, anim) efl_unref(anim); @@ -124,4 +124,4 @@ _efl_animation_group_efl_object_destructor(Eo *eo_obj, efl_destructor(efl_super(eo_obj, MY_CLASS)); } -#include "efl_animation_group.eo.c" +#include "efl_canvas_animation_group.eo.c" diff --git a/src/lib/evas/canvas/efl_canvas_animation_group.eo b/src/lib/evas/canvas/efl_canvas_animation_group.eo new file mode 100644 index 0000000000..13a0cd54f9 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation_group.eo @@ -0,0 +1,33 @@ +import efl_canvas_animation_types; + +abstract Efl.Canvas.Animation.Group (Efl.Canvas.Animation) +{ + [[Efl group animation abstract class]] + eo_prefix: efl_animation_group; + data: Efl_Canvas_Animation_Group_Data; + methods { + animation_add { + [[Add the given animation to the animation group.]] + params { + @in animation: Efl.Canvas.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.Canvas.Animation; [[The animation which needs to be deleted from the animation group]] + } + } + animations_get { + [[Get the animations of the animation group.]] + return: list<Efl.Canvas.Animation>; [[The animations of the animation group]] + } + } + implements { + Efl.Object.constructor; + Efl.Object.destructor; + Efl.Canvas.Animation.duration { set; } + Efl.Canvas.Animation.final_state_keep { set; } + Efl.Canvas.Animation.interpolator { set; } + } +} diff --git a/src/lib/evas/canvas/efl_animation_group_parallel.c b/src/lib/evas/canvas/efl_canvas_animation_group_parallel.c index d85d527412..725ae69906 100644 --- a/src/lib/evas/canvas/efl_animation_group_parallel.c +++ b/src/lib/evas/canvas/efl_canvas_animation_group_parallel.c @@ -1,9 +1,9 @@ -#include "efl_animation_group_parallel_private.h" +#include "efl_canvas_animation_group_parallel_private.h" -#define MY_CLASS EFL_ANIMATION_GROUP_PARALLEL_CLASS +#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS EOLIAN static double -_efl_animation_group_parallel_efl_animation_animation_apply(Eo *eo_obj, +_efl_canvas_animation_group_parallel_efl_canvas_animation_animation_apply(Eo *eo_obj, void *_pd EINA_UNUSED, double progress, Efl_Canvas_Object *target) @@ -20,7 +20,7 @@ _efl_animation_group_parallel_efl_animation_animation_apply(Eo *eo_obj, group_elapsed_time = group_length * progress; Eina_List *l; - Efl_Animation *anim; + Efl_Canvas_Animation *anim; EINA_LIST_FOREACH(group_anim, l, anim) { anim_length = efl_playable_length_get(anim); @@ -53,7 +53,7 @@ _efl_animation_group_parallel_efl_animation_animation_apply(Eo *eo_obj, } EOLIAN static double -_efl_animation_group_parallel_efl_animation_duration_get(Eo *eo_obj, void *_pd EINA_UNUSED) +_efl_canvas_animation_group_parallel_efl_canvas_animation_duration_get(Eo *eo_obj, void *_pd EINA_UNUSED) { double child_total_duration; double total_duration = 0.0; @@ -62,7 +62,7 @@ _efl_animation_group_parallel_efl_animation_duration_get(Eo *eo_obj, void *_pd E if (!animations) return 0.0; Eina_List *l; - Efl_Animation *anim; + Efl_Canvas_Animation *anim; EINA_LIST_FOREACH(animations, l, anim) { child_total_duration = efl_playable_length_get(anim); @@ -74,4 +74,4 @@ _efl_animation_group_parallel_efl_animation_duration_get(Eo *eo_obj, void *_pd E return total_duration; } -#include "efl_animation_group_parallel.eo.c" +#include "efl_canvas_animation_group_parallel.eo.c" diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo b/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo new file mode 100644 index 0000000000..b5db2ce634 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo @@ -0,0 +1,14 @@ +import efl_canvas_animation_types; + +class Efl.Canvas.Animation.Group.Parallel (Efl.Canvas.Animation.Group) +{ + [[Efl group parallel animation class]] + eo_prefix: efl_animation_group_parallel; + data: null; + methods { + } + implements { + Efl.Canvas.Animation.duration { get; } + Efl.Canvas.Animation.animation_apply; + } +} diff --git a/src/lib/evas/canvas/efl_animation_group_parallel_private.h b/src/lib/evas/canvas/efl_canvas_animation_group_parallel_private.h index c3498a7569..332e3b673c 100644 --- a/src/lib/evas/canvas/efl_animation_group_parallel_private.h +++ b/src/lib/evas/canvas/efl_canvas_animation_group_parallel_private.h @@ -2,4 +2,4 @@ #include "evas_common_private.h" #include <Ecore.h> -#include "efl_animation_private.h" +#include "efl_canvas_animation_private.h" diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_private.h b/src/lib/evas/canvas/efl_canvas_animation_group_private.h new file mode 100644 index 0000000000..685e8f6063 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation_group_private.h @@ -0,0 +1,15 @@ +#define EFL_ANIMATION_PROTECTED + +#include "evas_common_private.h" +#include <Ecore.h> + +#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_CLASS +#define MY_CLASS_NAME efl_class_name_get(MY_CLASS) + +#define EFL_ANIMATION_GROUP_DATA_GET(o, pd) \ + Efl_Canvas_Animation_Group_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_GROUP_CLASS) + +typedef struct _Efl_Canvas_Animation_Group_Data +{ + Eina_List *animations; +} Efl_Canvas_Animation_Group_Data; diff --git a/src/lib/evas/canvas/efl_animation_group_sequential.c b/src/lib/evas/canvas/efl_canvas_animation_group_sequential.c index 8bc83848a3..c6aade5eb5 100644 --- a/src/lib/evas/canvas/efl_animation_group_sequential.c +++ b/src/lib/evas/canvas/efl_canvas_animation_group_sequential.c @@ -1,9 +1,9 @@ -#include "efl_animation_group_sequential_private.h" +#include "efl_canvas_animation_group_sequential_private.h" -#define MY_CLASS EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS +#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS EOLIAN static double -_efl_animation_group_sequential_efl_animation_animation_apply(Eo *eo_obj, +_efl_canvas_animation_group_sequential_efl_canvas_animation_animation_apply(Eo *eo_obj, void *_pd EINA_UNUSED, double progress, Efl_Canvas_Object *target) @@ -22,7 +22,7 @@ _efl_animation_group_sequential_efl_animation_animation_apply(Eo *eo_obj, group_elapsed_time = group_length * progress; Eina_List *l; - Efl_Animation *anim; + Efl_Canvas_Animation *anim; EINA_LIST_FOREACH(group_anim, l, anim) { anim_start_delay = efl_animation_start_delay_get(anim); @@ -58,7 +58,7 @@ _efl_animation_group_sequential_efl_animation_animation_apply(Eo *eo_obj, } EOLIAN static double -_efl_animation_group_sequential_efl_animation_duration_get(Eo *eo_obj, void *_pd EINA_UNUSED) +_efl_canvas_animation_group_sequential_efl_canvas_animation_duration_get(Eo *eo_obj, void *_pd EINA_UNUSED) { double total_duration = 0.0; double child_total_duration; @@ -67,7 +67,7 @@ _efl_animation_group_sequential_efl_animation_duration_get(Eo *eo_obj, void *_pd if (!animations) return 0.0; Eina_List *l; - Efl_Animation *anim; + Efl_Canvas_Animation *anim; EINA_LIST_FOREACH(animations, l, anim) { child_total_duration = efl_playable_length_get(anim); @@ -78,4 +78,4 @@ _efl_animation_group_sequential_efl_animation_duration_get(Eo *eo_obj, void *_pd return total_duration; } -#include "efl_animation_group_sequential.eo.c" +#include "efl_canvas_animation_group_sequential.eo.c" diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo b/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo new file mode 100644 index 0000000000..0e02e90d87 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo @@ -0,0 +1,13 @@ +import efl_canvas_animation_types; + +class Efl.Canvas.Animation.Group.Sequential (Efl.Canvas.Animation.Group) +{ + [[Efl group sequential animation class]] + data: null; + methods { + } + implements { + Efl.Canvas.Animation.duration { get; } + Efl.Canvas.Animation.animation_apply; + } +} diff --git a/src/lib/evas/canvas/efl_animation_group_sequential_private.h b/src/lib/evas/canvas/efl_canvas_animation_group_sequential_private.h index c3498a7569..332e3b673c 100644 --- a/src/lib/evas/canvas/efl_animation_group_sequential_private.h +++ b/src/lib/evas/canvas/efl_canvas_animation_group_sequential_private.h @@ -2,4 +2,4 @@ #include "evas_common_private.h" #include <Ecore.h> -#include "efl_animation_private.h" +#include "efl_canvas_animation_private.h" diff --git a/src/lib/evas/canvas/efl_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c index 50af3d33d6..032bf57de7 100644 --- a/src/lib/evas/canvas/efl_animation_player.c +++ b/src/lib/evas/canvas/efl_canvas_animation_player.c @@ -1,15 +1,15 @@ -#include "efl_animation_player_private.h" +#include "efl_canvas_animation_player_private.h" static void _target_del_cb(void *data, const Efl_Event *event EINA_UNUSED) { - Efl_Animation_Player_Data *pd = data; + Efl_Canvas_Animation_Player_Data *pd = data; pd->target = NULL; } EOLIAN static void -_efl_animation_player_target_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd, +_efl_canvas_animation_player_target_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd, Efl_Canvas_Object *target) { efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, pd); @@ -18,35 +18,35 @@ _efl_animation_player_target_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static Efl_Canvas_Object * -_efl_animation_player_target_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_target_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Player_Data *pd) { return pd->target; } EOLIAN static void -_efl_animation_player_auto_del_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd, +_efl_canvas_animation_player_auto_del_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd, Eina_Bool auto_del) { pd->auto_del = auto_del; } EOLIAN static Eina_Bool -_efl_animation_player_auto_del_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_auto_del_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd) { return pd->auto_del; } EOLIAN static void -_efl_animation_player_animation_set(Eo *eo_obj, - Efl_Animation_Player_Data *pd, - Efl_Animation *anim) +_efl_canvas_animation_player_animation_set(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd, + Efl_Canvas_Animation *anim) { if (anim == pd->animation) return; - if (!efl_isa(anim, EFL_ANIMATION_CLASS)) + if (!efl_isa(anim, EFL_CANVAS_ANIMATION_CLASS)) { ERR("Passed argument [%p]:[%s] is not an Efl.Animation", anim, efl_class_name_get(efl_class_get(anim))); @@ -62,9 +62,9 @@ _efl_animation_player_animation_set(Eo *eo_obj, efl_ref(pd->animation); } -EOLIAN static Efl_Animation * -_efl_animation_player_animation_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd) +EOLIAN static Efl_Canvas_Animation * +_efl_canvas_animation_player_animation_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd) { return pd->animation; } @@ -105,7 +105,7 @@ _animator_cb(void *data) efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj)); - Efl_Animation_Player_Running_Event_Info event_info; + Efl_Canvas_Animation_Player_Running_Event_Info event_info; event_info.progress = pd->progress; efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, &event_info); @@ -122,7 +122,7 @@ _animator_cb(void *data) if (pd->remaining_repeat_count > 0) pd->remaining_repeat_count--; - if (efl_animation_repeat_mode_get(anim) == EFL_ANIMATION_REPEAT_MODE_REVERSE) + if (efl_animation_repeat_mode_get(anim) == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) { pd->is_direction_forward = !pd->is_direction_forward; } @@ -139,7 +139,7 @@ _animator_cb(void *data) } static void -_start(Eo *eo_obj, Efl_Animation_Player_Data *pd) +_start(Eo *eo_obj, Efl_Canvas_Animation_Player_Data *pd) { EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); @@ -175,8 +175,8 @@ _start_delay_timer_cb(void *data) } EOLIAN static void -_efl_animation_player_efl_player_start(Eo *eo_obj, - Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_efl_player_start(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd) { double start_delay; EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); @@ -199,8 +199,8 @@ _efl_animation_player_efl_player_start(Eo *eo_obj, } EOLIAN static void -_efl_animation_player_efl_player_stop(Eo *eo_obj, - Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_efl_player_stop(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd) { EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); Eina_Bool play = efl_player_play_get(eo_obj); @@ -209,7 +209,7 @@ _efl_animation_player_efl_player_stop(Eo *eo_obj, efl_player_play_set(eo_obj, EINA_FALSE); //Reset the state of the target to the initial state if ((efl_animation_final_state_keep_get(anim)) && - (efl_animation_repeat_mode_get(anim) != EFL_ANIMATION_REPEAT_MODE_REVERSE) && + (efl_animation_repeat_mode_get(anim) != EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) && (!(efl_animation_repeat_count_get(anim) & 1))) { pd->progress = 1.0; @@ -231,8 +231,8 @@ _efl_animation_player_efl_player_stop(Eo *eo_obj, } EOLIAN static void -_efl_animation_player_efl_player_play_set(Eo *eo_obj, - Efl_Animation_Player_Data *pd, +_efl_canvas_animation_player_efl_player_play_set(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd, Eina_Bool play) { if (efl_player_play_get(eo_obj) == !!play) @@ -259,35 +259,35 @@ _efl_animation_player_efl_player_play_set(Eo *eo_obj, } EOLIAN static Eina_Bool -_efl_animation_player_efl_player_play_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_efl_player_play_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd) { return pd->is_play; } EOLIAN static Eina_Bool -_efl_animation_player_efl_player_playable_get(Eo *eo_obj, - Efl_Animation_Player_Data *pd EINA_UNUSED) +_efl_canvas_animation_player_efl_player_playable_get(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED) { - Efl_Animation *anim = efl_animation_player_animation_get(eo_obj); + Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj); return efl_playable_get(anim); } EOLIAN static double -_efl_animation_player_efl_player_pos_get(Eo *eo_obj, - Efl_Animation_Player_Data *pd EINA_UNUSED) +_efl_canvas_animation_player_efl_player_pos_get(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED) { //TODO: this is not correct - Efl_Animation *anim = efl_animation_player_animation_get(eo_obj); + Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj); double length = efl_player_length_get(anim); return length * efl_player_progress_get(anim); } EOLIAN static void -_efl_animation_player_efl_player_pos_set(Eo *eo_obj, - Efl_Animation_Player_Data *pd EINA_UNUSED, +_efl_canvas_animation_player_efl_player_pos_set(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED, double sec) { //TODO: this is not correct @@ -301,15 +301,15 @@ _efl_animation_player_efl_player_pos_set(Eo *eo_obj, } EOLIAN static double -_efl_animation_player_efl_player_progress_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_efl_player_progress_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd) { return pd->progress; } EOLIAN static void -_efl_animation_player_efl_player_play_speed_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd, +_efl_canvas_animation_player_efl_player_play_speed_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd, double play_speed) { //TODO: check reverse play case. @@ -319,31 +319,31 @@ _efl_animation_player_efl_player_play_speed_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static double -_efl_animation_player_efl_player_play_speed_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_efl_player_play_speed_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd) { return pd->play_speed; } EOLIAN static double -_efl_animation_player_efl_player_length_get(Eo *eo_obj, - Efl_Animation_Player_Data *pd EINA_UNUSED) +_efl_canvas_animation_player_efl_player_length_get(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED) { EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); return efl_playable_length_get(anim); } EOLIAN static Eina_Bool -_efl_animation_player_efl_player_seekable_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Player_Data *pd EINA_UNUSED) +_efl_canvas_animation_player_efl_player_seekable_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED) { EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); return efl_playable_seekable_get(anim); } EOLIAN static Efl_Object * -_efl_animation_player_efl_object_constructor(Eo *eo_obj, - Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_efl_object_constructor(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd) { eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); @@ -360,8 +360,8 @@ _efl_animation_player_efl_object_constructor(Eo *eo_obj, } EOLIAN static void -_efl_animation_player_efl_object_destructor(Eo *eo_obj, - Efl_Animation_Player_Data *pd) +_efl_canvas_animation_player_efl_object_destructor(Eo *eo_obj, + Efl_Canvas_Animation_Player_Data *pd) { if (pd->animator) { @@ -381,4 +381,4 @@ _efl_animation_player_efl_object_destructor(Eo *eo_obj, EWAPI const Efl_Event_Description _EFL_ANIMATION_PLAYER_EVENT_PRE_STARTED = EFL_EVENT_DESCRIPTION("pre_started"); -#include "efl_animation_player.eo.c" +#include "efl_canvas_animation_player.eo.c" diff --git a/src/lib/evas/canvas/efl_animation_player.eo b/src/lib/evas/canvas/efl_canvas_animation_player.eo index 6dc9ce3b2b..606ec9b2b4 100644 --- a/src/lib/evas/canvas/efl_animation_player.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_player.eo @@ -1,14 +1,15 @@ -import efl_animation_types; +import efl_canvas_animation_types; -class Efl.Animation.Player (Efl.Object, Efl.Player) +class Efl.Canvas.Animation.Player (Efl.Object, Efl.Player) { [[Efl animation object class]] + eo_prefix: efl_animation_player; methods { @property animation { set {} get {} values { - animation: Efl.Animation; + animation: Efl.Canvas.Animation; } } @property auto_del { diff --git a/src/lib/evas/canvas/efl_animation_player_private.h b/src/lib/evas/canvas/efl_canvas_animation_player_private.h index 9b1a1fa3a5..f0128aaa74 100644 --- a/src/lib/evas/canvas/efl_animation_player_private.h +++ b/src/lib/evas/canvas/efl_canvas_animation_player_private.h @@ -3,7 +3,7 @@ #include "evas_common_private.h" #include <Ecore.h> -#define MY_CLASS EFL_ANIMATION_PLAYER_CLASS +#define MY_CLASS EFL_CANVAS_ANIMATION_PLAYER_CLASS #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) #if 0 @@ -17,7 +17,7 @@ typedef struct _Target_State } Target_State; #endif -typedef struct _Efl_Animation_Player_Data +typedef struct _Efl_Canvas_Animation_Player_Data { Ecore_Animator *animator; Ecore_Timer *start_delay_timer; @@ -29,7 +29,7 @@ typedef struct _Efl_Animation_Player_Data double pause_begin; } time; - Efl_Animation *animation; + Efl_Canvas_Animation *animation; Efl_Canvas_Object *target; double progress; @@ -43,10 +43,10 @@ typedef struct _Efl_Animation_Player_Data Eina_Bool is_play : 1; Eina_Bool keep_final_state : 1; Eina_Bool is_direction_forward : 1; -} Efl_Animation_Player_Data; +} Efl_Canvas_Animation_Player_Data; #define EFL_ANIMATION_PLAYER_DATA_GET(o, pd) \ - Efl_Animation_Player_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_PLAYER_CLASS) + Efl_Canvas_Animation_Player_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_PLAYER_CLASS) #define EFL_ANIMATION_PLAYER_ANIMATION_GET(o, anim) \ - Efl_Animation *anim = efl_animation_player_animation_get(o) + Efl_Canvas_Animation *anim = efl_animation_player_animation_get(o) diff --git a/src/lib/evas/canvas/efl_animation_private.h b/src/lib/evas/canvas/efl_canvas_animation_private.h index bcadf35c1a..c1fe16ff09 100644 --- a/src/lib/evas/canvas/efl_animation_private.h +++ b/src/lib/evas/canvas/efl_canvas_animation_private.h @@ -3,26 +3,26 @@ #include "evas_common_private.h" #include <Ecore.h> -typedef struct _Efl_Animation_Data +typedef struct _Efl_Canvas_Animation_Data { double duration; double start_delay_time; - Efl_Animation_Repeat_Mode repeat_mode; + Efl_Canvas_Animation_Repeat_Mode repeat_mode; int repeat_count; Efl_Interpolator *interpolator; Eina_Bool keep_final_state : 1; -} Efl_Animation_Data; +} Efl_Canvas_Animation_Data; #define EFL_ANIMATION_DATA_GET(o, pd) \ - Efl_Animation_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_CLASS) + Efl_Canvas_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_CLASS) #define GET_STATUS(from, to, progress) \ ((from) + (((to) - (from)) * (progress))) #define FINAL_STATE_IS_REVERSE(anim) \ - ((efl_animation_repeat_mode_get(anim) == EFL_ANIMATION_REPEAT_MODE_REVERSE) && \ + ((efl_animation_repeat_mode_get(anim) == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) && \ (efl_animation_repeat_count_get(anim) & 1)) diff --git a/src/lib/evas/canvas/efl_animation_rotate.c b/src/lib/evas/canvas/efl_canvas_animation_rotate.c index 72d30dc158..2a3f06ca07 100644 --- a/src/lib/evas/canvas/efl_animation_rotate.c +++ b/src/lib/evas/canvas/efl_canvas_animation_rotate.c @@ -1,6 +1,6 @@ -#include "efl_animation_rotate_private.h" +#include "efl_canvas_animation_rotate_private.h" -#define MY_CLASS EFL_ANIMATION_ROTATE_CLASS +#define MY_CLASS EFL_CANVAS_ANIMATION_ROTATE_CLASS static double _rotation_get(Eo *target) @@ -16,8 +16,8 @@ _rotation_get(Eo *target) } EOLIAN static void -_efl_animation_rotate_rotate_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Rotate_Data *pd, +_efl_canvas_animation_rotate_rotate_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Rotate_Data *pd, double from_degree, double to_degree, Efl_Canvas_Object *pivot, @@ -35,8 +35,8 @@ _efl_animation_rotate_rotate_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_rotate_rotate_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Rotate_Data *pd, +_efl_canvas_animation_rotate_rotate_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Rotate_Data *pd, double *from_degree, double *to_degree, Efl_Canvas_Object **pivot, @@ -66,8 +66,8 @@ _efl_animation_rotate_rotate_get(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_rotate_rotate_absolute_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Rotate_Data *pd, +_efl_canvas_animation_rotate_rotate_absolute_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Rotate_Data *pd, double from_degree, double to_degree, Evas_Coord cx, @@ -82,8 +82,8 @@ _efl_animation_rotate_rotate_absolute_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_rotate_rotate_absolute_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Rotate_Data *pd, +_efl_canvas_animation_rotate_rotate_absolute_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Rotate_Data *pd, double *from_degree, double *to_degree, Evas_Coord *cx, @@ -109,8 +109,8 @@ _efl_animation_rotate_rotate_absolute_get(Eo *eo_obj EINA_UNUSED, } EOLIAN static double -_efl_animation_rotate_efl_animation_animation_apply(Eo *eo_obj, - Efl_Animation_Rotate_Data *pd, +_efl_canvas_animation_rotate_efl_canvas_animation_animation_apply(Eo *eo_obj, + Efl_Canvas_Animation_Rotate_Data *pd, double progress, Efl_Canvas_Object *target) { @@ -141,8 +141,8 @@ _efl_animation_rotate_efl_animation_animation_apply(Eo *eo_obj, } EOLIAN static Efl_Object * -_efl_animation_rotate_efl_object_constructor(Eo *eo_obj, - Efl_Animation_Rotate_Data *pd) +_efl_canvas_animation_rotate_efl_object_constructor(Eo *eo_obj, + Efl_Canvas_Animation_Rotate_Data *pd) { eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); @@ -161,4 +161,4 @@ _efl_animation_rotate_efl_object_constructor(Eo *eo_obj, return eo_obj; } -#include "efl_animation_rotate.eo.c" +#include "efl_canvas_animation_rotate.eo.c" diff --git a/src/lib/evas/canvas/efl_animation_rotate.eo b/src/lib/evas/canvas/efl_canvas_animation_rotate.eo index 14c9901f2f..d092d2a2ea 100644 --- a/src/lib/evas/canvas/efl_animation_rotate.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_rotate.eo @@ -1,9 +1,10 @@ -import efl_animation_types; +import efl_canvas_animation_types; -class Efl.Animation.Rotate (Efl.Animation) +class Efl.Canvas.Animation.Rotate (Efl.Canvas.Animation) { [[Efl rotate animation class]] - data: Efl_Animation_Rotate_Data; + eo_prefix: efl_animation_rotate; + data: Efl_Canvas_Animation_Rotate_Data; methods { @property rotate { [[Rotate property]] @@ -35,6 +36,6 @@ class Efl.Animation.Rotate (Efl.Animation) } implements { Efl.Object.constructor; - Efl.Animation.animation_apply; + Efl.Canvas.Animation.animation_apply; } } diff --git a/src/lib/evas/canvas/efl_canvas_animation_rotate_private.h b/src/lib/evas/canvas/efl_canvas_animation_rotate_private.h new file mode 100644 index 0000000000..e50db39bff --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation_rotate_private.h @@ -0,0 +1,35 @@ +#define EFL_ANIMATION_PROTECTED + +#include "evas_common_private.h" +#include <Ecore.h> +#include "efl_canvas_animation_private.h" + +#define EFL_ANIMATION_ROTATE_DATA_GET(o, pd) \ + Efl_Canvas_Animation_Rotate_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_ROTATE_CLASS) + +typedef struct _Efl_Canvas_Animation_Rotate_Property +{ + double degree; +} Efl_Canvas_Animation_Rotate_Property; + +typedef struct _Efl_Canvas_Animation_Rotate_Absolute_Pivot +{ + Evas_Coord cx, cy; +} Efl_Canvas_Animation_Rotate_Absolute_Pivot; + +typedef struct _Efl_Canvas_Animation_Rotate_Relative_Pivot +{ + Efl_Canvas_Object *obj; + double cx, cy; +} Efl_Canvas_Animation_Rotate_Relative_Pivot; + +typedef struct _Efl_Canvas_Animation_Rotate_Data +{ + Efl_Canvas_Animation_Rotate_Property from; + Efl_Canvas_Animation_Rotate_Property to; + + Efl_Canvas_Animation_Rotate_Absolute_Pivot abs_pivot; + Efl_Canvas_Animation_Rotate_Relative_Pivot rel_pivot; + + Eina_Bool use_rel_pivot; +} Efl_Canvas_Animation_Rotate_Data; diff --git a/src/lib/evas/canvas/efl_animation_scale.c b/src/lib/evas/canvas/efl_canvas_animation_scale.c index dbb4b765a4..67449c21b2 100644 --- a/src/lib/evas/canvas/efl_animation_scale.c +++ b/src/lib/evas/canvas/efl_canvas_animation_scale.c @@ -1,12 +1,12 @@ -#include "efl_animation_scale_private.h" +#include "efl_canvas_animation_scale_private.h" -#define MY_CLASS EFL_ANIMATION_SCALE_CLASS +#define MY_CLASS EFL_CANVAS_ANIMATION_SCALE_CLASS -static Efl_Animation_Scale_Property +static Efl_Canvas_Animation_Scale_Property _scale_get(Eo *target) { double x1, x2, x3, y1, y2, y3, w, h; - Efl_Animation_Scale_Property scale; + Efl_Canvas_Animation_Scale_Property scale; Eina_Rect geometry; geometry = efl_gfx_geometry_get(target); @@ -24,8 +24,8 @@ _scale_get(Eo *target) } EOLIAN static void -_efl_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Scale_Data *pd, +_efl_canvas_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Scale_Data *pd, double from_scale_x, double from_scale_y, double to_scale_x, @@ -48,8 +48,8 @@ _efl_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_scale_scale_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Scale_Data *pd, +_efl_canvas_animation_scale_scale_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Scale_Data *pd, double *from_scale_x, double *from_scale_y, double *to_scale_x, @@ -87,8 +87,8 @@ _efl_animation_scale_scale_get(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_scale_scale_absolute_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Scale_Data *pd, +_efl_canvas_animation_scale_scale_absolute_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Scale_Data *pd, double from_scale_x, double from_scale_y, double to_scale_x, @@ -109,8 +109,8 @@ _efl_animation_scale_scale_absolute_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_scale_scale_absolute_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Scale_Data *pd, +_efl_canvas_animation_scale_scale_absolute_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Scale_Data *pd, double *from_scale_x, double *from_scale_y, double *to_scale_x, @@ -144,13 +144,13 @@ _efl_animation_scale_scale_absolute_get(Eo *eo_obj EINA_UNUSED, } EOLIAN static double -_efl_animation_scale_efl_animation_animation_apply(Eo *eo_obj, - Efl_Animation_Scale_Data *pd, +_efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj, + Efl_Canvas_Animation_Scale_Data *pd, double progress, Efl_Canvas_Object *target) { - Efl_Animation_Scale_Property prev_scale; - Efl_Animation_Scale_Property new_scale; + Efl_Canvas_Animation_Scale_Property prev_scale; + Efl_Canvas_Animation_Scale_Property new_scale; progress = efl_animation_apply(efl_super(eo_obj, MY_CLASS), progress, target); if (!target) return progress; @@ -179,8 +179,8 @@ _efl_animation_scale_efl_animation_animation_apply(Eo *eo_obj, } EOLIAN static Efl_Object * -_efl_animation_scale_efl_object_constructor(Eo *eo_obj, - Efl_Animation_Scale_Data *pd) +_efl_canvas_animation_scale_efl_object_constructor(Eo *eo_obj, + Efl_Canvas_Animation_Scale_Data *pd) { eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); @@ -201,4 +201,4 @@ _efl_animation_scale_efl_object_constructor(Eo *eo_obj, return eo_obj; } -#include "efl_animation_scale.eo.c" +#include "efl_canvas_animation_scale.eo.c" diff --git a/src/lib/evas/canvas/efl_animation_scale.eo b/src/lib/evas/canvas/efl_canvas_animation_scale.eo index 312ac4e041..f3112ed9c3 100644 --- a/src/lib/evas/canvas/efl_animation_scale.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_scale.eo @@ -1,9 +1,10 @@ -import efl_animation_types; +import efl_canvas_animation_types; -class Efl.Animation.Scale (Efl.Animation) +class Efl.Canvas.Animation.Scale (Efl.Canvas.Animation) { [[Efl scale animation class]] - data: Efl_Animation_Scale_Data; + eo_prefix: efl_animation_scale; + data: Efl_Canvas_Animation_Scale_Data; methods { @property scale { [[Scale property]] @@ -39,6 +40,6 @@ class Efl.Animation.Scale (Efl.Animation) } implements { Efl.Object.constructor; - Efl.Animation.animation_apply; + Efl.Canvas.Animation.animation_apply; } } diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale_private.h b/src/lib/evas/canvas/efl_canvas_animation_scale_private.h new file mode 100644 index 0000000000..020d9fdcb3 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation_scale_private.h @@ -0,0 +1,35 @@ +#define EFL_ANIMATION_PROTECTED + +#include "evas_common_private.h" +#include <Ecore.h> +#include "efl_canvas_animation_private.h" + +#define EFL_ANIMATION_SCALE_DATA_GET(o, pd) \ + Efl_Canvas_Animation_Scale_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_SCALE_CLASS) + +typedef struct _Efl_Canvas_Animation_Scale_Property +{ + double scale_x, scale_y; +} Efl_Canvas_Animation_Scale_Property; + +typedef struct _Efl_Canvas_Animation_Scale_Absolute_Pivot +{ + Evas_Coord cx, cy; +} Efl_Canvas_Animation_Scale_Absolute_Pivot; + +typedef struct _Efl_Canvas_Animation_Scale_Relative_Pivot +{ + Efl_Canvas_Object *obj; + double cx, cy; +} Efl_Canvas_Animation_Scale_Relative_Pivot; + +typedef struct _Efl_Canvas_Animation_Scale_Data +{ + Efl_Canvas_Animation_Scale_Property from; + Efl_Canvas_Animation_Scale_Property to; + + Efl_Canvas_Animation_Scale_Absolute_Pivot abs_pivot; + Efl_Canvas_Animation_Scale_Relative_Pivot rel_pivot; + + Eina_Bool use_rel_pivot; +} Efl_Canvas_Animation_Scale_Data; diff --git a/src/lib/evas/canvas/efl_animation_translate.c b/src/lib/evas/canvas/efl_canvas_animation_translate.c index 4464c59e6a..361ed63a06 100644 --- a/src/lib/evas/canvas/efl_animation_translate.c +++ b/src/lib/evas/canvas/efl_canvas_animation_translate.c @@ -1,6 +1,6 @@ -#include "efl_animation_translate_private.h" +#include "efl_canvas_animation_translate_private.h" -#define MY_CLASS EFL_ANIMATION_TRANSLATE_CLASS +#define MY_CLASS EFL_CANVAS_ANIMATION_TRANSLATE_CLASS typedef struct __Translate_Property_Double { @@ -26,8 +26,8 @@ _translation_get(Eo *target) } EOLIAN static void -_efl_animation_translate_translate_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Translate_Data *pd, +_efl_canvas_animation_translate_translate_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Translate_Data *pd, Evas_Coord from_x, Evas_Coord from_y, Evas_Coord to_x, @@ -43,8 +43,8 @@ _efl_animation_translate_translate_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_translate_translate_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Translate_Data *pd, +_efl_canvas_animation_translate_translate_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Translate_Data *pd, Evas_Coord *from_x, Evas_Coord *from_y, Evas_Coord *to_x, @@ -68,8 +68,8 @@ _efl_animation_translate_translate_get(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_translate_translate_absolute_set(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Translate_Data *pd, +_efl_canvas_animation_translate_translate_absolute_set(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Translate_Data *pd, Evas_Coord from_x, Evas_Coord from_y, Evas_Coord to_x, @@ -85,8 +85,8 @@ _efl_animation_translate_translate_absolute_set(Eo *eo_obj EINA_UNUSED, } EOLIAN static void -_efl_animation_translate_translate_absolute_get(Eo *eo_obj EINA_UNUSED, - Efl_Animation_Translate_Data *pd, +_efl_canvas_animation_translate_translate_absolute_get(Eo *eo_obj EINA_UNUSED, + Efl_Canvas_Animation_Translate_Data *pd, Evas_Coord *from_x, Evas_Coord *from_y, Evas_Coord *to_x, @@ -110,8 +110,8 @@ _efl_animation_translate_translate_absolute_get(Eo *eo_obj EINA_UNUSED, } EOLIAN static double -_efl_animation_translate_efl_animation_animation_apply(Eo *eo_obj, - Efl_Animation_Translate_Data *pd, +_efl_canvas_animation_translate_efl_canvas_animation_animation_apply(Eo *eo_obj, + Efl_Canvas_Animation_Translate_Data *pd, double progress, Efl_Canvas_Object *target) { @@ -139,8 +139,8 @@ _efl_animation_translate_efl_animation_animation_apply(Eo *eo_obj, } EOLIAN static Efl_Object * -_efl_animation_translate_efl_object_constructor(Eo *eo_obj, - Efl_Animation_Translate_Data *pd) +_efl_canvas_animation_translate_efl_object_constructor(Eo *eo_obj, + Efl_Canvas_Animation_Translate_Data *pd) { eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); @@ -159,4 +159,4 @@ _efl_animation_translate_efl_object_constructor(Eo *eo_obj, return eo_obj; } -#include "efl_animation_translate.eo.c" +#include "efl_canvas_animation_translate.eo.c" diff --git a/src/lib/evas/canvas/efl_animation_translate.eo b/src/lib/evas/canvas/efl_canvas_animation_translate.eo index 59e0c5e649..a8be5cbe78 100644 --- a/src/lib/evas/canvas/efl_animation_translate.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_translate.eo @@ -1,9 +1,10 @@ -import efl_animation_types; +import efl_canvas_animation_types; -class Efl.Animation.Translate (Efl.Animation) +class Efl.Canvas.Animation.Translate (Efl.Canvas.Animation) { [[Efl translate animation class]] - data: Efl_Animation_Translate_Data; + eo_prefix: efl_animation_translate; + data: Efl_Canvas_Animation_Translate_Data; methods { @property translate { [[Translate property]] @@ -34,6 +35,6 @@ class Efl.Animation.Translate (Efl.Animation) } implements { Efl.Object.constructor; - Efl.Animation.animation_apply; + Efl.Canvas.Animation.animation_apply; } } diff --git a/src/lib/evas/canvas/efl_canvas_animation_translate_private.h b/src/lib/evas/canvas/efl_canvas_animation_translate_private.h new file mode 100644 index 0000000000..17c4b6d432 --- /dev/null +++ b/src/lib/evas/canvas/efl_canvas_animation_translate_private.h @@ -0,0 +1,22 @@ +#define EFL_ANIMATION_PROTECTED + +#include "evas_common_private.h" +#include <Ecore.h> +#include "efl_canvas_animation_private.h" + +#define EFL_ANIMATION_TRANSLATE_DATA_GET(o, pd) \ + Efl_Canvas_Animation_Translate_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_TRANSLATE_CLASS) + +typedef struct _Efl_Canvas_Animation_Translate_Property +{ + Evas_Coord move_x, move_y; + Evas_Coord x, y; +} Efl_Canvas_Animation_Translate_Property; + +typedef struct _Efl_Canvas_Animation_Translate_Data +{ + Efl_Canvas_Animation_Translate_Property from; + Efl_Canvas_Animation_Translate_Property to; + + Eina_Bool use_rel_move; +} Efl_Canvas_Animation_Translate_Data; diff --git a/src/lib/evas/canvas/efl_animation_types.eot b/src/lib/evas/canvas/efl_canvas_animation_types.eot index 8eaf5fdb31..6c069a08c5 100644 --- a/src/lib/evas/canvas/efl_animation_types.eot +++ b/src/lib/evas/canvas/efl_canvas_animation_types.eot @@ -1,9 +1,9 @@ // ---------------------------------------------------------------------------- // All the below types are for Efl Animation -struct Efl.Animation.Player.Running_Event_Info; [[Information of running event]] +struct Efl.Canvas.Animation.Player.Running_Event_Info; [[Information of running event]] -enum Efl.Animation.Repeat_Mode +enum Efl.Canvas.Animation.Repeat_Mode { [[Animation repeat mode]] diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index 7d85781ef5..0d17ba8267 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -1,5 +1,5 @@ import efl_text_types; -import efl_animation_types; +import efl_canvas_animation_types; abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Animator, Efl.Input.Interface, Efl.Gfx.Size.Hint, @@ -584,7 +584,7 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, Efl.Gfx.Color, Efl.Gfx.Stack, E [[The event description for which the given $animation is set.]] } values { - animation: Efl.Animation; + animation: Efl.Canvas.Animation; [[The animation which starts when the given $event_name happens to the object.]] } diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 3b7950e130..49d0586c8e 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -45,7 +45,7 @@ typedef struct _Event_Animation const Efl_Event_Description *desc; - Efl_Animation *anim; + Efl_Canvas_Animation *anim; } Event_Animation; static Eina_Bool @@ -2460,13 +2460,13 @@ EOLIAN void _efl_canvas_object_event_animation_set(Eo *eo_obj, Evas_Object_Protected_Data *pd, const Efl_Event_Description *desc, - Efl_Animation *animation) + Efl_Canvas_Animation *animation) { Event_Animation *event_anim = _event_animation_find(pd, desc); if (!pd->anim_player) { - pd->anim_player = efl_add(EFL_ANIMATION_PLAYER_CLASS, eo_obj, + pd->anim_player = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, eo_obj, efl_animation_player_target_set(efl_added, eo_obj)); } @@ -2504,7 +2504,7 @@ _efl_canvas_object_event_animation_set(Eo *eo_obj, eina_inlist_append(pd->event_anims, EINA_INLIST_GET(event_anim)); } -EOLIAN Efl_Animation * +EOLIAN Efl_Canvas_Animation * _efl_canvas_object_event_animation_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *pd, const Efl_Event_Description *desc) |