evas_object_show(genlist);
Elm_Genlist_Item_Class gic;
-Elm_Genlist_Item *it, *top;
+Elm_Object_Item *glit, *glit_top;
gic.item_style = "default";
gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-it = elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-top = it;
-elm_genlist_item_expanded_set(it, EINA_TRUE);
-elm_genlist_item_append(genlist, &gic, NULL, it, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-it = elm_genlist_item_append(genlist, &gic, NULL, it, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-elm_genlist_item_append(genlist, &gic, NULL, it, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+glit = elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+glit_top = glit;
+elm_genlist_item_expanded_set(glit, EINA_TRUE);
+elm_genlist_item_append(genlist, &gic, NULL, glit, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+glit = elm_genlist_item_append(genlist, &gic, NULL, glit, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+elm_genlist_item_append(genlist, &gic, NULL, glit, ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_append(genlist, &gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-elm_genlist_item_top_show(top);
+elm_genlist_item_top_show(glit_top);
#include "widget_preview_tmpl_foot.c"
static void
glt_exp(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- Evas_Object *gl = elm_genlist_item_genlist_get(it);
- int val = (int)(long)elm_genlist_item_data_get(it);
- Elm_Genlist_Item *it1, *it2, *it3;
+ Elm_Object_Item *glit = event_info;
+ Evas_Object *gl = elm_genlist_item_genlist_get(glit);
+ int val = (int)(long)elm_genlist_item_data_get(glit);
+ Elm_Object_Item *glit1, *glit2, *glit3;
val *= 10;
- it1 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 1), it,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- it2 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 2), it,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- it3 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 3), it,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
+ glit1 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 1), glit,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ glit2 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 2), glit,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ glit3 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 3), glit,
+ ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
- elm_genlist_item_cursor_set(it1, ELM_CURSOR_HAND2);
- elm_genlist_item_cursor_set(it2, ELM_CURSOR_HAND2);
- elm_genlist_item_cursor_set(it3, ELM_CURSOR_HAND1);
+ elm_genlist_item_cursor_set(glit1, ELM_CURSOR_HAND2);
+ elm_genlist_item_cursor_set(glit2, ELM_CURSOR_HAND2);
+ elm_genlist_item_cursor_set(glit3, ELM_CURSOR_HAND1);
}
static void
glt_con(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_subitems_clear(it);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_subitems_clear(glit);
}
static void
glt_exp_req(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 1);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_TRUE);
}
static void
glt_con_req(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 0);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_FALSE);
}
char *
test_cursor2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *bx, *o, *grid, *gl;
- Elm_Genlist_Item *it1, *it2, *it3;
+ Elm_Object_Item *glit1, *glit2, *glit3;
Elm_Object_Item *tb_it;
Elm_Object_Item *lit;
char buf[PATH_MAX];
itct.item_style = "default";
itct.func.text_get = glt_text_get;
- it1 = elm_genlist_item_append(gl, &itct, (void *) 1, NULL,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
- it2 = elm_genlist_item_append(gl, &itct, (void *) 2, NULL,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
- it3 = elm_genlist_item_append(gl, &itct, (void *) 3, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ glit1 = elm_genlist_item_append(gl, &itct, (void *) 1, NULL,
+ ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
+ glit2 = elm_genlist_item_append(gl, &itct, (void *) 2, NULL,
+ ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
+ glit3 = elm_genlist_item_append(gl, &itct, (void *) 3, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_cursor_set(it1, ELM_CURSOR_HAND1);
- elm_genlist_item_cursor_set(it2, ELM_CURSOR_HAND1);
- elm_genlist_item_cursor_set(it3, ELM_CURSOR_CROSS);
+ elm_genlist_item_cursor_set(glit1, ELM_CURSOR_HAND1);
+ elm_genlist_item_cursor_set(glit2, ELM_CURSOR_HAND1);
+ elm_genlist_item_cursor_set(glit3, ELM_CURSOR_CROSS);
evas_object_smart_callback_add(gl, "expand,request", glt_exp_req, gl);
evas_object_smart_callback_add(gl, "contract,request", glt_con_req, gl);
#ifndef ELM_LIB_QUICKLAUNCH
typedef struct _Testitem
{
- Elm_Genlist_Item *item;
+ Elm_Object_Item *item;
int mode;
int onoff;
} Testitem;
typedef struct _Testitem
{
- Elm_Genlist_Item *item;
+ Elm_Object_Item *item;
int mode;
int onoff;
} Testitem;
Evas_Object *gl = data;
Evas_Event_Mouse_Move *ev = event_info;
int where = 0;
- Elm_Genlist_Item *gli;
+ Elm_Object_Item *gli;
gli = elm_genlist_at_xy_item_get(gl, ev->cur.canvas.x, ev->cur.canvas.y, &where);
if (gli)
printf("over %p, where %i\n", elm_genlist_item_data_get(gli), where);
{
Evas_Object *win, *bg, *gl, *bt_50, *bt_1500, *bx;
Evas_Object *over;
- Elm_Genlist_Item *gli;
+ Elm_Object_Item *gli;
int i;
win = elm_win_add(NULL, "genlist", ELM_WIN_BASIC);
{
Evas_Object *gl = data;
static int i = 0;
- Elm_Genlist_Item *gli_selected;
+ Elm_Object_Item *gli_selected;
itc1.item_style = "default";
itc1.func.text_get = gl_text_get;
{
Evas_Object *gl = data;
static int i = 0;
- Elm_Genlist_Item *gli_selected;
+ Elm_Object_Item *gli_selected;
itc1.item_style = "default";
itc1.func.text_get = gl_text_get;
my_gl_del(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *gl = data;
- Elm_Genlist_Item *gli = elm_genlist_selected_item_get(gl);
+ Elm_Object_Item *gli = elm_genlist_selected_item_get(gl);
if (!gli)
{
printf("no item selected\n");
my_gl_disable(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *gl = data;
- Elm_Genlist_Item *gli = elm_genlist_selected_item_get(gl);
+ Elm_Object_Item *gli = elm_genlist_selected_item_get(gl);
if (!gli)
{
printf("no item selected\n");
{
Evas_Object *gl = data;
int i = 0;
- Elm_Genlist_Item *it = elm_genlist_first_item_get(gl);
+ Elm_Object_Item *it = elm_genlist_first_item_get(gl);
while (it)
{
elm_genlist_item_update(it);
my_gl_first(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *gl = data;
- Elm_Genlist_Item *gli = elm_genlist_first_item_get(gl);
+ Elm_Object_Item *gli = elm_genlist_first_item_get(gl);
if (!gli) return;
elm_genlist_item_show(gli);
elm_genlist_item_selected_set(gli, 1);
my_gl_last(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *gl = data;
- Elm_Genlist_Item *gli = elm_genlist_last_item_get(gl);
+ Elm_Object_Item *gli = elm_genlist_last_item_get(gl);
if (!gli) return;
elm_genlist_item_show(gli);
elm_genlist_item_selected_set(gli, 1);
test_genlist2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *gl, *bx, *bx2, *bx3, *bt;
- Elm_Genlist_Item *gli[10];
+ Elm_Object_Item *gli[10];
char buf[PATH_MAX];
win = elm_win_add(NULL, "genlist2", ELM_WIN_BASIC);
static void
gl4_sel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = (Elm_Genlist_Item *)event_info;
- int depth = 0;
-
- depth = elm_genlist_item_expanded_depth_get(it);
+ Elm_Object_Item *glit = event_info;
+ int depth = elm_genlist_item_expanded_depth_get(glit);
printf("expanded depth for selected item is %d\n", depth);
}
static void
gl4_exp(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- Evas_Object *gl = elm_genlist_item_genlist_get(it);
- int val = (int)(long)elm_genlist_item_data_get(it);
+ Elm_Object_Item *glit = event_info;
+ Evas_Object *gl = elm_genlist_item_genlist_get(glit);
+ int val = (int)(long)elm_genlist_item_data_get(glit);
val *= 10;
elm_genlist_item_append(gl, &itc4,
- (void *)(long)(val + 1)/* item data */, it/* parent */,
- ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
+ (void *)(long)(val + 1)/* item data */,
+ glit/* parent */, ELM_GENLIST_ITEM_NONE,
+ gl4_sel/* func */,
NULL/* func data */);
elm_genlist_item_append(gl, &itc4,
- (void *)(long)(val + 2)/* item data */, it/* parent */,
- ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
+ (void *)(long)(val + 2)/* item data */,
+ glit/* parent */, ELM_GENLIST_ITEM_NONE,
+ gl4_sel/* func */,
NULL/* func data */);
elm_genlist_item_append(gl, &itc4,
- (void *)(long)(val + 3)/* item data */, it/* parent */,
+ (void *)(long)(val + 3)/* item data */,
+ glit/* parent */,
ELM_GENLIST_ITEM_SUBITEMS, gl4_sel/* func */,
NULL/* func data */);
}
static void
gl4_con(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_subitems_clear(it);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_subitems_clear(glit);
}
static void
gl4_exp_req(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 1);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_TRUE);
}
static void
gl4_con_req(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 0);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_FALSE);
}
char *gl4_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
test_genlist8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *gl, *bt[8], *bx, *bx2, *bx3;
- Elm_Genlist_Item *gli = NULL, *git = NULL;
+ Elm_Object_Item *gli = NULL, *git = NULL;
int i, bt_num;
win = elm_win_add(NULL, "genlist-group", ELM_WIN_BASIC);
static void
gl9_exp(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- Evas_Object *gl = elm_genlist_item_genlist_get(it);
- int val = (int)(long)elm_genlist_item_data_get(it);
+ Elm_Object_Item *glit = event_info;
+ Evas_Object *gl = elm_genlist_item_genlist_get(glit);
+ int val = (int)(long)elm_genlist_item_data_get(glit);
val *= 10;
elm_genlist_item_append(gl, &itc1,
- (void *)(long)(val + 1)/* item data */, it/* parent */,
+ (void *)(long)(val + 1)/* item data */,
+ glit/* parent */,
ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
NULL/* func data */);
elm_genlist_item_append(gl, &itc1,
- (void *)(long)(val + 2)/* item data */, it/* parent */,
+ (void *)(long)(val + 2)/* item data */,
+ glit/* parent */,
ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
NULL/* func data */);
elm_genlist_item_append(gl, &itc1,
- (void *)(long)(val + 3)/* item data */, it/* parent */,
+ (void *)(long)(val + 3)/* item data */,
+ glit/* parent */,
ELM_GENLIST_ITEM_SUBITEMS, gl4_sel/* func */,
NULL/* func data */);
}
static void
gl9_con(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_subitems_clear(it);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_subitems_clear(glit);
}
static void
gl9_exp_req(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, EINA_TRUE);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_TRUE);
}
static void
gl9_con_req(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, EINA_FALSE);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_FALSE);
}
void
test_genlist9(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *gl, *bx;
- Elm_Genlist_Item *git;
+ Elm_Object_Item *git;
win = elm_win_add(NULL, "genlist-group-tree", ELM_WIN_BASIC);
elm_win_title_set(win, "Genlist Group Tree");
fprintf(stderr, "drag\n");
if (!data) return;
int v = elm_radio_value_get(data);
- Elm_Genlist_Item *it = (Elm_Genlist_Item *)elm_genlist_mode_item_get(obj);
- if (it)
- elm_genlist_item_mode_set(it, mode_type[v], EINA_FALSE);
+ Elm_Object_Item *glit = (Elm_Object_Item *) elm_genlist_mode_item_get(obj);
+ if (glit) elm_genlist_item_mode_set(glit, mode_type[v], EINA_FALSE);
}
void
* the item(*item) had been moved before the given relative item(*rel_item) in list.
*
*/
-static void gl_moved(Evas_Object *data __UNUSED__, Evas_Object *obj __UNUSED__, Elm_Genlist_Item *item __UNUSED__)
+static void gl_moved(Evas_Object *data __UNUSED__, Evas_Object *obj __UNUSED__, Elm_Object_Item *item __UNUSED__)
{
// if needed, add application logic.
}
static int
gl13_cmp(const void *pa, const void *pb)
{
- const Elm_Genlist_Item *ia = pa, *ib = pb;
+ const Elm_Object_Item *ia = pa, *ib = pb;
int a = (int)(long)elm_genlist_item_data_get(ia);
int b = (int)(long)elm_genlist_item_data_get(ib);
return a - b;
void
test_genlist13(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_Genlist_Item *pi[6];
+ Elm_Object_Item *pi[6];
Evas_Object *win, *bg, *bx, *gl;
int i, base, idx[3] = {1, 10, 15};
{
Evas_Object *gl = data;
static int i = 1000;
- Elm_Genlist_Item *gli_selected;
+ Elm_Object_Item *gli_selected;
itc1.item_style = "default";
itc1.func.text_get = gl_text_get;
{
Evas_Object *gl = data;
static int i = 0;
- Elm_Genlist_Item *gli_selected;
+ Elm_Object_Item *gli_selected;
itc1.item_style = "default";
itc1.func.text_get = gl_text_get;
void
test_genlist14(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Elm_Genlist_Item *pi[6];
+ Elm_Object_Item *pi[6];
Evas_Object *win, *bg, *bx, *bx2, *bt, *gl;
int i, base;
/* index: 0, 1, 2, 3, 4, 5
for (i = 0; i < 3; i++)
{
- Elm_Genlist_Item *sub[6];
+ Elm_Object_Item *sub_glit[6];
int j;
base = 1000 * (long)elm_genlist_item_data_get(pi[i]);
- sub[0] = elm_genlist_item_append
+ sub_glit[0] = elm_genlist_item_append
(gl, &itc4, (void *)(idx[0] + base)/* item data */, pi[i]/* parent */,
ELM_GENLIST_ITEM_SUBITEMS, NULL/* func */, NULL/* func data */);
for (j = 1; j < 6; j++) {
if (relative[j] < 0)
- sub[j] = elm_genlist_item_insert_before
+ sub_glit[j] = elm_genlist_item_insert_before
(gl, &itc4, (void *)(idx[j] + base)/* item data */,
- pi[i]/* parent */, sub[-relative[j]],
+ pi[i]/* parent */, sub_glit[-relative[j]],
ELM_GENLIST_ITEM_SUBITEMS, NULL/* func */, NULL/* func data */);
else
- sub[j] = elm_genlist_item_insert_after
+ sub_glit[j] = elm_genlist_item_insert_after
(gl, &itc4, (void *)(idx[j] + base)/* item data */,
- pi[i]/* parent */, sub[relative[j]],
+ pi[i]/* parent */, sub_glit[relative[j]],
ELM_GENLIST_ITEM_SUBITEMS, NULL/* func */, NULL/* func data */);
}
}
for (i = 3; i < 6; i++)
{
- Elm_Genlist_Item *sub[6];
+ Elm_Object_Item *sub_glit[6];
int j;
base = 1000 * (long)elm_genlist_item_data_get(pi[i]);
- sub[0] = elm_genlist_item_append
+ sub_glit[0] = elm_genlist_item_append
(gl, &itc4, (void *)(idx[0] + base)/* item data */, pi[i]/* parent */,
ELM_GENLIST_ITEM_SUBITEMS, NULL/* func */, NULL/* func data */);
for (j = 1; j < 6; j++) {
if (relative[j] < 0)
- sub[j] = elm_genlist_item_insert_before
+ sub_glit[j] = elm_genlist_item_insert_before
(gl, &itc4, (void *)(idx[j] + base)/* item data */,
- pi[i]/* parent */, sub[-relative[j]],
+ pi[i]/* parent */, sub_glit[-relative[j]],
ELM_GENLIST_ITEM_SUBITEMS, NULL/* func */, NULL/* func data */);
else
- sub[j] = elm_genlist_item_insert_after
+ sub_glit[j] = elm_genlist_item_insert_after
(gl, &itc4, (void *)(idx[j] + base)/* item data */,
- pi[i]/* parent */, sub[relative[j]],
+ pi[i]/* parent */, sub_glit[relative[j]],
ELM_GENLIST_ITEM_SUBITEMS, NULL/* func */, NULL/* func data */);
}
}
test_index(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *gl, *id;
- Elm_Genlist_Item *it;
+ Elm_Object_Item *glit;
int i, j;
win = elm_win_add(NULL, "index", ELM_WIN_BASIC);
j = 0;
for (i = 0; i < 100; i++)
{
- it = elm_genlist_item_append(gl, &itci,
- (void *)(long)j/* item data */,
- NULL/* parent */, ELM_GENLIST_ITEM_NONE,
- NULL/* func */, NULL/* func data */);
+ glit = elm_genlist_item_append(gl, &itci,
+ (void *)(long)j/* item data */,
+ NULL/* parent */,
+ ELM_GENLIST_ITEM_NONE,
+ NULL/* func */, NULL/* func data */);
if (!(j & 0xf))
{
char buf[32];
snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_append(id, buf, it);
+ elm_index_item_append(id, buf, glit);
}
j += 2;
}
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- Evas_Object *gl = elm_genlist_item_genlist_get(it);
- int val = (int)(long)elm_genlist_item_data_get(it);
- Elm_Genlist_Item *it1, *it2, *it3;
+ Elm_Object_Item *glit = event_info;
+ Evas_Object *gl = elm_genlist_item_genlist_get(glit);
+ int val = (int)(long)elm_genlist_item_data_get(glit);
+ Elm_Object_Item *glit1, *glit2, *glit3;
val *= 10;
- it1 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 1), it,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- it2 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 2), it,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- it3 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 3), it,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
-
- elm_genlist_item_tooltip_text_set(it1, "Testing A");
- elm_genlist_item_tooltip_text_set(it2, "Testing B");
- elm_genlist_item_tooltip_text_set(it3, "Testing C");
+ glit1 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 1), glit,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ glit2 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 2), glit,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ glit3 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 3), glit,
+ ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
+
+ elm_genlist_item_tooltip_text_set(glit1, "Testing A");
+ elm_genlist_item_tooltip_text_set(glit2, "Testing B");
+ elm_genlist_item_tooltip_text_set(glit3, "Testing C");
}
static void
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_subitems_clear(it);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_subitems_clear(glit);
}
static void
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 1);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_TRUE);
}
static void
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 0);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_FALSE);
}
char *
void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *bx, *grid, *gl;
- Elm_Genlist_Item *it1, *it2, *it3;
+ Elm_Object_Item *glit1, *glit2, *glit3;
static Testitem ti[144];
int i, n;
char buf[PATH_MAX];
itct.item_style = "default";
itct.func.text_get = gltt_text_get;
- it1 = elm_genlist_item_append(gl, &itct, (void *)1, NULL,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
- it2 = elm_genlist_item_append(gl, &itct, (void *)2, NULL,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
- it3 = elm_genlist_item_append(gl, &itct, (void *)3, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ glit1 = elm_genlist_item_append(gl, &itct, (void *)1, NULL,
+ ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
+ glit2 = elm_genlist_item_append(gl, &itct, (void *)2, NULL,
+ ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
+ glit3 = elm_genlist_item_append(gl, &itct, (void *)3, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_tooltip_text_set(it1, "Testing 1");
- elm_genlist_item_tooltip_text_set(it2, "Testing 2");
- elm_genlist_item_tooltip_text_set(it3, "Testing 3");
+ elm_genlist_item_tooltip_text_set(glit1, "Testing 1");
+ elm_genlist_item_tooltip_text_set(glit2, "Testing 2");
+ elm_genlist_item_tooltip_text_set(glit3, "Testing 3");
evas_object_smart_callback_add(gl, "expand,request", gltt_exp_req, gl);
evas_object_smart_callback_add(gl, "contract,request", gltt_con_req,
#ifndef ELM_LIB_QUICKLAUNCH
typedef struct _Testitem
{
- Elm_Genlist_Item *item;
+ Elm_Object_Item *item;
int mode, onoff;
} Testitem;
{
Evas_Object *list = data;
Evas_Coord x, y, w, h, mx, my;
- Elm_Genlist_Item *it = elm_genlist_selected_item_get(list);
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
const Eina_List *selected, *l, *realized;
- printf("\nfirst selected item: %p\n", it);
+ printf("\nfirst selected item: %p\n", glit);
selected = elm_genlist_selected_items_get(list);
printf("all selected items (%d): ", eina_list_count(selected));
- EINA_LIST_FOREACH(selected, l, it)
- printf("%p ", it);
+ EINA_LIST_FOREACH(selected, l, glit)
+ printf("%p ", glit);
printf("\n");
realized = elm_genlist_realized_items_get(list);
printf("realized items (%d): ", eina_list_count(realized));
- EINA_LIST_FOREACH(realized, l, it)
- printf("%p ", it);
+ EINA_LIST_FOREACH(realized, l, glit)
+ printf("%p ", glit);
printf("\n");
printf("genlist mode: %s\n", elm_genlist_mode_get(list));
printf("mode item: %p\n", elm_genlist_mode_item_get(list));
evas_object_geometry_get(list, &x, &y, &w, &h);
mx = w / 2 + x;
my = h / 2 + y;
- it = elm_genlist_at_xy_item_get(list, mx, my, NULL);
- printf("item in the middle of the screen: %p\n", it);
+ glit = elm_genlist_at_xy_item_get(list, mx, my, NULL);
+ printf("item in the middle of the screen: %p\n", glit);
}
static void
Evas_Object *list = data;
elm_genlist_item_append(list, &_itc,
- (void *)(long)nitems++, NULL,
- ELM_GENLIST_ITEM_NONE,
- _item_sel_cb, NULL);
+ (void *)(long)nitems++, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ _item_sel_cb, NULL);
}
Evas_Object *list = data;
elm_genlist_item_prepend(list, &_itc,
- (void *)(long)nitems++, NULL,
- ELM_GENLIST_ITEM_NONE,
- _item_sel_cb, NULL);
+ (void *)(long)nitems++, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ _item_sel_cb, NULL);
}
_insert_before_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it = elm_genlist_selected_item_get(list);
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
- if (!it)
- return;
+ if (!glit) return;
elm_genlist_item_insert_before(list, &_itc,
- (void *)(long)nitems++, NULL,
- it, ELM_GENLIST_ITEM_NONE,
- _item_sel_cb, NULL);
+ (void *)(long)nitems++, NULL,
+ glit, ELM_GENLIST_ITEM_NONE,
+ _item_sel_cb, NULL);
}
_insert_after_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it = elm_genlist_selected_item_get(list);
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
- if (!it)
- return;
+ if (!glit) return;
elm_genlist_item_insert_after(list, &_itc,
- (void *)(long)nitems++, NULL,
- it, ELM_GENLIST_ITEM_NONE,
- _item_sel_cb, NULL);
+ (void *)(long)nitems++, NULL,
+ glit, ELM_GENLIST_ITEM_NONE,
+ _item_sel_cb, NULL);
}
_next_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it;
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
- it = elm_genlist_selected_item_get(list);
- if (it)
- it = elm_genlist_item_next_get(it);
+ if (glit) glit = elm_genlist_item_next_get(it);
+ if (!glit) glit = elm_genlist_first_item_get(list);
- if (!it)
- it = elm_genlist_first_item_get(list);
-
- elm_genlist_item_selected_set(it, EINA_TRUE);
- elm_genlist_item_show(it);
+ elm_genlist_item_selected_set(glit, EINA_TRUE);
+ elm_genlist_item_show(glit);
}
static void
_prev_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it;
-
- it = elm_genlist_selected_item_get(list);
- if (it)
- it = elm_genlist_item_prev_get(it);
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
- if (!it)
- it = elm_genlist_last_item_get(list);
+ if (glit) glit = elm_genlist_item_prev_get(glit);
+ if (!glit) glit = elm_genlist_last_item_get(list);
- elm_genlist_item_selected_set(it, EINA_TRUE);
- elm_genlist_item_show(it);
+ elm_genlist_item_selected_set(glit, EINA_TRUE);
+ elm_genlist_item_show(glit);
}
static void
_bring_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
- Elm_Genlist_Item *it = data;
-
- if (!it)
- return;
+ Elm_Object_Item *glit = data;
+ if (!glit) return;
- elm_genlist_item_bring_in(it);
+ elm_genlist_item_bring_in(glit);
}
static void
_show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
- Elm_Genlist_Item *it = data;
+ Elm_Object_Item *glit = data;
+ if (!glit) return;
- if (!it)
- return;
-
- elm_genlist_item_show(it);
+ elm_genlist_item_show(glit);
}
static void
_middle_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
- Elm_Genlist_Item *it = data;
-
- if (!it)
- return;
+ Elm_Object_Item *glit = data;
+ if (!glit) return;
- elm_genlist_item_middle_bring_in(it);
+ elm_genlist_item_middle_bring_in(glit);
}
static void
_middle_show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
- Elm_Genlist_Item *it = data;
+ Elm_Object_Item *glit = data;
+ if (!glit) return;
- if (!it)
- return;
-
- elm_genlist_item_middle_show(it);
+ elm_genlist_item_middle_show(glit);
}
static void
_top_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
- Elm_Genlist_Item *it = data;
-
- if (!it)
- return;
+ Elm_Object_Item *glit = data;
+ if (!glit) return;
- elm_genlist_item_top_bring_in(it);
+ elm_genlist_item_top_bring_in(glit);
}
static void
_top_show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
- Elm_Genlist_Item *it = data;
+ Elm_Object_Item *glit = data;
+ if (!glit) return;
- if (!it)
- return;
-
- elm_genlist_item_top_show(it);
+ elm_genlist_item_top_show(glit);
}
static void
_realize_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it = elm_genlist_selected_item_get(list);
-
- if (!it)
- return;
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
+ if (!glit) return;
- elm_genlist_item_update(it);
+ elm_genlist_item_update(glit);
}
static Evas_Object *
for (i = 0; i < N_ITEMS; i++)
{
- Elm_Genlist_Item *gli, *glg;
+ Elm_Object_Item *gli, *glg;
if (i % 7 == 0)
{
_append_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it, *parent = NULL;
+ Elm_Object_Item *glit, *parent = NULL;
Node_Data *pdata, *d = malloc(sizeof(*d));
d->children = NULL;
d->value = nitems++;
d->favorite = EINA_FALSE;
- it = elm_genlist_selected_item_get(list);
- if (it)
- parent = elm_genlist_item_parent_get(it);
+ glit = elm_genlist_selected_item_get(list);
+ if (glit)
+ parent = elm_genlist_item_parent_get(glit);
if (parent)
{
- d->level = elm_genlist_item_expanded_depth_get(parent) + 1;
- pdata = elm_genlist_item_data_get(parent);
- pdata->children = eina_list_append(pdata->children, d);
+ d->level = elm_genlist_item_expanded_depth_get(parent) + 1;
+ pdata = elm_genlist_item_data_get(parent);
+ pdata->children = eina_list_append(pdata->children, d);
}
else
d->level = 0;
elm_genlist_item_append(list, &_itc,
- d, parent,
- ELM_GENLIST_ITEM_NONE,
- _item_sel_cb, NULL);
-
+ d, parent,
+ ELM_GENLIST_ITEM_NONE,
+ _item_sel_cb, NULL);
}
static void
_favorite_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it = elm_genlist_selected_item_get(list);
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
- if (!it)
- return;
+ if (!glit) return;
- Node_Data *d = elm_genlist_item_data_get(it);
+ Node_Data *d = elm_genlist_item_data_get(glit);
d->favorite = !d->favorite;
if (d->favorite)
- elm_genlist_item_item_class_update(it, &_itfav);
+ elm_genlist_item_item_class_update(glit, &_itfav);
else
{
- if (d->children)
- elm_genlist_item_item_class_update(it, &_itp);
- else
- elm_genlist_item_item_class_update(it, &_itc);
+ if (d->children)
+ elm_genlist_item_item_class_update(glit, &_itp);
+ else
+ elm_genlist_item_item_class_update(glit, &_itc);
}
- elm_genlist_item_update(it);
+ elm_genlist_item_update(glit);
}
static void
_add_child_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it = elm_genlist_selected_item_get(list);
- Elm_Genlist_Item *prev, *parent;
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
+ Elm_Object_Item *glit_prev, *glit_parent;
- if (!it)
- return;
+ if (!glit) return;
- Node_Data *d = elm_genlist_item_data_get(it);
- prev = elm_genlist_item_prev_get(it);
- parent = elm_genlist_item_parent_get(it);
+ Node_Data *d = elm_genlist_item_data_get(glit);
+ glit_prev = elm_genlist_item_prev_get(glit);
+ glit_parent = elm_genlist_item_parent_get(glit);
Eina_Bool change_item = !d->children;
ndata->value = nitems++;
ndata->children = NULL;
ndata->favorite = EINA_FALSE;
- ndata->level = elm_genlist_item_expanded_depth_get(it) + 1;
+ ndata->level = elm_genlist_item_expanded_depth_get(glit) + 1;
d->children = eina_list_append(d->children, ndata);
// Changing leaf item to parent item
if (change_item)
{
- elm_genlist_item_del(it);
-
- if (prev != parent)
- it = elm_genlist_item_insert_after(list, &_itp, d, parent, prev,
- ELM_GENLIST_ITEM_SUBITEMS,
- _item_sel_cb, NULL);
- else
- it = elm_genlist_item_prepend(list, &_itp, d, parent,
- ELM_GENLIST_ITEM_SUBITEMS,
- _item_sel_cb, NULL);
- elm_genlist_item_expanded_set(it, EINA_FALSE);
- elm_genlist_item_selected_set(it, EINA_TRUE);
+ elm_genlist_item_del(glit);
+
+ if (glit_prev != glit_parent)
+ glit = elm_genlist_item_insert_after(list, &_itp, d, glit_parent,
+ glit_prev,
+ ELM_GENLIST_ITEM_SUBITEMS,
+ _item_sel_cb, NULL);
+ else
+ glit = elm_genlist_item_prepend(list, &_itp, d, glit_parent,
+ ELM_GENLIST_ITEM_SUBITEMS,
+ _item_sel_cb, NULL);
+ elm_genlist_item_expanded_set(glit, EINA_FALSE);
+ elm_genlist_item_selected_set(glit, EINA_TRUE);
}
- else if (elm_genlist_item_expanded_get(it))
+ else if (elm_genlist_item_expanded_get(glit))
{
- elm_genlist_item_append(list, &_itc, ndata, it,
- ELM_GENLIST_ITEM_NONE, _item_sel_cb, NULL);
+ elm_genlist_item_append(list, &_itc, ndata, glit,
+ ELM_GENLIST_ITEM_NONE, _item_sel_cb, NULL);
}
- elm_genlist_item_update(it);
+ elm_genlist_item_update(glit);
}
_del_item_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *list = data;
- Elm_Genlist_Item *it = elm_genlist_selected_item_get(list);
- Elm_Genlist_Item *parent = NULL;
+ Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
+ Elm_Object_Item *glit_parent = NULL;
- if (!it)
- return;
+ if (!glit) return;
- Node_Data *pdata, *d = elm_genlist_item_data_get(it);
- parent = elm_genlist_item_parent_get(it);
- elm_genlist_item_subitems_clear(it);
- elm_genlist_item_del(it);
+ Node_Data *pdata, *d = elm_genlist_item_data_get(glit);
+ glit_parent = elm_genlist_item_parent_get(glit_it);
+ elm_genlist_item_subitems_clear(glit);
+ elm_genlist_item_del(glit);
_clear_list(d);
- if (!parent)
- return;
+ if (!glit_parent) return;
- pdata = elm_genlist_item_data_get(parent);
+ pdata = elm_genlist_item_data_get(glit_parent);
pdata->children = eina_list_remove(pdata->children, d);
- elm_genlist_item_update(parent);
+ elm_genlist_item_update(glit_parent);
}
static void
_expand_request_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
+ Elm_Object_Item *glit = event_info;
printf("expand request on item: %p\n", event_info);
- elm_genlist_item_expanded_set(it, EINA_TRUE);
+ elm_genlist_item_expanded_set(glit, EINA_TRUE);
}
static void
_contract_request_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
+ Elm_Object_Item *glit = event_info;
printf("contract request on item: %p\n", event_info);
- elm_genlist_item_expanded_set(it, EINA_FALSE);
+ elm_genlist_item_expanded_set(glit, EINA_FALSE);
}
static void
_expanded_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
{
Eina_List *l;
- Elm_Genlist_Item *it = event_info;
- Node_Data *it_data, *d = elm_genlist_item_data_get(it);
- Evas_Object *list = elm_genlist_item_genlist_get(it);
+ Elm_Object_Item *glit = event_info;
+ Node_Data *it_data, *d = elm_genlist_item_data_get(glit);
+ Evas_Object *list = elm_genlist_item_genlist_get(glit);
Elm_Genlist_Item_Class *ic;
EINA_LIST_FOREACH(d->children, l, it_data)
{
- Elm_Genlist_Item *nitem;
- Elm_Genlist_Item_Flags flags = ELM_GENLIST_ITEM_NONE;
- printf("expanding item: #%d from parent #%d\n", it_data->value, d->value);
- if (it_data->favorite)
- ic = &_itfav;
- else if (it_data->children)
- {
- ic = &_itp;
- flags = ELM_GENLIST_ITEM_SUBITEMS;
- }
- else
- ic = &_itc;
-
- nitem = elm_genlist_item_append(list, ic, it_data, it,
- flags, _item_sel_cb, NULL);
- elm_genlist_item_expanded_set(nitem, EINA_FALSE);
+ Elm_Object_Item *nitem;
+ Elm_Genlist_Item_Flags flags = ELM_GENLIST_ITEM_NONE;
+ printf("expanding item: #%d from parent #%d\n", it_data->value, d->value);
+ if (it_data->favorite)
+ ic = &_itfav;
+ else if (it_data->children)
+ {
+ ic = &_itp;
+ flags = ELM_GENLIST_ITEM_SUBITEMS;
+ }
+ else
+ ic = &_itc;
+
+ nitem = elm_genlist_item_append(list, ic, it_data, glit,
+ flags, _item_sel_cb, NULL);
+ elm_genlist_item_expanded_set(nitem, EINA_FALSE);
}
}
static void
_contracted_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_subitems_clear(it);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_subitems_clear(glit);
}
static Evas_Object *
fbox = elm_box_add(win);
elm_box_layout_set(fbox, evas_object_box_layout_flow_horizontal,
- NULL, NULL);
+ NULL, NULL);
evas_object_size_hint_weight_set(fbox, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(fbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, fbox);
for (i = 0; i < N_ITEMS; i++)
{
- Elm_Genlist_Item *gli, *glg;
- Node_Data *data = malloc(sizeof(*data)); // data for this item
- data->children = NULL;
- data->value = i;
- data->favorite = EINA_FALSE;
- nitems++;
-
- Node_Data *pdata; // data for the parent of the group
-
- printf("creating item: #%d\n", data->value);
- if (i % 3 == 0)
- {
- glg = gli = elm_genlist_item_append(list, &_itp, data, NULL,
- ELM_GENLIST_ITEM_SUBITEMS,
- _item_sel_cb, NULL);
- elm_genlist_item_expanded_set(glg, EINA_TRUE);
- pdata = data;
- data->level = 0;
- }
- else
- {
- gli = elm_genlist_item_append(list, &_itc, data, glg,
- ELM_GENLIST_ITEM_NONE,
- _item_sel_cb, NULL);
- pdata->children = eina_list_append(pdata->children, data);
- data->level = 1;
- }
+ Elm_Object_Item *gli, *glg;
+ Node_Data *data = malloc(sizeof(*data)); // data for this item
+ data->children = NULL;
+ data->value = i;
+ data->favorite = EINA_FALSE;
+ nitems++;
+
+ Node_Data *pdata; // data for the parent of the group
+
+ printf("creating item: #%d\n", data->value);
+ if (i % 3 == 0)
+ {
+ glg = gli = elm_genlist_item_append(list, &_itp, data, NULL,
+ ELM_GENLIST_ITEM_SUBITEMS,
+ _item_sel_cb, NULL);
+ elm_genlist_item_expanded_set(glg, EINA_TRUE);
+ pdata = data;
+ data->level = 0;
+ }
+ else
+ {
+ gli = elm_genlist_item_append(list, &_itc, data, glg,
+ ELM_GENLIST_ITEM_NONE,
+ _item_sel_cb, NULL);
+ pdata->children = eina_list_append(pdata->children, data);
+ data->level = 1;
+ }
}
evas_object_smart_callback_add(list, "expand,request", _expand_request_cb, list);
struct _Widget_Request
{
Widget_Data *wd;
- Elm_Genlist_Item *parent;
+ Elm_Object_Item *parent;
Evas_Object *obj;
const char *path;
static void _populate(Evas_Object *obj,
const char *path,
- Elm_Genlist_Item *parent);
+ Elm_Object_Item *parent);
static void _do_anchors(Evas_Object *obj,
const char *path);
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
+ Elm_Object_Item *it = event_info;
const char *path = elm_genlist_item_data_get(it);
_populate(data, path, it);
}
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
+ Elm_Object_Item *it = event_info;
elm_genlist_item_subitems_clear(it);
}
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 1);
+ Elm_Object_Item *it = event_info;
+ elm_genlist_item_expanded_set(it, EINA_TRUE);
}
static void
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 0);
+ Elm_Object_Item *it = event_info;
+ elm_genlist_item_expanded_set(it, EINA_FALSE);
}
/*** PRIVATES ***/
static int
_file_list_cmp(const void *a, const void *b)
{
- const Elm_Genlist_Item *la = a;
- const Elm_Genlist_Item *lb = b;
+ const Elm_Object_Item *la = a;
+ const Elm_Object_Item *lb = b;
const Elm_Genlist_Item_Class *ca = elm_genlist_item_item_class_get(la);
const Elm_Genlist_Item_Class *cb = elm_genlist_item_item_class_get(lb);
static void
_populate(Evas_Object *obj,
const char *path,
- Elm_Genlist_Item *parent)
+ Elm_Object_Item *parent)
{
Widget_Data *wd = elm_widget_data_get(obj);
#ifdef HAVE_EIO
if (wd->mode == ELM_FILESELECTOR_LIST)
{
- Elm_Genlist_Item *it;
+ Elm_Object_Item *it;
it = elm_genlist_selected_item_get(wd->files_list);
if (it) return elm_genlist_item_data_get(it);
}
EINA_DEPRECATED EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode);
EINA_DEPRECATED EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj);
-EINA_DEPRECATED EAPI void elm_genlist_item_icons_orphan(Elm_Genlist_Item *it);
+EINA_DEPRECATED EAPI void elm_genlist_item_icons_orphan(Elm_Object_Item *it);
#define ELM_IMAGE_ROTATE_90_CW 1
#define ELM_IMAGE_ROTATE_180_CW 2
elm_gen_item_selected_set(Elm_Gen_Item *it,
Eina_Bool selected)
{
- elm_genlist_item_selected_set(it, selected);
+ elm_genlist_item_selected_set((Elm_Object_Item *) it, selected);
}
EAPI Eina_Bool
elm_gen_item_selected_get(const Elm_Gen_Item *it)
{
- return elm_genlist_item_selected_get(it);
+ return elm_genlist_item_selected_get((const Elm_Object_Item *) it);
}
EAPI void
EAPI Elm_Gen_Item *
elm_gen_item_next_get(const Elm_Gen_Item *it)
{
- return (Elm_Gen_Item *)elm_genlist_item_next_get(it);
+ return (Elm_Gen_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it);
}
EAPI Elm_Gen_Item *
elm_gen_item_prev_get(const Elm_Gen_Item *it)
{
- return (Elm_Gen_Item *)elm_genlist_item_prev_get(it);
+ return (Elm_Gen_Item *)elm_genlist_item_prev_get((Elm_Object_Item *) it);
}
EAPI Evas_Object *
elm_gengrid_item_selected_set(Elm_Gen_Item *it,
Eina_Bool selected)
{
- elm_genlist_item_selected_set(it, selected);
+ elm_genlist_item_selected_set((Elm_Object_Item *) it, selected);
}
EAPI Eina_Bool
elm_gengrid_item_selected_get(const Elm_Gen_Item *it)
{
- return elm_genlist_item_selected_get(it);
+ return elm_genlist_item_selected_get((const Elm_Object_Item *) it);
}
EAPI void
EAPI Elm_Gen_Item *
elm_gengrid_first_item_get(const Evas_Object *obj)
{
- return elm_genlist_first_item_get(obj);
+ return (Elm_Gen_Item *) elm_genlist_first_item_get(obj);
}
EAPI Elm_Gen_Item *
elm_gengrid_last_item_get(const Evas_Object *obj)
{
- return elm_genlist_last_item_get(obj);
+ return (Elm_Gen_Item *) elm_genlist_last_item_get(obj);
}
EAPI Elm_Gen_Item *
elm_gengrid_item_next_get(const Elm_Gen_Item *it)
{
- return elm_genlist_item_next_get(it);
+ return (Elm_Gen_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it);
}
EAPI Elm_Gen_Item *
elm_gengrid_item_prev_get(const Elm_Gen_Item *it)
{
- return elm_genlist_item_prev_get(it);
+ return (Elm_Gen_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) it);
}
EAPI Evas_Object *
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- Elm_Gen_Item *it = NULL;
+ Elm_Object_Item *it = NULL;
Evas_Coord x = 0;
Evas_Coord y = 0;
Evas_Coord step_x = 0;
if (!wd->selected) return EINA_FALSE;
if (!wd->multi) return EINA_FALSE;
- Elm_Gen_Item *prev = elm_genlist_item_prev_get(wd->last_selected_item);
+ Elm_Object_Item *prev = elm_genlist_item_prev_get((Elm_Object_Item *) wd->last_selected_item);
if (!prev) return EINA_TRUE;
if (elm_genlist_item_selected_get(prev))
{
- elm_genlist_item_selected_set(wd->last_selected_item, EINA_FALSE);
- wd->last_selected_item = prev;
- elm_genlist_item_show(wd->last_selected_item);
+ elm_genlist_item_selected_set((Elm_Object_Item *) wd->last_selected_item, EINA_FALSE);
+ wd->last_selected_item = (Elm_Gen_Item *) prev;
+ elm_genlist_item_show((Elm_Object_Item *) wd->last_selected_item);
}
else
{
if (!wd->selected) return EINA_FALSE;
if (!wd->multi) return EINA_FALSE;
- Elm_Gen_Item *next = elm_genlist_item_next_get(wd->last_selected_item);
+ Elm_Object_Item *next;
+ next = elm_genlist_item_next_get((Elm_Object_Item *) wd->last_selected_item);
if (!next) return EINA_TRUE;
if (elm_genlist_item_selected_get(next))
{
- elm_genlist_item_selected_set(wd->last_selected_item, EINA_FALSE);
- wd->last_selected_item = next;
- elm_genlist_item_show(wd->last_selected_item);
+ elm_genlist_item_selected_set((Elm_Object_Item *) wd->last_selected_item, EINA_FALSE);
+ wd->last_selected_item = (Elm_Gen_Item *) next;
+ elm_genlist_item_show((Elm_Object_Item *) wd->last_selected_item);
}
else
{
while ((prev) && (prev->generation < wd->generation))
prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
}
- else prev = elm_genlist_item_prev_get(wd->last_selected_item);
+ else prev = (Elm_Gen_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) wd->last_selected_item);
if (!prev) return EINA_FALSE;
_deselect_all_items(wd);
- elm_genlist_item_selected_set(prev, EINA_TRUE);
- elm_genlist_item_show(prev);
+ elm_genlist_item_selected_set((Elm_Object_Item *) prev, EINA_TRUE);
+ elm_genlist_item_show((Elm_Object_Item *) prev);
return EINA_TRUE;
}
while ((next) && (next->generation < wd->generation))
next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
}
- else next = elm_genlist_item_next_get(wd->last_selected_item);
+ else next = (Elm_Gen_Item *) elm_genlist_item_next_get((Elm_Object_Item *) wd->last_selected_item);
if (!next) return EINA_FALSE;
_deselect_all_items(wd);
- elm_genlist_item_selected_set(next, EINA_TRUE);
- elm_genlist_item_show(next);
+ elm_genlist_item_selected_set((Elm_Object_Item *) next, EINA_TRUE);
+ elm_genlist_item_show((Elm_Object_Item *) next);
return EINA_TRUE;
}
Evas_Object *obj = WIDGET(it);
evas_event_freeze(evas_object_evas_get(obj));
- elm_genlist_item_subitems_clear(it);
+ elm_genlist_item_subitems_clear((Elm_Object_Item *) it);
if (it->wd->show_item == it) it->wd->show_item = NULL;
if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE);
if (it->item->block) _item_block_del(it);
{
if (it != it_tmp) _item_unselect(it_tmp);
}
- if (elm_genlist_item_expanded_get(it))
+ if (elm_genlist_item_expanded_get((Elm_Object_Item *) it))
{
- elm_genlist_item_expanded_set(it, EINA_FALSE);
+ elm_genlist_item_expanded_set((Elm_Object_Item *) it, EINA_FALSE);
return ECORE_CALLBACK_RENEW;
}
edje_object_signal_emit(VIEW(it), "elm,state,reorder,enabled", "elm");
static void
_scroll_item(Widget_Data *wd)
{
- Elm_Genlist_Item *it = NULL;
+ Elm_Gen_Item *it = NULL;
Evas_Coord gith = 0;
Evas_Coord ow, oh, dx = 0, dy = 0, dw = 0, dh = 0;
evas_object_smart_callback_call(WIDGET(it), SIG_MOVED, it);
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_item_append(Evas_Object *obj,
const Elm_Genlist_Item_Class *itc,
const void *data,
- Elm_Gen_Item *parent,
+ Elm_Object_Item *parent,
Elm_Genlist_Item_Flags flags,
Evas_Smart_Cb func,
const void *func_data)
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- Elm_Gen_Item *it = _item_new(wd, itc, data, parent, flags, func,
- func_data);
+ Elm_Gen_Item *it = _item_new(wd, itc, data, (Elm_Gen_Item *) parent, flags,
+ func, func_data);
if (!it) return NULL;
if (!it->parent)
{
}
it->item->before = EINA_FALSE;
_item_queue(wd, it, NULL);
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_item_prepend(Evas_Object *obj,
const Elm_Genlist_Item_Class *itc,
const void *data,
- Elm_Gen_Item *parent,
+ Elm_Object_Item *parent,
Elm_Genlist_Item_Flags flags,
Evas_Smart_Cb func,
const void *func_data)
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- Elm_Gen_Item *it = _item_new(wd, itc, data, parent, flags, func,
- func_data);
+ Elm_Gen_Item *it = _item_new(wd, itc, data, (Elm_Gen_Item *) parent, flags,
+ func, func_data);
if (!it) return NULL;
if (!it->parent)
{
}
it->item->before = EINA_TRUE;
_item_queue(wd, it, NULL);
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_item_insert_after(Evas_Object *obj,
const Elm_Genlist_Item_Class *itc,
const void *data,
- Elm_Gen_Item *parent,
- Elm_Gen_Item *after,
+ Elm_Object_Item *parent,
+ Elm_Object_Item *after,
Elm_Genlist_Item_Flags flags,
Evas_Smart_Cb func,
const void *func_data)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- EINA_SAFETY_ON_NULL_RETURN_VAL(after, NULL);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(after, NULL);
Widget_Data *wd = elm_widget_data_get(obj);
+ Elm_Gen_Item *_after = (Elm_Gen_Item *) after;
if (!wd) return NULL;
/* It makes no sense to insert after in an empty list with after != NULL, something really bad is happening in your app. */
EINA_SAFETY_ON_NULL_RETURN_VAL(wd->items, NULL);
- Elm_Gen_Item *it = _item_new(wd, itc, data, parent, flags, func,
- func_data);
+ Elm_Gen_Item *it = _item_new(wd, itc, data, (Elm_Gen_Item *) parent, flags,
+ func, func_data);
if (!it) return NULL;
if (!it->parent)
{
- if ((it->group) &&
- (after->group))
+ if ((it->group) && (_after->group))
wd->group_items = eina_list_append_relative(wd->group_items, it,
- after);
+ _after);
}
else
{
- it->parent->item->items = eina_list_append_relative(it->parent->item->items, it,
- after);
+ it->parent->item->items =
+ eina_list_append_relative(it->parent->item->items, it, _after);
}
wd->items = eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it),
- EINA_INLIST_GET(after));
- it->item->rel = after;
+ EINA_INLIST_GET(_after));
+ it->item->rel = _after;
it->item->rel->relcount++;
it->item->before = EINA_FALSE;
_item_queue(wd, it, NULL);
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_item_insert_before(Evas_Object *obj,
const Elm_Genlist_Item_Class *itc,
const void *data,
- Elm_Gen_Item *parent,
- Elm_Gen_Item *before,
+ Elm_Object_Item *parent,
+ Elm_Object_Item *before,
Elm_Genlist_Item_Flags flags,
Evas_Smart_Cb func,
const void *func_data)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- EINA_SAFETY_ON_NULL_RETURN_VAL(before, NULL);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(before, NULL);
Widget_Data *wd = elm_widget_data_get(obj);
+ Elm_Gen_Item *_before = (Elm_Gen_Item *) before;
if (!wd) return NULL;
/* It makes no sense to insert before in an empty list with before != NULL, something really bad is happening in your app. */
EINA_SAFETY_ON_NULL_RETURN_VAL(wd->items, NULL);
- Elm_Gen_Item *it = _item_new(wd, itc, data, parent, flags, func,
- func_data);
+ Elm_Gen_Item *it = _item_new(wd, itc, data, (Elm_Gen_Item *) parent, flags,
+ func, func_data);
if (!it) return NULL;
if (!it->parent)
{
- if (it->group && before->group)
+ if (it->group && _before->group)
wd->group_items = eina_list_prepend_relative(wd->group_items, it,
- before);
+ _before);
}
else
{
- it->parent->item->items = eina_list_prepend_relative(it->parent->item->items, it,
- before);
+ it->parent->item->items =
+ eina_list_prepend_relative(it->parent->item->items, it, _before);
}
wd->items = eina_inlist_prepend_relative(wd->items, EINA_INLIST_GET(it),
- EINA_INLIST_GET(before));
- it->item->rel = before;
+ EINA_INLIST_GET(_before));
+ it->item->rel = _before;
it->item->rel->relcount++;
it->item->before = EINA_TRUE;
_item_queue(wd, it, NULL);
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_item_direct_sorted_insert(Evas_Object *obj,
const Elm_Genlist_Item_Class *itc,
const void *data,
- Elm_Gen_Item *parent,
+ Elm_Object_Item *parent,
Elm_Genlist_Item_Flags flags,
Eina_Compare_Cb comp,
Evas_Smart_Cb func,
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
Elm_Gen_Item *rel = NULL;
- Elm_Gen_Item *it = _item_new(wd, itc, data, parent, flags, func,
- func_data);
+ Elm_Gen_Item *it = _item_new(wd, itc, data, (Elm_Gen_Item *) parent, flags,
+ func, func_data);
if (!it) return NULL;
wd->item_compare_cb = comp;
_item_queue(wd, it, _elm_genlist_item_list_compare);
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_item_sorted_insert(Evas_Object *obj,
const Elm_Genlist_Item_Class *itc,
const void *data,
- Elm_Gen_Item *parent,
+ Elm_Object_Item *parent,
Elm_Genlist_Item_Flags flags,
Eina_Compare_Cb comp,
Evas_Smart_Cb func,
const void *func_data)
{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
wd->item_compare_data_cb = comp;
-
return elm_genlist_item_direct_sorted_insert(obj, itc, data, parent, flags,
- _elm_genlist_item_compare_data, func, func_data);
+ _elm_genlist_item_compare_data,
+ func, func_data);
}
static void
return wd->multi;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_selected_item_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
return list;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_at_xy_item_get(const Evas_Object *obj,
Evas_Coord x,
Evas_Coord y,
*posret = 1;
else *posret = 0;
}
- return it;
+ return (Elm_Object_Item *) it;
}
lasty = ity + it->item->h;
}
return NULL;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_first_item_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Elm_Gen_Item *it = ELM_GEN_ITEM_FROM_INLIST(wd->items);
while ((it) && (it->generation < wd->generation))
it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_Gen_Item *
+EAPI Elm_Object_Item *
elm_genlist_last_item_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Elm_Gen_Item *it = ELM_GEN_ITEM_FROM_INLIST(wd->items->last);
while ((it) && (it->generation < wd->generation))
it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
- return it;
+ return (Elm_Object_Item *) it;
}
-EAPI Elm_Gen_Item *
-elm_genlist_item_next_get(const Elm_Gen_Item *it)
+EAPI Elm_Object_Item *
+elm_genlist_item_next_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
- while (it)
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ while (_it)
{
- it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
- if ((it) && (it->generation == it->wd->generation)) break;
+ _it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(_it)->next);
+ if ((_it) && (_it->generation == _it->wd->generation)) break;
}
- return (Elm_Gen_Item *)it;
+ return (Elm_Object_Item *) _it;
}
-EAPI Elm_Gen_Item *
-elm_genlist_item_prev_get(const Elm_Gen_Item *it)
+EAPI Elm_Object_Item *
+elm_genlist_item_prev_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
- while (it)
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ while (_it)
{
- it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
- if ((it) && (it->generation == it->wd->generation)) break;
+ _it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(_it)->prev);
+ if ((_it) && (_it->generation == _it->wd->generation)) break;
}
- return (Elm_Gen_Item *)it;
+ return (Elm_Object_Item *) _it;
}
EAPI Evas_Object *
-elm_genlist_item_genlist_get(const Elm_Gen_Item *it)
+elm_genlist_item_genlist_get(const Elm_Object_Item *it)
{
- return _elm_genlist_item_widget_get(it);
+ return elm_object_item_widget_get(it);
}
-EAPI Elm_Gen_Item *
-elm_genlist_item_parent_get(const Elm_Gen_Item *it)
+EAPI Elm_Object_Item *
+elm_genlist_item_parent_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
- return it->parent;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
+ return (Elm_Object_Item *) ((Elm_Gen_Item *) it)->parent;
}
EAPI void
-elm_genlist_item_subitems_clear(Elm_Gen_Item *it)
+elm_genlist_item_subitems_clear(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Eina_List *tl = NULL, *l;
- Elm_Gen_Item *it2;
+ Elm_Gen_Item *_it;
+ Elm_Object_Item *it2;
+ _it = (Elm_Gen_Item *) it;
- EINA_LIST_FOREACH(it->item->items, l, it2)
+ EINA_LIST_FOREACH(_it->item->items, l, it2)
tl = eina_list_append(tl, it2);
EINA_LIST_FREE(tl, it2)
elm_genlist_item_del(it2);
}
EAPI void
-elm_genlist_item_selected_set(Elm_Gen_Item *it,
- Eina_Bool selected)
+elm_genlist_item_selected_set(Elm_Object_Item *it,
+ Eina_Bool selected)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- Widget_Data *wd = it->wd;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ Widget_Data *wd = _it->wd;
if (!wd) return;
- if ((it->generation < wd->generation) || (it->disabled)) return;
+ if ((_it->generation < wd->generation) || (_it->disabled)) return;
selected = !!selected;
- if (it->selected == selected) return;
+ if (_it->selected == selected) return;
if (selected)
{
{
while (wd->selected)
{
- if (it->unhighlight_cb) it->unhighlight_cb(wd->selected->data);
- it->unsel_cb(wd->selected->data);
+ if (_it->unhighlight_cb) _it->unhighlight_cb(wd->selected->data);
+ _it->unsel_cb(wd->selected->data);
}
}
- it->highlight_cb(it);
- _item_select(it);
+ _it->highlight_cb(_it);
+ _item_select(_it);
return;
}
- if (it->unhighlight_cb) it->unhighlight_cb(it);
- it->unsel_cb(it);
+ if (_it->unhighlight_cb) _it->unhighlight_cb(_it);
+ _it->unsel_cb(_it);
}
EAPI Eina_Bool
-elm_genlist_item_selected_get(const Elm_Gen_Item *it)
+elm_genlist_item_selected_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE);
- return it->selected;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
+ return ((Elm_Gen_Item *) it)->selected;
}
EAPI void
-elm_genlist_item_expanded_set(Elm_Gen_Item *it,
+elm_genlist_item_expanded_set(Elm_Object_Item *it,
Eina_Bool expanded)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if (it->item->expanded == expanded) return;
- it->item->expanded = expanded;
- it->wd->expanded_item = it;
- if (it->item->expanded)
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ if (_it->item->expanded == expanded) return;
+ _it->item->expanded = expanded;
+ _it->wd->expanded_item = _it;
+ if (_it->item->expanded)
{
- if (it->realized)
- edje_object_signal_emit(VIEW(it), "elm,state,expanded", "elm");
- evas_object_smart_callback_call(WIDGET(it), SIG_EXPANDED, it);
- it->wd->auto_scroll_enabled = EINA_TRUE;
+ if (_it->realized)
+ edje_object_signal_emit(VIEW(_it), "elm,state,expanded", "elm");
+ evas_object_smart_callback_call(WIDGET(_it), SIG_EXPANDED, _it);
+ _it->wd->auto_scroll_enabled = EINA_TRUE;
}
else
{
- if (it->realized)
- edje_object_signal_emit(VIEW(it), "elm,state,contracted", "elm");
- evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACTED, it);
- it->wd->auto_scroll_enabled = EINA_FALSE;
+ if (_it->realized)
+ edje_object_signal_emit(VIEW(_it), "elm,state,contracted", "elm");
+ evas_object_smart_callback_call(WIDGET(_it), SIG_CONTRACTED, _it);
+ _it->wd->auto_scroll_enabled = EINA_FALSE;
}
}
EAPI Eina_Bool
-elm_genlist_item_expanded_get(const Elm_Gen_Item *it)
+elm_genlist_item_expanded_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE);
- return it->item->expanded;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
+ return ((Elm_Gen_Item *) it)->item->expanded;
}
EAPI int
-elm_genlist_item_expanded_depth_get(const Elm_Gen_Item *it)
+elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, 0);
- return it->item->expanded_depth;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, 0);
+ return ((Elm_Gen_Item *) it)->item->expanded_depth;
}
EAPI void
-elm_genlist_item_disabled_set(Elm_Gen_Item *it,
+elm_genlist_item_disabled_set(Elm_Object_Item *it,
Eina_Bool disabled)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Eina_List *l;
Evas_Object *obj;
- if (it->disabled == disabled) return;
- if (it->generation < it->wd->generation) return;
- it->disabled = !!disabled;
- if (it->selected)
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ if (_it->disabled == disabled) return;
+ if (_it->generation < _it->wd->generation) return;
+ _it->disabled = !!disabled;
+ if (_it->selected)
elm_genlist_item_selected_set(it, EINA_FALSE);
- if (it->realized)
+ if (_it->realized)
{
- if (it->disabled)
- edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
+ if (_it->disabled)
+ edje_object_signal_emit(VIEW(_it), "elm,state,disabled", "elm");
else
- edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
- EINA_LIST_FOREACH(it->content_objs, l, obj)
+ edje_object_signal_emit(VIEW(_it), "elm,state,enabled", "elm");
+ EINA_LIST_FOREACH(_it->content_objs, l, obj)
elm_widget_disabled_set(obj, disabled);
}
}
EAPI Eina_Bool
-elm_genlist_item_disabled_get(const Elm_Gen_Item *it)
+elm_genlist_item_disabled_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE);
- if (it->generation < it->wd->generation) return EINA_FALSE;
- return it->disabled;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ if (_it->generation < _it->wd->generation) return EINA_FALSE;
+ return _it->disabled;
}
EAPI void
-elm_genlist_item_display_only_set(Elm_Gen_Item *it,
+elm_genlist_item_display_only_set(Elm_Object_Item *it,
Eina_Bool display_only)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if (it->display_only == display_only) return;
- if (it->generation < it->wd->generation) return;
- it->display_only = display_only;
- it->item->mincalcd = EINA_FALSE;
- it->item->updateme = EINA_TRUE;
- if (it->item->block) it->item->block->updateme = EINA_TRUE;
- if (it->wd->update_job) ecore_job_del(it->wd->update_job);
- it->wd->update_job = ecore_job_add(_update_job, it->wd);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ display_only = !!display_only;
+ if (_it->display_only == display_only) return;
+ if (_it->generation < _it->wd->generation) return;
+ _it->display_only = display_only;
+ _it->item->mincalcd = EINA_FALSE;
+ _it->item->updateme = EINA_TRUE;
+ if (_it->item->block) _it->item->block->updateme = EINA_TRUE;
+ if (_it->wd->update_job) ecore_job_del(_it->wd->update_job);
+ _it->wd->update_job = ecore_job_add(_update_job, _it->wd);
}
EAPI Eina_Bool
-elm_genlist_item_display_only_get(const Elm_Gen_Item *it)
+elm_genlist_item_display_only_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE);
- if (it->generation < it->wd->generation) return EINA_FALSE;
- return it->display_only;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ if (_it->generation < _it->wd->generation) return EINA_FALSE;
+ return _it->display_only;
}
EAPI void
-elm_genlist_item_show(Elm_Gen_Item *it)
+elm_genlist_item_show(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
Evas_Coord gith = 0;
- if (it->generation < it->wd->generation) return;
- if ((it->item->queued) || (!it->item->mincalcd))
+ if (_it->generation < _it->wd->generation) return;
+ if ((_it->item->queued) || (!_it->item->mincalcd))
{
- it->wd->show_item = it;
- it->wd->bring_in = EINA_FALSE;
- it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN;
- it->item->showme = EINA_TRUE;
+ _it->wd->show_item = _it;
+ _it->wd->bring_in = EINA_FALSE;
+ _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN;
+ _it->item->showme = EINA_TRUE;
return;
}
- if (it->wd->show_item)
+ if (_it->wd->show_item)
{
- it->wd->show_item->item->showme = EINA_FALSE;
- it->wd->show_item = NULL;
+ _it->wd->show_item->item->showme = EINA_FALSE;
+ _it->wd->show_item = NULL;
}
- if ((it->item->group_item) && (it->wd->pan_y > (it->y + it->item->block->y)))
- gith = it->item->group_item->item->h;
- elm_smart_scroller_child_region_show(it->wd->scr,
- it->x + it->item->block->x,
- it->y + it->item->block->y - gith,
- it->item->block->w, it->item->h);
+ if ((_it->item->group_item) &&
+ (_it->wd->pan_y > (_it->y + _it->item->block->y)))
+ gith = _it->item->group_item->item->h;
+ elm_smart_scroller_child_region_show(_it->wd->scr,
+ _it->x + _it->item->block->x,
+ _it->y + _it->item->block->y - gith,
+ _it->item->block->w, _it->item->h);
}
EAPI void
-elm_genlist_item_promote(Elm_Gen_Item *it)
+elm_genlist_item_promote(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if (it->generation < it->wd->generation) return;
- _item_move_before(it, elm_genlist_first_item_get(WIDGET(it)));
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ if (_it->generation < _it->wd->generation) return;
+ _item_move_before(_it,
+ (Elm_Gen_Item *) elm_genlist_first_item_get(WIDGET(_it)));
}
EAPI void
-elm_genlist_item_demote(Elm_Gen_Item *it)
+elm_genlist_item_demote(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if (it->generation < it->wd->generation) return;
- _item_move_after(it, elm_genlist_last_item_get(WIDGET(it)));
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ if (_it->generation < _it->wd->generation) return;
+ _item_move_after(_it,
+ (Elm_Gen_Item *) elm_genlist_last_item_get(WIDGET(_it)));
}
EAPI void
-elm_genlist_item_bring_in(Elm_Gen_Item *it)
+elm_genlist_item_bring_in(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
Evas_Coord gith = 0;
- if (it->generation < it->wd->generation) return;
- if ((it->item->queued) || (!it->item->mincalcd))
+ if (_it->generation < _it->wd->generation) return;
+ if ((_it->item->queued) || (!_it->item->mincalcd))
{
- it->wd->show_item = it;
- it->wd->bring_in = EINA_TRUE;
- it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN;
- it->item->showme = EINA_TRUE;
+ _it->wd->show_item = _it;
+ _it->wd->bring_in = EINA_TRUE;
+ _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN;
+ _it->item->showme = EINA_TRUE;
return;
}
- if (it->wd->show_item)
+ if (_it->wd->show_item)
{
- it->wd->show_item->item->showme = EINA_FALSE;
- it->wd->show_item = NULL;
+ _it->wd->show_item->item->showme = EINA_FALSE;
+ _it->wd->show_item = NULL;
}
- if ((it->item->group_item) && (it->wd->pan_y > (it->y + it->item->block->y)))
- gith = it->item->group_item->item->h;
- elm_smart_scroller_region_bring_in(it->wd->scr,
- it->x + it->item->block->x,
- it->y + it->item->block->y - gith,
- it->item->block->w, it->item->h);
+ if ((_it->item->group_item) &&
+ (_it->wd->pan_y > (_it->y + _it->item->block->y)))
+ gith = _it->item->group_item->item->h;
+ elm_smart_scroller_region_bring_in(_it->wd->scr,
+ _it->x + _it->item->block->x,
+ _it->y + _it->item->block->y - gith,
+ _it->item->block->w, _it->item->h);
}
EAPI void
-elm_genlist_item_top_show(Elm_Gen_Item *it)
+elm_genlist_item_top_show(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
Evas_Coord ow, oh;
Evas_Coord gith = 0;
- if (it->generation < it->wd->generation) return;
- if ((it->item->queued) || (!it->item->mincalcd))
+ if (_it->generation < _it->wd->generation) return;
+ if ((_it->item->queued) || (!_it->item->mincalcd))
{
- it->wd->show_item = it;
- it->wd->bring_in = EINA_FALSE;
- it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_TOP;
- it->item->showme = EINA_TRUE;
+ _it->wd->show_item = _it;
+ _it->wd->bring_in = EINA_FALSE;
+ _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_TOP;
+ _it->item->showme = EINA_TRUE;
return;
}
- if (it->wd->show_item)
+ if (_it->wd->show_item)
{
- it->wd->show_item->item->showme = EINA_FALSE;
- it->wd->show_item = NULL;
+ _it->wd->show_item->item->showme = EINA_FALSE;
+ _it->wd->show_item = NULL;
}
- evas_object_geometry_get(it->wd->pan_smart, NULL, NULL, &ow, &oh);
- if (it->item->group_item) gith = it->item->group_item->item->h;
- elm_smart_scroller_child_region_show(it->wd->scr,
- it->x + it->item->block->x,
- it->y + it->item->block->y - gith,
- it->item->block->w, oh);
+ evas_object_geometry_get(_it->wd->pan_smart, NULL, NULL, &ow, &oh);
+ if (_it->item->group_item) gith = _it->item->group_item->item->h;
+ elm_smart_scroller_child_region_show(_it->wd->scr,
+ _it->x + _it->item->block->x,
+ _it->y + _it->item->block->y - gith,
+ _it->item->block->w, oh);
}
EAPI void
-elm_genlist_item_top_bring_in(Elm_Gen_Item *it)
+elm_genlist_item_top_bring_in(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
Evas_Coord ow, oh;
Evas_Coord gith = 0;
- if (it->generation < it->wd->generation) return;
- if ((it->item->queued) || (!it->item->mincalcd))
+ if (_it->generation < _it->wd->generation) return;
+ if ((_it->item->queued) || (!_it->item->mincalcd))
{
- it->wd->show_item = it;
- it->wd->bring_in = EINA_TRUE;
- it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_TOP;
- it->item->showme = EINA_TRUE;
+ _it->wd->show_item = _it;
+ _it->wd->bring_in = EINA_TRUE;
+ _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_TOP;
+ _it->item->showme = EINA_TRUE;
return;
}
- if (it->wd->show_item)
+ if (_it->wd->show_item)
{
- it->wd->show_item->item->showme = EINA_FALSE;
- it->wd->show_item = NULL;
+ _it->wd->show_item->item->showme = EINA_FALSE;
+ _it->wd->show_item = NULL;
}
- evas_object_geometry_get(it->wd->pan_smart, NULL, NULL, &ow, &oh);
- if (it->item->group_item) gith = it->item->group_item->item->h;
- elm_smart_scroller_region_bring_in(it->wd->scr,
- it->x + it->item->block->x,
- it->y + it->item->block->y - gith,
- it->item->block->w, oh);
+ evas_object_geometry_get(_it->wd->pan_smart, NULL, NULL, &ow, &oh);
+ if (_it->item->group_item) gith = _it->item->group_item->item->h;
+ elm_smart_scroller_region_bring_in(_it->wd->scr,
+ _it->x + _it->item->block->x,
+ _it->y + _it->item->block->y - gith,
+ _it->item->block->w, oh);
}
EAPI void
-elm_genlist_item_middle_show(Elm_Gen_Item *it)
+elm_genlist_item_middle_show(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
Evas_Coord ow, oh;
- if (it->generation < it->wd->generation) return;
- if ((it->item->queued) || (!it->item->mincalcd))
+ if (_it->generation < _it->wd->generation) return;
+ if ((_it->item->queued) || (!_it->item->mincalcd))
{
- it->wd->show_item = it;
- it->wd->bring_in = EINA_FALSE;
- it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_MIDDLE;
- it->item->showme = EINA_TRUE;
+ _it->wd->show_item = _it;
+ _it->wd->bring_in = EINA_FALSE;
+ _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_MIDDLE;
+ _it->item->showme = EINA_TRUE;
return;
}
- if (it->wd->show_item)
+ if (_it->wd->show_item)
{
- it->wd->show_item->item->showme = EINA_FALSE;
- it->wd->show_item = NULL;
+ _it->wd->show_item->item->showme = EINA_FALSE;
+ _it->wd->show_item = NULL;
}
- evas_object_geometry_get(it->wd->pan_smart, NULL, NULL, &ow, &oh);
- elm_smart_scroller_child_region_show(it->wd->scr,
- it->x + it->item->block->x,
- it->y + it->item->block->y - oh / 2 +
- it->item->h / 2, it->item->block->w, oh);
+ evas_object_geometry_get(_it->wd->pan_smart, NULL, NULL, &ow, &oh);
+ elm_smart_scroller_child_region_show(_it->wd->scr,
+ _it->x + _it->item->block->x,
+ _it->y + _it->item->block->y - oh / 2 +
+ _it->item->h / 2, _it->item->block->w,
+ oh);
}
EAPI void
-elm_genlist_item_middle_bring_in(Elm_Gen_Item *it)
+elm_genlist_item_middle_bring_in(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
Evas_Coord ow, oh;
- if (it->generation < it->wd->generation) return;
- if ((it->item->queued) || (!it->item->mincalcd))
+ if (_it->generation < _it->wd->generation) return;
+ if ((_it->item->queued) || (!_it->item->mincalcd))
{
- it->wd->show_item = it;
- it->wd->bring_in = EINA_TRUE;
- it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_MIDDLE;
- it->item->showme = EINA_TRUE;
+ _it->wd->show_item = _it;
+ _it->wd->bring_in = EINA_TRUE;
+ _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_MIDDLE;
+ _it->item->showme = EINA_TRUE;
return;
}
- if (it->wd->show_item)
+ if (_it->wd->show_item)
{
- it->wd->show_item->item->showme = EINA_FALSE;
- it->wd->show_item = NULL;
+ _it->wd->show_item->item->showme = EINA_FALSE;
+ _it->wd->show_item = NULL;
}
- evas_object_geometry_get(it->wd->pan_smart, NULL, NULL, &ow, &oh);
- elm_smart_scroller_region_bring_in(it->wd->scr,
- it->x + it->item->block->x,
- it->y + it->item->block->y - oh / 2 + it->item->h / 2,
- it->item->block->w, oh);
+ evas_object_geometry_get(_it->wd->pan_smart, NULL, NULL, &ow, &oh);
+ elm_smart_scroller_region_bring_in(_it->wd->scr,
+ _it->x + _it->item->block->x,
+ _it->y + _it->item->block->y - oh / 2 +
+ _it->item->h / 2, _it->item->block->w,
+ oh);
}
EAPI void
-elm_genlist_item_del(Elm_Gen_Item *it)
+elm_genlist_item_del(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if ((it->relcount > 0) || (it->walking > 0))
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ if ((_it->relcount > 0) || (_it->walking > 0))
{
elm_genlist_item_subitems_clear(it);
- if (it->wd->show_item == it) it->wd->show_item = NULL;
- _elm_genlist_item_del_notserious(it);
- if (it->item->block)
+ if (_it->wd->show_item == _it) _it->wd->show_item = NULL;
+ _elm_genlist_item_del_notserious(_it);
+ if (_it->item->block)
{
- if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE);
- it->item->block->changed = EINA_TRUE;
- if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
- it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
+ if (_it->realized) _elm_genlist_item_unrealize(_it, EINA_FALSE);
+ _it->item->block->changed = EINA_TRUE;
+ if (_it->wd->calc_job) ecore_job_del(_it->wd->calc_job);
+ _it->wd->calc_job = ecore_job_add(_calc_job, _it->wd);
}
- if (it->parent)
+ if (_it->parent)
{
- it->parent->item->items = eina_list_remove(it->parent->item->items, it);
- it->parent = NULL;
+ _it->parent->item->items =
+ eina_list_remove(_it->parent->item->items, it);
+ _it->parent = NULL;
}
return;
}
- _item_del(it);
+ _item_del(_it);
}
EAPI void
-elm_genlist_item_data_set(Elm_Gen_Item *it,
+elm_genlist_item_data_set(Elm_Object_Item *it,
const void *data)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- elm_widget_item_data_set(it, data);
+ elm_object_item_data_set(it, (void *) data);
}
EAPI void *
-elm_genlist_item_data_get(const Elm_Gen_Item *it)
+elm_genlist_item_data_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
- return elm_widget_item_data_get(it);
+ return elm_object_item_data_get(it);
}
EAPI void
-elm_genlist_item_icons_orphan(Elm_Gen_Item *it)
+elm_genlist_item_icons_orphan(Elm_Object_Item *it)
{
elm_genlist_item_contents_orphan(it);
}
EAPI void
-elm_genlist_item_contents_orphan(Elm_Gen_Item *it)
+elm_genlist_item_contents_orphan(Elm_Object_Item *it)
{
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+
Evas_Object *content;
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- EINA_LIST_FREE(it->content_objs, content)
+ EINA_LIST_FREE(((Elm_Gen_Item *) it)->content_objs, content)
{
elm_widget_sub_object_del(WIDGET(it), content);
evas_object_smart_member_del(content);
}
EAPI const Evas_Object *
-elm_genlist_item_object_get(const Elm_Gen_Item *it)
+elm_genlist_item_object_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
return VIEW(it);
}
EAPI void
-elm_genlist_item_update(Elm_Gen_Item *it)
+elm_genlist_item_update(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if (!it->item->block) return;
- if (it->generation < it->wd->generation) return;
- it->item->mincalcd = EINA_FALSE;
- it->item->updateme = EINA_TRUE;
- it->item->block->updateme = EINA_TRUE;
- if (it->wd->update_job) ecore_job_del(it->wd->update_job);
- it->wd->update_job = ecore_job_add(_update_job, it->wd);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ if (!_it->item->block) return;
+ if (_it->generation < _it->wd->generation) return;
+ _it->item->mincalcd = EINA_FALSE;
+ _it->item->updateme = EINA_TRUE;
+ _it->item->block->updateme = EINA_TRUE;
+ if (_it->wd->update_job) ecore_job_del(_it->wd->update_job);
+ _it->wd->update_job = ecore_job_add(_update_job, _it->wd);
}
EAPI void
-elm_genlist_item_fields_update(Elm_Genlist_Item *it,
+elm_genlist_item_fields_update(Elm_Object_Item *it,
const char *parts,
Elm_Genlist_Item_Field_Flags itf)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if (!it->item->block) return;
- if (it->generation < it->wd->generation) return;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ if (!_it->item->block) return;
+ if (_it->generation < _it->wd->generation) return;
if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_LABEL))
- _item_text_realize(it, it->base.view, &it->texts, parts);
+ _item_text_realize(_it, _it->base.view, &_it->texts, parts);
if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_CONTENT))
{
- it->content_objs = _item_content_unrealize(it, it->base.view,
- &it->contents, parts);
- it->content_objs = _item_content_realize(it, it->base.view,
- &it->contents, parts);
+ _it->content_objs = _item_content_unrealize(_it, _it->base.view,
+ &_it->contents, parts);
+ _it->content_objs = _item_content_realize(_it, _it->base.view,
+ &_it->contents, parts);
}
if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_STATE))
- _item_state_realize(it, it->base.view, &it->states, parts);
+ _item_state_realize(_it, _it->base.view, &_it->states, parts);
}
EAPI void
-elm_genlist_item_item_class_update(Elm_Gen_Item *it,
+elm_genlist_item_item_class_update(Elm_Object_Item *it,
const Elm_Genlist_Item_Class *itc)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if (!it->item->block) return;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ if (!_it->item->block) return;
EINA_SAFETY_ON_NULL_RETURN(itc);
- if (it->generation < it->wd->generation) return;
- it->itc = itc;
- it->item->nocache = EINA_TRUE;
+ if (_it->generation < _it->wd->generation) return;
+ _it->itc = itc;
+ _it->item->nocache = EINA_TRUE;
elm_genlist_item_update(it);
}
EAPI const Elm_Genlist_Item_Class *
-elm_genlist_item_item_class_get(const Elm_Gen_Item *it)
+elm_genlist_item_item_class_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
- if (it->generation < it->wd->generation) return NULL;
- return it->itc;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ if (_it->generation < _it->wd->generation) return NULL;
+ return _it->itc;
}
static Evas_Object *
}
EAPI void
-elm_genlist_item_tooltip_text_set(Elm_Gen_Item *it,
- const char *text)
+elm_genlist_item_tooltip_text_set(Elm_Object_Item *it,
+ const char *text)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
text = eina_stringshare_add(text);
elm_genlist_item_tooltip_content_cb_set(it, _elm_genlist_item_label_create,
text,
}
EAPI void
-elm_genlist_item_tooltip_content_cb_set(Elm_Gen_Item *it,
+elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *it,
Elm_Tooltip_Item_Content_Cb func,
const void *data,
Evas_Smart_Cb del_cb)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_GOTO(it, error);
+ ELM_OBJ_ITEM_CHECK_OR_GOTO(it, error);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
- if ((it->tooltip.content_cb == func) && (it->tooltip.data == data))
+ if ((_it->tooltip.content_cb == func) && (_it->tooltip.data == data))
return;
- if (it->tooltip.del_cb)
- it->tooltip.del_cb((void *)it->tooltip.data,
- WIDGET(it), it);
+ if (_it->tooltip.del_cb)
+ _it->tooltip.del_cb((void *) _it->tooltip.data, WIDGET(it), it);
- it->tooltip.content_cb = func;
- it->tooltip.data = data;
- it->tooltip.del_cb = del_cb;
+ _it->tooltip.content_cb = func;
+ _it->tooltip.data = data;
+ _it->tooltip.del_cb = del_cb;
- if (VIEW(it))
+ if (VIEW(_it))
{
- elm_widget_item_tooltip_content_cb_set(it,
- it->tooltip.content_cb,
- it->tooltip.data, NULL);
- elm_widget_item_tooltip_style_set(it, it->tooltip.style);
- elm_widget_item_tooltip_window_mode_set(it, it->tooltip.free_size);
+ elm_widget_item_tooltip_content_cb_set(_it,
+ _it->tooltip.content_cb,
+ _it->tooltip.data, NULL);
+ elm_widget_item_tooltip_style_set(_it, _it->tooltip.style);
+ elm_widget_item_tooltip_window_mode_set(_it, _it->tooltip.free_size);
}
return;
}
EAPI void
-elm_genlist_item_tooltip_unset(Elm_Gen_Item *it)
+elm_genlist_item_tooltip_unset(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if ((VIEW(it)) && (it->tooltip.content_cb))
- elm_widget_item_tooltip_unset(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
- if (it->tooltip.del_cb)
- it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
- it->tooltip.del_cb = NULL;
- it->tooltip.content_cb = NULL;
- it->tooltip.data = NULL;
- it->tooltip.free_size = EINA_FALSE;
- if (it->tooltip.style)
+ if ((VIEW(_it)) && (_it->tooltip.content_cb))
+ elm_widget_item_tooltip_unset(_it);
+
+ if (_it->tooltip.del_cb)
+ _it->tooltip.del_cb((void *) _it->tooltip.data, WIDGET(_it), _it);
+ _it->tooltip.del_cb = NULL;
+ _it->tooltip.content_cb = NULL;
+ _it->tooltip.data = NULL;
+ _it->tooltip.free_size = EINA_FALSE;
+ if (_it->tooltip.style)
elm_genlist_item_tooltip_style_set(it, NULL);
}
EAPI void
-elm_genlist_item_tooltip_style_set(Elm_Gen_Item *it,
+elm_genlist_item_tooltip_style_set(Elm_Object_Item *it,
const char *style)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- eina_stringshare_replace(&it->tooltip.style, style);
- if (VIEW(it)) elm_widget_item_tooltip_style_set(it, style);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ eina_stringshare_replace(&_it->tooltip.style, style);
+ if (VIEW(_it)) elm_widget_item_tooltip_style_set(_it, style);
}
EAPI const char *
-elm_genlist_item_tooltip_style_get(const Elm_Gen_Item *it)
+elm_genlist_item_tooltip_style_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
- return it->tooltip.style;
+ return elm_object_item_tooltip_style_get(it);
}
EAPI Eina_Bool
-elm_genlist_item_tooltip_window_mode_set(Elm_Gen_Item *it, Eina_Bool disable)
+elm_genlist_item_tooltip_window_mode_set(Elm_Object_Item *it,
+ Eina_Bool disable)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE);
- it->tooltip.free_size = disable;
- if (VIEW(it)) return elm_widget_item_tooltip_window_mode_set(it, disable);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ _it->tooltip.free_size = disable;
+ if (VIEW(_it)) return elm_widget_item_tooltip_window_mode_set(_it, disable);
return EINA_TRUE;
}
EAPI Eina_Bool
-elm_genlist_item_tooltip_window_mode_get(const Elm_Gen_Item *it)
+elm_genlist_item_tooltip_window_mode_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE);
- return it->tooltip.free_size;
+ return elm_object_tooltip_window_mode_get(VIEW(it));
}
EAPI void
-elm_genlist_item_cursor_set(Elm_Gen_Item *it,
+elm_genlist_item_cursor_set(Elm_Object_Item *it,
const char *cursor)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- eina_stringshare_replace(&it->mouse_cursor, cursor);
- if (VIEW(it)) elm_widget_item_cursor_set(it, cursor);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ eina_stringshare_replace(&_it->mouse_cursor, cursor);
+ if (VIEW(_it)) elm_widget_item_cursor_set(_it, cursor);
}
EAPI const char *
-elm_genlist_item_cursor_get(const Elm_Gen_Item *it)
+elm_genlist_item_cursor_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
return elm_widget_item_cursor_get(it);
}
EAPI void
-elm_genlist_item_cursor_unset(Elm_Gen_Item *it)
+elm_genlist_item_cursor_unset(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- if (!it->mouse_cursor)
- return;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ if (!_it->mouse_cursor) return;
- if (VIEW(it))
- elm_widget_item_cursor_unset(it);
+ if (VIEW(_it)) elm_widget_item_cursor_unset(_it);
- eina_stringshare_del(it->mouse_cursor);
- it->mouse_cursor = NULL;
+ eina_stringshare_del(_it->mouse_cursor);
+ _it->mouse_cursor = NULL;
}
EAPI void
-elm_genlist_item_cursor_style_set(Elm_Gen_Item *it,
+elm_genlist_item_cursor_style_set(Elm_Object_Item *it,
const char *style)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
elm_widget_item_cursor_style_set(it, style);
}
EAPI const char *
-elm_genlist_item_cursor_style_get(const Elm_Gen_Item *it)
+elm_genlist_item_cursor_style_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
return elm_widget_item_cursor_style_get(it);
}
EAPI void
-elm_genlist_item_cursor_engine_only_set(Elm_Gen_Item *it,
- Eina_Bool engine_only)
+elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *it,
+ Eina_Bool engine_only)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
elm_widget_item_cursor_engine_only_set(it, engine_only);
}
EAPI Eina_Bool
-elm_genlist_item_cursor_engine_only_get(const Elm_Gen_Item *it)
+elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
return elm_widget_item_cursor_engine_only_get(it);
}
EAPI int
-elm_genlist_item_index_get(Elm_Gen_Item *it)
+elm_genlist_item_index_get(Elm_Object_Item *it)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, -1);
- if (it->item->block)
- return it->position + it->item->block->position;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, -1);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ if (_it->item->block)
+ return _it->position + _it->item->block->position;
return -1;
}
EAPI void
elm_genlist_horizontal_set(Evas_Object *obj,
- Elm_List_Mode mode)
+ Elm_List_Mode mode)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
ELM_CHECK_WIDTYPE(obj, widtype);
Eina_List *list, *l;
- Elm_Gen_Item *it;
+ Elm_Object_Item *it;
list = elm_genlist_realized_items_get(obj);
EINA_LIST_FOREACH(list, l, it)
}
EAPI void
-elm_genlist_item_mode_set(Elm_Gen_Item *it,
+elm_genlist_item_mode_set(Elm_Object_Item *it,
const char *mode_type,
Eina_Bool mode_set)
{
- ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
- Widget_Data *wd = it->wd;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+
+ Widget_Data *wd = _it->wd;
Eina_List *l;
- Elm_Gen_Item *it2;
+ Elm_Object_Item *it2;
if (!wd) return;
if (!mode_type) return;
- if ((it->generation < it->wd->generation) || (it->disabled)) return;
+ if ((_it->generation < _it->wd->generation) || (_it->disabled)) return;
- if ((wd->mode_item == it) &&
+ if ((wd->mode_item == _it) &&
(!strcmp(mode_type, wd->mode_type)) &&
(mode_set))
return;
if (!wd->mode_item_style) return;
- it->mode_set = mode_set;
+ _it->mode_set = mode_set;
if (wd->multi)
{
EINA_LIST_FOREACH(wd->selected, l, it2)
- if (it2->realized)
+ if (((Elm_Gen_Item *) it2)->realized)
elm_genlist_item_selected_set(it2, EINA_FALSE);
}
else
{
it2 = elm_genlist_selected_item_get(wd->obj);
- if ((it2) && (it2->realized))
+ if ((it2) && (((Elm_Gen_Item *) it2)->realized))
elm_genlist_item_selected_set(it2, EINA_FALSE);
}
if (((wd->mode_type) && (strcmp(mode_type, wd->mode_type))) ||
(mode_set) ||
- ((it == wd->mode_item) && (!mode_set)))
+ ((_it == wd->mode_item) && (!mode_set)))
_item_mode_unset(wd);
eina_stringshare_replace(&wd->mode_type, mode_type);
- if (mode_set) _item_mode_set(it);
+ if (mode_set) _item_mode_set(_it);
}
return wd->mode_type;
}
-EAPI const Elm_Gen_Item *
+EAPI const Elm_Object_Item *
elm_genlist_mode_item_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- return wd->mode_item;
+ return (Elm_Object_Item *) wd->mode_item;
}
EAPI void
* @section Genlist_Manipulation Editing and Navigating
*
* Items can be added by several calls. All of them return a @ref
- * Elm_Genlist_Item handle that is an internal member inside the genlist.
+ * Elm_Object_Item handle that is an internal member inside the genlist.
* They all take a data parameter that is meant to be used for a handle to
* the applications internal data (eg the struct with the original item
* data). The parent parameter is the parent genlist item this belongs to if
ELM_GENLIST_ITEM_FIELD_STATE = (1 << 2)
} Elm_Genlist_Item_Field_Flags;
typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class; /**< Genlist item class definition structs */
+
#define Elm_Genlist_Item_Class Elm_Gen_Item_Class
-typedef struct _Elm_Genlist_Item Elm_Genlist_Item; /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */
-#define Elm_Genlist_Item Elm_Gen_Item /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */
typedef struct _Elm_Genlist_Item_Class_Func Elm_Genlist_Item_Class_Func; /**< Class functions for genlist item class */
/**
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
/**
* Prepend a new item in a given genlist widget.
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
/**
* Insert an item before another in a genlist widget
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item *before, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *before, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
/**
* Insert an item after another in a genlist widget
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item *after, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *after, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
/**
* Insert a new item into the sorted genlist object
*/
// XXX: deprecate elm_genlist_item_sorted_insert() and rename
// elm_genlist_item_direct_sorted_insert()
-EAPI Elm_Genlist_Item *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
-EAPI Elm_Genlist_Item *elm_genlist_item_direct_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_direct_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
/* operations to retrieve existing items */
/**
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_selected_item_get(const Evas_Object *obj);
+EAPI Elm_Object_Item *elm_genlist_selected_item_get(const Evas_Object *obj);
/**
* Get a list of selected items in the genlist.
*
* It returns a list of the selected items. This list pointer is only valid so
* long as the selection doesn't change (no items are selected or unselected, or
- * unselected implicitly by deletion). The list contains Elm_Genlist_Item
+ * unselected implicitly by deletion). The list contains genlist items
* pointers. The order of the items in this list is the order which they were
* selected, i.e. the first item in this list is the first item that was
* selected, and so on.
* @return The list of realized items, nor NULL if none are realized.
*
* This returns a list of the realized items in the genlist. The list
- * contains Elm_Genlist_Item pointers. The list must be freed by the
+ * contains genlist item pointers. The list must be freed by the
* caller when done with eina_list_free(). The item pointers in the
* list are only valid so long as those items are not deleted or the
* genlist is not deleted.
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret);
+EAPI Elm_Object_Item *elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret);
/**
* Get the first item in the genlist
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_first_item_get(const Evas_Object *obj);
+EAPI Elm_Object_Item *elm_genlist_first_item_get(const Evas_Object *obj);
/**
* Get the last item in the genlist
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_last_item_get(const Evas_Object *obj);
+EAPI Elm_Object_Item *elm_genlist_last_item_get(const Evas_Object *obj);
/**
* Set the scrollbar policy
* Get the @b next item in a genlist widget's internal list of items,
* given a handle to one of those items.
*
- * @param item The genlist item to fetch next from
+ * @param it The genlist item to fetch next from
* @return The item after @p item, or @c NULL if there's none (and
* on errors)
*
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_item_next_get(const Elm_Genlist_Item *item);
+EAPI Elm_Object_Item *elm_genlist_item_next_get(const Elm_Object_Item *it);
/**
* Get the @b previous item in a genlist widget's internal list of items,
* given a handle to one of those items.
*
- * @param item The genlist item to fetch previous from
+ * @param it The genlist item to fetch previous from
* @return The item before @p item, or @c NULL if there's none (and
* on errors)
*
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_item_prev_get(const Elm_Genlist_Item *item);
+EAPI Elm_Object_Item *elm_genlist_item_prev_get(const Elm_Object_Item *it);
/**
* Get the genlist object's handle which contains a given genlist
* item
*
- * @param item The item to fetch the container from
+ * @param it The item to fetch the container from
* @return The genlist (parent) object
*
* This returns the genlist object itself that an item belongs to.
*
* @ingroup Genlist
*/
-EAPI Evas_Object *elm_genlist_item_genlist_get(const Elm_Genlist_Item *item);
+EAPI Evas_Object *elm_genlist_item_genlist_get(const Elm_Object_Item *it);
/**
* Get the parent item of the given item
*
* @ingroup Genlist
*/
-EAPI Elm_Genlist_Item *elm_genlist_item_parent_get(const Elm_Genlist_Item *it);
+EAPI Elm_Object_Item *elm_genlist_item_parent_get(const Elm_Object_Item *it);
/**
* Remove all sub-items (children) of the given item
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_subitems_clear(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_subitems_clear(Elm_Object_Item *it);
/**
* Set whether a given genlist item is selected or not
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_selected_set(Elm_Genlist_Item *item, Eina_Bool selected);
+EAPI void elm_genlist_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
/**
* Get whether a given genlist item is selected or not
*
* @ingroup Genlist
*/
-EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Genlist_Item *item);
+EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Object_Item *it);
/**
* Sets the expanded state of an item.
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_expanded_set(Elm_Genlist_Item *item, Eina_Bool expanded);
+EAPI void elm_genlist_item_expanded_set(Elm_Object_Item *it, Eina_Bool expanded);
/**
* Get the expanded state of an item
*
* @ingroup Genlist
*/
-EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Genlist_Item *item);
+EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Object_Item *it);
/**
* Get the depth of expanded item
*
* @ingroup Genlist
*/
-EAPI int elm_genlist_item_expanded_depth_get(const Elm_Genlist_Item *it);
+EAPI int elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it);
/**
* Set whether a given genlist item is disabled or not.
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_disabled_set(Elm_Genlist_Item *item, Eina_Bool disabled);
+EAPI void elm_genlist_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
/**
* Get whether a given genlist item is disabled or not.
*
* @ingroup Genlist
*/
-EAPI Eina_Bool elm_genlist_item_disabled_get(const Elm_Genlist_Item *item);
+EAPI Eina_Bool elm_genlist_item_disabled_get(const Elm_Object_Item *it);
/**
* Sets the display only state of an item.
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_display_only_set(Elm_Genlist_Item *it, Eina_Bool display_only);
+EAPI void elm_genlist_item_display_only_set(Elm_Object_Item *it, Eina_Bool display_only);
/**
* Get the display only state of an item
*
* @ingroup Genlist
*/
-EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Genlist_Item *it);
+EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Object_Item *it);
/**
* Show the portion of a genlist's internal list containing a given
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_show(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_show(Elm_Object_Item *it);
/**
* Animatedly bring in, to the visible are of a genlist, a given
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_bring_in(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_bring_in(Elm_Object_Item *it);
/**
* Show the portion of a genlist's internal list containing a given
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_top_show(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_top_show(Elm_Object_Item *it);
/**
* Animatedly bring in, to the visible are of a genlist, a given
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_top_bring_in(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_top_bring_in(Elm_Object_Item *it);
/**
* Show the portion of a genlist's internal list containing a given
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_middle_show(Elm_Genlist_Item *it);
+EAPI void elm_genlist_item_middle_show(Elm_Object_Item *it);
/**
* Animatedly bring in, to the visible are of a genlist, a given
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_middle_bring_in(Elm_Genlist_Item *it);
+EAPI void elm_genlist_item_middle_bring_in(Elm_Object_Item *it);
/**
* Remove a genlist item from the its parent, deleting it.
*
- * @param item The item to be removed.
+ * @param it The item to be removed.
* @return @c EINA_TRUE on success or @c EINA_FALSE, otherwise.
*
* @see elm_genlist_clear(), to remove all items in a genlist at
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_del(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_del(Elm_Object_Item *it);
/**
* Return the data associated to a given genlist item
*
- * @param item The genlist item.
+ * @param it The genlist item.
* @return the data associated to this item.
*
* This returns the @c data value passed on the
*
* @ingroup Genlist
*/
-EAPI void *elm_genlist_item_data_get(const Elm_Genlist_Item *item);
+EAPI void *elm_genlist_item_data_get(const Elm_Object_Item *it);
/**
* Set the data associated to a given genlist item
*
- * @param item The genlist item
+ * @param it The genlist item
* @param data The new data pointer to set on it
*
* This @b overrides the @c data value passed on the
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_data_set(Elm_Genlist_Item *it, const void *data);
+EAPI void elm_genlist_item_data_set(Elm_Object_Item *it, const void *data);
/**
* Tells genlist to "orphan" contents fetchs by the item class
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_contents_orphan(Elm_Genlist_Item *it);
+EAPI void elm_genlist_item_contents_orphan(Elm_Object_Item *it);
/**
* Get the real Evas object created to implement the view of a
* given genlist item
*
- * @param item The genlist item.
+ * @param it The genlist item.
* @return the Evas object implementing this item's view.
*
* This returns the actual Evas object used to implement the
*
* @ingroup Genlist
*/
-EAPI const Evas_Object *elm_genlist_item_object_get(const Elm_Genlist_Item *it);
+EAPI const Evas_Object *elm_genlist_item_object_get(const Elm_Object_Item *it);
/**
* Update the contents of an item
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_update(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_update(Elm_Object_Item *it);
/**
* Promote an item to the top of the list
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_promote(Elm_Gen_Item *it);
+EAPI void elm_genlist_item_promote(Elm_Object_Item *it);
/**
* Demote an item to the end of the list
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_demote(Elm_Gen_Item *it);
+EAPI void elm_genlist_item_demote(Elm_Object_Item *it);
/**
* Update the part of an item
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_fields_update(Elm_Genlist_Item *it, const char *parts, Elm_Genlist_Item_Field_Flags itf);
+EAPI void elm_genlist_item_fields_update(Elm_Object_Item *it, const char *parts, Elm_Genlist_Item_Field_Flags itf);
/**
* Update the item class of an item
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_item_class_update(Elm_Genlist_Item *it, const Elm_Genlist_Item_Class *itc);
-EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Genlist_Item *it);
+EAPI void elm_genlist_item_item_class_update(Elm_Object_Item *it, const Elm_Genlist_Item_Class *itc);
+EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Object_Item *it);
/**
* Set the text to be shown in a given genlist item's tooltips.
*
- * @param item The genlist item
+ * @param it The genlist item
* @param text The text to set in the content
*
* This call will setup the text to be used as tooltip to that item
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_tooltip_text_set(Elm_Genlist_Item *item, const char *text);
+EAPI void elm_genlist_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
/**
* Set the content to be shown in a given genlist item's tooltips
*
- * @param item The genlist item.
+ * @param it The genlist item.
* @param func The function returning the tooltip contents.
* @param data What to provide to @a func as callback data/context.
* @param del_cb Called when data is not needed anymore, either when
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_tooltip_content_cb_set(Elm_Genlist_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
+EAPI void elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
/**
* Unset a tooltip from a given genlist item
*
- * @param item genlist item to remove a previously set tooltip from.
+ * @param it genlist item to remove a previously set tooltip from.
*
* This call removes any tooltip set on @p item. The callback
* provided as @c del_cb to
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_tooltip_unset(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_tooltip_unset(Elm_Object_Item *it);
/**
* Set a different @b style for a given genlist item's tooltip.
*
- * @param item genlist item with tooltip set
+ * @param it genlist item with tooltip set
* @param style the <b>theme style</b> to use on tooltips (e.g. @c
* "default", @c "transparent", etc)
*
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_tooltip_style_set(Elm_Genlist_Item *item, const char *style);
+EAPI void elm_genlist_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
/**
* Get the style set a given genlist item's tooltip.
*
- * @param item genlist item with tooltip already set on.
+ * @param it genlist item with tooltip already set on.
* @return style the theme style in use, which defaults to
* "default". If the object does not have a tooltip set,
* then @c NULL is returned.
*
* @ingroup Genlist
*/
-EAPI const char *elm_genlist_item_tooltip_style_get(const Elm_Genlist_Item *item);
+EAPI const char *elm_genlist_item_tooltip_style_get(const Elm_Object_Item *it);
/**
* @brief Disable size restrictions on an object's tooltip
- * @param item The tooltip's anchor object
+ * @param it The tooltip's anchor object
* @param disable If EINA_TRUE, size restrictions are disabled
* @return EINA_FALSE on failure, EINA_TRUE on success
*
* This function allows a tooltip to expand beyond its parant window's canvas.
* It will instead be limited only by the size of the display.
*/
-EAPI Eina_Bool elm_genlist_item_tooltip_window_mode_set(Elm_Genlist_Item *item, Eina_Bool disable);
+EAPI Eina_Bool elm_genlist_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
/**
* @brief Retrieve size restriction state of an object's tooltip
- * @param item The tooltip's anchor object
+ * @param it The tooltip's anchor object
* @return If EINA_TRUE, size restrictions are disabled
*
* This function returns whether a tooltip is allowed to expand beyond
* its parant window's canvas.
* It will instead be limited only by the size of the display.
*/
-EAPI Eina_Bool elm_genlist_item_tooltip_window_mode_get(const Elm_Genlist_Item *item);
+EAPI Eina_Bool elm_genlist_item_tooltip_window_mode_get(const Elm_Object_Item *it);
/**
* Set the type of mouse pointer/cursor decoration to be shown,
* when the mouse pointer is over the given genlist widget item
*
- * @param item genlist item to customize cursor on
+ * @param it genlist item to customize cursor on
* @param cursor the cursor type's name
*
* This function works analogously as elm_object_cursor_set(), but
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_cursor_set(Elm_Genlist_Item *item, const char *cursor);
+EAPI void elm_genlist_item_cursor_set(Elm_Object_Item *it, const char *cursor);
/**
* Get the type of mouse pointer/cursor decoration set to be shown,
* when the mouse pointer is over the given genlist widget item
*
- * @param item genlist item with custom cursor set
+ * @param it genlist item with custom cursor set
* @return the cursor type's name or @c NULL, if no custom cursors
* were set to @p item (and on errors)
*
*
* @ingroup Genlist
*/
-EAPI const char *elm_genlist_item_cursor_get(const Elm_Genlist_Item *item);
+EAPI const char *elm_genlist_item_cursor_get(const Elm_Object_Item *it);
/**
* Unset any custom mouse pointer/cursor decoration set to be
* shown, when the mouse pointer is over the given genlist widget
* item, thus making it show the @b default cursor again.
*
- * @param item a genlist item
+ * @param it a genlist item
*
* Use this call to undo any custom settings on this item's cursor
* decoration, bringing it back to defaults (no custom style set).
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_cursor_unset(Elm_Genlist_Item *item);
+EAPI void elm_genlist_item_cursor_unset(Elm_Object_Item *it);
/**
* Set a different @b style for a given custom cursor set for a
* genlist item.
*
- * @param item genlist item with custom cursor set
+ * @param it genlist item with custom cursor set
* @param style the <b>theme style</b> to use (e.g. @c "default",
* @c "transparent", etc)
*
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_cursor_style_set(Elm_Genlist_Item *item, const char *style);
+EAPI void elm_genlist_item_cursor_style_set(Elm_Object_Item *it, const char *style);
/**
* Get the current @b style set for a given genlist item's custom
* cursor
*
- * @param item genlist item with custom cursor set.
+ * @param it genlist item with custom cursor set.
* @return style the cursor style in use. If the object does not
* have a cursor set, then @c NULL is returned.
*
*
* @ingroup Genlist
*/
-EAPI const char *elm_genlist_item_cursor_style_get(const Elm_Genlist_Item *item);
+EAPI const char *elm_genlist_item_cursor_style_get(const Elm_Object_Item *it);
/**
* Set if the (custom) cursor for a given genlist item should be
* searched in its theme, also, or should only rely on the
* rendering engine.
*
- * @param item item with custom (custom) cursor already set on
+ * @param it item with custom (custom) cursor already set on
* @param engine_only Use @c EINA_TRUE to have cursors looked for
* only on those provided by the rendering engine, @c EINA_FALSE to
* have them searched on the widget's theme, as well.
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_cursor_engine_only_set(Elm_Genlist_Item *item, Eina_Bool engine_only);
+EAPI void elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
/**
* Get if the (custom) cursor for a given genlist item is being
* searched in its theme, also, or is only relying on the rendering
* engine.
*
- * @param item a genlist item
+ * @param it a genlist item
* @return @c EINA_TRUE, if cursors are being looked for only on
* those provided by the rendering engine, @c EINA_FALSE if they
* are being searched on the widget's theme, as well.
*
* @ingroup Genlist
*/
-EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const Elm_Genlist_Item *item);
+EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *it);
/**
* Get the index of the item. It is only valid once displayed.
*
* @ingroup Genlist
*/
-EAPI int elm_genlist_item_index_get(Elm_Gen_Item *it);
+EAPI int elm_genlist_item_index_get(Elm_Object_Item *it);
/**
* Update the contents of all realized items.
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_mode_set(Elm_Genlist_Item *it, const char *mode_type, Eina_Bool mode_set);
+EAPI void elm_genlist_item_mode_set(Elm_Object_Item *it, const char *mode_type, Eina_Bool mode_set);
/**
* Get the last (or current) genlist mode used.
*
* @ingroup Genlist
*/
-EAPI const Elm_Genlist_Item *elm_genlist_mode_item_get(const Evas_Object *obj);
+EAPI const Elm_Object_Item *elm_genlist_mode_item_get(const Evas_Object *obj);
/**
* Set reorder mode
EINA_INLIST;
EINA_MAGIC;
Elm_Store *store;
- Elm_Genlist_Item *item;
+ Elm_Object_Item *item;
Ecore_Thread *fetch_th;
Ecore_Job *eval_job;
const Elm_Store_Item_Mapping *mapping;
_store_genlist_item_realized(void *data, Evas_Object *obj __UNUSED__, void *event_info)
{
Elm_Store *st = data;
- Elm_Genlist_Item *gli = event_info;
+ Elm_Object_Item *gli = event_info;
Elm_Store_Item *sti = elm_genlist_item_data_get(gli);
if (!sti) return;
st->realized_count++;
_store_genlist_item_unrealized(void *data, Evas_Object *obj __UNUSED__, void *event_info)
{
Elm_Store *st = data;
- Elm_Genlist_Item *gli = event_info;
+ Elm_Object_Item *gli = event_info;
Elm_Store_Item *sti = elm_genlist_item_data_get(gli);
if (!sti) return;
st->realized_count--;
return sti->store;
}
-EAPI const Elm_Genlist_Item *
+EAPI const Elm_Object_Item *
elm_store_item_genlist_item_get(const Elm_Store_Item *sti)
{
if (!EINA_MAGIC_CHECK(sti, ELM_STORE_ITEM_MAGIC)) return NULL;
EAPI void elm_store_item_data_set(Elm_Store_Item *sti, void *data);
EAPI void *elm_store_item_data_get(Elm_Store_Item *sti);
EAPI const Elm_Store *elm_store_item_store_get(const Elm_Store_Item *sti);
-EAPI const Elm_Genlist_Item *elm_store_item_genlist_item_get(const Elm_Store_Item *sti);
+EAPI const Elm_Object_Item *elm_store_item_genlist_item_get(const Elm_Store_Item *sti);
#define ELM_OBJ_ITEM_CHECK_OR_RETURN(it, ...) \
ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)(it), __VA_ARGS__); \
- ELM_CHECK_WIDTYPE(it->base.widget, widtype) __VA_ARGS__;
+ ELM_CHECK_WIDTYPE(WIDGET(it), widtype) __VA_ARGS__;
+
+#define ELM_OBJ_ITEM_CHECK_OR_GOTO(it, label) \
+ ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item *)it, label); \
+ if (!elm_widget_type_check(WIDGET(it), (widtype), __func__)) goto label;
EAPI Eina_Bool elm_widget_api_check(int ver);
EAPI Evas_Object *elm_widget_add(Evas *evas);