exactness - Elm_List_Item -> Elm_Object_Item

SVN revision: 67121
devs/tasn/jenkins
ChunEon Park 11 years ago
parent 5df77cb4a5
commit 24ef320096
  1. 42
      src/bin/test_index.c
  2. 50
      src/bin/test_list.c
  3. 2
      src/bin/test_tooltip.c

@ -210,11 +210,11 @@ int
test_index2_cmp(const void *data1, const void *data2)
{
const char *label1, *label2;
const Elm_List_Item *it1 = data1;
const Elm_List_Item *it2 = data2;
const Elm_Object_Item *list_it1 = data1;
const Elm_Object_Item *list_it2 = data2;
label1 = elm_list_item_label_get(it1);
label2 = elm_list_item_label_get(it2);
label1 = elm_list_item_label_get(list_it1);
label2 = elm_list_item_label_get(list_it2);
return strcasecmp(label1, label2);
}
@ -236,19 +236,19 @@ void
test_index2_it_add(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Test_Index2_Elements *gui = data;
Elm_List_Item *it;
Elm_Object_Item *list_it;
const char *label;
char letter[2];
label = elm_entry_entry_get(gui->entry);
snprintf(letter, sizeof(letter), "%c", label[0]);
it = elm_list_item_sorted_insert(gui->lst, label, NULL, NULL, NULL, NULL,
test_index2_cmp);
elm_index_item_sorted_insert(gui->id, letter, it, test_index2_icmp,
list_it = elm_list_item_sorted_insert(gui->lst, label, NULL, NULL, NULL,
NULL, test_index2_cmp);
elm_index_item_sorted_insert(gui->id, letter, list_it, test_index2_icmp,
test_index2_cmp);
elm_list_go(gui->lst);
/* FIXME it's not showing the recently added item */
elm_list_item_show(it);
elm_list_item_show(list_it);
}
void
@ -256,31 +256,31 @@ test_index2_it_del(void *data, Evas_Object *obj, void *event_info __UNUSED__)
{
Test_Index2_Elements *gui = data;
const char *label, *label_next;
Elm_List_Item *it, *it_next;
Elm_Object_Item *lit, *lit_next;
it = elm_list_selected_item_get(obj);
it_next = elm_list_item_next(it);
lit = elm_list_selected_item_get(obj);
lit_next = elm_list_item_next(lit);
if (!it_next)
if (!lit_next)
{
elm_index_item_del(gui->id, elm_index_item_find(gui->id, it));
elm_list_item_del(it);
elm_index_item_del(gui->id, elm_index_item_find(gui->id, lit));
elm_list_item_del(lit);
return;
}
label = elm_list_item_label_get(it);
label_next = elm_list_item_label_get(it_next);
label = elm_list_item_label_get(lit);
label_next = elm_list_item_label_get(lit_next);
if (label[0] == label_next[0])
{
Elm_Object_Item *iit;
iit = elm_index_item_find(gui->id, it);
elm_index_item_data_set(iit, it_next);
iit = elm_index_item_find(gui->id, lit);
elm_index_item_data_set(iit, lit_next);
}
else
elm_index_item_del(gui->id, elm_index_item_find(gui->id, it));
elm_index_item_del(gui->id, elm_index_item_find(gui->id, lit));
elm_list_item_del(it);
elm_list_item_del(lit);
}
void

@ -268,7 +268,7 @@ TEST_START(test_list)
{
Evas_Object *bg, *li, *ic, *ic2, *bx, *bxx, *tb2, *bt;
char buf[PATH_MAX];
Elm_List_Item *it1, *it2, *it3, *it4, *it5;
Elm_Object_Item *list_it1, *list_it2, *list_it3, *list_it4, *list_it5;
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
@ -299,7 +299,7 @@ TEST_START(test_list)
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
elm_icon_scale_set(ic, 1, 1);
it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
list_it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
elm_icon_scale_set(ic, 0, 0);
@ -316,7 +316,7 @@ TEST_START(test_list)
ic2 = elm_icon_add(win);
elm_icon_standard_set(ic2, "clock");
elm_icon_scale_set(ic2, 0, 0);
it2 = elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
list_it2 = elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_TRUE);
@ -347,18 +347,18 @@ TEST_START(test_list)
elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
it3 = elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
list_it3 = elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
it4 = elm_list_item_append(li, "Here", NULL, NULL, NULL, NULL);
list_it4 = elm_list_item_append(li, "Here", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "some", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "more", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "items", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "Is this label long enough?", NULL, NULL, NULL, NULL);
it5 = elm_list_item_append(li, "Maybe this one is even longer so we can test long long items.", NULL, NULL, NULL, NULL);
list_it5 = elm_list_item_append(li, "Maybe this one is even longer so we can test long long items.", NULL, NULL, NULL, NULL);
elm_list_go(li);
@ -370,7 +370,7 @@ TEST_START(test_list)
bt = elm_button_add(win);
elm_object_text_set(bt, "Hello");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it1);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it1);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.9, 0.5);
elm_table_pack(tb2, bt, 0, 0, 1, 1);
@ -378,7 +378,7 @@ TEST_START(test_list)
bt = elm_button_add(win);
elm_object_text_set(bt, "How");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it2);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it2);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.9, 0.5);
elm_table_pack(tb2, bt, 0, 1, 1, 1);
@ -386,7 +386,7 @@ TEST_START(test_list)
bt = elm_button_add(win);
elm_object_text_set(bt, "doing");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it3);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it3);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.9, 0.5);
elm_table_pack(tb2, bt, 0, 2, 1, 1);
@ -394,7 +394,7 @@ TEST_START(test_list)
bt = elm_button_add(win);
elm_object_text_set(bt, "Here");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it4);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it4);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.9, 0.5);
elm_table_pack(tb2, bt, 0, 3, 1, 1);
@ -402,7 +402,7 @@ TEST_START(test_list)
bt = elm_button_add(win);
elm_object_text_set(bt, "Maybe this...");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it5);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it5);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.9, 0.5);
elm_table_pack(tb2, bt, 0, 4, 1, 1);
@ -424,7 +424,7 @@ TEST_START(test_list_horizontal)
{
Evas_Object *bg, *li, *ic, *ic2, *bx, *tb2, *bt;
char buf[PATH_MAX];
Elm_List_Item *it1, *it2, *it3, *it4;
Elm_Object_Item *list_it1, *list_it2, *list_it3, *list_it4;
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
@ -441,7 +441,7 @@ TEST_START(test_list_horizontal)
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
elm_icon_scale_set(ic, 1, 1);
it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
list_it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
elm_icon_scale_set(ic, 0, 0);
@ -458,7 +458,7 @@ TEST_START(test_list_horizontal)
ic2 = elm_icon_add(win);
elm_icon_standard_set(ic2, "clock");
elm_icon_scale_set(ic2, 0, 0);
it2 = elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
list_it2 = elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
bx = elm_box_add(win);
@ -481,13 +481,13 @@ TEST_START(test_list_horizontal)
elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
it3 = elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
list_it3 = elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
it4 = elm_list_item_append(li, "And", NULL, NULL, NULL, NULL);
list_it4 = elm_list_item_append(li, "And", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "here", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "we", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
@ -505,7 +505,7 @@ TEST_START(test_list_horizontal)
bt = elm_button_add(win);
elm_object_text_set(bt, "Hello");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it1);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it1);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.5, 0.9);
elm_table_pack(tb2, bt, 0, 0, 1, 1);
@ -513,7 +513,7 @@ TEST_START(test_list_horizontal)
bt = elm_button_add(win);
elm_object_text_set(bt, "How");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it2);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it2);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.5, 0.9);
elm_table_pack(tb2, bt, 1, 0, 1, 1);
@ -521,7 +521,7 @@ TEST_START(test_list_horizontal)
bt = elm_button_add(win);
elm_object_text_set(bt, "doing");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it3);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it3);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.5, 0.9);
elm_table_pack(tb2, bt, 2, 0, 1, 1);
@ -529,7 +529,7 @@ TEST_START(test_list_horizontal)
bt = elm_button_add(win);
elm_object_text_set(bt, "And");
evas_object_smart_callback_add(bt, "clicked", my_show_it, it4);
evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it4);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.5, 0.9);
elm_table_pack(tb2, bt, 3, 0, 1, 1);
@ -557,8 +557,8 @@ my_li2_sel(void *data __UNUSED__,
Evas_Object *obj,
void *event_info __UNUSED__)
{
Elm_List_Item *it = elm_list_selected_item_get(obj);
elm_list_item_selected_set(it, 0);
Elm_Object_Item *list_it = elm_list_selected_item_get(obj);
elm_list_item_selected_set(list_it, EINA_FALSE);
// elm_list_item_selected_set(event_info, 0);
}
@ -566,7 +566,7 @@ TEST_START(test_list2)
{
Evas_Object *bg, *li, *ic, *ic2, *bx, *bx2, *bt;
char buf[PATH_MAX];
Elm_List_Item *it;
Elm_Object_Item *list_it;
bg = elm_bg_add(win);
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
@ -589,8 +589,8 @@ TEST_START(test_list2)
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
it = elm_list_item_append(li, "Hello", ic, NULL, my_li2_sel, NULL);
elm_list_item_selected_set(it, 1);
list_it = elm_list_item_append(li, "Hello", ic, NULL, my_li2_sel, NULL);
elm_list_item_selected_set(list_it, EINA_TRUE);
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
elm_icon_scale_set(ic, 0, 0);

@ -365,7 +365,7 @@ TEST_START(test_tooltip)
{
Evas_Object *bg, *bx, *tb, *bt, *se, *lst;
Elm_Object_Item *tb_it;
Elm_List_Item *li;
Elm_Object_Item *li;
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);

Loading…
Cancel
Save