forked from enlightenment/efl
Elementary/list - Elm_List_Item -> Elm_Object_Item
SVN revision: 67110
This commit is contained in:
parent
9e9c1ddbc9
commit
11282d3953
|
@ -2372,7 +2372,7 @@
|
||||||
*
|
*
|
||||||
* This code places a Elementary list widgets on a window,
|
* This code places a Elementary list widgets on a window,
|
||||||
* along with some buttons trigerring actions on it (though its API).
|
* 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
|
* On our @c main function, we are adding a default list with
|
||||||
* 3 items. We are only setting their labels (second parameter of function
|
* 3 items. We are only setting their labels (second parameter of function
|
||||||
|
|
|
@ -29,11 +29,11 @@ unsigned int i;
|
||||||
for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++)
|
for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++)
|
||||||
{
|
{
|
||||||
char buf[32];
|
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]);
|
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);
|
elm_index_active_set(id, EINA_TRUE);
|
||||||
|
|
|
@ -755,15 +755,15 @@ _font_overlay_set_all(void *data,
|
||||||
{
|
{
|
||||||
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
|
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
|
||||||
Elm_Text_Class_Data *tc_data, *tc;
|
Elm_Text_Class_Data *tc_data, *tc;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
win = data;
|
win = data;
|
||||||
|
|
||||||
fclasses = evas_object_data_get(win, "font_classes_list");
|
fclasses = evas_object_data_get(win, "font_classes_list");
|
||||||
it = elm_list_selected_item_get(fclasses);
|
list_it = elm_list_selected_item_get(fclasses);
|
||||||
if (!it) return;
|
if (!list_it) return;
|
||||||
tc_data = elm_object_item_data_get(it);
|
tc_data = elm_object_item_data_get(list_it);
|
||||||
|
|
||||||
fnames = evas_object_data_get(win, "font_names_list");
|
fnames = evas_object_data_get(win, "font_names_list");
|
||||||
fstyles = evas_object_data_get(win, "font_styles_list");
|
fstyles = evas_object_data_get(win, "font_styles_list");
|
||||||
|
@ -786,14 +786,14 @@ _font_overlay_reset(void *data,
|
||||||
{
|
{
|
||||||
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
|
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
|
||||||
Elm_Text_Class_Data *tc_data;
|
Elm_Text_Class_Data *tc_data;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
|
|
||||||
win = data;
|
win = data;
|
||||||
|
|
||||||
fclasses = evas_object_data_get(win, "font_classes_list");
|
fclasses = evas_object_data_get(win, "font_classes_list");
|
||||||
it = elm_list_selected_item_get(fclasses);
|
list_it = elm_list_selected_item_get(fclasses);
|
||||||
if (!it) return;
|
if (!list_it) return;
|
||||||
tc_data = elm_object_item_data_get(it);
|
tc_data = elm_object_item_data_get(list_it);
|
||||||
|
|
||||||
fnames = evas_object_data_get(win, "font_names_list");
|
fnames = evas_object_data_get(win, "font_names_list");
|
||||||
fstyles = evas_object_data_get(win, "font_styles_list");
|
fstyles = evas_object_data_get(win, "font_styles_list");
|
||||||
|
@ -822,7 +822,7 @@ _font_overlay_reset_all(void *data,
|
||||||
{
|
{
|
||||||
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
|
Evas_Object *win, *fclasses, *fnames, *fstyles, *fsizes;
|
||||||
Elm_Text_Class_Data *tc_data;
|
Elm_Text_Class_Data *tc_data;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
win = data;
|
win = data;
|
||||||
|
@ -844,8 +844,8 @@ _font_overlay_reset_all(void *data,
|
||||||
fstyles = evas_object_data_get(win, "font_styles_list");
|
fstyles = evas_object_data_get(win, "font_styles_list");
|
||||||
fsizes = evas_object_data_get(win, "font_sizes_list");
|
fsizes = evas_object_data_get(win, "font_sizes_list");
|
||||||
|
|
||||||
it = elm_list_selected_item_get(fclasses);
|
list_it = elm_list_selected_item_get(fclasses);
|
||||||
if (it) elm_list_item_selected_set(it, EINA_FALSE);
|
if (list_it) elm_list_item_selected_set(list_it, EINA_FALSE);
|
||||||
|
|
||||||
ELM_LIST_DISABLE(fnames);
|
ELM_LIST_DISABLE(fnames);
|
||||||
ELM_LIST_DISABLE(fstyles);
|
ELM_LIST_DISABLE(fstyles);
|
||||||
|
@ -893,7 +893,7 @@ _config_display_update(Evas_Object *win)
|
||||||
const char *curr_theme, *curr_engine;
|
const char *curr_theme, *curr_engine;
|
||||||
const Eina_List *l_items, *l;
|
const Eina_List *l_items, *l;
|
||||||
Eina_Bool s_bounce, ts;
|
Eina_Bool s_bounce, ts;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
Elm_Theme *th;
|
Elm_Theme *th;
|
||||||
int fs;
|
int fs;
|
||||||
|
|
||||||
|
@ -991,11 +991,11 @@ _config_display_update(Evas_Object *win)
|
||||||
|
|
||||||
curr_engine = elm_engine_current_get();
|
curr_engine = elm_engine_current_get();
|
||||||
l_items = elm_list_items_get(evas_object_data_get(win, "engines_list"));
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1125,7 +1125,7 @@ _theme_sel(void *data __UNUSED__,
|
||||||
Evas_Object *win = elm_object_top_widget_get(obj);
|
Evas_Object *win = elm_object_top_widget_get(obj);
|
||||||
Evas_Object *sample = evas_object_data_get(win, "theme_preview");
|
Evas_Object *sample = evas_object_data_get(win, "theme_preview");
|
||||||
Elm_Theme *th, *sth;
|
Elm_Theme *th, *sth;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
const char *defth;
|
const char *defth;
|
||||||
Eina_Strbuf *newth;
|
Eina_Strbuf *newth;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
@ -1142,9 +1142,9 @@ _theme_sel(void *data __UNUSED__,
|
||||||
eina_strbuf_free(newth);
|
eina_strbuf_free(newth);
|
||||||
return;
|
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);
|
eina_strbuf_append_printf(newth, "%s:", t->name);
|
||||||
if ((!l->prev) && strcmp(t->name, "default"))
|
if ((!l->prev) && strcmp(t->name, "default"))
|
||||||
/* ensure default theme is always there for fallback */
|
/* ensure default theme is always there for fallback */
|
||||||
|
@ -1312,7 +1312,7 @@ _status_config_themes(Evas_Object *win,
|
||||||
Eina_List *list, *l;
|
Eina_List *list, *l;
|
||||||
char *th, *s, *ext;
|
char *th, *s, *ext;
|
||||||
Elm_Theme *d;
|
Elm_Theme *d;
|
||||||
Elm_List_Item *it, *def_it = NULL;
|
Elm_Object_Item *list_it, *def_it = NULL;
|
||||||
const char *theme_name, *sep[20];
|
const char *theme_name, *sep[20];
|
||||||
unsigned int x;
|
unsigned int x;
|
||||||
|
|
||||||
|
@ -1394,16 +1394,16 @@ _status_config_themes(Evas_Object *win,
|
||||||
t->label = eina_stringshare_add(s);
|
t->label = eina_stringshare_add(s);
|
||||||
}
|
}
|
||||||
themes = eina_list_append(themes, t);
|
themes = eina_list_append(themes, t);
|
||||||
it = elm_list_item_append(li, t->label, NULL, NULL, NULL, t);
|
list_it = elm_list_item_append(li, t->label, NULL, NULL, NULL, t);
|
||||||
if (!strcmp(t->name, "default")) def_it = it;
|
if (!strcmp(t->name, "default")) def_it = list_it;
|
||||||
for (y = x - 1 /* ignore default e theme */; y > 0; y--)
|
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];
|
const char *start = (sep[y - 1][0] == ':') ? sep[y - 1] + 1 : sep[y - 1];
|
||||||
unsigned int len = (unsigned int)(sep[y] - start);
|
unsigned int len = (unsigned int)(sep[y] - start);
|
||||||
if (strncmp(start , t->name, len) || (strlen(t->name) != len)) continue;
|
if (strncmp(start , t->name, len) || (strlen(t->name) != len)) continue;
|
||||||
|
|
||||||
if (!elm_list_item_selected_get(it))
|
if (!elm_list_item_selected_get(list_it))
|
||||||
elm_list_item_selected_set(it, EINA_TRUE);
|
elm_list_item_selected_set(list_it, EINA_TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1515,7 +1515,7 @@ _font_classes_list_sel(void *data __UNUSED__,
|
||||||
const Eina_List *f_names_items, *l;
|
const Eina_List *f_names_items, *l;
|
||||||
Elm_Text_Class_Data *tc_data;
|
Elm_Text_Class_Data *tc_data;
|
||||||
Evas_Object *f_names_list;
|
Evas_Object *f_names_list;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
|
|
||||||
tc_data = elm_object_item_data_get(event_info);
|
tc_data = elm_object_item_data_get(event_info);
|
||||||
|
|
||||||
|
@ -1525,16 +1525,16 @@ _font_classes_list_sel(void *data __UNUSED__,
|
||||||
|
|
||||||
f_names_items = elm_list_items_get(f_names_list);
|
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;
|
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))
|
if (tc_data->font && !strcmp(l, tc_data->font))
|
||||||
{
|
{
|
||||||
elm_list_item_selected_set(it, EINA_TRUE);
|
elm_list_item_selected_set(list_it, EINA_TRUE);
|
||||||
elm_list_item_show(it);
|
elm_list_item_show(list_it);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1548,25 +1548,25 @@ _font_names_list_sel(void *data __UNUSED__,
|
||||||
Evas_Object *style_list, *cls_list, *sizes_list, *win;
|
Evas_Object *style_list, *cls_list, *sizes_list, *win;
|
||||||
const char *style, *sel_font;
|
const char *style, *sel_font;
|
||||||
Elm_Text_Class_Data *tc_data;
|
Elm_Text_Class_Data *tc_data;
|
||||||
Elm_List_Item *it, *fc_it;
|
Elm_Object_Item *list_it, *fc_list_it;
|
||||||
Elm_Font_Properties *efp;
|
Elm_Font_Properties *efp;
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
|
|
||||||
it = event_info;
|
list_it = event_info;
|
||||||
sel_font = elm_object_item_text_get(it);
|
sel_font = elm_object_item_text_get(list_it);
|
||||||
|
|
||||||
win = elm_object_top_widget_get(obj);
|
win = elm_object_top_widget_get(obj);
|
||||||
style_list = evas_object_data_get(win, "font_styles_list");
|
style_list = evas_object_data_get(win, "font_styles_list");
|
||||||
cls_list = evas_object_data_get(win, "font_classes_list");
|
cls_list = evas_object_data_get(win, "font_classes_list");
|
||||||
sizes_list = evas_object_data_get(win, "font_sizes_list");
|
sizes_list = evas_object_data_get(win, "font_sizes_list");
|
||||||
|
|
||||||
fc_it = elm_list_selected_item_get(cls_list);
|
fc_list_it = elm_list_selected_item_get(cls_list);
|
||||||
if (!fc_it) return; /* should not happen, fonts list disabled in
|
if (!fc_list_it) return; /* should not happen, fonts list disabled in
|
||||||
* this case */
|
* this case */
|
||||||
|
|
||||||
eina_stringshare_replace(&fdata.cur_font, sel_font);
|
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 (tc_data->font) eina_stringshare_del(tc_data->font);
|
||||||
if (fdata.cur_font) tc_data->font = eina_stringshare_ref(fdata.cur_font);
|
if (fdata.cur_font) tc_data->font = eina_stringshare_ref(fdata.cur_font);
|
||||||
|
|
||||||
|
@ -1579,17 +1579,17 @@ _font_names_list_sel(void *data __UNUSED__,
|
||||||
evas_event_freeze(evas_object_evas_get(style_list));
|
evas_event_freeze(evas_object_evas_get(style_list));
|
||||||
edje_freeze();
|
edje_freeze();
|
||||||
|
|
||||||
it = NULL;
|
list_it = NULL;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(efp->styles, l, style)
|
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,
|
i = elm_list_item_append(style_list, style, NULL, NULL,
|
||||||
_font_styles_list_sel, NULL);
|
_font_styles_list_sel, NULL);
|
||||||
|
|
||||||
if (tc_data->style && (!strcmp(style, tc_data->style)))
|
if (tc_data->style && (!strcmp(style, tc_data->style)))
|
||||||
it = i;
|
list_it = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
elm_list_go(style_list);
|
elm_list_go(style_list);
|
||||||
|
@ -1597,8 +1597,8 @@ _font_names_list_sel(void *data __UNUSED__,
|
||||||
edje_thaw();
|
edje_thaw();
|
||||||
evas_event_thaw(evas_object_evas_get(style_list));
|
evas_event_thaw(evas_object_evas_get(style_list));
|
||||||
|
|
||||||
if (it)
|
if (list_it)
|
||||||
elm_list_item_selected_set(it, EINA_TRUE);
|
elm_list_item_selected_set(list_it, EINA_TRUE);
|
||||||
|
|
||||||
_font_preview_update(win);
|
_font_preview_update(win);
|
||||||
}
|
}
|
||||||
|
@ -1611,37 +1611,37 @@ _font_styles_list_sel(void *data __UNUSED__,
|
||||||
Evas_Object *fc_list, *fs_list, *win;
|
Evas_Object *fc_list, *fs_list, *win;
|
||||||
Elm_Text_Class_Data *tc_data;
|
Elm_Text_Class_Data *tc_data;
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
|
|
||||||
win = elm_object_top_widget_get(obj);
|
win = elm_object_top_widget_get(obj);
|
||||||
fc_list = evas_object_data_get(win, "font_classes_list");
|
fc_list = evas_object_data_get(win, "font_classes_list");
|
||||||
fs_list = evas_object_data_get(win, "font_sizes_list");
|
fs_list = evas_object_data_get(win, "font_sizes_list");
|
||||||
|
|
||||||
it = elm_list_selected_item_get(fc_list);
|
list_it = elm_list_selected_item_get(fc_list);
|
||||||
if (!it) return; /* should not happen */
|
if (!list_it) return; /* should not happen */
|
||||||
|
|
||||||
eina_stringshare_replace(&fdata.cur_style,
|
eina_stringshare_replace(&fdata.cur_style,
|
||||||
elm_object_item_text_get(event_info));
|
elm_object_item_text_get(event_info));
|
||||||
ELM_LIST_ENABLE(fs_list);
|
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);
|
eina_stringshare_del(tc_data->style);
|
||||||
tc_data->style = eina_stringshare_ref(fdata.cur_style);
|
tc_data->style = eina_stringshare_ref(fdata.cur_style);
|
||||||
|
|
||||||
evas_event_freeze(evas_object_evas_get(fs_list));
|
evas_event_freeze(evas_object_evas_get(fs_list));
|
||||||
edje_freeze();
|
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;
|
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);
|
elm_list_item_selected_set(l->data, EINA_FALSE);
|
||||||
|
|
||||||
if (tc_data->size == sdata->size)
|
if (tc_data->size == sdata->size)
|
||||||
{
|
{
|
||||||
elm_list_item_selected_set(it, EINA_TRUE);
|
elm_list_item_selected_set(list_it, EINA_TRUE);
|
||||||
elm_list_item_show(it);
|
elm_list_item_show(list_it);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1660,18 +1660,18 @@ _font_sizes_list_sel(void *data __UNUSED__,
|
||||||
Elm_Text_Class_Data *tc_data;
|
Elm_Text_Class_Data *tc_data;
|
||||||
Evas_Object *fc_list, *win;
|
Evas_Object *fc_list, *win;
|
||||||
Elm_Font_Size_Data *sd;
|
Elm_Font_Size_Data *sd;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
|
|
||||||
win = elm_object_top_widget_get(obj);
|
win = elm_object_top_widget_get(obj);
|
||||||
fc_list = evas_object_data_get(win, "font_classes_list");
|
fc_list = evas_object_data_get(win, "font_classes_list");
|
||||||
|
|
||||||
it = elm_list_selected_item_get(fc_list);
|
list_it = elm_list_selected_item_get(fc_list);
|
||||||
if (!it) return; /* should not happen */
|
if (!list_it) return; /* should not happen */
|
||||||
|
|
||||||
sd = elm_object_item_data_get(event_info);
|
sd = elm_object_item_data_get(event_info);
|
||||||
fdata.cur_size = sd->size;
|
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;
|
tc_data->size = fdata.cur_size;
|
||||||
|
|
||||||
_font_preview_update(win);
|
_font_preview_update(win);
|
||||||
|
@ -2215,7 +2215,7 @@ _profiles_list_fill(Evas_Object *l_widget,
|
||||||
#endif
|
#endif
|
||||||
const char *label, *ext, *pdir;
|
const char *label, *ext, *pdir;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
Evas_Object *ic;
|
Evas_Object *ic;
|
||||||
|
|
||||||
pdir = elm_profile_dir_get(profile, EINA_TRUE);
|
pdir = elm_profile_dir_get(profile, EINA_TRUE);
|
||||||
|
@ -2255,11 +2255,12 @@ _profiles_list_fill(Evas_Object *l_widget,
|
||||||
1, 1);
|
1, 1);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
|
|
||||||
it = elm_list_item_append(l_widget, label, ic, NULL,
|
list_it = elm_list_item_append(l_widget, label, ic, NULL,
|
||||||
_profiles_list_selected_cb, strdup(profile));
|
_profiles_list_selected_cb,
|
||||||
elm_list_item_del_cb_set(it, _profiles_list_item_del_cb);
|
strdup(profile));
|
||||||
|
elm_object_item_del_cb_set(list_it, _profiles_list_item_del_cb);
|
||||||
if (cur_profile && !strcmp(profile, cur_profile))
|
if (cur_profile && !strcmp(profile, cur_profile))
|
||||||
sel_it = it;
|
sel_it = list_it;
|
||||||
|
|
||||||
elm_profile_dir_free(pdir);
|
elm_profile_dir_free(pdir);
|
||||||
|
|
||||||
|
@ -2745,20 +2746,20 @@ _engines_list_fill(Evas_Object *l_widget,
|
||||||
EINA_LIST_FOREACH(e_names, l, engine)
|
EINA_LIST_FOREACH(e_names, l, engine)
|
||||||
{
|
{
|
||||||
const char *label;
|
const char *label;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
|
|
||||||
if (!_elm_engine_supported(engine))
|
if (!_elm_engine_supported(engine))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
label = _engine_name_prettify(engine);
|
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));
|
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);
|
free((void *)label);
|
||||||
|
|
||||||
if (!strcmp(cur_engine, engine))
|
if (!strcmp(cur_engine, engine))
|
||||||
sel_it = it;
|
sel_it = list_it;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sel_it) elm_list_item_selected_set(sel_it, EINA_TRUE);
|
if (sel_it) elm_list_item_selected_set(sel_it, EINA_TRUE);
|
||||||
|
|
|
@ -97,7 +97,7 @@ void
|
||||||
test_cursor(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
test_cursor(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *bt, *list, *entry, *ck;
|
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);
|
win = elm_win_add(NULL, "cursor", ELM_WIN_BASIC);
|
||||||
elm_win_title_set(win, "Cursor");
|
elm_win_title_set(win, "Cursor");
|
||||||
|
@ -166,7 +166,7 @@ test_cursor2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
|
||||||
Evas_Object *win, *bg, *bx, *o, *grid, *gl;
|
Evas_Object *win, *bg, *bx, *o, *grid, *gl;
|
||||||
Elm_Genlist_Item *it1, *it2, *it3;
|
Elm_Genlist_Item *it1, *it2, *it3;
|
||||||
Elm_Object_Item *tb_it;
|
Elm_Object_Item *tb_it;
|
||||||
Elm_List_Item *lit;
|
Elm_Object_Item *lit;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
static Testitem ti[144];
|
static Testitem ti[144];
|
||||||
int i, n;
|
int i, n;
|
||||||
|
@ -288,7 +288,7 @@ void
|
||||||
test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *o;
|
Evas_Object *win, *bg, *bx, *o;
|
||||||
Elm_List_Item *lit;
|
Elm_Object_Item *lit;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = elm_win_add(NULL, "cursor3", ELM_WIN_BASIC);
|
win = elm_win_add(NULL, "cursor3", ELM_WIN_BASIC);
|
||||||
|
|
|
@ -139,19 +139,19 @@ void
|
||||||
test_index2_it_add(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
test_index2_it_add(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Test_Index2_Elements *gui = data;
|
Test_Index2_Elements *gui = data;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
const char *label;
|
const char *label;
|
||||||
char letter[2];
|
char letter[2];
|
||||||
|
|
||||||
label = elm_object_text_get(gui->entry);
|
label = elm_object_text_get(gui->entry);
|
||||||
snprintf(letter, sizeof(letter), "%c", label[0]);
|
snprintf(letter, sizeof(letter), "%c", label[0]);
|
||||||
it = elm_list_item_sorted_insert(gui->lst, label, NULL, NULL, NULL, NULL,
|
list_it = elm_list_item_sorted_insert(gui->lst, label, NULL, NULL, NULL,
|
||||||
test_index2_cmp);
|
NULL, test_index2_cmp);
|
||||||
elm_index_item_sorted_insert(gui->id, letter, it, test_index2_icmp,
|
elm_index_item_sorted_insert(gui->id, letter, list_it, test_index2_icmp,
|
||||||
test_index2_cmp);
|
test_index2_cmp);
|
||||||
elm_list_go(gui->lst);
|
elm_list_go(gui->lst);
|
||||||
/* FIXME it's not showing the recently added item */
|
/* FIXME it's not showing the recently added item */
|
||||||
elm_list_item_show(it);
|
elm_list_item_show(list_it);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -159,30 +159,30 @@ test_index2_it_del(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Test_Index2_Elements *gui = data;
|
Test_Index2_Elements *gui = data;
|
||||||
const char *label, *label_next;
|
const char *label, *label_next;
|
||||||
Elm_List_Item *it, *it_next;
|
Elm_Object_Item *list_it, *list_it_next;
|
||||||
Elm_Object_Item *iit;
|
Elm_Object_Item *iit;
|
||||||
|
|
||||||
it = elm_list_selected_item_get(obj);
|
list_it = elm_list_selected_item_get(obj);
|
||||||
it_next = elm_list_item_next(it);
|
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);
|
if (iit) elm_object_item_del(iit);
|
||||||
elm_list_item_del(it);
|
elm_list_item_del(list_it);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
label = elm_object_item_text_get((Elm_Object_Item *)it);
|
label = elm_object_item_text_get(list_it);
|
||||||
label_next = elm_object_item_text_get((Elm_Object_Item *)it_next);
|
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])
|
if (label[0] == label_next[0])
|
||||||
elm_object_item_data_set(iit, it_next);
|
elm_object_item_data_set(iit, list_it_next);
|
||||||
else
|
else
|
||||||
elm_object_item_del(iit);
|
elm_object_item_del(iit);
|
||||||
|
|
||||||
elm_list_item_del(it);
|
elm_list_item_del(list_it);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -50,7 +50,7 @@ test_list(void *data __UNUSED__,
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *tb2, *bt;
|
Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *tb2, *bt;
|
||||||
char buf[PATH_MAX];
|
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);
|
win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
|
||||||
elm_win_title_set(win, "List");
|
elm_win_title_set(win, "List");
|
||||||
|
@ -70,7 +70,7 @@ test_list(void *data __UNUSED__,
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_scale_set(ic, 1, 1);
|
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);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_scale_set(ic, 0, 0);
|
elm_icon_scale_set(ic, 0, 0);
|
||||||
|
@ -87,7 +87,7 @@ test_list(void *data __UNUSED__,
|
||||||
ic2 = elm_icon_add(win);
|
ic2 = elm_icon_add(win);
|
||||||
elm_icon_standard_set(ic2, "clock");
|
elm_icon_standard_set(ic2, "clock");
|
||||||
elm_icon_scale_set(ic2, 0, 0);
|
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);
|
bx = elm_box_add(win);
|
||||||
elm_box_horizontal_set(bx, EINA_TRUE);
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
||||||
|
@ -118,18 +118,18 @@ test_list(void *data __UNUSED__,
|
||||||
elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
|
elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
|
||||||
|
|
||||||
elm_list_item_append(li, "you", NULL, 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, "out", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_append(li, "there", 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, "today", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_append(li, "?", 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, "are", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_append(li, "some", 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, "more", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_append(li, "items", 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);
|
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);
|
elm_list_go(li);
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ test_list(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "Hello");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
||||||
elm_table_pack(tb2, bt, 0, 0, 1, 1);
|
elm_table_pack(tb2, bt, 0, 0, 1, 1);
|
||||||
|
@ -149,7 +149,7 @@ test_list(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "How");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
||||||
elm_table_pack(tb2, bt, 0, 1, 1, 1);
|
elm_table_pack(tb2, bt, 0, 1, 1, 1);
|
||||||
|
@ -157,7 +157,7 @@ test_list(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "doing");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
||||||
elm_table_pack(tb2, bt, 0, 2, 1, 1);
|
elm_table_pack(tb2, bt, 0, 2, 1, 1);
|
||||||
|
@ -165,7 +165,7 @@ test_list(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "Here");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
||||||
elm_table_pack(tb2, bt, 0, 3, 1, 1);
|
elm_table_pack(tb2, bt, 0, 3, 1, 1);
|
||||||
|
@ -173,7 +173,7 @@ test_list(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "Maybe this...");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
evas_object_size_hint_align_set(bt, 0.9, 0.5);
|
||||||
elm_table_pack(tb2, bt, 0, 4, 1, 1);
|
elm_table_pack(tb2, bt, 0, 4, 1, 1);
|
||||||
|
@ -197,7 +197,7 @@ test_list_horizontal(void *data __UNUSED__,
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *tb2, *bt;
|
Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *tb2, *bt;
|
||||||
char buf[PATH_MAX];
|
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);
|
win = elm_win_add(NULL, "list-horizontal", ELM_WIN_BASIC);
|
||||||
elm_win_title_set(win, "List Horizontal");
|
elm_win_title_set(win, "List Horizontal");
|
||||||
|
@ -218,7 +218,7 @@ test_list_horizontal(void *data __UNUSED__,
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_scale_set(ic, 1, 1);
|
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);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_scale_set(ic, 0, 0);
|
elm_icon_scale_set(ic, 0, 0);
|
||||||
|
@ -235,7 +235,7 @@ test_list_horizontal(void *data __UNUSED__,
|
||||||
ic2 = elm_icon_add(win);
|
ic2 = elm_icon_add(win);
|
||||||
elm_icon_standard_set(ic2, "clock");
|
elm_icon_standard_set(ic2, "clock");
|
||||||
elm_icon_scale_set(ic2, 0, 0);
|
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);
|
bx = elm_box_add(win);
|
||||||
|
|
||||||
|
@ -258,13 +258,13 @@ test_list_horizontal(void *data __UNUSED__,
|
||||||
elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
|
elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
|
||||||
|
|
||||||
elm_list_item_append(li, "you", NULL, 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, "out", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_append(li, "there", 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, "today", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_append(li, "?", 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, "here", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_append(li, "we", NULL, NULL, NULL, NULL);
|
elm_list_item_append(li, "we", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
|
elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
|
||||||
|
@ -282,7 +282,7 @@ test_list_horizontal(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "Hello");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.5, 0.9);
|
evas_object_size_hint_align_set(bt, 0.5, 0.9);
|
||||||
elm_table_pack(tb2, bt, 0, 0, 1, 1);
|
elm_table_pack(tb2, bt, 0, 0, 1, 1);
|
||||||
|
@ -290,7 +290,7 @@ test_list_horizontal(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "How");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.5, 0.9);
|
evas_object_size_hint_align_set(bt, 0.5, 0.9);
|
||||||
elm_table_pack(tb2, bt, 1, 0, 1, 1);
|
elm_table_pack(tb2, bt, 1, 0, 1, 1);
|
||||||
|
@ -298,7 +298,7 @@ test_list_horizontal(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "doing");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.5, 0.9);
|
evas_object_size_hint_align_set(bt, 0.5, 0.9);
|
||||||
elm_table_pack(tb2, bt, 2, 0, 1, 1);
|
elm_table_pack(tb2, bt, 2, 0, 1, 1);
|
||||||
|
@ -306,7 +306,7 @@ test_list_horizontal(void *data __UNUSED__,
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "And");
|
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_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(bt, 0.5, 0.9);
|
evas_object_size_hint_align_set(bt, 0.5, 0.9);
|
||||||
elm_table_pack(tb2, bt, 3, 0, 1, 1);
|
elm_table_pack(tb2, bt, 3, 0, 1, 1);
|
||||||
|
@ -333,9 +333,8 @@ my_li2_sel(void *data __UNUSED__,
|
||||||
Evas_Object *obj,
|
Evas_Object *obj,
|
||||||
void *event_info __UNUSED__)
|
void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Elm_List_Item *it = elm_list_selected_item_get(obj);
|
Elm_Object_Item *list_it = elm_list_selected_item_get(obj);
|
||||||
elm_list_item_selected_set(it, 0);
|
elm_list_item_selected_set(list_it, 0);
|
||||||
// elm_list_item_selected_set(event_info, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -345,7 +344,7 @@ test_list2(void *data __UNUSED__,
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *bx2, *bt;
|
Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *bx2, *bt;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
|
|
||||||
win = elm_win_add(NULL, "list2", ELM_WIN_BASIC);
|
win = elm_win_add(NULL, "list2", ELM_WIN_BASIC);
|
||||||
elm_win_title_set(win, "List 2");
|
elm_win_title_set(win, "List 2");
|
||||||
|
@ -372,8 +371,8 @@ test_list2(void *data __UNUSED__,
|
||||||
ic = elm_icon_add(win);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
it = elm_list_item_append(li, "Hello", ic, NULL, my_li2_sel, NULL);
|
list_it = elm_list_item_append(li, "Hello", ic, NULL, my_li2_sel, NULL);
|
||||||
elm_list_item_selected_set(it, 1);
|
elm_list_item_selected_set(list_it, EINA_TRUE);
|
||||||
ic = elm_icon_add(win);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_scale_set(ic, 0, 0);
|
elm_icon_scale_set(ic, 0, 0);
|
||||||
|
|
|
@ -372,7 +372,7 @@ test_tooltip(void *data __UNUSED__,
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *tb, *bt, *se, *lst;
|
Evas_Object *win, *bg, *bx, *tb, *bt, *se, *lst;
|
||||||
Elm_Object_Item *tb_it;
|
Elm_Object_Item *tb_it;
|
||||||
Elm_List_Item *li;
|
Elm_Object_Item *lit;
|
||||||
|
|
||||||
win = elm_win_add(NULL, "tooltip", ELM_WIN_BASIC);
|
win = elm_win_add(NULL, "tooltip", ELM_WIN_BASIC);
|
||||||
elm_win_title_set(win, "Tooltip");
|
elm_win_title_set(win, "Tooltip");
|
||||||
|
@ -486,19 +486,19 @@ test_tooltip(void *data __UNUSED__,
|
||||||
evas_object_show(se);
|
evas_object_show(se);
|
||||||
|
|
||||||
lst = elm_list_add(win);
|
lst = elm_list_add(win);
|
||||||
li = elm_list_item_append(lst, "Hello", NULL, NULL, NULL, NULL);
|
lit = 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_content_cb_set(lit, _tt_item_label, NULL, NULL);
|
||||||
elm_list_item_tooltip_window_mode_set(li, EINA_TRUE);
|
elm_list_item_tooltip_window_mode_set(lit, EINA_TRUE);
|
||||||
li = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
|
lit = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
|
||||||
elm_list_item_tooltip_content_cb_set(li, _tt_item_icon, NULL, NULL);
|
elm_list_item_tooltip_content_cb_set(lit, _tt_item_icon, NULL, NULL);
|
||||||
li = elm_list_item_append(lst, "Big Icon Tooltip", NULL, NULL, NULL, NULL);
|
lit = 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_content_cb_set(lit, _tt_item_icon2, NULL, NULL);
|
||||||
elm_list_item_tooltip_style_set(li, "transparent");
|
elm_list_item_tooltip_style_set(lit, "transparent");
|
||||||
elm_list_item_tooltip_window_mode_set(li, EINA_TRUE);
|
elm_list_item_tooltip_window_mode_set(lit, EINA_TRUE);
|
||||||
li = elm_list_item_append(lst, "Insanely Big Icon Tooltip", NULL, NULL, NULL, NULL);
|
lit = 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_content_cb_set(lit, _tt_item_icon3, NULL, NULL);
|
||||||
elm_list_item_tooltip_style_set(li, "transparent");
|
elm_list_item_tooltip_style_set(lit, "transparent");
|
||||||
elm_list_item_tooltip_window_mode_set(li, EINA_TRUE);
|
elm_list_item_tooltip_window_mode_set(lit, EINA_TRUE);
|
||||||
evas_object_size_hint_weight_set(lst, EVAS_HINT_EXPAND,
|
evas_object_size_hint_weight_set(lst, EVAS_HINT_EXPAND,
|
||||||
EVAS_HINT_EXPAND);
|
EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(lst, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(lst, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
|
|
@ -50,7 +50,7 @@ _item_del(void *data __UNUSED__,
|
||||||
void *event_info __UNUSED__)
|
void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Elm_Object_Item *iit;
|
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);
|
iit = elm_index_item_find(d.index, lit);
|
||||||
|
|
||||||
|
@ -95,11 +95,11 @@ _index_selected(void *data __UNUSED__,
|
||||||
Evas_Object *obj,
|
Evas_Object *obj,
|
||||||
void *event_info)
|
void *event_info)
|
||||||
{
|
{
|
||||||
Elm_List_Item *it = event_info;
|
Elm_Object_Item *lit = event_info;
|
||||||
|
|
||||||
fprintf(stdout, "New index item selected. Comparing item reported"
|
fprintf(stdout, "New index item selected. Comparing item reported"
|
||||||
" via callback with the selection returned by the API: "
|
" 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");
|
"FAIL, something went wrong");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ elm_main(int argc __UNUSED__,
|
||||||
char **argv __UNUSED__)
|
char **argv __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *hbox, *vbox, *bt, *sep;
|
Evas_Object *win, *bg, *hbox, *vbox, *bt, *sep;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *lit;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
char curr = 0;
|
char curr = 0;
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ elm_main(int argc __UNUSED__,
|
||||||
|
|
||||||
for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++)
|
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])
|
if (curr != dict[i][0])
|
||||||
{
|
{
|
||||||
|
@ -161,8 +161,8 @@ elm_main(int argc __UNUSED__,
|
||||||
/* indexing by first letters */
|
/* indexing by first letters */
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%c", curr);
|
snprintf(buf, sizeof(buf), "%c", curr);
|
||||||
elm_index_item_append(d.index, buf, it);
|
elm_index_item_append(d.index, buf, lit);
|
||||||
index_it = elm_index_item_find(d.index, it);
|
index_it = elm_index_item_find(d.index, lit);
|
||||||
|
|
||||||
elm_object_item_del_cb_set(index_it, _index_item_del);
|
elm_object_item_del_cb_set(index_it, _index_item_del);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,33 +29,33 @@ _on_done(void *data __UNUSED__,
|
||||||
static void
|
static void
|
||||||
_prepend_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
char label[32];
|
char label[32];
|
||||||
|
|
||||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
it = elm_list_item_prepend(li, label, NULL, NULL, NULL, NULL);
|
list_it = elm_list_item_prepend(li, label, NULL, NULL, NULL, NULL);
|
||||||
if (!it)
|
if (!list_it)
|
||||||
printf("Error adding item\n");
|
printf("Error adding item\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
char label[32];
|
char label[32];
|
||||||
|
|
||||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
it = elm_list_item_append(li, label, NULL, NULL, NULL, NULL);
|
list_it = elm_list_item_append(li, label, NULL, NULL, NULL, NULL);
|
||||||
if (!it)
|
if (!list_it)
|
||||||
printf("Error adding item\n");
|
printf("Error adding item\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *ic, *li = data;
|
||||||
char label[32];
|
char label[32];
|
||||||
|
|
||||||
|
@ -64,28 +64,28 @@ _add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
elm_icon_standard_set(ic, "home");
|
elm_icon_standard_set(ic, "home");
|
||||||
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
|
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
|
||||||
|
|
||||||
it = elm_list_item_append(li, label, ic, NULL, NULL, NULL);
|
list_it = elm_list_item_append(li, label, ic, NULL, NULL, NULL);
|
||||||
if (!it)
|
if (!list_it)
|
||||||
printf("Error adding item with icon\n");
|
printf("Error adding item with icon\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
_sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||||
{
|
{
|
||||||
Elm_List_Item *it = event_info;
|
Elm_Object_Item *list_it = event_info;
|
||||||
printf("Selected label: %s\n", elm_object_item_text_get(it));
|
printf("Selected label: %s\n", elm_object_item_text_get(list_it));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
char label[32];
|
char label[32];
|
||||||
|
|
||||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
it = elm_list_item_append(li, label, NULL, NULL, _sel_cb, NULL);
|
list_it = elm_list_item_append(li, label, NULL, NULL, _sel_cb, NULL);
|
||||||
if (!it)
|
if (!list_it)
|
||||||
printf("Error adding item\n");
|
printf("Error adding item\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,9 +93,9 @@ static void
|
||||||
_sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
_sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
||||||
{
|
{
|
||||||
char *content = data;
|
char *content = data;
|
||||||
Elm_List_Item *it = event_info;
|
Elm_Object_Item *list_it = event_info;
|
||||||
printf("Selected label: %s with data: %s\n",
|
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
|
||||||
|
@ -107,25 +107,25 @@ _free_data(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
static void
|
static void
|
||||||
_add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
char label[32];
|
char label[32];
|
||||||
char *content = malloc(sizeof(char) * 32);
|
char *content = malloc(sizeof(char) * 32);
|
||||||
|
|
||||||
snprintf(content, 32, "Item content %i", counter);
|
snprintf(content, 32, "Item content %i", counter);
|
||||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
it = elm_list_item_append(li, label, NULL, NULL, _sel_data_cb, content);
|
list_it = elm_list_item_append(li, label, NULL, NULL, _sel_data_cb, content);
|
||||||
if (!it) {
|
if (!list_it) {
|
||||||
printf("Error adding item\n");
|
printf("Error adding item\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elm_list_item_del_cb_set(it, _free_data);
|
elm_list_item_del_cb_set(list_it, _free_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
|
|
||||||
selected_item = elm_list_selected_item_get(li);
|
selected_item = elm_list_selected_item_get(li);
|
||||||
|
@ -135,7 +135,7 @@ _del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
static void
|
static void
|
||||||
_unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
|
|
||||||
selected_item = elm_list_selected_item_get(li);
|
selected_item = elm_list_selected_item_get(li);
|
||||||
|
@ -146,12 +146,12 @@ static void
|
||||||
_print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
const Eina_List *l, *items;
|
const Eina_List *l, *items;
|
||||||
Elm_List_Item *it;
|
Elm_Object_Item *list_it;
|
||||||
Evas_Object *li = data;
|
Evas_Object *li = data;
|
||||||
|
|
||||||
items = elm_list_items_get(li);
|
items = elm_list_items_get(li);
|
||||||
EINA_LIST_FOREACH(items, l, it)
|
EINA_LIST_FOREACH(items, l, list_it)
|
||||||
printf("%s\n", elm_object_item_text_get(it));
|
printf("%s\n", elm_object_item_text_get(list_it));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -164,7 +164,7 @@ _clear_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
static void
|
static void
|
||||||
_select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
|
|
||||||
selected_item = elm_list_selected_item_get(li);
|
selected_item = elm_list_selected_item_get(li);
|
||||||
|
@ -178,7 +178,7 @@ _select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
|
||||||
static void
|
static void
|
||||||
_insert_after_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
char label[32];
|
char label[32];
|
||||||
|
|
||||||
|
@ -186,16 +186,16 @@ _insert_after_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNU
|
||||||
if (!selected_item) return;
|
if (!selected_item) return;
|
||||||
|
|
||||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
it = elm_list_item_insert_after(li, selected_item, label, NULL, NULL, NULL,
|
list_it = elm_list_item_insert_after(li, selected_item, label, NULL, NULL,
|
||||||
NULL);
|
NULL, NULL);
|
||||||
if (!it)
|
if (!list_it)
|
||||||
printf("Error adding item\n");
|
printf("Error adding item\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
|
|
||||||
selected_item = elm_list_selected_item_get(li);
|
selected_item = elm_list_selected_item_get(li);
|
||||||
|
@ -209,7 +209,7 @@ _select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
|
||||||
static void
|
static void
|
||||||
_insert_before_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
char label[32];
|
char label[32];
|
||||||
|
|
||||||
|
@ -217,16 +217,16 @@ _insert_before_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
|
||||||
if (!selected_item) return;
|
if (!selected_item) return;
|
||||||
|
|
||||||
snprintf(label, sizeof(label), "Item %i", counter++);
|
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);
|
NULL, NULL);
|
||||||
if (!it)
|
if (!list_it)
|
||||||
printf("Error adding item\n");
|
printf("Error adding item\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_set_separator_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
|
|
||||||
selected_item = elm_list_selected_item_get(li);
|
selected_item = elm_list_selected_item_get(li);
|
||||||
|
@ -237,7 +237,7 @@ _set_separator_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
|
||||||
static void
|
static void
|
||||||
_disable_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_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;
|
Evas_Object *li = data;
|
||||||
|
|
||||||
selected_item = elm_list_selected_item_get(li);
|
selected_item = elm_list_selected_item_get(li);
|
||||||
|
|
|
@ -1787,7 +1787,7 @@ EINA_DEPRECATED EAPI const char *elm_layout_text_get(const Evas_Object *obj, co
|
||||||
#define elm_layout_label_get(_ly) \
|
#define elm_layout_label_get(_ly) \
|
||||||
elm_layout_text_get((_ly), "elm.text")
|
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);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2948,7 +2948,7 @@ EINA_DEPRECATED EAPI void elm_naviframe_item_del(Elm_Object_Item *it
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Get a value whether list item is disabled or not.
|
||||||
|
@ -2962,12 +2962,12 @@ EINA_DEPRECATED EAPI void elm_list_item_disabled_set(Elm
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* @param func The function called
|
||||||
*
|
*
|
||||||
* If there is a @p func, then it will be called prior item's memory release.
|
* If there is a @p func, then it will be called prior item's memory release.
|
||||||
|
@ -2982,12 +2982,12 @@ EINA_DEPRECATED EAPI Eina_Bool elm_list_item_disabled_get(con
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Get the data associated to the item.
|
||||||
*
|
*
|
||||||
* @param item The list item
|
* @param it The list item
|
||||||
* @return The data associated to @p item
|
* @return The data associated to @p item
|
||||||
*
|
*
|
||||||
* The return value is a pointer to data associated to @p item when it was
|
* The return value is a pointer to data associated to @p item when it was
|
||||||
|
@ -3000,12 +3000,12 @@ EINA_DEPRECATED EAPI void elm_list_item_del_cb_set(Elm_L
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* @return The left side icon associated to @p item
|
||||||
*
|
*
|
||||||
* The return value is a pointer to the icon associated to @p item when
|
* The return value is a pointer to the icon associated to @p item when
|
||||||
|
@ -3020,12 +3020,12 @@ EINA_DEPRECATED EAPI void *elm_list_item_data_get(const E
|
||||||
* @deprecated Please use elm_object_item_part_content_get(item, NULL);
|
* @deprecated Please use elm_object_item_part_content_get(item, NULL);
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* @param icon The left side icon object to associate with @p item
|
||||||
*
|
*
|
||||||
* The icon object to use at left side of the item. An
|
* The icon object to use at left side of the item. An
|
||||||
|
@ -3046,12 +3046,12 @@ EINA_DEPRECATED EAPI Evas_Object *elm_list_item_icon_get(const E
|
||||||
* @deprecated Please use elm_object_item_part_content_set(item, NULL, icon);
|
* @deprecated Please use elm_object_item_part_content_set(item, NULL, icon);
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* @return The right side icon associated to @p item
|
||||||
*
|
*
|
||||||
* The return value is a pointer to the icon associated to @p item when
|
* The return value is a pointer to the icon associated to @p item when
|
||||||
|
@ -3066,12 +3066,12 @@ EINA_DEPRECATED EAPI void elm_list_item_icon_set(Elm_Lis
|
||||||
* @deprecated Please use elm_object_item_part_content_get(item, "end");
|
* @deprecated Please use elm_object_item_part_content_get(item, "end");
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* @param end The right side icon object to associate with @p item
|
||||||
*
|
*
|
||||||
* The icon object to use at right side of the item. An
|
* The icon object to use at right side of the item. An
|
||||||
|
@ -3092,12 +3092,12 @@ EINA_DEPRECATED EAPI Evas_Object *elm_list_item_end_get(const El
|
||||||
* @deprecated Please use elm_object_item_part_content_set(item, "end", end);
|
* @deprecated Please use elm_object_item_part_content_set(item, "end", end);
|
||||||
* @ingroup List
|
* @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.
|
* Get the label of item.
|
||||||
*
|
*
|
||||||
* @param item The item of list.
|
* @param it The item of list.
|
||||||
* @return The label of item.
|
* @return The label of item.
|
||||||
*
|
*
|
||||||
* The return value is a pointer to the label associated to @p item when
|
* The return value is a pointer to the label associated to @p item when
|
||||||
|
@ -3111,12 +3111,12 @@ EINA_DEPRECATED EAPI void elm_list_item_end_set(Elm_List
|
||||||
* @deprecated Please use elm_object_item_text_get(item);
|
* @deprecated Please use elm_object_item_text_get(item);
|
||||||
* @ingroup List
|
* @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.
|
* Set the label of item.
|
||||||
*
|
*
|
||||||
* @param item The item of list.
|
* @param it The item of list.
|
||||||
* @param text The label of item.
|
* @param text The label of item.
|
||||||
*
|
*
|
||||||
* The label to be displayed by the item.
|
* The label to be displayed by the item.
|
||||||
|
@ -3132,7 +3132,7 @@ EINA_DEPRECATED EAPI const char *elm_list_item_label_get(const
|
||||||
* @deprecated Please use elm_object_item_text_set(item, text);
|
* @deprecated Please use elm_object_item_text_set(item, text);
|
||||||
* @ingroup List
|
* @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.
|
* Set the shrink state of toolbar @p obj.
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#define SWIPE_MOVES 12
|
#define SWIPE_MOVES 12
|
||||||
|
|
||||||
typedef struct _Widget_Data Widget_Data;
|
typedef struct _Widget_Data Widget_Data;
|
||||||
|
typedef struct _Elm_List_Item Elm_List_Item;
|
||||||
|
|
||||||
struct _Widget_Data
|
struct _Widget_Data
|
||||||
{
|
{
|
||||||
|
@ -101,8 +102,8 @@ static const Evas_Smart_Cb_Description _signals[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, ...) \
|
#define ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, ...) \
|
||||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, __VA_ARGS__); \
|
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, __VA_ARGS__); \
|
||||||
if (it->deleted) \
|
if (((Elm_List_Item *) it)->deleted) \
|
||||||
{ \
|
{ \
|
||||||
ERR("ERROR: "#it" has been DELETED.\n"); \
|
ERR("ERROR: "#it" has been DELETED.\n"); \
|
||||||
return __VA_ARGS__; \
|
return __VA_ARGS__; \
|
||||||
|
@ -225,7 +226,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
|
||||||
(!strcmp(ev->keyname, "KP_Home")))
|
(!strcmp(ev->keyname, "KP_Home")))
|
||||||
{
|
{
|
||||||
it = eina_list_data_get(wd->items);
|
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;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -233,7 +234,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
|
||||||
(!strcmp(ev->keyname, "KP_End")))
|
(!strcmp(ev->keyname, "KP_End")))
|
||||||
{
|
{
|
||||||
it = eina_list_data_get(eina_list_last(wd->items));
|
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;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -278,7 +279,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
|
||||||
(!strcmp(ev->keyname, "space")))
|
(!strcmp(ev->keyname, "space")))
|
||||||
&& (!wd->multi) && (wd->selected))
|
&& (!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);
|
evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it);
|
||||||
}
|
}
|
||||||
else if (!strcmp(ev->keyname, "Escape"))
|
else if (!strcmp(ev->keyname, "Escape"))
|
||||||
|
@ -305,7 +306,8 @@ _deselect_all_items(Widget_Data *wd)
|
||||||
{
|
{
|
||||||
if (!wd->selected) return EINA_FALSE;
|
if (!wd->selected) return EINA_FALSE;
|
||||||
while (wd->selected)
|
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;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -316,14 +318,15 @@ _item_multi_select_up(Widget_Data *wd)
|
||||||
if (!wd->selected) return EINA_FALSE;
|
if (!wd->selected) return EINA_FALSE;
|
||||||
if (!wd->multi) 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 (!prev) return EINA_TRUE;
|
||||||
|
|
||||||
if (elm_list_item_selected_get(prev))
|
if (elm_list_item_selected_get(prev))
|
||||||
{
|
{
|
||||||
elm_list_item_selected_set(wd->last_selected_item, EINA_FALSE);
|
elm_list_item_selected_set((Elm_Object_Item *) wd->last_selected_item,
|
||||||
wd->last_selected_item = prev;
|
EINA_FALSE);
|
||||||
elm_list_item_show(wd->last_selected_item);
|
wd->last_selected_item = (Elm_List_Item *) prev;
|
||||||
|
elm_list_item_show((Elm_Object_Item *) wd->last_selected_item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -339,14 +342,15 @@ _item_multi_select_down(Widget_Data *wd)
|
||||||
if (!wd->selected) return EINA_FALSE;
|
if (!wd->selected) return EINA_FALSE;
|
||||||
if (!wd->multi) 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 (!next) return EINA_TRUE;
|
||||||
|
|
||||||
if (elm_list_item_selected_get(next))
|
if (elm_list_item_selected_get(next))
|
||||||
{
|
{
|
||||||
elm_list_item_selected_set(wd->last_selected_item, EINA_FALSE);
|
elm_list_item_selected_set((Elm_Object_Item *) wd->last_selected_item,
|
||||||
wd->last_selected_item = next;
|
EINA_FALSE);
|
||||||
elm_list_item_show(wd->last_selected_item);
|
wd->last_selected_item = (Elm_List_Item *) next;
|
||||||
|
elm_list_item_show((Elm_Object_Item *) wd->last_selected_item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -359,11 +363,10 @@ _item_multi_select_down(Widget_Data *wd)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_item_single_select_up(Widget_Data *wd)
|
_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));
|
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;
|
if (!prev) return EINA_FALSE;
|
||||||
|
|
||||||
_deselect_all_items(wd);
|
_deselect_all_items(wd);
|
||||||
|
@ -376,11 +379,10 @@ _item_single_select_up(Widget_Data *wd)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_item_single_select_down(Widget_Data *wd)
|
_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);
|
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;
|
if (!next) return EINA_FALSE;
|
||||||
|
|
||||||
_deselect_all_items(wd);
|
_deselect_all_items(wd);
|
||||||
|
@ -1701,13 +1703,13 @@ elm_list_items_get(const Evas_Object *obj)
|
||||||
return wd->items;
|
return wd->items;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Elm_List_Item *
|
EAPI Elm_Object_Item *
|
||||||
elm_list_selected_item_get(const Evas_Object *obj)
|
elm_list_selected_item_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return NULL;
|
if (!wd) return NULL;
|
||||||
if (wd->selected) return wd->selected->data;
|
if (wd->selected) return (Elm_Object_Item *) wd->selected->data;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1720,7 +1722,7 @@ elm_list_selected_items_get(const Evas_Object *obj)
|
||||||
return wd->selected;
|
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_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;
|
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||||
|
@ -1730,10 +1732,10 @@ elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Eva
|
||||||
wd->items = eina_list_append(wd->items, it);
|
wd->items = eina_list_append(wd->items, it);
|
||||||
it->node = eina_list_last(wd->items);
|
it->node = eina_list_last(wd->items);
|
||||||
elm_box_pack_end(wd->box, VIEW(it));
|
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_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;
|
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||||
|
@ -1743,50 +1745,54 @@ elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Ev
|
||||||
wd->items = eina_list_prepend(wd->items, it);
|
wd->items = eina_list_prepend(wd->items, it);
|
||||||
it->node = wd->items;
|
it->node = wd->items;
|
||||||
elm_box_pack_start(wd->box, VIEW(it));
|
elm_box_pack_start(wd->box, VIEW(it));
|
||||||
return it;
|
return (Elm_Object_Item *) it;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Elm_List_Item *
|
EAPI Elm_Object_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)
|
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_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||||
Elm_List_Item *it;
|
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(before, NULL);
|
|
||||||
if (!before->node) return NULL;
|
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(before, 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);
|
wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return NULL;
|
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);
|
it = _item_new(obj, label, icon, end, func, data);
|
||||||
wd->items = eina_list_prepend_relative_list(wd->items, it, before->node);
|
wd->items = eina_list_prepend_relative_list(wd->items, it, before_it->node);
|
||||||
it->node = before->node->prev;
|
it->node = before_it->node->prev;
|
||||||
elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
|
elm_box_pack_before(wd->box, VIEW(it), VIEW(before_it));
|
||||||
return it;
|
return (Elm_Object_Item *) it;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Elm_List_Item *
|
EAPI Elm_Object_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)
|
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_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||||
Elm_List_Item *it;
|
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(after, NULL);
|
|
||||||
if (!after->node) return NULL;
|
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(after, 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);
|
wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return NULL;
|
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);
|
it = _item_new(obj, label, icon, end, func, data);
|
||||||
wd->items = eina_list_append_relative_list(wd->items, it, after->node);
|
wd->items = eina_list_append_relative_list(wd->items, it, after_it->node);
|
||||||
it->node = after->node->next;
|
it->node = after_it->node->next;
|
||||||
elm_box_pack_after(wd->box, VIEW(it), VIEW(after));
|
elm_box_pack_after(wd->box, VIEW(it), VIEW(after_it));
|
||||||
return 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_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;
|
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||||
|
@ -1808,33 +1814,34 @@ elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *ic
|
||||||
it->node = before->node->prev;
|
it->node = before->node->prev;
|
||||||
elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
|
elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
|
||||||
}
|
}
|
||||||
return it;
|
return (Elm_Object_Item *) it;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
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);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
it->is_separator = !!setting;
|
((Elm_List_Item *) it)->is_separator = !!setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
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);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
|
||||||
return it->is_separator;
|
return ((Elm_List_Item *) it)->is_separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
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);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
|
Elm_List_Item *item = (Elm_List_Item *) it;
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
|
|
||||||
selected = !!selected;
|
selected = !!selected;
|
||||||
if (it->selected == selected) return;
|
if (item->selected == selected) return;
|
||||||
|
|
||||||
evas_object_ref(obj);
|
evas_object_ref(obj);
|
||||||
_elm_list_walk(wd);
|
_elm_list_walk(wd);
|
||||||
|
@ -1846,28 +1853,29 @@ elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected)
|
||||||
while (wd->selected)
|
while (wd->selected)
|
||||||
_item_unselect(wd->selected->data);
|
_item_unselect(wd->selected->data);
|
||||||
}
|
}
|
||||||
_item_highlight(it);
|
_item_highlight(item);
|
||||||
_item_select(it);
|
_item_select(item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_item_unselect(it);
|
_item_unselect(item);
|
||||||
|
|
||||||
_elm_list_unwalk(wd);
|
_elm_list_unwalk(wd);
|
||||||
evas_object_unref(obj);
|
evas_object_unref(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
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);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
|
||||||
return it->selected;
|
return ((Elm_List_Item *) it)->selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
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);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
|
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
|
||||||
|
if (!wd) return;
|
||||||
Evas_Coord bx, by, bw, bh;
|
Evas_Coord bx, by, bw, bh;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
|
|
||||||
|
@ -1875,15 +1883,15 @@ elm_list_item_show(Elm_List_Item *it)
|
||||||
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
|
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
|
||||||
x -= bx;
|
x -= bx;
|
||||||
y -= by;
|
y -= by;
|
||||||
if (wd->scr)
|
if (wd->scr) elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
|
||||||
elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
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);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
|
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
|
||||||
|
if (!wd) return;
|
||||||
Evas_Coord bx, by, bw, bh;
|
Evas_Coord bx, by, bw, bh;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
|
|
||||||
|
@ -1891,224 +1899,226 @@ elm_list_item_bring_in(Elm_List_Item *it)
|
||||||
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
|
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
|
||||||
x -= bx;
|
x -= bx;
|
||||||
y -= by;
|
y -= by;
|
||||||
if (wd->scr)
|
if (wd->scr) elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
|
||||||
elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
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);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
|
Elm_List_Item *item = (Elm_List_Item *) it;
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
|
|
||||||
if (it->selected) _item_unselect(it);
|
if (item->selected) _item_unselect(item);
|
||||||
|
|
||||||
if (wd->walking > 0)
|
if (wd->walking > 0)
|
||||||
{
|
{
|
||||||
if (it->deleted) return;
|
if (item->deleted) return;
|
||||||
it->deleted = EINA_TRUE;
|
item->deleted = EINA_TRUE;
|
||||||
wd->to_delete = eina_list_append(wd->to_delete, it);
|
wd->to_delete = eina_list_append(wd->to_delete, item);
|
||||||
return;
|
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);
|
evas_object_ref(obj);
|
||||||
_elm_list_walk(wd);
|
_elm_list_walk(wd);
|
||||||
|
|
||||||
elm_widget_item_pre_notify_del(it);
|
elm_widget_item_pre_notify_del(item);
|
||||||
_elm_list_item_free(it);
|
_elm_list_item_free(item);
|
||||||
|
|
||||||
_elm_list_unwalk(wd);
|
_elm_list_unwalk(wd);
|
||||||
evas_object_unref(obj);
|
evas_object_unref(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
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);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
|
||||||
return VIEW(it);
|
return VIEW(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Elm_List_Item *
|
EAPI Elm_Object_Item *
|
||||||
elm_list_item_prev(const Elm_List_Item *it)
|
elm_list_item_prev(const Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
|
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;
|
else return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Elm_List_Item *
|
EAPI Elm_Object_Item *
|
||||||
elm_list_item_next(const Elm_List_Item *it)
|
elm_list_item_next(const Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
|
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;
|
else return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI Evas_Object *
|
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);
|
return elm_list_item_object_get(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI void
|
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
|
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
|
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 *
|
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 *
|
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
|
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 *
|
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
|
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 *
|
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
|
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
|
// XXX: all the below - make elm_object_item*() calls to do these
|
||||||
EINA_DEPRECATED EAPI void
|
EAPI void
|
||||||
elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text)
|
elm_list_item_tooltip_text_set(Elm_Object_Item *it, const char *text)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
elm_widget_item_tooltip_text_set(item, text);
|
elm_widget_item_tooltip_text_set(it, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI void
|
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)
|
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_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb);
|
elm_widget_item_tooltip_content_cb_set(it, func, data, del_cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI void
|
EAPI void
|
||||||
elm_list_item_tooltip_unset(Elm_List_Item *item)
|
elm_list_item_tooltip_unset(Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
elm_widget_item_tooltip_unset(item);
|
elm_widget_item_tooltip_unset(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_list_item_tooltip_window_mode_set(Elm_List_Item *item, Eina_Bool disable)
|
elm_list_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
|
||||||
return elm_widget_item_tooltip_window_mode_set(item, disable);
|
return elm_widget_item_tooltip_window_mode_set(it, disable);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_list_item_tooltip_window_mode_get(const Elm_List_Item *item)
|
elm_list_item_tooltip_window_mode_get(const Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
|
||||||
return elm_widget_item_tooltip_window_mode_get(item);
|
return elm_widget_item_tooltip_window_mode_get(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI void
|
EAPI void
|
||||||
elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style)
|
elm_list_item_tooltip_style_set(Elm_Object_Item *it, const char *style)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
elm_widget_item_tooltip_style_set(item, style);
|
elm_widget_item_tooltip_style_set(it, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI const char *
|
EAPI const char *
|
||||||
elm_list_item_tooltip_style_get(const Elm_List_Item *item)
|
elm_list_item_tooltip_style_get(const Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
|
||||||
return elm_widget_item_tooltip_style_get(item);
|
return elm_widget_item_tooltip_style_get(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI void
|
EAPI void
|
||||||
elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor)
|
elm_list_item_cursor_set(Elm_Object_Item *it, const char *cursor)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
elm_widget_item_cursor_set(item, cursor);
|
elm_widget_item_cursor_set(it, cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI const char *
|
EAPI const char *
|
||||||
elm_list_item_cursor_get(const Elm_List_Item *item)
|
elm_list_item_cursor_get(const Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
|
||||||
return elm_widget_item_cursor_get(item);
|
return elm_widget_item_cursor_get(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI void
|
EAPI void
|
||||||
elm_list_item_cursor_unset(Elm_List_Item *item)
|
elm_list_item_cursor_unset(Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
elm_widget_item_cursor_unset(item);
|
elm_widget_item_cursor_unset(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI void
|
EAPI void
|
||||||
elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style)
|
elm_list_item_cursor_style_set(Elm_Object_Item *it, const char *style)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
elm_widget_item_cursor_style_set(item, style);
|
elm_widget_item_cursor_style_set(it, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI const char *
|
EAPI const char *
|
||||||
elm_list_item_cursor_style_get(const Elm_List_Item *item)
|
elm_list_item_cursor_style_get(const Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
|
||||||
return elm_widget_item_cursor_style_get(item);
|
return elm_widget_item_cursor_style_get(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI void
|
EAPI void
|
||||||
elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only)
|
elm_list_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
|
||||||
elm_widget_item_cursor_engine_only_set(item, engine_only);
|
elm_widget_item_cursor_engine_only_set(it, engine_only);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_DEPRECATED EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_list_item_cursor_engine_only_get(const Elm_List_Item *item)
|
elm_list_item_cursor_engine_only_get(const Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
|
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
|
||||||
return elm_widget_item_cursor_engine_only_get(item);
|
return elm_widget_item_cursor_engine_only_get(it);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,8 +70,6 @@ typedef enum
|
||||||
ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */
|
ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */
|
||||||
} Elm_List_Mode;
|
} 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
|
* Add a new list widget to the given parent Elementary
|
||||||
* (container) object.
|
* (container) object.
|
||||||
|
@ -364,7 +362,7 @@ EAPI void elm_list_scroller_policy_get(const Evas_Object
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Prepend a new item to the list object.
|
||||||
|
@ -406,7 +404,7 @@ EAPI Elm_List_Item *elm_list_item_append(Evas_Object *obj, const c
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Insert a new item into the list object before item @p before.
|
||||||
|
@ -449,7 +447,7 @@ EAPI Elm_List_Item *elm_list_item_prepend(Evas_Object *obj, const
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Insert a new item into the list object after item @p after.
|
||||||
|
@ -492,7 +490,7 @@ EAPI Elm_List_Item *elm_list_item_insert_before(Evas_Object *obj,
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Insert a new item into the sorted list object.
|
||||||
|
@ -507,7 +505,7 @@ EAPI Elm_List_Item *elm_list_item_insert_after(Evas_Object *obj, E
|
||||||
* @param func The function to call when the item is clicked.
|
* @param func The function to call when the item is clicked.
|
||||||
* @param data The data to associate with the item for related callbacks.
|
* @param data The data to associate with the item for related callbacks.
|
||||||
* @param cmp_func The comparing function to be used to sort list
|
* @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
|
* 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 the second item should be place after the first, or negative value
|
||||||
* if should be placed before.
|
* if should be placed before.
|
||||||
|
@ -543,7 +541,7 @@ EAPI Elm_List_Item *elm_list_item_insert_after(Evas_Object *obj, E
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Remove all list's items.
|
||||||
|
@ -561,7 +559,7 @@ EAPI void elm_list_clear(Evas_Object *obj);
|
||||||
* Get a list of all the list items.
|
* Get a list of all the list items.
|
||||||
*
|
*
|
||||||
* @param obj The list object
|
* @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.
|
* or @c NULL on failure.
|
||||||
*
|
*
|
||||||
* @see elm_list_item_append()
|
* @see elm_list_item_append()
|
||||||
|
@ -587,13 +585,13 @@ EAPI const Eina_List *elm_list_items_get(const Evas_Object *obj);
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Return a list of the currently selected list items.
|
||||||
*
|
*
|
||||||
* @param obj The list object.
|
* @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.
|
* or @c NULL on failure.
|
||||||
*
|
*
|
||||||
* Multiple items can be selected if multi select is enabled. It can be
|
* Multiple items can be selected if multi select is enabled. It can be
|
||||||
|
@ -609,7 +607,7 @@ EAPI const Eina_List *elm_list_selected_items_get(const Evas_Object
|
||||||
/**
|
/**
|
||||||
* Set the selected state of an item.
|
* Set the selected state of an item.
|
||||||
*
|
*
|
||||||
* @param item The list item
|
* @param it The list item
|
||||||
* @param selected The selected state
|
* @param selected The selected state
|
||||||
*
|
*
|
||||||
* This sets the selected state of the given item @p it.
|
* This sets the selected state of the given item @p it.
|
||||||
|
@ -628,12 +626,12 @@ EAPI const Eina_List *elm_list_selected_items_get(const Evas_Object
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* @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.
|
* it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
|
||||||
*
|
*
|
||||||
|
@ -642,7 +640,7 @@ EAPI void elm_list_item_selected_set(Elm_List_Item *item
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Set or unset item as a separator.
|
||||||
|
@ -660,7 +658,7 @@ EAPI Eina_Bool elm_list_item_selected_get(const Elm_List_Item
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Get a value whether item is a separator or not.
|
||||||
|
@ -673,24 +671,24 @@ EAPI void elm_list_item_separator_set(Elm_List_Item *it,
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* 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,
|
* It won't animate list until item is visible. If such behavior is wanted,
|
||||||
* use elm_list_bring_in() intead.
|
* use elm_list_bring_in() intead.
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* This causes list to jump to the given item @p item and show it
|
||||||
* (by scrolling), if it is not fully visible.
|
* (by scrolling), if it is not fully visible.
|
||||||
|
@ -701,12 +699,12 @@ EAPI void elm_list_item_show(Elm_List_Item *item);
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* 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()
|
* If deleting all list items is required, elm_list_clear()
|
||||||
* should be used instead of getting items list and deleting each one.
|
* should be used instead of getting items list and deleting each one.
|
||||||
|
@ -717,19 +715,19 @@ EAPI void elm_list_item_bring_in(Elm_List_Item *item);
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* @return The base object associated with @p item
|
||||||
*
|
*
|
||||||
* Base object is the @c Evas_Object that represents that item.
|
* Base object is the @c Evas_Object that represents that item.
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Get the item before @p it in list.
|
||||||
|
@ -744,7 +742,7 @@ EAPI Evas_Object *elm_list_item_object_get(const Elm_List_Item *
|
||||||
*
|
*
|
||||||
* @ingroup 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.
|
* Get the item after @p it in list.
|
||||||
|
@ -759,12 +757,12 @@ EAPI Elm_List_Item *elm_list_item_prev(const Elm_List_Item *it);
|
||||||
*
|
*
|
||||||
* @ingroup 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.
|
* 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.
|
* @param text The text to set in the content.
|
||||||
*
|
*
|
||||||
* Setup the text as tooltip to object. The item can have only one tooltip,
|
* Setup the text as tooltip to object. The item can have only one tooltip,
|
||||||
|
@ -775,18 +773,18 @@ EAPI Elm_List_Item *elm_list_item_next(const Elm_List_Item *it);
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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
|
* @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
|
* @param disable If EINA_TRUE, size restrictions are disabled
|
||||||
* @return EINA_FALSE on failure, EINA_TRUE on success
|
* @return EINA_FALSE on failure, EINA_TRUE on success
|
||||||
*
|
*
|
||||||
* This function allows a tooltip to expand beyond its parant window's canvas.
|
* 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.
|
* 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
|
* @brief Retrieve size restriction state of an object's tooltip
|
||||||
|
@ -797,7 +795,7 @@ EAPI Eina_Bool elm_list_item_tooltip_window_mode_set(Elm_List
|
||||||
* its parant window's canvas.
|
* its parant window's canvas.
|
||||||
* It will instead be limited only by the size of the display.
|
* 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.
|
* Set the content to be shown in the tooltip item.
|
||||||
|
@ -808,7 +806,7 @@ EAPI Eina_Bool elm_list_item_tooltip_window_mode_get(const El
|
||||||
* return a valid Evas_Object. This object is then managed fully by
|
* return a valid Evas_Object. This object is then managed fully by
|
||||||
* tooltip system and is deleted when the tooltip is gone.
|
* 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 func the function used to create the tooltip contents.
|
||||||
* @param data what to provide to @a func as callback data/context.
|
* @param data what to provide to @a func as callback data/context.
|
||||||
* @param del_cb called when data is not needed anymore, either when
|
* @param del_cb called when data is not needed anymore, either when
|
||||||
|
@ -821,12 +819,12 @@ EAPI Eina_Bool elm_list_item_tooltip_window_mode_get(const El
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* 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
|
* Remove tooltip from item. The callback provided as del_cb to
|
||||||
* elm_list_item_tooltip_content_cb_set() will be called to notify
|
* elm_list_item_tooltip_content_cb_set() will be called to notify
|
||||||
|
@ -837,7 +835,7 @@ EAPI void elm_list_item_tooltip_content_cb_set(Elm_List_
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Sets a different style for this item tooltip.
|
||||||
|
@ -846,14 +844,14 @@ EAPI void elm_list_item_tooltip_unset(Elm_List_Item *ite
|
||||||
* elm_list_item_tooltip_content_cb_set() or
|
* elm_list_item_tooltip_content_cb_set() or
|
||||||
* elm_list_item_tooltip_text_set()
|
* 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, ...)
|
* @param style the theme style to use (default, transparent, ...)
|
||||||
*
|
*
|
||||||
* @see elm_object_tooltip_style_set() for more details.
|
* @see elm_object_tooltip_style_set() for more details.
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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.
|
* Get the style for this item tooltip.
|
||||||
|
@ -867,13 +865,13 @@ EAPI void elm_list_item_tooltip_style_set(Elm_List_Item
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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,
|
* Set the type of mouse pointer/cursor decoration to be shown,
|
||||||
* when the mouse pointer is over the given list widget item
|
* 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
|
* @param cursor the cursor type's name
|
||||||
*
|
*
|
||||||
* This function works analogously as elm_object_cursor_set(), but
|
* This function works analogously as elm_object_cursor_set(), but
|
||||||
|
@ -891,13 +889,13 @@ EAPI const char *elm_list_item_tooltip_style_get(const Elm_List
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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,
|
* Get the type of mouse pointer/cursor decoration set to be shown,
|
||||||
* when the mouse pointer is over the given list widget item
|
* 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
|
* @return the cursor type's name or @c NULL, if no custom cursors
|
||||||
* were set to @p item (and on errors)
|
* were set to @p item (and on errors)
|
||||||
*
|
*
|
||||||
|
@ -907,14 +905,14 @@ EAPI void elm_list_item_cursor_set(Elm_List_Item *item,
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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
|
* Unset any custom mouse pointer/cursor decoration set to be
|
||||||
* shown, when the mouse pointer is over the given list widget
|
* shown, when the mouse pointer is over the given list widget
|
||||||
* item, thus making it show the @b default cursor again.
|
* 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
|
* Use this call to undo any custom settings on this item's cursor
|
||||||
* decoration, bringing it back to defaults (no custom style set).
|
* decoration, bringing it back to defaults (no custom style set).
|
||||||
|
@ -924,13 +922,13 @@ EAPI const char *elm_list_item_cursor_get(const Elm_List_Item *
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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
|
* Set a different @b style for a given custom cursor set for a
|
||||||
* list item.
|
* 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",
|
* @param style the <b>theme style</b> to use (e.g. @c "default",
|
||||||
* @c "transparent", etc)
|
* @c "transparent", etc)
|
||||||
*
|
*
|
||||||
|
@ -949,13 +947,13 @@ EAPI void elm_list_item_cursor_unset(Elm_List_Item *item
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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
|
* Get the current @b style set for a given list item's custom
|
||||||
* cursor
|
* 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
|
* @return style the cursor style in use. If the object does not
|
||||||
* have a cursor set, then @c NULL is returned.
|
* have a cursor set, then @c NULL is returned.
|
||||||
*
|
*
|
||||||
|
@ -963,14 +961,14 @@ EAPI void elm_list_item_cursor_style_set(Elm_List_Item *
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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
|
* Set if the (custom)cursor for a given list item should be
|
||||||
* searched in its theme, also, or should only rely on the
|
* searched in its theme, also, or should only rely on the
|
||||||
* rendering engine.
|
* 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
|
* @param engine_only Use @c EINA_TRUE to have cursors looked for
|
||||||
* only on those provided by the rendering engine, @c EINA_FALSE to
|
* only on those provided by the rendering engine, @c EINA_FALSE to
|
||||||
* have them searched on the widget's theme, as well.
|
* have them searched on the widget's theme, as well.
|
||||||
|
@ -983,14 +981,14 @@ EAPI const char *elm_list_item_cursor_style_get(const Elm_List_
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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
|
* Get if the (custom) cursor for a given list item is being
|
||||||
* searched in its theme, also, or is only relying on the rendering
|
* searched in its theme, also, or is only relying on the rendering
|
||||||
* engine.
|
* engine.
|
||||||
*
|
*
|
||||||
* @param item a list item
|
* @param it a list item
|
||||||
* @return @c EINA_TRUE, if cursors are being looked for only on
|
* @return @c EINA_TRUE, if cursors are being looked for only on
|
||||||
* those provided by the rendering engine, @c EINA_FALSE if they
|
* those provided by the rendering engine, @c EINA_FALSE if they
|
||||||
* are being searched on the widget's theme, as well.
|
* are being searched on the widget's theme, as well.
|
||||||
|
@ -999,7 +997,7 @@ EAPI void elm_list_item_cursor_engine_only_set(Elm_List_
|
||||||
*
|
*
|
||||||
* @ingroup List
|
* @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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
|
@ -22,7 +22,7 @@ typedef Evas_Object *(*Elm_Tooltip_Content_Cb)(void *data, Evas_Object *obj, Eva
|
||||||
* @param obj owner widget.
|
* @param obj owner widget.
|
||||||
* @param tooltip The tooltip object (affix content to this!)
|
* @param tooltip The tooltip object (affix content to this!)
|
||||||
* @param item context dependent item. As an example, if tooltip was
|
* @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);
|
typedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip, void *item);
|
||||||
|
|
||||||
|
|
|
@ -856,14 +856,14 @@ static void
|
||||||
_popup_item_selected(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
_popup_item_selected(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *view = data;
|
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);
|
const Eina_List *itr, *list = elm_list_items_get(obj);
|
||||||
void *d;
|
void *d;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(list, itr, d)
|
EINA_LIST_FOREACH(list, itr, d)
|
||||||
{
|
{
|
||||||
if (d == it)
|
if (d == list_it)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
|
Loading…
Reference in New Issue