#define N_ITEMS 300
-static Elm_Genlist_Item_Class _itc;
-static Elm_Genlist_Item_Class _itc_group;
+static Elm_Genlist_Item_Class *_itc = NULL;
+static Elm_Genlist_Item_Class *_itc_group = NULL;
static int nitems = 0;
static char *
{
Evas_Object *list = data;
- elm_genlist_item_append(list, &_itc,
+ elm_genlist_item_append(list, _itc,
(void *)(long)nitems++, NULL,
ELM_GENLIST_ITEM_NONE,
_item_sel_cb, NULL);
{
Evas_Object *list = data;
- elm_genlist_item_prepend(list, &_itc,
+ elm_genlist_item_prepend(list, _itc,
(void *)(long)nitems++, NULL,
ELM_GENLIST_ITEM_NONE,
_item_sel_cb, NULL);
if (!glit) return;
- elm_genlist_item_insert_before(list, &_itc,
+ elm_genlist_item_insert_before(list, _itc,
(void *)(long)nitems++, NULL,
glit, ELM_GENLIST_ITEM_NONE,
_item_sel_cb, NULL);
if (!glit) return;
- elm_genlist_item_insert_after(list, &_itc,
+ elm_genlist_item_insert_after(list, _itc,
(void *)(long)nitems++, NULL,
glit, ELM_GENLIST_ITEM_NONE,
_item_sel_cb, NULL);
if (!glit) glit = elm_genlist_first_item_get(list);
elm_genlist_item_selected_set(glit, EINA_TRUE);
- elm_genlist_item_show(glit);
+ elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
static void
if (!glit) glit = elm_genlist_last_item_get(list);
elm_genlist_item_selected_set(glit, EINA_TRUE);
- elm_genlist_item_show(glit);
+ elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
static void
Elm_Object_Item *glit = data;
if (!glit) return;
- elm_genlist_item_bring_in(glit);
+ elm_genlist_item_bring_in(glit, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
static void
Elm_Object_Item *glit = data;
if (!glit) return;
- elm_genlist_item_show(glit);
+ elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
static void
Elm_Object_Item *glit = data;
if (!glit) return;
- elm_genlist_item_middle_bring_in(glit);
+ elm_genlist_item_bring_in(glit, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
}
static void
Elm_Object_Item *glit = data;
if (!glit) return;
- elm_genlist_item_middle_show(glit);
+ elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
}
static void
Elm_Object_Item *glit = data;
if (!glit) return;
- elm_genlist_item_top_bring_in(glit);
+ elm_genlist_item_bring_in(glit, ELM_GENLIST_ITEM_SCROLLTO_TOP);
}
static void
Elm_Object_Item *glit = data;
if (!glit) return;
- elm_genlist_item_top_show(glit);
+ elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_TOP);
}
static void
elm_win_resize_object_add(win, box);
evas_object_show(box);
- _itc.item_style = "double_label";
- _itc.func.text_get = _item_label_get;
- _itc.func.content_get = _item_content_get;
- _itc.func.state_get = NULL;
- _itc.func.del = NULL;
-
- _itc_group.item_style = "group_index";
- _itc_group.func.text_get = _group_label_get;
- _itc_group.func.content_get = _group_content_get;
- _itc_group.func.state_get = NULL;
- _itc_group.func.del = NULL;
+ if (!_itc)
+ {
+ _itc = elm_genlist_item_class_new();
+ _itc->item_style = "default";
+ _itc->func.text_get = _item_label_get;
+ _itc->func.content_get = _item_content_get;
+ _itc->func.state_get = NULL;
+ _itc->func.del = NULL;
+ }
+ if (!_itc_group)
+ {
+ _itc_group = elm_genlist_item_class_new();
+ _itc_group->item_style = "default";
+ _itc_group->func.text_get = _item_label_get;
+ _itc_group->func.content_get = _item_content_get;
+ _itc_group->func.state_get = NULL;
+ _itc_group->func.del = NULL;
+ }
+
list = elm_genlist_add(win);
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
if (i % 7 == 0)
{
- glg = gli = elm_genlist_item_append(list, &_itc_group,
+ glg = gli = elm_genlist_item_append(list, _itc_group,
(void *)(long)nitems++, NULL,
ELM_GENLIST_ITEM_GROUP,
_item_sel_cb, NULL);
- elm_genlist_item_display_only_set(glg, EINA_TRUE);
+ elm_genlist_item_select_mode_set(git, ELM_OBJECT_DISPLAY_ONLY_SELECT);
}
else
{
- gli = elm_genlist_item_append(list, &_itc,
+ gli = elm_genlist_item_append(list, _itc,
(void *)(long)nitems++, glg,
ELM_GENLIST_ITEM_NONE,
_item_sel_cb, NULL);