summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/test_flip.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/bin/test_flip.c b/src/bin/test_flip.c
index f6aca729d..e49cb65a0 100644
--- a/src/bin/test_flip.c
+++ b/src/bin/test_flip.c
@@ -3,7 +3,6 @@
3#endif 3#endif
4#include <Elementary.h> 4#include <Elementary.h>
5 5
6
7void 6void
8my_fl_1(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 7my_fl_1(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
9{ 8{
@@ -492,13 +491,24 @@ test_flip3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
492 evas_object_show(win); 491 evas_object_show(win);
493} 492}
494 493
495
496static void 494static void
497my_fl_go(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 495my_fl_go(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
498{ 496{
499 Evas_Object *win = data; 497 Evas_Object *win = data;
498
499 Evas_Object *rdg = evas_object_data_get(win, "rdg");
500 Evas_Object *rd = elm_radio_selected_object_get(rdg);
500 Evas_Object *fl = evas_object_data_get(win, "fl"); 501 Evas_Object *fl = evas_object_data_get(win, "fl");
501 elm_flip_go(fl, ELM_FLIP_PAGE_LEFT); 502
503 const char *text = elm_object_text_get(rd);
504 if (!text) return;
505
506 if (!strcmp(text, "Rotate"))
507 elm_flip_go(fl, ELM_FLIP_ROTATE_Y_CENTER_AXIS);
508 else if (!strcmp(text, "Cube"))
509 elm_flip_go(fl, ELM_FLIP_CUBE_RIGHT);
510 else if (!strcmp(text, "Page"))
511 elm_flip_go(fl, ELM_FLIP_PAGE_RIGHT);
502} 512}
503 513
504static void 514static void
@@ -611,7 +621,7 @@ test_flip4(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
611 evas_object_smart_callback_add(rd, "changed", my_fl_ch, win); 621 evas_object_smart_callback_add(rd, "changed", my_fl_ch, win);
612 622
613 bt = elm_button_add(win); 623 bt = elm_button_add(win);
614 elm_object_text_set(bt, "Flip page"); 624 elm_object_text_set(bt, "Flip Go");
615 evas_object_smart_callback_add(bt, "clicked", my_fl_go, win); 625 evas_object_smart_callback_add(bt, "clicked", my_fl_go, win);
616 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 626 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
617 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0); 627 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);