*
* This code places a Elementary list widgets on a window,
* along with some buttons trigerring actions on it (though its API).
- * It covers most of Elm_List_Item functions.
+ * It covers most of elm_list_item functions.
*
* On our @c main function, we are adding a default list with
* 3 items. We are only setting their labels (second parameter of function
for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++)
{
char buf[32];
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
- it = elm_list_item_append(o, dict[i], NULL, NULL, NULL, NULL);
+ list_it = elm_list_item_append(o, dict[i], NULL, NULL, NULL, NULL);
snprintf(buf, sizeof(buf), "%c", dict[i][0]);
- elm_index_item_append(id, buf, it);
+ elm_index_item_append(id, buf, list_it);
}
elm_index_active_set(id, EINA_TRUE);
{
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
Elm_Text_Class_Data *tc_data, *tc;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Eina_List *l;
win = data;
fclasses = evas_object_data_get(win, "font_classes_list");
- it = elm_list_selected_item_get(fclasses);
- if (!it) return;
- tc_data = elm_object_item_data_get(it);
+ list_it = elm_list_selected_item_get(fclasses);
+ if (!list_it) return;
+ tc_data = elm_object_item_data_get(list_it);
fnames = evas_object_data_get(win, "font_names_list");
fstyles = evas_object_data_get(win, "font_styles_list");
{
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
Elm_Text_Class_Data *tc_data;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
win = data;
fclasses = evas_object_data_get(win, "font_classes_list");
- it = elm_list_selected_item_get(fclasses);
- if (!it) return;
- tc_data = elm_object_item_data_get(it);
+ list_it = elm_list_selected_item_get(fclasses);
+ if (!list_it) return;
+ tc_data = elm_object_item_data_get(list_it);
fnames = evas_object_data_get(win, "font_names_list");
fstyles = evas_object_data_get(win, "font_styles_list");
{
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
Elm_Text_Class_Data *tc_data;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Eina_List *l;
win = data;
fstyles = evas_object_data_get(win, "font_styles_list");
fsizes = evas_object_data_get(win, "font_sizes_list");
- it = elm_list_selected_item_get(fclasses);
- if (it) elm_list_item_selected_set(it, EINA_FALSE);
+ list_it = elm_list_selected_item_get(fclasses);
+ if (list_it) elm_list_item_selected_set(list_it, EINA_FALSE);
ELM_LIST_DISABLE(fnames);
ELM_LIST_DISABLE(fstyles);
const char *curr_theme, *curr_engine;
const Eina_List *l_items, *l;
Eina_Bool s_bounce, ts;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Elm_Theme *th;
int fs;
curr_engine = elm_engine_current_get();
l_items = elm_list_items_get(evas_object_data_get(win, "engines_list"));
- EINA_LIST_FOREACH(l_items, l, it)
+ EINA_LIST_FOREACH(l_items, l, list_it)
{
- if (!strcmp(elm_object_item_data_get(it), curr_engine))
+ if (!strcmp(elm_object_item_data_get(list_it), curr_engine))
{
- elm_list_item_selected_set(it, EINA_TRUE);
+ elm_list_item_selected_set(list_it, EINA_TRUE);
break;
}
}
Evas_Object *win = elm_object_top_widget_get(obj);
Evas_Object *sample = evas_object_data_get(win, "theme_preview");
Elm_Theme *th, *sth;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
const char *defth;
Eina_Strbuf *newth;
Eina_List *l;
eina_strbuf_free(newth);
return;
}
- EINA_LIST_REVERSE_FOREACH((Eina_List*)tsel, l, it)
+ EINA_LIST_REVERSE_FOREACH((Eina_List*)tsel, l, list_it)
{
- Theme *t = elm_object_item_data_get(it);
+ Theme *t = elm_object_item_data_get(list_it);
eina_strbuf_append_printf(newth, "%s:", t->name);
if ((!l->prev) && strcmp(t->name, "default"))
/* ensure default theme is always there for fallback */
Eina_List *list, *l;
char *th, *s, *ext;
Elm_Theme *d;
- Elm_List_Item *it, *def_it = NULL;
+ Elm_Object_Item *list_it, *def_it = NULL;
const char *theme_name, *sep[20];
unsigned int x;
t->label = eina_stringshare_add(s);
}
themes = eina_list_append(themes, t);
- it = elm_list_item_append(li, t->label, NULL, NULL, NULL, t);
- if (!strcmp(t->name, "default")) def_it = it;
+ list_it = elm_list_item_append(li, t->label, NULL, NULL, NULL, t);
+ if (!strcmp(t->name, "default")) def_it = list_it;
for (y = x - 1 /* ignore default e theme */; y > 0; y--)
{
const char *start = (sep[y - 1][0] == ':') ? sep[y - 1] + 1 : sep[y - 1];
unsigned int len = (unsigned int)(sep[y] - start);
if (strncmp(start , t->name, len) || (strlen(t->name) != len)) continue;
- if (!elm_list_item_selected_get(it))
- elm_list_item_selected_set(it, EINA_TRUE);
+ if (!elm_list_item_selected_get(list_it))
+ elm_list_item_selected_set(list_it, EINA_TRUE);
break;
}
}
const Eina_List *f_names_items, *l;
Elm_Text_Class_Data *tc_data;
Evas_Object *f_names_list;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
tc_data = elm_object_item_data_get(event_info);
f_names_items = elm_list_items_get(f_names_list);
- EINA_LIST_FOREACH(f_names_items, l, it)
+ EINA_LIST_FOREACH(f_names_items, l, list_it)
{
const char *l;
- l = elm_object_item_text_get(it);
+ l = elm_object_item_text_get(list_it);
if (tc_data->font && !strcmp(l, tc_data->font))
{
- elm_list_item_selected_set(it, EINA_TRUE);
- elm_list_item_show(it);
+ elm_list_item_selected_set(list_it, EINA_TRUE);
+ elm_list_item_show(list_it);
break;
}
}
Evas_Object *style_list, *cls_list, *sizes_list, *win;
const char *style, *sel_font;
Elm_Text_Class_Data *tc_data;
- Elm_List_Item *it, *fc_it;
+ Elm_Object_Item *list_it, *fc_list_it;
Elm_Font_Properties *efp;
const Eina_List *l;
- it = event_info;
- sel_font = elm_object_item_text_get(it);
+ list_it = event_info;
+ sel_font = elm_object_item_text_get(list_it);
win = elm_object_top_widget_get(obj);
style_list = evas_object_data_get(win, "font_styles_list");
cls_list = evas_object_data_get(win, "font_classes_list");
sizes_list = evas_object_data_get(win, "font_sizes_list");
- fc_it = elm_list_selected_item_get(cls_list);
- if (!fc_it) return; /* should not happen, fonts list disabled in
+ fc_list_it = elm_list_selected_item_get(cls_list);
+ if (!fc_list_it) return; /* should not happen, fonts list disabled in
* this case */
eina_stringshare_replace(&fdata.cur_font, sel_font);
- tc_data = elm_object_item_data_get(fc_it);
+ tc_data = elm_object_item_data_get(fc_list_it);
if (tc_data->font) eina_stringshare_del(tc_data->font);
if (fdata.cur_font) tc_data->font = eina_stringshare_ref(fdata.cur_font);
evas_event_freeze(evas_object_evas_get(style_list));
edje_freeze();
- it = NULL;
+ list_it = NULL;
EINA_LIST_FOREACH(efp->styles, l, style)
{
- Elm_List_Item *i;
+ Elm_Object_Item *i;
i = elm_list_item_append(style_list, style, NULL, NULL,
_font_styles_list_sel, NULL);
if (tc_data->style && (!strcmp(style, tc_data->style)))
- it = i;
+ list_it = i;
}
elm_list_go(style_list);
edje_thaw();
evas_event_thaw(evas_object_evas_get(style_list));
- if (it)
- elm_list_item_selected_set(it, EINA_TRUE);
+ if (list_it)
+ elm_list_item_selected_set(list_it, EINA_TRUE);
_font_preview_update(win);
}
Evas_Object *fc_list, *fs_list, *win;
Elm_Text_Class_Data *tc_data;
const Eina_List *l;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
win = elm_object_top_widget_get(obj);
fc_list = evas_object_data_get(win, "font_classes_list");
fs_list = evas_object_data_get(win, "font_sizes_list");
- it = elm_list_selected_item_get(fc_list);
- if (!it) return; /* should not happen */
+ list_it = elm_list_selected_item_get(fc_list);
+ if (!list_it) return; /* should not happen */
eina_stringshare_replace(&fdata.cur_style,
elm_object_item_text_get(event_info));
ELM_LIST_ENABLE(fs_list);
- tc_data = elm_object_item_data_get(it);
+ tc_data = elm_object_item_data_get(list_it);
eina_stringshare_del(tc_data->style);
tc_data->style = eina_stringshare_ref(fdata.cur_style);
evas_event_freeze(evas_object_evas_get(fs_list));
edje_freeze();
- EINA_LIST_FOREACH(elm_list_items_get(fs_list), l, it)
+ EINA_LIST_FOREACH(elm_list_items_get(fs_list), l, list_it)
{
Elm_Font_Size_Data *sdata;
- sdata = elm_object_item_data_get(it);
+ sdata = elm_object_item_data_get(list_it);
elm_list_item_selected_set(l->data, EINA_FALSE);
if (tc_data->size == sdata->size)
{
- elm_list_item_selected_set(it, EINA_TRUE);
- elm_list_item_show(it);
+ elm_list_item_selected_set(list_it, EINA_TRUE);
+ elm_list_item_show(list_it);
break;
}
}
Elm_Text_Class_Data *tc_data;
Evas_Object *fc_list, *win;
Elm_Font_Size_Data *sd;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
win = elm_object_top_widget_get(obj);
fc_list = evas_object_data_get(win, "font_classes_list");
- it = elm_list_selected_item_get(fc_list);
- if (!it) return; /* should not happen */
+ list_it = elm_list_selected_item_get(fc_list);
+ if (!list_it) return; /* should not happen */
sd = elm_object_item_data_get(event_info);
fdata.cur_size = sd->size;
- tc_data = elm_object_item_data_get(it);
+ tc_data = elm_object_item_data_get(list_it);
tc_data->size = fdata.cur_size;
_font_preview_update(win);
#endif
const char *label, *ext, *pdir;
char buf[PATH_MAX];
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Evas_Object *ic;
pdir = elm_profile_dir_get(profile, EINA_TRUE);
1, 1);
evas_object_show(ic);
- it = elm_list_item_append(l_widget, label, ic, NULL,
- _profiles_list_selected_cb, strdup(profile));
- elm_list_item_del_cb_set(it, _profiles_list_item_del_cb);
+ list_it = elm_list_item_append(l_widget, label, ic, NULL,
+ _profiles_list_selected_cb,
+ strdup(profile));
+ elm_object_item_del_cb_set(list_it, _profiles_list_item_del_cb);
if (cur_profile && !strcmp(profile, cur_profile))
- sel_it = it;
+ sel_it = list_it;
elm_profile_dir_free(pdir);
EINA_LIST_FOREACH(e_names, l, engine)
{
const char *label;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
if (!_elm_engine_supported(engine))
continue;
label = _engine_name_prettify(engine);
- it = elm_list_item_append(l_widget, label, NULL, NULL, NULL,
+ list_it = elm_list_item_append(l_widget, label, NULL, NULL, NULL,
strdup(engine));
- elm_list_item_del_cb_set(it, _engines_list_item_del_cb);
+ elm_object_item_del_cb_set(list_it, _engines_list_item_del_cb);
free((void *)label);
if (!strcmp(cur_engine, engine))
- sel_it = it;
+ sel_it = list_it;
}
if (sel_it) elm_list_item_selected_set(sel_it, EINA_TRUE);
test_cursor(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *bx, *bt, *list, *entry, *ck;
- Elm_List_Item *lit;
+ Elm_Object_Item *lit;
win = elm_win_add(NULL, "cursor", ELM_WIN_BASIC);
elm_win_title_set(win, "Cursor");
Evas_Object *win, *bg, *bx, *o, *grid, *gl;
Elm_Genlist_Item *it1, *it2, *it3;
Elm_Object_Item *tb_it;
- Elm_List_Item *lit;
+ Elm_Object_Item *lit;
char buf[PATH_MAX];
static Testitem ti[144];
int i, n;
test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *bx, *o;
- Elm_List_Item *lit;
+ Elm_Object_Item *lit;
char buf[PATH_MAX];
win = elm_win_add(NULL, "cursor3", ELM_WIN_BASIC);
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_object_text_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
{
Test_Index2_Elements *gui = data;
const char *label, *label_next;
- Elm_List_Item *it, *it_next;
+ Elm_Object_Item *list_it, *list_it_next;
Elm_Object_Item *iit;
- it = elm_list_selected_item_get(obj);
- it_next = elm_list_item_next(it);
+ list_it = elm_list_selected_item_get(obj);
+ list_it_next = elm_list_item_next(list_it);
- if (!it_next)
+ if (!list_it_next)
{
- iit = elm_index_item_find(gui->id, it);
+ iit = elm_index_item_find(gui->id, list_it);
if (iit) elm_object_item_del(iit);
- elm_list_item_del(it);
+ elm_list_item_del(list_it);
return;
}
- label = elm_object_item_text_get((Elm_Object_Item *)it);
- label_next = elm_object_item_text_get((Elm_Object_Item *)it_next);
+ label = elm_object_item_text_get(list_it);
+ label_next = elm_object_item_text_get(list_it_next);
- iit = elm_index_item_find(gui->id, it);
+ iit = elm_index_item_find(gui->id, list_it);
if (label[0] == label_next[0])
- elm_object_item_data_set(iit, it_next);
+ elm_object_item_data_set(iit, list_it_next);
else
elm_object_item_del(iit);
- elm_list_item_del(it);
+ elm_list_item_del(list_it);
}
void
{
Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *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;
win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
elm_win_title_set(win, "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);
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);
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);
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);
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);
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);
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);
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);
{
Evas_Object *win, *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;
win = elm_win_add(NULL, "list-horizontal", ELM_WIN_BASIC);
elm_win_title_set(win, "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);
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_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);
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);
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);
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);
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);
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_list_item_selected_set(event_info, 0);
+ Elm_Object_Item *list_it = elm_list_selected_item_get(obj);
+ elm_list_item_selected_set(list_it, 0);
}
void
{
Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *bx2, *bt;
char buf[PATH_MAX];
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
win = elm_win_add(NULL, "list2", ELM_WIN_BASIC);
elm_win_title_set(win, "List 2");
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);
{
Evas_Object *win, *bg, *bx, *tb, *bt, *se, *lst;
Elm_Object_Item *tb_it;
- Elm_List_Item *li;
+ Elm_Object_Item *lit;
win = elm_win_add(NULL, "tooltip", ELM_WIN_BASIC);
elm_win_title_set(win, "Tooltip");
evas_object_show(se);
lst = elm_list_add(win);
- li = elm_list_item_append(lst, "Hello", NULL, NULL, NULL, NULL);
- elm_list_item_tooltip_content_cb_set(li, _tt_item_label, NULL, NULL);
- elm_list_item_tooltip_window_mode_set(li, EINA_TRUE);
- li = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
- elm_list_item_tooltip_content_cb_set(li, _tt_item_icon, NULL, NULL);
- li = elm_list_item_append(lst, "Big Icon Tooltip", NULL, NULL, NULL, NULL);
- elm_list_item_tooltip_content_cb_set(li, _tt_item_icon2, NULL, NULL);
- elm_list_item_tooltip_style_set(li, "transparent");
- elm_list_item_tooltip_window_mode_set(li, EINA_TRUE);
- li = elm_list_item_append(lst, "Insanely Big Icon Tooltip", NULL, NULL, NULL, NULL);
- elm_list_item_tooltip_content_cb_set(li, _tt_item_icon3, NULL, NULL);
- elm_list_item_tooltip_style_set(li, "transparent");
- elm_list_item_tooltip_window_mode_set(li, EINA_TRUE);
+ lit = elm_list_item_append(lst, "Hello", NULL, NULL, NULL, NULL);
+ elm_list_item_tooltip_content_cb_set(lit, _tt_item_label, NULL, NULL);
+ elm_list_item_tooltip_window_mode_set(lit, EINA_TRUE);
+ lit = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
+ elm_list_item_tooltip_content_cb_set(lit, _tt_item_icon, NULL, NULL);
+ lit = elm_list_item_append(lst, "Big Icon Tooltip", NULL, NULL, NULL, NULL);
+ elm_list_item_tooltip_content_cb_set(lit, _tt_item_icon2, NULL, NULL);
+ elm_list_item_tooltip_style_set(lit, "transparent");
+ elm_list_item_tooltip_window_mode_set(lit, EINA_TRUE);
+ lit = elm_list_item_append(lst, "Insanely Big Icon Tooltip", NULL, NULL, NULL, NULL);
+ elm_list_item_tooltip_content_cb_set(lit, _tt_item_icon3, NULL, NULL);
+ elm_list_item_tooltip_style_set(lit, "transparent");
+ elm_list_item_tooltip_window_mode_set(lit, EINA_TRUE);
evas_object_size_hint_weight_set(lst, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(lst, EVAS_HINT_FILL, EVAS_HINT_FILL);
void *event_info __UNUSED__)
{
Elm_Object_Item *iit;
- Elm_List_Item *lit = elm_index_item_selected_get(d.index, 0);
+ Elm_Object_Item *lit = elm_index_item_selected_get(d.index, 0);
iit = elm_index_item_find(d.index, lit);
Evas_Object *obj,
void *event_info)
{
- Elm_List_Item *it = event_info;
+ Elm_Object_Item *lit = event_info;
fprintf(stdout, "New index item selected. Comparing item reported"
" via callback with the selection returned by the API: "
- "%s.\n", it == elm_index_item_selected_get(obj, 0) ? "OK" :
+ "%s.\n", lit == elm_index_item_selected_get(obj, 0) ? "OK" :
"FAIL, something went wrong");
}
char **argv __UNUSED__)
{
Evas_Object *win, *bg, *hbox, *vbox, *bt, *sep;
- Elm_List_Item *it;
+ Elm_Object_Item *lit;
unsigned int i;
char curr = 0;
for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++)
{
- it = elm_list_item_append(d.list, dict[i], NULL, NULL, NULL, NULL);
+ lit = elm_list_item_append(d.list, dict[i], NULL, NULL, NULL, NULL);
if (curr != dict[i][0])
{
/* indexing by first letters */
snprintf(buf, sizeof(buf), "%c", curr);
- elm_index_item_append(d.index, buf, it);
- index_it = elm_index_item_find(d.index, it);
+ elm_index_item_append(d.index, buf, lit);
+ index_it = elm_index_item_find(d.index, lit);
elm_object_item_del_cb_set(index_it, _index_item_del);
}
static void
_prepend_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Evas_Object *li = data;
char label[32];
snprintf(label, sizeof(label), "Item %i", counter++);
- it = elm_list_item_prepend(li, label, NULL, NULL, NULL, NULL);
- if (!it)
+ list_it = elm_list_item_prepend(li, label, NULL, NULL, NULL, NULL);
+ if (!list_it)
printf("Error adding item\n");
}
static void
_add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Evas_Object *li = data;
char label[32];
snprintf(label, sizeof(label), "Item %i", counter++);
- it = elm_list_item_append(li, label, NULL, NULL, NULL, NULL);
- if (!it)
+ list_it = elm_list_item_append(li, label, NULL, NULL, NULL, NULL);
+ if (!list_it)
printf("Error adding item\n");
}
static void
_add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Evas_Object *ic, *li = data;
char label[32];
elm_icon_standard_set(ic, "home");
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
- it = elm_list_item_append(li, label, ic, NULL, NULL, NULL);
- if (!it)
+ list_it = elm_list_item_append(li, label, ic, NULL, NULL, NULL);
+ if (!list_it)
printf("Error adding item with icon\n");
}
static void
_sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_List_Item *it = event_info;
- printf("Selected label: %s\n", elm_object_item_text_get(it));
+ Elm_Object_Item *list_it = event_info;
+ printf("Selected label: %s\n", elm_object_item_text_get(list_it));
}
static void
_add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Evas_Object *li = data;
char label[32];
snprintf(label, sizeof(label), "Item %i", counter++);
- it = elm_list_item_append(li, label, NULL, NULL, _sel_cb, NULL);
- if (!it)
+ list_it = elm_list_item_append(li, label, NULL, NULL, _sel_cb, NULL);
+ if (!list_it)
printf("Error adding item\n");
}
_sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info)
{
char *content = data;
- Elm_List_Item *it = event_info;
+ Elm_Object_Item *list_it = event_info;
printf("Selected label: %s with data: %s\n",
- elm_object_item_text_get(it), content);
+ elm_object_item_text_get(list_it), content);
}
static void
static void
_add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Evas_Object *li = data;
char label[32];
char *content = malloc(sizeof(char) * 32);
snprintf(content, 32, "Item content %i", counter);
snprintf(label, sizeof(label), "Item %i", counter++);
- it = elm_list_item_append(li, label, NULL, NULL, _sel_data_cb, content);
- if (!it) {
+ list_it = elm_list_item_append(li, label, NULL, NULL, _sel_data_cb, content);
+ if (!list_it) {
printf("Error adding item\n");
return;
}
- elm_list_item_del_cb_set(it, _free_data);
+ elm_list_item_del_cb_set(list_it, _free_data);
}
static void
_del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *selected_item;
+ Elm_Object_Item *selected_item;
Evas_Object *li = data;
selected_item = elm_list_selected_item_get(li);
static void
_unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *selected_item;
+ Elm_Object_Item *selected_item;
Evas_Object *li = data;
selected_item = elm_list_selected_item_get(li);
_print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
const Eina_List *l, *items;
- Elm_List_Item *it;
+ Elm_Object_Item *list_it;
Evas_Object *li = data;
items = elm_list_items_get(li);
- EINA_LIST_FOREACH(items, l, it)
- printf("%s\n", elm_object_item_text_get(it));
+ EINA_LIST_FOREACH(items, l, list_it)
+ printf("%s\n", elm_object_item_text_get(list_it));
}
static void
static void
_select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *selected_item, *next_item;
+ Elm_Object_Item *selected_item, *next_item;
Evas_Object *li = data;
selected_item = elm_list_selected_item_get(li);
static void
_insert_after_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *selected_item, *it;
+ Elm_Object_Item *selected_item, *list_it;
Evas_Object *li = data;
char label[32];
if (!selected_item) return;
snprintf(label, sizeof(label), "Item %i", counter++);
- it = elm_list_item_insert_after(li, selected_item, label, NULL, NULL, NULL,
- NULL);
- if (!it)
+ list_it = elm_list_item_insert_after(li, selected_item, label, NULL, NULL,
+ NULL, NULL);
+ if (!list_it)
printf("Error adding item\n");
}
static void
_select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *selected_item, *prev_item;
+ Elm_Object_Item *selected_item, *prev_item;
Evas_Object *li = data;
selected_item = elm_list_selected_item_get(li);
static void
_insert_before_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *selected_item, *it;
+ Elm_Object_Item *selected_item, *list_it;
Evas_Object *li = data;
char label[32];
if (!selected_item) return;
snprintf(label, sizeof(label), "Item %i", counter++);
- it = elm_list_item_insert_before(li, selected_item, label, NULL, NULL,
+ list_it = elm_list_item_insert_before(li, selected_item, label, NULL, NULL,
NULL, NULL);
- if (!it)
+ if (!list_it)
printf("Error adding item\n");
}
static void
_set_separator_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *selected_item;
+ Elm_Object_Item *selected_item;
Evas_Object *li = data;
selected_item = elm_list_selected_item_get(li);
static void
_disable_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_List_Item *selected_item;
+ Elm_Object_Item *selected_item;
Evas_Object *li = data;
selected_item = elm_list_selected_item_get(li);
#define elm_layout_label_get(_ly) \
elm_layout_text_get((_ly), "elm.text")
-EINA_DEPRECATED EAPI Evas_Object *elm_list_item_base_get(const Elm_List_Item *item);
+EINA_DEPRECATED EAPI Evas_Object *elm_list_item_base_get(const Elm_Object_Item *it);
/**
*
* @ingroup List
*/
-EINA_DEPRECATED EAPI void elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled);
+EINA_DEPRECATED EAPI void elm_list_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
/**
* Get a value whether list item is disabled or not.
*
* @ingroup List
*/
-EINA_DEPRECATED EAPI Eina_Bool elm_list_item_disabled_get(const Elm_List_Item *it);
+EINA_DEPRECATED EAPI Eina_Bool elm_list_item_disabled_get(const Elm_Object_Item *it);
/**
* Set the function called when a list item is freed.
*
- * @param item The item to set the callback on
+ * @param it The item to set the callback on
* @param func The function called
*
* If there is a @p func, then it will be called prior item's memory release.
*
* @ingroup List
*/
-EINA_DEPRECATED EAPI void elm_list_item_del_cb_set(Elm_List_Item *item, Evas_Smart_Cb func);
+EINA_DEPRECATED EAPI void elm_list_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
/**
* Get the data associated to the item.
*
- * @param item The list item
+ * @param it The list item
* @return The data associated to @p item
*
* The return value is a pointer to data associated to @p item when it was
*
* @ingroup List
*/
-EINA_DEPRECATED EAPI void *elm_list_item_data_get(const Elm_List_Item *item);
+EINA_DEPRECATED EAPI void *elm_list_item_data_get(const Elm_Object_Item *it);
/**
* Get the left side icon associated to the item.
*
- * @param item The list item
+ * @param it The list item
* @return The left side icon associated to @p item
*
* The return value is a pointer to the icon associated to @p item when
* @deprecated Please use elm_object_item_part_content_get(item, NULL);
* @ingroup List
*/
-EINA_DEPRECATED EAPI Evas_Object *elm_list_item_icon_get(const Elm_List_Item *item);
+EINA_DEPRECATED EAPI Evas_Object *elm_list_item_icon_get(const Elm_Object_Item *it);
/**
* Set the left side icon associated to the item.
*
- * @param item The list item
+ * @param it The list item
* @param icon The left side icon object to associate with @p item
*
* The icon object to use at left side of the item. An
* @deprecated Please use elm_object_item_part_content_set(item, NULL, icon);
* @ingroup List
*/
-EINA_DEPRECATED EAPI void elm_list_item_icon_set(Elm_List_Item *item, Evas_Object *icon);
+EINA_DEPRECATED EAPI void elm_list_item_icon_set(Elm_Object_Item *it, Evas_Object *icon);
/**
* Get the right side icon associated to the item.
*
- * @param item The list item
+ * @param it The list item
* @return The right side icon associated to @p item
*
* The return value is a pointer to the icon associated to @p item when
* @deprecated Please use elm_object_item_part_content_get(item, "end");
* @ingroup List
*/
-EINA_DEPRECATED EAPI Evas_Object *elm_list_item_end_get(const Elm_List_Item *item);
+EINA_DEPRECATED EAPI Evas_Object *elm_list_item_end_get(const Elm_Object_Item *it);
/**
* Set the right side icon associated to the item.
*
- * @param item The list item
+ * @param it The list item
* @param end The right side icon object to associate with @p item
*
* The icon object to use at right side of the item. An
* @deprecated Please use elm_object_item_part_content_set(item, "end", end);
* @ingroup List
*/
-EINA_DEPRECATED EAPI void elm_list_item_end_set(Elm_List_Item *item, Evas_Object *end);
+EINA_DEPRECATED EAPI void elm_list_item_end_set(Elm_Object_Item *it, Evas_Object *end);
/**
* Get the label of item.
*
- * @param item The item of list.
+ * @param it The item of list.
* @return The label of item.
*
* The return value is a pointer to the label associated to @p item when
* @deprecated Please use elm_object_item_text_get(item);
* @ingroup List
*/
-EINA_DEPRECATED EAPI const char *elm_list_item_label_get(const Elm_List_Item *item);
+EINA_DEPRECATED EAPI const char *elm_list_item_label_get(const Elm_Object_Item *it);
/**
* Set the label of item.
*
- * @param item The item of list.
+ * @param it The item of list.
* @param text The label of item.
*
* The label to be displayed by the item.
* @deprecated Please use elm_object_item_text_set(item, text);
* @ingroup List
*/
-EINA_DEPRECATED EAPI void elm_list_item_label_set(Elm_List_Item *item, const char *text);
+EINA_DEPRECATED EAPI void elm_list_item_label_set(Elm_Object_Item *it, const char *text);
/**
* Set the shrink state of toolbar @p obj.
#define SWIPE_MOVES 12
typedef struct _Widget_Data Widget_Data;
+typedef struct _Elm_List_Item Elm_List_Item;
struct _Widget_Data
{
};
#define ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, ...) \
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, __VA_ARGS__); \
-if (it->deleted) \
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, __VA_ARGS__); \
+if (((Elm_List_Item *) it)->deleted) \
{ \
ERR("ERROR: "#it" has been DELETED.\n"); \
return __VA_ARGS__; \
(!strcmp(ev->keyname, "KP_Home")))
{
it = eina_list_data_get(wd->items);
- elm_list_item_bring_in(it);
+ elm_list_item_bring_in((Elm_Object_Item *) it);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
(!strcmp(ev->keyname, "KP_End")))
{
it = eina_list_data_get(eina_list_last(wd->items));
- elm_list_item_bring_in(it);
+ elm_list_item_bring_in((Elm_Object_Item *) it);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
(!strcmp(ev->keyname, "space")))
&& (!wd->multi) && (wd->selected))
{
- it = elm_list_selected_item_get(obj);
+ it = (Elm_List_Item *) elm_list_selected_item_get(obj);
evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it);
}
else if (!strcmp(ev->keyname, "Escape"))
{
if (!wd->selected) return EINA_FALSE;
while (wd->selected)
- elm_list_item_selected_set(wd->selected->data, EINA_FALSE);
+ elm_list_item_selected_set((Elm_Object_Item *) wd->selected->data,
+ EINA_FALSE);
return EINA_TRUE;
}
if (!wd->selected) return EINA_FALSE;
if (!wd->multi) return EINA_FALSE;
- Elm_List_Item *prev = elm_list_item_prev(wd->last_selected_item);
+ Elm_Object_Item *prev = elm_list_item_prev((Elm_Object_Item *) wd->last_selected_item);
if (!prev) return EINA_TRUE;
if (elm_list_item_selected_get(prev))
{
- elm_list_item_selected_set(wd->last_selected_item, EINA_FALSE);
- wd->last_selected_item = prev;
- elm_list_item_show(wd->last_selected_item);
+ elm_list_item_selected_set((Elm_Object_Item *) wd->last_selected_item,
+ EINA_FALSE);
+ wd->last_selected_item = (Elm_List_Item *) prev;
+ elm_list_item_show((Elm_Object_Item *) wd->last_selected_item);
}
else
{
if (!wd->selected) return EINA_FALSE;
if (!wd->multi) return EINA_FALSE;
- Elm_List_Item *next = elm_list_item_next(wd->last_selected_item);
+ Elm_Object_Item *next = elm_list_item_next((Elm_Object_Item *) wd->last_selected_item);
if (!next) return EINA_TRUE;
if (elm_list_item_selected_get(next))
{
- elm_list_item_selected_set(wd->last_selected_item, EINA_FALSE);
- wd->last_selected_item = next;
- elm_list_item_show(wd->last_selected_item);
+ elm_list_item_selected_set((Elm_Object_Item *) wd->last_selected_item,
+ EINA_FALSE);
+ wd->last_selected_item = (Elm_List_Item *) next;
+ elm_list_item_show((Elm_Object_Item *) wd->last_selected_item);
}
else
{
static Eina_Bool
_item_single_select_up(Widget_Data *wd)
{
- Elm_List_Item *prev;
+ Elm_Object_Item *prev;
if (!wd->selected) prev = eina_list_data_get(eina_list_last(wd->items));
- else prev = elm_list_item_prev(wd->last_selected_item);
-
+ else prev = elm_list_item_prev((Elm_Object_Item *) wd->last_selected_item);
if (!prev) return EINA_FALSE;
_deselect_all_items(wd);
static Eina_Bool
_item_single_select_down(Widget_Data *wd)
{
- Elm_List_Item *next;
+ Elm_Object_Item *next;
if (!wd->selected) next = eina_list_data_get(wd->items);
- else next = elm_list_item_next(wd->last_selected_item);
-
+ else next = elm_list_item_next((Elm_Object_Item *) wd->last_selected_item);
if (!next) return EINA_FALSE;
_deselect_all_items(wd);
return wd->items;
}
-EAPI Elm_List_Item *
+EAPI Elm_Object_Item *
elm_list_selected_item_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if (wd->selected) return wd->selected->data;
+ if (wd->selected) return (Elm_Object_Item *) wd->selected->data;
return NULL;
}
return wd->selected;
}
-EAPI Elm_List_Item *
+EAPI Elm_Object_Item *
elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
wd->items = eina_list_append(wd->items, it);
it->node = eina_list_last(wd->items);
elm_box_pack_end(wd->box, VIEW(it));
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_List_Item *
+EAPI Elm_Object_Item *
elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
wd->items = eina_list_prepend(wd->items, it);
it->node = wd->items;
elm_box_pack_start(wd->box, VIEW(it));
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_List_Item *
-elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
+EAPI Elm_Object_Item *
+elm_list_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
{
- Widget_Data *wd;
- Elm_List_Item *it;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(before, NULL);
- if (!before->node) return NULL;
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
ELM_LIST_ITEM_CHECK_DELETED_RETURN(before, NULL);
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd;
+ Elm_List_Item *it, *before_it;
+
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
+
+ before_it = (Elm_List_Item *) before;
+ if (!before_it->node) return NULL;
+
it = _item_new(obj, label, icon, end, func, data);
- wd->items = eina_list_prepend_relative_list(wd->items, it, before->node);
- it->node = before->node->prev;
- elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
- return it;
+ wd->items = eina_list_prepend_relative_list(wd->items, it, before_it->node);
+ it->node = before_it->node->prev;
+ elm_box_pack_before(wd->box, VIEW(it), VIEW(before_it));
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_List_Item *
-elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
+EAPI Elm_Object_Item *
+elm_list_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
{
- Widget_Data *wd;
- Elm_List_Item *it;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(after, NULL);
- if (!after->node) return NULL;
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
ELM_LIST_ITEM_CHECK_DELETED_RETURN(after, NULL);
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd;
+ Elm_List_Item *it, *after_it;
+
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
+
+ after_it = (Elm_List_Item *) after;
+ if (!after_it->node) return NULL;
+
it = _item_new(obj, label, icon, end, func, data);
- wd->items = eina_list_append_relative_list(wd->items, it, after->node);
- it->node = after->node->next;
- elm_box_pack_after(wd->box, VIEW(it), VIEW(after));
- return it;
+ wd->items = eina_list_append_relative_list(wd->items, it, after_it->node);
+ it->node = after_it->node->next;
+ elm_box_pack_after(wd->box, VIEW(it), VIEW(after_it));
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_List_Item *
+EAPI Elm_Object_Item *
elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
it->node = before->node->prev;
elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
}
- return it;
+ return (Elm_Object_Item *) it;
}
EAPI void
-elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting)
+elm_list_item_separator_set(Elm_Object_Item *it, Eina_Bool setting)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
- it->is_separator = !!setting;
+ ((Elm_List_Item *) it)->is_separator = !!setting;
}
EAPI Eina_Bool
-elm_list_item_separator_get(const Elm_List_Item *it)
+elm_list_item_separator_get(const Elm_Object_Item *it)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
- return it->is_separator;
+ return ((Elm_List_Item *) it)->is_separator;
}
EAPI void
-elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected)
+elm_list_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
Evas_Object *obj = WIDGET(it);
Widget_Data *wd = elm_widget_data_get(obj);
+ Elm_List_Item *item = (Elm_List_Item *) it;
if (!wd) return;
selected = !!selected;
- if (it->selected == selected) return;
+ if (item->selected == selected) return;
evas_object_ref(obj);
_elm_list_walk(wd);
while (wd->selected)
_item_unselect(wd->selected->data);
}
- _item_highlight(it);
- _item_select(it);
+ _item_highlight(item);
+ _item_select(item);
}
else
- _item_unselect(it);
+ _item_unselect(item);
_elm_list_unwalk(wd);
evas_object_unref(obj);
}
EAPI Eina_Bool
-elm_list_item_selected_get(const Elm_List_Item *it)
+elm_list_item_selected_get(const Elm_Object_Item *it)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
- return it->selected;
+ return ((Elm_List_Item *) it)->selected;
}
EAPI void
-elm_list_item_show(Elm_List_Item *it)
+elm_list_item_show(Elm_Object_Item *it)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
+ if (!wd) return;
Evas_Coord bx, by, bw, bh;
Evas_Coord x, y, w, h;
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
x -= bx;
y -= by;
- if (wd->scr)
- elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
+ if (wd->scr) elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
}
EAPI void
-elm_list_item_bring_in(Elm_List_Item *it)
+elm_list_item_bring_in(Elm_Object_Item *it)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
+ if (!wd) return;
Evas_Coord bx, by, bw, bh;
Evas_Coord x, y, w, h;
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
x -= bx;
y -= by;
- if (wd->scr)
- elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
+ if (wd->scr) elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
}
EAPI void
-elm_list_item_del(Elm_List_Item *it)
+elm_list_item_del(Elm_Object_Item *it)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
Evas_Object *obj = WIDGET(it);
+ Elm_List_Item *item = (Elm_List_Item *) it;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (it->selected) _item_unselect(it);
+ if (item->selected) _item_unselect(item);
if (wd->walking > 0)
{
- if (it->deleted) return;
- it->deleted = EINA_TRUE;
- wd->to_delete = eina_list_append(wd->to_delete, it);
+ if (item->deleted) return;
+ item->deleted = EINA_TRUE;
+ wd->to_delete = eina_list_append(wd->to_delete, item);
return;
}
- wd->items = eina_list_remove_list(wd->items, it->node);
+ wd->items = eina_list_remove_list(wd->items, item->node);
evas_object_ref(obj);
_elm_list_walk(wd);
- elm_widget_item_pre_notify_del(it);
- _elm_list_item_free(it);
+ elm_widget_item_pre_notify_del(item);
+ _elm_list_item_free(item);
_elm_list_unwalk(wd);
evas_object_unref(obj);
}
EAPI Evas_Object *
-elm_list_item_object_get(const Elm_List_Item *it)
+elm_list_item_object_get(const Elm_Object_Item *it)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
return VIEW(it);
}
-EAPI Elm_List_Item *
-elm_list_item_prev(const Elm_List_Item *it)
+EAPI Elm_Object_Item *
+elm_list_item_prev(const Elm_Object_Item *it)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
- if (it->node->prev) return it->node->prev->data;
+ Elm_List_Item *item = (Elm_List_Item *) it;
+ if (item->node->prev) return item->node->prev->data;
else return NULL;
}
-EAPI Elm_List_Item *
-elm_list_item_next(const Elm_List_Item *it)
+EAPI Elm_Object_Item *
+elm_list_item_next(const Elm_Object_Item *it)
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
- if (it->node->next) return it->node->next->data;
+ Elm_List_Item *item = (Elm_List_Item *) it;
+ if (item->node->next) return item->node->next->data;
else return NULL;
}
EINA_DEPRECATED EAPI Evas_Object *
-elm_list_item_base_get(const Elm_List_Item *it)
+elm_list_item_base_get(const Elm_Object_Item *it)
{
return elm_list_item_object_get(it);
}
EINA_DEPRECATED EAPI void
-elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled)
+elm_list_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled)
{
- elm_object_item_disabled_set((Elm_Object_Item *)it, disabled);
+ elm_object_item_disabled_set(it, disabled);
}
EINA_DEPRECATED EAPI Eina_Bool
-elm_list_item_disabled_get(const Elm_List_Item *it)
+elm_list_item_disabled_get(const Elm_Object_Item *it)
{
- return elm_object_item_disabled_get((Elm_Object_Item *)it);
+ return elm_object_item_disabled_get(it);
}
EINA_DEPRECATED EAPI void
-elm_list_item_del_cb_set(Elm_List_Item *it, Evas_Smart_Cb func)
+elm_list_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
{
- elm_widget_item_del_cb_set(it, func);
+ elm_object_item_del_cb_set(it, func);
}
EINA_DEPRECATED EAPI void *
-elm_list_item_data_get(const Elm_List_Item *it)
+elm_list_item_data_get(const Elm_Object_Item *it)
{
- return elm_widget_item_data_get(it);
+ return elm_object_item_data_get(it);
}
EINA_DEPRECATED EAPI Evas_Object *
-elm_list_item_icon_get(const Elm_List_Item *it)
+elm_list_item_icon_get(const Elm_Object_Item *it)
{
- return _elm_widget_item_content_part_get((Elm_Widget_Item *)it, NULL);
+ return _item_content_get(it, NULL);
}
EINA_DEPRECATED EAPI void
-elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon)
+elm_list_item_icon_set(Elm_Object_Item *it, Evas_Object *icon)
{
- _elm_widget_item_content_part_set((Elm_Widget_Item *)it, NULL, icon);
+ _item_content_set(it, NULL, icon);
}
EINA_DEPRECATED EAPI Evas_Object *
-elm_list_item_end_get(const Elm_List_Item *it)
+elm_list_item_end_get(const Elm_Object_Item *it)
{
- return _elm_widget_item_content_part_get((Elm_Widget_Item *)it, "end");
+ return _item_content_get(it, "end");
}
EINA_DEPRECATED EAPI void
-elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end)
+elm_list_item_end_set(Elm_Object_Item *it, Evas_Object *end)
{
- _elm_widget_item_content_part_set((Elm_Widget_Item *)it, "end", end);
+ _item_content_set(it, "end", end);
}
EINA_DEPRECATED EAPI const char *
-elm_list_item_label_get(const Elm_List_Item *it)
+elm_list_item_label_get(const Elm_Object_Item *it)
{
- return _elm_widget_item_text_part_get((Elm_Widget_Item *)it, NULL);
+ return _item_text_get(it, NULL);
}
EINA_DEPRECATED EAPI void
-elm_list_item_label_set(Elm_List_Item *it, const char *text)
+elm_list_item_label_set(Elm_Object_Item *it, const char *text)
{
- _elm_widget_item_text_part_set((Elm_Widget_Item *)it, NULL, text);
+ _item_text_set(it, NULL, text);
}
// XXX: all the below - make elm_object_item*() calls to do these
-EINA_DEPRECATED EAPI void
-elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text)
+EAPI void
+elm_list_item_tooltip_text_set(Elm_Object_Item *it, const char *text)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
- elm_widget_item_tooltip_text_set(item, text);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+ elm_widget_item_tooltip_text_set(it, text);
}
-EINA_DEPRECATED EAPI void
-elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
+EAPI void
+elm_list_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
- elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+ elm_widget_item_tooltip_content_cb_set(it, func, data, del_cb);
}
-EINA_DEPRECATED EAPI void
-elm_list_item_tooltip_unset(Elm_List_Item *item)
+EAPI void
+elm_list_item_tooltip_unset(Elm_Object_Item *it)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
- elm_widget_item_tooltip_unset(item);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+ elm_widget_item_tooltip_unset(it);
}
-EINA_DEPRECATED EAPI Eina_Bool
-elm_list_item_tooltip_window_mode_set(Elm_List_Item *item, Eina_Bool disable)
+EAPI Eina_Bool
+elm_list_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
- return elm_widget_item_tooltip_window_mode_set(item, disable);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
+ return elm_widget_item_tooltip_window_mode_set(it, disable);
}
-EINA_DEPRECATED EAPI Eina_Bool
-elm_list_item_tooltip_window_mode_get(const Elm_List_Item *item)
+EAPI Eina_Bool
+elm_list_item_tooltip_window_mode_get(const Elm_Object_Item *it)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
- return elm_widget_item_tooltip_window_mode_get(item);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
+ return elm_widget_item_tooltip_window_mode_get(it);
}
-EINA_DEPRECATED EAPI void
-elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style)
+EAPI void
+elm_list_item_tooltip_style_set(Elm_Object_Item *it, const char *style)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
- elm_widget_item_tooltip_style_set(item, style);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+ elm_widget_item_tooltip_style_set(it, style);
}
-EINA_DEPRECATED EAPI const char *
-elm_list_item_tooltip_style_get(const Elm_List_Item *item)
+EAPI const char *
+elm_list_item_tooltip_style_get(const Elm_Object_Item *it)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
- return elm_widget_item_tooltip_style_get(item);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
+ return elm_widget_item_tooltip_style_get(it);
}
-EINA_DEPRECATED EAPI void
-elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor)
+EAPI void
+elm_list_item_cursor_set(Elm_Object_Item *it, const char *cursor)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
- elm_widget_item_cursor_set(item, cursor);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+ elm_widget_item_cursor_set(it, cursor);
}
-EINA_DEPRECATED EAPI const char *
-elm_list_item_cursor_get(const Elm_List_Item *item)
+EAPI const char *
+elm_list_item_cursor_get(const Elm_Object_Item *it)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
- return elm_widget_item_cursor_get(item);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
+ return elm_widget_item_cursor_get(it);
}
-EINA_DEPRECATED EAPI void
-elm_list_item_cursor_unset(Elm_List_Item *item)
+EAPI void
+elm_list_item_cursor_unset(Elm_Object_Item *it)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
- elm_widget_item_cursor_unset(item);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+ elm_widget_item_cursor_unset(it);
}
-EINA_DEPRECATED EAPI void
-elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style)
+EAPI void
+elm_list_item_cursor_style_set(Elm_Object_Item *it, const char *style)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
- elm_widget_item_cursor_style_set(item, style);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+ elm_widget_item_cursor_style_set(it, style);
}
-EINA_DEPRECATED EAPI const char *
-elm_list_item_cursor_style_get(const Elm_List_Item *item)
+EAPI const char *
+elm_list_item_cursor_style_get(const Elm_Object_Item *it)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
- return elm_widget_item_cursor_style_get(item);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
+ return elm_widget_item_cursor_style_get(it);
}
-EINA_DEPRECATED EAPI void
-elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only)
+EAPI void
+elm_list_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
- elm_widget_item_cursor_engine_only_set(item, engine_only);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+ elm_widget_item_cursor_engine_only_set(it, engine_only);
}
-EINA_DEPRECATED EAPI Eina_Bool
-elm_list_item_cursor_engine_only_get(const Elm_List_Item *item)
+EAPI Eina_Bool
+elm_list_item_cursor_engine_only_get(const Elm_Object_Item *it)
{
- ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
- return elm_widget_item_cursor_engine_only_get(item);
+ ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
+ return elm_widget_item_cursor_engine_only_get(it);
}
ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */
} Elm_List_Mode;
-typedef struct _Elm_List_Item Elm_List_Item; /**< Item of Elm_List. Sub-type of Elm_Widget_Item. Can be created with elm_list_item_append(), elm_list_item_prepend() and functions to add items in relative positions, like elm_list_item_insert_before(), and deleted with elm_list_item_del(). */
-
/**
* Add a new list widget to the given parent Elementary
* (container) object.
*
* @ingroup List
*/
-EAPI Elm_List_Item *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
+EAPI Elm_Object_Item *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* Prepend a new item to the list object.
*
* @ingroup List
*/
-EAPI Elm_List_Item *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
+EAPI Elm_Object_Item *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* Insert a new item into the list object before item @p before.
*
* @ingroup List
*/
-EAPI Elm_List_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
+EAPI Elm_Object_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* Insert a new item into the list object after item @p after.
*
* @ingroup List
*/
-EAPI Elm_List_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
+EAPI Elm_Object_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* Insert a new item into the sorted list object.
* @param func The function to call when the item is clicked.
* @param data The data to associate with the item for related callbacks.
* @param cmp_func The comparing function to be used to sort list
- * items <b>by #Elm_List_Item item handles</b>. This function will
+ * items <b>by #Elm_Object_Item item handles</b>. This function will
* receive two items and compare them, returning a non-negative integer
* if the second item should be place after the first, or negative value
* if should be placed before.
*
* @ingroup List
*/
-EAPI Elm_List_Item *elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func);
+EAPI Elm_Object_Item *elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func);
/**
* Remove all list's items.
* Get a list of all the list items.
*
* @param obj The list object
- * @return An @c Eina_List of list items, #Elm_List_Item,
+ * @return An @c Eina_List of list items, #Elm_Object_Item,
* or @c NULL on failure.
*
* @see elm_list_item_append()
*
* @ingroup List
*/
-EAPI Elm_List_Item *elm_list_selected_item_get(const Evas_Object *obj);
+EAPI Elm_Object_Item *elm_list_selected_item_get(const Evas_Object *obj);
/**
* Return a list of the currently selected list items.
*
* @param obj The list object.
- * @return An @c Eina_List of list items, #Elm_List_Item,
+ * @return An @c Eina_List of list items, #Elm_Object_Item,
* or @c NULL on failure.
*
* Multiple items can be selected if multi select is enabled. It can be
/**
* Set the selected state of an item.
*
- * @param item The list item
+ * @param it The list item
* @param selected The selected state
*
* This sets the selected state of the given item @p it.
*
* @ingroup List
*/
-EAPI void elm_list_item_selected_set(Elm_List_Item *item, Eina_Bool selected);
+EAPI void elm_list_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
/*
* Get whether the @p item is selected or not.
*
- * @param item The list item.
+ * @param it The list item.
* @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
* it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
*
*
* @ingroup List
*/
-EAPI Eina_Bool elm_list_item_selected_get(const Elm_List_Item *item);
+EAPI Eina_Bool elm_list_item_selected_get(const Elm_Object_Item *it);
/**
* Set or unset item as a separator.
*
* @ingroup List
*/
-EAPI void elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting);
+EAPI void elm_list_item_separator_set(Elm_Object_Item *it, Eina_Bool setting);
/**
* Get a value whether item is a separator or not.
*
* @ingroup List
*/
-EAPI Eina_Bool elm_list_item_separator_get(const Elm_List_Item *it);
+EAPI Eina_Bool elm_list_item_separator_get(const Elm_Object_Item *it);
/**
* Show @p item in the list view.
*
- * @param item The list item to be shown.
+ * @param it The list item to be shown.
*
* It won't animate list until item is visible. If such behavior is wanted,
* use elm_list_bring_in() intead.
*
* @ingroup List
*/
-EAPI void elm_list_item_show(Elm_List_Item *item);
+EAPI void elm_list_item_show(Elm_Object_Item *it);
/**
* Bring in the given item to list view.
*
- * @param item The item.
+ * @param it The item.
*
* This causes list to jump to the given item @p item and show it
* (by scrolling), if it is not fully visible.
*
* @ingroup List
*/
-EAPI void elm_list_item_bring_in(Elm_List_Item *item);
+EAPI void elm_list_item_bring_in(Elm_Object_Item *it);
/**
* Delete the item from the list.
*
- * @param item The item of list to be deleted.
+ * @param it The item of list to be deleted.
*
* If deleting all list items is required, elm_list_clear()
* should be used instead of getting items list and deleting each one.
*
* @ingroup List
*/
-EAPI void elm_list_item_del(Elm_List_Item *item);
+EAPI void elm_list_item_del(Elm_Object_Item *it);
/**
* Gets the base object of the item.
*
- * @param item The list item
+ * @param it The list item
* @return The base object associated with @p item
*
* Base object is the @c Evas_Object that represents that item.
*
* @ingroup List
*/
-EAPI Evas_Object *elm_list_item_object_get(const Elm_List_Item *item);
+EAPI Evas_Object *elm_list_item_object_get(const Elm_Object_Item *it);
/**
* Get the item before @p it in list.
*
* @ingroup List
*/
-EAPI Elm_List_Item *elm_list_item_prev(const Elm_List_Item *it);
+EAPI Elm_Object_Item *elm_list_item_prev(const Elm_Object_Item *it);
/**
* Get the item after @p it in list.
*
* @ingroup List
*/
-EAPI Elm_List_Item *elm_list_item_next(const Elm_List_Item *it);
+EAPI Elm_Object_Item *elm_list_item_next(const Elm_Object_Item *it);
/**
* Set the text to be shown in a given list item's tooltips.
*
- * @param item Target item.
+ * @param it Target item.
* @param text The text to set in the content.
*
* Setup the text as tooltip to object. The item can have only one tooltip,
*
* @ingroup List
*/
-EAPI void elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text);
+EAPI void elm_list_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
/**
* @brief Disable size restrictions on an object's tooltip
- * @param item The tooltip's anchor object
+ * @param it The tooltip's anchor object
* @param disable If EINA_TRUE, size restrictions are disabled
* @return EINA_FALSE on failure, EINA_TRUE on success
*
* This function allows a tooltip to expand beyond its parant window's canvas.
* It will instead be limited only by the size of the display.
*/
-EAPI Eina_Bool elm_list_item_tooltip_window_mode_set(Elm_List_Item *item, Eina_Bool disable);
+EAPI Eina_Bool elm_list_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
/**
* @brief Retrieve size restriction state of an object's tooltip
* its parant window's canvas.
* It will instead be limited only by the size of the display.
*/
-EAPI Eina_Bool elm_list_item_tooltip_window_mode_get(const Elm_List_Item *item);
+EAPI Eina_Bool elm_list_item_tooltip_window_mode_get(const Elm_Object_Item *it);
/**
* Set the content to be shown in the tooltip item.
* return a valid Evas_Object. This object is then managed fully by
* tooltip system and is deleted when the tooltip is gone.
*
- * @param item the list item being attached a tooltip.
+ * @param it the list item being attached a tooltip.
* @param func the function used to create the tooltip contents.
* @param data what to provide to @a func as callback data/context.
* @param del_cb called when data is not needed anymore, either when
*
* @ingroup List
*/
-EAPI void elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
+EAPI void elm_list_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
/**
* Unset tooltip from item.
*
- * @param item list item to remove previously set tooltip.
+ * @param it list item to remove previously set tooltip.
*
* Remove tooltip from item. The callback provided as del_cb to
* elm_list_item_tooltip_content_cb_set() will be called to notify
*
* @ingroup List
*/
-EAPI void elm_list_item_tooltip_unset(Elm_List_Item *item);
+EAPI void elm_list_item_tooltip_unset(Elm_Object_Item *it);
/**
* Sets a different style for this item tooltip.
* elm_list_item_tooltip_content_cb_set() or
* elm_list_item_tooltip_text_set()
*
- * @param item list item with tooltip already set.
+ * @param it list item with tooltip already set.
* @param style the theme style to use (default, transparent, ...)
*
* @see elm_object_tooltip_style_set() for more details.
*
* @ingroup List
*/
-EAPI void elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style);
+EAPI void elm_list_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
/**
* Get the style for this item tooltip.
*
* @ingroup List
*/
-EAPI const char *elm_list_item_tooltip_style_get(const Elm_List_Item *item);
+EAPI const char *elm_list_item_tooltip_style_get(const Elm_Object_Item *it);
/**
* Set the type of mouse pointer/cursor decoration to be shown,
* when the mouse pointer is over the given list widget item
*
- * @param item list item to customize cursor on
+ * @param it list item to customize cursor on
* @param cursor the cursor type's name
*
* This function works analogously as elm_object_cursor_set(), but
*
* @ingroup List
*/
-EAPI void elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor);
+EAPI void elm_list_item_cursor_set(Elm_Object_Item *it, const char *cursor);
/*
* Get the type of mouse pointer/cursor decoration set to be shown,
* when the mouse pointer is over the given list widget item
*
- * @param item list item with custom cursor set
+ * @param it list item with custom cursor set
* @return the cursor type's name or @c NULL, if no custom cursors
* were set to @p item (and on errors)
*
*
* @ingroup List
*/
-EAPI const char *elm_list_item_cursor_get(const Elm_List_Item *item);
+EAPI const char *elm_list_item_cursor_get(const Elm_Object_Item *it);
/**
* Unset any custom mouse pointer/cursor decoration set to be
* shown, when the mouse pointer is over the given list widget
* item, thus making it show the @b default cursor again.
*
- * @param item a list item
+ * @param it a list item
*
* Use this call to undo any custom settings on this item's cursor
* decoration, bringing it back to defaults (no custom style set).
*
* @ingroup List
*/
-EAPI void elm_list_item_cursor_unset(Elm_List_Item *item);
+EAPI void elm_list_item_cursor_unset(Elm_Object_Item *it);
/**
* Set a different @b style for a given custom cursor set for a
* list item.
*
- * @param item list item with custom cursor set
+ * @param it list item with custom cursor set
* @param style the <b>theme style</b> to use (e.g. @c "default",
* @c "transparent", etc)
*
*
* @ingroup List
*/
-EAPI void elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style);
+EAPI void elm_list_item_cursor_style_set(Elm_Object_Item *it, const char *style);
/**
* Get the current @b style set for a given list item's custom
* cursor
*
- * @param item list item with custom cursor set.
+ * @param it list item with custom cursor set.
* @return style the cursor style in use. If the object does not
* have a cursor set, then @c NULL is returned.
*
*
* @ingroup List
*/
-EAPI const char *elm_list_item_cursor_style_get(const Elm_List_Item *item);
+EAPI const char *elm_list_item_cursor_style_get(const Elm_Object_Item *it);
/**
* Set if the (custom)cursor for a given list item should be
* searched in its theme, also, or should only rely on the
* rendering engine.
*
- * @param item item with custom (custom) cursor already set on
+ * @param it item with custom (custom) cursor already set on
* @param engine_only Use @c EINA_TRUE to have cursors looked for
* only on those provided by the rendering engine, @c EINA_FALSE to
* have them searched on the widget's theme, as well.
*
* @ingroup List
*/
-EAPI void elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only);
+EAPI void elm_list_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
/**
* Get if the (custom) cursor for a given list item is being
* searched in its theme, also, or is only relying on the rendering
* engine.
*
- * @param item a list item
+ * @param it a list item
* @return @c EINA_TRUE, if cursors are being looked for only on
* those provided by the rendering engine, @c EINA_FALSE if they
* are being searched on the widget's theme, as well.
*
* @ingroup List
*/
-EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_List_Item *item);
+EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_Object_Item *it);
/**
* @}
* @param obj owner widget.
* @param tooltip The tooltip object (affix content to this!)
* @param item context dependent item. As an example, if tooltip was
- * set on Elm_List_Item, then it is of this type.
+ * set on elm_list item, then it is of this type.
*/
typedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip, void *item);
_popup_item_selected(void *data, Evas_Object *obj, void *event_info __UNUSED__)
{
Evas_Object *view = data;
- Elm_List_Item *it = elm_list_selected_item_get(obj);
+ Elm_Object_Item *list_it = elm_list_selected_item_get(obj);
const Eina_List *itr, *list = elm_list_items_get(obj);
void *d;
int i = 0;
EINA_LIST_FOREACH(list, itr, d)
{
- if (d == it)
+ if (d == list_it)
break;
i++;