summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2013-11-28 16:04:08 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2013-11-28 16:24:01 +0200
commit7b13aa26890573a3e9f59b204a4f31cc79d1ea07 (patch)
treec7fae2e2a315da2d37cbe494b4abb900922987f5 /src
parent98aeb437590c3838f53770ff7553b2b1a29c0281 (diff)
Rename DnD test
Diffstat (limited to 'src')
-rwxr-xr-xsrc/bin/test.c4
-rw-r--r--src/bin/test_dnd.c19
2 files changed, 18 insertions, 5 deletions
diff --git a/src/bin/test.c b/src/bin/test.c
index 174024646..a6dc70962 100755
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -232,7 +232,7 @@ void test_web_mobile(void *data, Evas_Object *obj, void *event_info);
232void test_dnd_genlist_default_anim(void *data, Evas_Object *obj, void *event_info); 232void test_dnd_genlist_default_anim(void *data, Evas_Object *obj, void *event_info);
233void test_dnd_genlist_user_anim(void *data, Evas_Object *obj, void *event_info); 233void test_dnd_genlist_user_anim(void *data, Evas_Object *obj, void *event_info);
234void test_dnd_genlist_gengrid(void *data, Evas_Object *obj, void *event_info); 234void test_dnd_genlist_gengrid(void *data, Evas_Object *obj, void *event_info);
235void test_dnd_overlapping(void *data, Evas_Object *obj, void *event_info); 235void test_dnd_multi_features(void *data, Evas_Object *obj, void *event_info);
236void test_task_switcher(void *data, Evas_Object *obj, void *event_info); 236void test_task_switcher(void *data, Evas_Object *obj, void *event_info);
237void test_application_server_message(void *data, Evas_Object *obj, void *event_info); 237void test_application_server_message(void *data, Evas_Object *obj, void *event_info);
238void test_application_server_phone(void *data, Evas_Object *obj, void *event_info); 238void test_application_server_phone(void *data, Evas_Object *obj, void *event_info);
@@ -807,7 +807,7 @@ add_tests:
807 ADD_TEST(NULL, "Drag & Drop", "Genlist DnD Dflt Anim", test_dnd_genlist_default_anim); 807 ADD_TEST(NULL, "Drag & Drop", "Genlist DnD Dflt Anim", test_dnd_genlist_default_anim);
808 ADD_TEST(NULL, "Drag & Drop", "Genlist DnD User Anim", test_dnd_genlist_user_anim); 808 ADD_TEST(NULL, "Drag & Drop", "Genlist DnD User Anim", test_dnd_genlist_user_anim);
809 ADD_TEST(NULL, "Drag & Drop", "Genlist-Gengrid DnD", test_dnd_genlist_gengrid); 809 ADD_TEST(NULL, "Drag & Drop", "Genlist-Gengrid DnD", test_dnd_genlist_gengrid);
810 ADD_TEST(NULL, "Drag & Drop", "Overlapping DnD", test_dnd_overlapping); 810 ADD_TEST(NULL, "Drag & Drop", "Features DnD", test_dnd_multi_features);
811 811
812 //------------------------------// 812 //------------------------------//
813 ADD_TEST(NULL, "Miscellaneous", "Copy And Paste", test_cnp); 813 ADD_TEST(NULL, "Miscellaneous", "Copy And Paste", test_cnp);
diff --git a/src/bin/test_dnd.c b/src/bin/test_dnd.c
index d8ca772b6..093383e70 100644
--- a/src/bin/test_dnd.c
+++ b/src/bin/test_dnd.c
@@ -48,6 +48,7 @@ _item_ptr_cmp(const void *d1, const void *d2)
48 48
49static Elm_Genlist_Item_Class *itc1; 49static Elm_Genlist_Item_Class *itc1;
50static Elm_Gengrid_Item_Class *gic; 50static Elm_Gengrid_Item_Class *gic;
51
51static char * 52static char *
52gl_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 53gl_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
53{ 54{
@@ -959,13 +960,13 @@ static Eina_Bool _drop_bg_change_cb(void *data EINA_UNUSED, Evas_Object *obj, El
959} 960}
960 961
961void 962void
962test_dnd_overlapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 963test_dnd_multi_features(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
963{ 964{
964 char buf[PATH_MAX]; 965 char buf[PATH_MAX];
965 Evas_Object *win, *bxx, *bg; 966 Evas_Object *win, *bxx, *bg;
966 int i; 967 int i;
967 968
968 win = elm_win_util_standard_add("dnd-overlapping", "DnD-Overlapping"); 969 win = elm_win_util_standard_add("dnd-multi-features", "DnD-Multi Features");
969 elm_win_autodel_set(win, EINA_TRUE); 970 elm_win_autodel_set(win, EINA_TRUE);
970 971
971 bg = elm_bg_add(win); 972 bg = elm_bg_add(win);
@@ -1023,7 +1024,7 @@ test_dnd_overlapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
1023 elm_image_file_set(ic, buf, NULL); 1024 elm_image_file_set(ic, buf, NULL);
1024 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); 1025 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
1025 bt = elm_button_add(win); 1026 bt = elm_button_add(win);
1026 elm_object_text_set(bt, "Drop into me to change my icon"); 1027 elm_object_text_set(bt, "Multi-callbacks check");
1027 elm_drop_target_add(bt, ELM_SEL_FORMAT_TARGETS, NULL, NULL, NULL, NULL, NULL, NULL, _drop_but_icon_change_cb, win); 1028 elm_drop_target_add(bt, ELM_SEL_FORMAT_TARGETS, NULL, NULL, NULL, NULL, NULL, NULL, _drop_but_icon_change_cb, win);
1028 elm_drop_target_add(bt, ELM_SEL_FORMAT_TARGETS, _enter_but_cb, NULL, NULL, NULL, NULL, NULL, _drop_but_cb_remove_cb, NULL); 1029 elm_drop_target_add(bt, ELM_SEL_FORMAT_TARGETS, _enter_but_cb, NULL, NULL, NULL, NULL, NULL, _drop_but_cb_remove_cb, NULL);
1029 elm_object_part_content_set(bt, "icon", ic); 1030 elm_object_part_content_set(bt, "icon", ic);
@@ -1036,6 +1037,18 @@ test_dnd_overlapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
1036 elm_image_file_set(ic, buf, NULL); 1037 elm_image_file_set(ic, buf, NULL);
1037 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); 1038 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
1038 bt = elm_button_add(win); 1039 bt = elm_button_add(win);
1040 elm_object_text_set(bt, "Drop into me to change my icon");
1041 elm_drop_target_add(bt, ELM_SEL_FORMAT_TARGETS, NULL, NULL, NULL, NULL, NULL, NULL, _drop_but_icon_change_cb, win);
1042 elm_object_part_content_set(bt, "icon", ic);
1043 elm_box_pack_end(vert_box, bt);
1044 evas_object_show(bt);
1045 evas_object_show(ic);
1046
1047 ic = elm_icon_add(win);
1048 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
1049 elm_image_file_set(ic, buf, NULL);
1050 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
1051 bt = elm_button_add(win);
1039 elm_object_text_set(bt, "No action on drop"); 1052 elm_object_text_set(bt, "No action on drop");
1040 elm_object_part_content_set(bt, "icon", ic); 1053 elm_object_part_content_set(bt, "icon", ic);
1041 elm_box_pack_end(vert_box, bt); 1054 elm_box_pack_end(vert_box, bt);