Rename DnD test
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Thu, 28 Nov 2013 14:04:08 +0000 (16:04 +0200)
committerDaniel Zaoui <daniel.zaoui@samsung.com>
Thu, 28 Nov 2013 14:24:01 +0000 (16:24 +0200)
src/bin/test.c
src/bin/test_dnd.c

index 1740246..a6dc709 100755 (executable)
@@ -232,7 +232,7 @@ void test_web_mobile(void *data, Evas_Object *obj, void *event_info);
 void test_dnd_genlist_default_anim(void *data, Evas_Object *obj, void *event_info);
 void test_dnd_genlist_user_anim(void *data, Evas_Object *obj, void *event_info);
 void test_dnd_genlist_gengrid(void *data, Evas_Object *obj, void *event_info);
-void test_dnd_overlapping(void *data, Evas_Object *obj, void *event_info);
+void test_dnd_multi_features(void *data, Evas_Object *obj, void *event_info);
 void test_task_switcher(void *data, Evas_Object *obj, void *event_info);
 void test_application_server_message(void *data, Evas_Object *obj, void *event_info);
 void test_application_server_phone(void *data, Evas_Object *obj, void *event_info);
@@ -807,7 +807,7 @@ add_tests:
    ADD_TEST(NULL, "Drag & Drop", "Genlist DnD Dflt Anim", test_dnd_genlist_default_anim);
    ADD_TEST(NULL, "Drag & Drop", "Genlist DnD User Anim", test_dnd_genlist_user_anim);
    ADD_TEST(NULL, "Drag & Drop", "Genlist-Gengrid DnD", test_dnd_genlist_gengrid);
-   ADD_TEST(NULL, "Drag & Drop", "Overlapping DnD", test_dnd_overlapping);
+   ADD_TEST(NULL, "Drag & Drop", "Features DnD", test_dnd_multi_features);
 
    //------------------------------//
    ADD_TEST(NULL, "Miscellaneous", "Copy And Paste", test_cnp);
index d8ca772..093383e 100644 (file)
@@ -48,6 +48,7 @@ _item_ptr_cmp(const void *d1, const void *d2)
 
 static Elm_Genlist_Item_Class *itc1;
 static Elm_Gengrid_Item_Class *gic;
+
 static char *
 gl_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
 {
@@ -959,13 +960,13 @@ static Eina_Bool _drop_bg_change_cb(void *data EINA_UNUSED, Evas_Object *obj, El
 }
 
 void
-test_dnd_overlapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+test_dnd_multi_features(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {
    char buf[PATH_MAX];
    Evas_Object *win, *bxx, *bg;
    int i;
 
-   win = elm_win_util_standard_add("dnd-overlapping", "DnD-Overlapping");
+   win = elm_win_util_standard_add("dnd-multi-features", "DnD-Multi Features");
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
@@ -1023,7 +1024,7 @@ test_dnd_overlapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
         elm_image_file_set(ic, buf, NULL);
         evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
         bt = elm_button_add(win);
-        elm_object_text_set(bt, "Drop into me to change my icon");
+        elm_object_text_set(bt, "Multi-callbacks check");
         elm_drop_target_add(bt, ELM_SEL_FORMAT_TARGETS, NULL, NULL, NULL, NULL, NULL, NULL, _drop_but_icon_change_cb, win);
         elm_drop_target_add(bt, ELM_SEL_FORMAT_TARGETS, _enter_but_cb, NULL, NULL, NULL, NULL, NULL, _drop_but_cb_remove_cb, NULL);
         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
         elm_image_file_set(ic, buf, NULL);
         evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
         bt = elm_button_add(win);
+        elm_object_text_set(bt, "Drop into me to change my icon");
+        elm_drop_target_add(bt, ELM_SEL_FORMAT_TARGETS, NULL, NULL, NULL, NULL, NULL, NULL, _drop_but_icon_change_cb, win);
+        elm_object_part_content_set(bt, "icon", ic);
+        elm_box_pack_end(vert_box, bt);
+        evas_object_show(bt);
+        evas_object_show(ic);
+
+        ic = elm_icon_add(win);
+        snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
+        elm_image_file_set(ic, buf, NULL);
+        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+        bt = elm_button_add(win);
         elm_object_text_set(bt, "No action on drop");
         elm_object_part_content_set(bt, "icon", ic);
         elm_box_pack_end(vert_box, bt);