summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-09-24 11:18:57 -0400
committerCedric Bail <cedric.bail@free.fr>2019-09-24 15:23:15 -0700
commit3d3cdc5955560726f0b9a8cef492274a1f7254a4 (patch)
treedb17c01b91b5a1d98367a2e168154fd1a0f4c974 /src/bin
parent89bee7a11a61d08cc758b061fd2f5e705d1f9029 (diff)
efl/player: rename 'play' property to 'pause'
this is a bit of an overhaul wherein the existing 'play' mechanics are all inverted. 'pause' is a state which stops playback but does not affect the playback_position property. this patch also includes implementations of Efl.Player::playing for a couple classes which (now) only implement pause, as this is a requirement for the objects to actually activate their animations test cases: * unit tests * all elm_test animation cases * elm_test video * rage Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10114
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elementary/test_efl_anim_pause.c4
-rw-r--r--src/bin/elementary/test_efl_anim_repeat.c3
-rw-r--r--src/bin/elementary/test_evas_snapshot.c6
-rw-r--r--src/bin/elementary/test_gfx_filters.c2
-rw-r--r--src/bin/elementary/test_photocam.c12
5 files changed, 15 insertions, 12 deletions
diff --git a/src/bin/elementary/test_efl_anim_pause.c b/src/bin/elementary/test_efl_anim_pause.c
index 748599b..3730db3 100644
--- a/src/bin/elementary/test_efl_anim_pause.c
+++ b/src/bin/elementary/test_efl_anim_pause.c
@@ -82,13 +82,13 @@ _pause_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED
82 if (ad->is_anim_paused) 82 if (ad->is_anim_paused)
83 { 83 {
84 //Pause animation 84 //Pause animation
85 efl_player_play_set(ad->anim_obj, EINA_FALSE); 85 efl_player_paused_set(ad->anim_obj, EINA_TRUE);
86 elm_object_text_set(obj, "Resume Animation"); 86 elm_object_text_set(obj, "Resume Animation");
87 } 87 }
88 else 88 else
89 { 89 {
90 //Resume animation 90 //Resume animation
91 efl_player_play_set(ad->anim_obj, EINA_TRUE); 91 efl_player_paused_set(ad->anim_obj, EINA_FALSE);
92 elm_object_text_set(obj, "Pause Animation"); 92 elm_object_text_set(obj, "Pause Animation");
93 } 93 }
94} 94}
diff --git a/src/bin/elementary/test_efl_anim_repeat.c b/src/bin/elementary/test_efl_anim_repeat.c
index d853f9c..55bf98c 100644
--- a/src/bin/elementary/test_efl_anim_repeat.c
+++ b/src/bin/elementary/test_efl_anim_repeat.c
@@ -122,8 +122,7 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
122 App_Data *ad = calloc(1, sizeof(App_Data)); 122 App_Data *ad = calloc(1, sizeof(App_Data));
123 if (!ad) return; 123 if (!ad) return;
124 124
125 Evas_Object *win = elm_win_add(NULL, "Efl Animation Repeat", ELM_WIN_BASIC); 125 Evas_Object *win = elm_win_util_standard_add(NULL, "Efl Animation Repeat");
126 elm_win_title_set(win, "Efl Animation Repeat");
127 elm_win_autodel_set(win, EINA_TRUE); 126 elm_win_autodel_set(win, EINA_TRUE);
128 evas_object_smart_callback_add(win, "delete,request", _win_del_cb, ad); 127 evas_object_smart_callback_add(win, "delete,request", _win_del_cb, ad);
129 128
diff --git a/src/bin/elementary/test_evas_snapshot.c b/src/bin/elementary/test_evas_snapshot.c
index ecfee19..f1395f2 100644
--- a/src/bin/elementary/test_evas_snapshot.c
+++ b/src/bin/elementary/test_evas_snapshot.c
@@ -47,7 +47,11 @@ _anim_toggle(void *data, const Efl_Event *ev EINA_UNUSED)
47 EINA_ITERATOR_FOREACH(it, o) 47 EINA_ITERATOR_FOREACH(it, o)
48 { 48 {
49 if (efl_isa(o, EFL_PLAYER_INTERFACE) && efl_playable_get(o)) 49 if (efl_isa(o, EFL_PLAYER_INTERFACE) && efl_playable_get(o))
50 efl_player_play_set(o, !efl_player_play_get(o)); 50 {
51 if (!efl_player_playing_get(o))
52 efl_player_playing_set(o, EINA_TRUE);
53 efl_player_paused_set(o, !efl_player_paused_get(o));
54 }
51 } 55 }
52 eina_iterator_free(it); 56 eina_iterator_free(it);
53} 57}
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index e7410c8..11ee74c 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -408,7 +408,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
408 efl_name_set(efl_added, images[k].src_name), 408 efl_name_set(efl_added, images[k].src_name),
409 elm_object_tooltip_text_set(efl_added, images[k].src_name)); 409 elm_object_tooltip_text_set(efl_added, images[k].src_name));
410 if (efl_playable_get(o)) 410 if (efl_playable_get(o))
411 efl_player_play_set(o, 1); 411 efl_player_playing_set(o, 1);
412 efl_event_callback_add(o, EFL_INPUT_EVENT_CLICKED, _img_click, win); 412 efl_event_callback_add(o, EFL_INPUT_EVENT_CLICKED, _img_click, win);
413 efl_pack(box2, o); 413 efl_pack(box2, o);
414 } 414 }
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index 70d6da2..c26be3a 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -153,7 +153,7 @@ my_bt_open(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
153 153
154 if (file && eina_str_has_extension(file, ".gif") 154 if (file && eina_str_has_extension(file, ".gif")
155 && efl_playable_get(ph)) 155 && efl_playable_get(ph))
156 efl_player_play_set(ph, EINA_TRUE); 156 efl_player_playing_set(ph, EINA_TRUE);
157} 157}
158 158
159static void 159static void
@@ -754,11 +754,11 @@ test_photocam_icon(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
754static void 754static void
755_zoomable_clicked_cb(void *data EINA_UNUSED, const Efl_Event *ev) 755_zoomable_clicked_cb(void *data EINA_UNUSED, const Efl_Event *ev)
756{ 756{
757 Eina_Bool play; 757 Eina_Bool paused;
758 758
759 play = !efl_player_play_get(ev->object); 759 paused = efl_player_paused_get(ev->object);
760 printf("image clicked! play = %d\n", play); 760 printf("image clicked! paused = %d\n", paused);
761 efl_player_play_set(ev->object, play); 761 efl_player_paused_set(ev->object, !paused);
762} 762}
763 763
764static void 764static void
@@ -832,7 +832,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
832 if (efl_playable_get(zoomable)) 832 if (efl_playable_get(zoomable))
833 { 833 {
834 printf("animation is available for this image.\n"); 834 printf("animation is available for this image.\n");
835 efl_player_play_set(zoomable, EINA_TRUE); 835 efl_player_playing_set(zoomable, EINA_TRUE);
836 } 836 }
837 837
838 rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win, 838 rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,