summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2020-01-16 20:11:49 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2020-01-16 20:11:49 +0900
commit2f4ca46544c93a7d7bbbded0cf37cb34f1672b53 (patch)
tree27134d8cb2cd7bbaf20924492d4e062d5dfc656c
parent05bb02cbb021e97bbb4caf21af756ee15f144e9d (diff)
Efl.Ui.Vg_Animation: Change property name autorepeat to looping
Summary: autoplay and autorepeat look similar and can be confusing. so change autorepeat to looping. ref T8476 Depends on D11022 Test Plan: N/A Reviewers: Hermet, bu5hm4n, kimcinoo, segfaultxavi, zmike Reviewed By: Hermet, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8476 Differential Revision: https://phab.enlightenment.org/D11061
-rw-r--r--src/bin/elementary/test_efl_gfx_vg_value_provider.c2
-rw-r--r--src/bin/elementary/test_efl_ui_vg_animation.c2
-rw-r--r--src/lib/elementary/efl_ui_vg_animation.c16
-rw-r--r--src/lib/elementary/efl_ui_vg_animation.eo10
-rw-r--r--src/lib/elementary/efl_ui_vg_animation_eo.legacy.c4
-rw-r--r--src/lib/elementary/efl_ui_vg_animation_private.h2
-rw-r--r--src/tests/elementary/efl_ui_test_vg_animation.c4
7 files changed, 20 insertions, 20 deletions
diff --git a/src/bin/elementary/test_efl_gfx_vg_value_provider.c b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
index 5b9424c8d6..5127bb0eb2 100644
--- a/src/bin/elementary/test_efl_gfx_vg_value_provider.c
+++ b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
@@ -159,7 +159,7 @@ static void
159check_changed_cb(void *data, const Efl_Event *event) 159check_changed_cb(void *data, const Efl_Event *event)
160{ 160{
161 Evas_Object *anim_view = data; 161 Evas_Object *anim_view = data;
162 efl_ui_vg_animation_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object)); 162 efl_ui_vg_animation_looping_set(anim_view, efl_ui_selectable_selected_get(event->object));
163} 163}
164 164
165static void 165static void
diff --git a/src/bin/elementary/test_efl_ui_vg_animation.c b/src/bin/elementary/test_efl_ui_vg_animation.c
index b51491906d..5d943a795f 100644
--- a/src/bin/elementary/test_efl_ui_vg_animation.c
+++ b/src/bin/elementary/test_efl_ui_vg_animation.c
@@ -52,7 +52,7 @@ static void
52check_changed_cb(void *data, const Efl_Event *event) 52check_changed_cb(void *data, const Efl_Event *event)
53{ 53{
54 Evas_Object *anim_view = data; 54 Evas_Object *anim_view = data;
55 efl_ui_vg_animation_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object)); 55 efl_ui_vg_animation_looping_set(anim_view, efl_ui_selectable_selected_get(event->object));
56} 56}
57 57
58static void 58static void
diff --git a/src/lib/elementary/efl_ui_vg_animation.c b/src/lib/elementary/efl_ui_vg_animation.c
index 503ea856e6..e723a922a4 100644
--- a/src/lib/elementary/efl_ui_vg_animation.c
+++ b/src/lib/elementary/efl_ui_vg_animation.c
@@ -217,7 +217,7 @@ _transit_cb(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
217 217
218 evas_object_vg_animated_frame_set(pd->vg, update_frame); 218 evas_object_vg_animated_frame_set(pd->vg, update_frame);
219 219
220 if (pd->autorepeat) 220 if (pd->looping)
221 { 221 {
222 int repeat_times = elm_transit_current_repeat_times_get(pd->transit); 222 int repeat_times = elm_transit_current_repeat_times_get(pd->transit);
223 if (pd->repeat_times != repeat_times) 223 if (pd->repeat_times != repeat_times)
@@ -327,7 +327,7 @@ _ready_play(Eo *obj, Efl_Ui_Vg_Animation_Data *pd)
327 double speed = pd->playback_speed < 0 ? pd->playback_speed * -1 : pd->playback_speed; 327 double speed = pd->playback_speed < 0 ? pd->playback_speed * -1 : pd->playback_speed;
328 Elm_Transit *transit = elm_transit_add(); 328 Elm_Transit *transit = elm_transit_add();
329 elm_transit_object_add(transit, pd->vg); 329 elm_transit_object_add(transit, pd->vg);
330 if (pd->autorepeat) elm_transit_repeat_times_set(transit, -1); 330 if (pd->looping) elm_transit_repeat_times_set(transit, -1);
331 elm_transit_effect_add(transit, _transit_cb, obj, _transit_del_cb); 331 elm_transit_effect_add(transit, _transit_cb, obj, _transit_del_cb);
332 elm_transit_progress_value_set(transit, pd->progress); 332 elm_transit_progress_value_set(transit, pd->progress);
333 elm_transit_objects_final_state_keep_set(transit, EINA_TRUE); 333 elm_transit_objects_final_state_keep_set(transit, EINA_TRUE);
@@ -462,21 +462,21 @@ _efl_ui_vg_animation_efl_gfx_view_view_size_get(const Eo *obj EINA_UNUSED,
462} 462}
463 463
464EOLIAN static void 464EOLIAN static void
465_efl_ui_vg_animation_autorepeat_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, Eina_Bool autorepeat) 465_efl_ui_vg_animation_looping_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, Eina_Bool looping)
466{ 466{
467 if (pd->autorepeat == autorepeat) return; 467 if (pd->looping == looping) return;
468 pd->autorepeat = autorepeat; 468 pd->looping = looping;
469 if (pd->transit) 469 if (pd->transit)
470 { 470 {
471 if (autorepeat) elm_transit_repeat_times_set(pd->transit, -1); 471 if (looping) elm_transit_repeat_times_set(pd->transit, -1);
472 else elm_transit_repeat_times_set(pd->transit, 0); 472 else elm_transit_repeat_times_set(pd->transit, 0);
473 } 473 }
474} 474}
475 475
476EOLIAN static Eina_Bool 476EOLIAN static Eina_Bool
477_efl_ui_vg_animation_autorepeat_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd) 477_efl_ui_vg_animation_looping_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
478{ 478{
479 return pd->autorepeat; 479 return pd->looping;
480} 480}
481 481
482EOLIAN static void 482EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_vg_animation.eo b/src/lib/elementary/efl_ui_vg_animation.eo
index 12dcfe96c6..9c44a93665 100644
--- a/src/lib/elementary/efl_ui_vg_animation.eo
+++ b/src/lib/elementary/efl_ui_vg_animation.eo
@@ -47,20 +47,20 @@ class @beta Efl.Ui.Vg_Animation extends Efl.Ui.Widget implements Efl.Gfx.View, E
47 autoplay: bool(false); [[Auto play mode.]] 47 autoplay: bool(false); [[Auto play mode.]]
48 } 48 }
49 } 49 }
50 @property autorepeat { 50 @property looping {
51 [[Turn on/off animation looping. 51 [[Turn on/off animation looping.
52 52
53 If @.autorepeat is $true, it repeats animation when animation frame is reached to 53 When $true, animation is restarted when it reaches the last frame.
54 end. This auto repeat mode is valid to both playing and playing_backwards cases. 54 This works both when playing forward and backward.
55 55
56 $true Enable auto play mode, disable otherwise. 56 $true Enable loop mode, disable otherwise.
57 ]] 57 ]]
58 set { 58 set {
59 } 59 }
60 get { 60 get {
61 } 61 }
62 values { 62 values {
63 autorepeat: bool; [[Loop mode, Default is $false.]] 63 looping: bool; [[Loop mode, Default is $false.]]
64 } 64 }
65 } 65 }
66 @property frame { 66 @property frame {
diff --git a/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c b/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c
index 04aba9206f..78c24cfe11 100644
--- a/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c
+++ b/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c
@@ -14,13 +14,13 @@ elm_animation_view_auto_play_get(const Efl_Ui_Vg_Animation *obj)
14EAPI void 14EAPI void
15elm_animation_view_auto_repeat_set(Efl_Ui_Vg_Animation *obj, Eina_Bool autorepeat) 15elm_animation_view_auto_repeat_set(Efl_Ui_Vg_Animation *obj, Eina_Bool autorepeat)
16{ 16{
17 efl_ui_vg_animation_autorepeat_set(obj, autorepeat); 17 efl_ui_vg_animation_looping_set(obj, autorepeat);
18} 18}
19 19
20EAPI Eina_Bool 20EAPI Eina_Bool
21elm_animation_view_auto_repeat_get(const Efl_Ui_Vg_Animation *obj) 21elm_animation_view_auto_repeat_get(const Efl_Ui_Vg_Animation *obj)
22{ 22{
23 return efl_ui_vg_animation_autorepeat_get(obj); 23 return efl_ui_vg_animation_looping_get(obj);
24} 24}
25 25
26EAPI Eina_Bool 26EAPI Eina_Bool
diff --git a/src/lib/elementary/efl_ui_vg_animation_private.h b/src/lib/elementary/efl_ui_vg_animation_private.h
index b36ba79d79..98304f39ad 100644
--- a/src/lib/elementary/efl_ui_vg_animation_private.h
+++ b/src/lib/elementary/efl_ui_vg_animation_private.h
@@ -24,7 +24,7 @@ struct _Efl_Ui_Vg_Animation_Data
24 Eina_Bool playing_reverse : 1; 24 Eina_Bool playing_reverse : 1;
25 Eina_Bool autoplay : 1; 25 Eina_Bool autoplay : 1;
26 Eina_Bool autoplay_pause: 1; 26 Eina_Bool autoplay_pause: 1;
27 Eina_Bool autorepeat : 1; 27 Eina_Bool looping : 1;
28 Eina_Bool playback_direction_changed : 1; 28 Eina_Bool playback_direction_changed : 1;
29}; 29};
30 30
diff --git a/src/tests/elementary/efl_ui_test_vg_animation.c b/src/tests/elementary/efl_ui_test_vg_animation.c
index 0a0f397156..2da7d0fbde 100644
--- a/src/tests/elementary/efl_ui_test_vg_animation.c
+++ b/src/tests/elementary/efl_ui_test_vg_animation.c
@@ -50,8 +50,8 @@ EFL_START_TEST(vg_anim_playing_control)
50 ck_assert_int_eq(efl_ui_vg_animation_state_get(vg_anim), EFL_UI_VG_ANIMATION_STATE_STOPPED); 50 ck_assert_int_eq(efl_ui_vg_animation_state_get(vg_anim), EFL_UI_VG_ANIMATION_STATE_STOPPED);
51 51
52 // Auto repeat 52 // Auto repeat
53 efl_ui_vg_animation_autorepeat_set(vg_anim, EINA_TRUE); 53 efl_ui_vg_animation_looping_set(vg_anim, EINA_TRUE);
54 ck_assert_int_eq(efl_ui_vg_animation_autorepeat_get(vg_anim), EINA_TRUE); 54 ck_assert_int_eq(efl_ui_vg_animation_looping_get(vg_anim), EINA_TRUE);
55 55
56 // Auto play 56 // Auto play
57 efl_ui_vg_animation_autoplay_set(vg_anim, EINA_TRUE); 57 efl_ui_vg_animation_autoplay_set(vg_anim, EINA_TRUE);