elementary/genlist - Elm_Genlist_Item -> Elm_Object_Item

SVN revision: 67370
This commit is contained in:
ChunEon Park 2012-01-20 05:18:31 +00:00
parent 2b7a2bfba5
commit da7b8465a3
19 changed files with 871 additions and 845 deletions

View File

@ -34,7 +34,7 @@ elm_win_resize_object_add(win, genlist);
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;
@ -43,15 +43,15 @@ gic.func.del = 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);
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"

View File

@ -45,44 +45,44 @@ static Elm_Genlist_Item_Class itct;
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 *
@ -164,7 +164,7 @@ void
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];
@ -233,16 +233,16 @@ test_cursor2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
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);

View File

@ -5,7 +5,7 @@
#ifndef ELM_LIB_QUICKLAUNCH
typedef struct _Testitem
{
Elm_Genlist_Item *item;
Elm_Object_Item *item;
int mode;
int onoff;
} Testitem;

View File

@ -14,7 +14,7 @@
typedef struct _Testitem
{
Elm_Genlist_Item *item;
Elm_Object_Item *item;
int mode;
int onoff;
} Testitem;
@ -60,7 +60,7 @@ _move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *even
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);
@ -103,7 +103,7 @@ test_genlist(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
{
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);
@ -208,7 +208,7 @@ my_gl_insert_before(void *data, Evas_Object *obj __UNUSED__, void *event_info __
{
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;
@ -238,7 +238,7 @@ my_gl_insert_after(void *data, Evas_Object *obj __UNUSED__, void *event_info __U
{
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;
@ -267,7 +267,7 @@ static void
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");
@ -280,7 +280,7 @@ static void
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");
@ -296,7 +296,7 @@ my_gl_update_all(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNU
{
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);
@ -310,7 +310,7 @@ static void
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);
@ -320,7 +320,7 @@ static void
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);
@ -343,7 +343,7 @@ void
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);
@ -1041,51 +1041,52 @@ static Elm_Genlist_Item_Class itc4;
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__)
@ -1363,7 +1364,7 @@ void
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);
@ -1533,48 +1534,51 @@ test_genlist8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
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");
@ -1706,9 +1710,8 @@ _my_gl_mode_cancel(void *data, Evas_Object *obj, void *event_info __UNUSED__)
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
@ -1821,7 +1824,7 @@ _reorder_tg_changed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__
* 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.
}
@ -1949,7 +1952,7 @@ test_genlist12(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
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;
@ -1958,7 +1961,7 @@ gl13_cmp(const void *pa, const void *pb)
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};
@ -2042,7 +2045,7 @@ my_gl_insert_before_rel(void *data, Evas_Object *obj __UNUSED__, void *event_inf
{
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;
@ -2071,7 +2074,7 @@ my_gl_insert_after_rel(void *data, Evas_Object *obj __UNUSED__, void *event_info
{
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;
@ -2098,7 +2101,7 @@ my_gl_insert_after_rel(void *data, Evas_Object *obj __UNUSED__, void *event_info
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
@ -2166,25 +2169,25 @@ test_genlist14(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
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 */);
}
}
@ -2205,25 +2208,25 @@ test_genlist14(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
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 */);
}
}

View File

@ -41,7 +41,7 @@ void
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);
@ -73,16 +73,17 @@ test_index(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
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;
}

View File

@ -51,22 +51,22 @@ gltt_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_tooltip_text_set(it1, "Testing A");
elm_genlist_item_tooltip_text_set(it2, "Testing B");
elm_genlist_item_tooltip_text_set(it3, "Testing C");
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
@ -74,8 +74,8 @@ gltt_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
@ -83,8 +83,8 @@ gltt_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
@ -92,8 +92,8 @@ gltt_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 *
@ -517,7 +517,7 @@ test_tooltip2(void *data __UNUSED__,
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];
@ -591,16 +591,16 @@ test_tooltip2(void *data __UNUSED__,
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,

View File

@ -5,7 +5,7 @@
#ifndef ELM_LIB_QUICKLAUNCH
typedef struct _Testitem
{
Elm_Genlist_Item *item;
Elm_Object_Item *item;
int mode, onoff;
} Testitem;

View File

@ -55,21 +55,21 @@ _show_status_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED
{
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));
@ -77,8 +77,8 @@ _show_status_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED
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

View File

@ -82,9 +82,9 @@ _append_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
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);
}
@ -94,9 +94,9 @@ _prepend_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
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);
}
@ -104,15 +104,14 @@ static void
_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);
}
@ -120,15 +119,14 @@ static void
_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);
}
@ -136,112 +134,90 @@ static void
_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;
Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
it = elm_genlist_selected_item_get(list);
if (it)
it = elm_genlist_item_prev_get(it);
if (glit) glit = elm_genlist_item_prev_get(glit);
if (!glit) glit = elm_genlist_last_item_get(list);
if (!it)
it = 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;
Elm_Object_Item *glit = data;
if (!glit) return;
if (!it)
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;
Elm_Object_Item *glit = data;
if (!glit) return;
if (!it)
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;
Elm_Object_Item *glit = data;
if (!glit) return;
if (!it)
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);
Elm_Object_Item *glit = elm_genlist_selected_item_get(list);
if (!glit) return;
if (!it)
return;
elm_genlist_item_update(it);
elm_genlist_item_update(glit);
}
static Evas_Object *
@ -330,7 +306,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
for (i = 0; i < N_ITEMS; i++)
{
Elm_Genlist_Item *gli, *glg;
Elm_Object_Item *gli, *glg;
if (i % 7 == 0)
{

View File

@ -105,70 +105,67 @@ static void
_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;
@ -177,32 +174,33 @@ _add_child_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__
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);
elm_genlist_item_del(glit);
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);
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);
}
@ -220,79 +218,77 @@ static void
_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;
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, it,
flags, _item_sel_cb, NULL);
elm_genlist_item_expanded_set(nitem, EINA_FALSE);
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 *
@ -362,7 +358,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
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);
@ -375,33 +371,33 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
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++;
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
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;
}
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);

View File

@ -64,7 +64,7 @@ typedef struct _Widget_Request Widget_Request;
struct _Widget_Request
{
Widget_Data *wd;
Elm_Genlist_Item *parent;
Elm_Object_Item *parent;
Evas_Object *obj;
const char *path;
@ -103,7 +103,7 @@ static const Evas_Smart_Cb_Description _signals[] = {
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);
@ -326,7 +326,7 @@ _expand_done(void *data,
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);
}
@ -336,7 +336,7 @@ _contract_done(void *data __UNUSED__,
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);
}
@ -345,8 +345,8 @@ _expand_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 *it = event_info;
elm_genlist_item_expanded_set(it, EINA_TRUE);
}
static void
@ -354,8 +354,8 @@ _contract_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 *it = event_info;
elm_genlist_item_expanded_set(it, EINA_FALSE);
}
/*** PRIVATES ***/
@ -605,8 +605,8 @@ _file_grid_cmp(const void *a, const void *b)
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);
@ -707,7 +707,7 @@ _error_cb(void *data, Eio_File *handler, int error __UNUSED__)
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
@ -1154,7 +1154,7 @@ elm_fileselector_selected_get(const Evas_Object *obj)
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);
}

View File

@ -1704,7 +1704,7 @@ EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj);
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

View File

@ -14,13 +14,13 @@ EAPI void
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
@ -126,13 +126,13 @@ elm_gen_last_item_get(const Evas_Object *obj)
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 *

View File

@ -2331,13 +2331,13 @@ EAPI void
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
@ -2649,25 +2649,25 @@ elm_gengrid_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenu
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 *

File diff suppressed because it is too large Load Diff

View File

@ -108,7 +108,7 @@
* @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
@ -350,9 +350,8 @@ typedef enum
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 */
/**
@ -787,7 +786,7 @@ EAPI double elm_genlist_longpress_timeout_get(const Evas_
*
* @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.
@ -811,7 +810,7 @@ EAPI Elm_Genlist_Item *elm_genlist_item_append(Evas_Object *obj, con
*
* @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
@ -835,7 +834,7 @@ EAPI Elm_Genlist_Item *elm_genlist_item_prepend(Evas_Object *obj, co
*
* @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
@ -859,7 +858,7 @@ EAPI Elm_Genlist_Item *elm_genlist_item_insert_before(Evas_Object *o
*
* @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
@ -878,8 +877,8 @@ EAPI Elm_Genlist_Item *elm_genlist_item_insert_after(Evas_Object *ob
*/
// 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 */
/**
@ -899,7 +898,7 @@ EAPI Elm_Genlist_Item *elm_genlist_item_direct_sorted_insert(Evas_Ob
*
* @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.
@ -909,7 +908,7 @@ EAPI Elm_Genlist_Item *elm_genlist_selected_item_get(const Evas_Obje
*
* 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.
@ -959,7 +958,7 @@ EAPI void elm_genlist_mode_item_style_set(Evas_Object *
* @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.
@ -991,7 +990,7 @@ EAPI Eina_List *elm_genlist_realized_items_get(const Evas_Obj
*
* @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
@ -1003,7 +1002,7 @@ EAPI Elm_Genlist_Item *elm_genlist_at_xy_item_get(const Evas_Object
*
* @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
@ -1014,7 +1013,7 @@ EAPI Elm_Genlist_Item *elm_genlist_first_item_get(const Evas_Object
*
* @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
@ -1054,7 +1053,7 @@ EAPI void elm_genlist_scroller_policy_get(const Evas_Ob
* 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)
*
@ -1065,13 +1064,13 @@ EAPI void elm_genlist_scroller_policy_get(const Evas_Ob
*
* @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)
*
@ -1082,20 +1081,20 @@ EAPI Elm_Genlist_Item *elm_genlist_item_next_get(const Elm_Genlist_I
*
* @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
@ -1108,7 +1107,7 @@ EAPI Evas_Object *elm_genlist_item_genlist_get(const Elm_Genlis
*
* @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
@ -1123,7 +1122,7 @@ EAPI Elm_Genlist_Item *elm_genlist_item_parent_get(const Elm_Genlist
*
* @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
@ -1141,7 +1140,7 @@ EAPI void elm_genlist_item_subitems_clear(Elm_Genlist_I
*
* @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
@ -1153,7 +1152,7 @@ EAPI void elm_genlist_item_selected_set(Elm_Genlist_Ite
*
* @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.
@ -1176,7 +1175,7 @@ EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Genli
*
* @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
@ -1190,7 +1189,7 @@ EAPI void elm_genlist_item_expanded_set(Elm_Genlist_Ite
*
* @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
@ -1200,7 +1199,7 @@ EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Genli
*
* @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.
@ -1216,7 +1215,7 @@ EAPI int elm_genlist_item_expanded_depth_get(const Elm
*
* @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.
@ -1229,7 +1228,7 @@ EAPI void elm_genlist_item_disabled_set(Elm_Genlist_Ite
*
* @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.
@ -1249,7 +1248,7 @@ EAPI Eina_Bool elm_genlist_item_disabled_get(const Elm_Genli
*
* @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
@ -1262,7 +1261,7 @@ EAPI void elm_genlist_item_display_only_set(Elm_Genlist
*
* @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
@ -1279,7 +1278,7 @@ EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_G
*
* @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
@ -1297,7 +1296,7 @@ EAPI void elm_genlist_item_show(Elm_Genlist_Item *item)
*
* @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
@ -1315,7 +1314,7 @@ EAPI void elm_genlist_item_bring_in(Elm_Genlist_Item *i
*
* @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
@ -1334,7 +1333,7 @@ EAPI void elm_genlist_item_top_show(Elm_Genlist_Item *i
*
* @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
@ -1352,7 +1351,7 @@ EAPI void elm_genlist_item_top_bring_in(Elm_Genlist_Ite
*
* @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
@ -1371,12 +1370,12 @@ EAPI void elm_genlist_item_middle_show(Elm_Genlist_Item
*
* @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
@ -1384,12 +1383,12 @@ EAPI void elm_genlist_item_middle_bring_in(Elm_Genlist_
*
* @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
@ -1400,12 +1399,12 @@ EAPI void elm_genlist_item_del(Elm_Genlist_Item *item);
*
* @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
@ -1418,7 +1417,7 @@ EAPI void *elm_genlist_item_data_get(const Elm_Genlist_I
*
* @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
@ -1432,13 +1431,13 @@ EAPI void elm_genlist_item_data_set(Elm_Genlist_Item *i
*
* @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
@ -1454,7 +1453,7 @@ EAPI void elm_genlist_item_contents_orphan(Elm_Genlist_
*
* @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
@ -1472,7 +1471,7 @@ EAPI const Evas_Object *elm_genlist_item_object_get(const Elm_Genlist
*
* @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
@ -1481,7 +1480,7 @@ EAPI void elm_genlist_item_update(Elm_Genlist_Item *ite
*
* @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
@ -1490,7 +1489,7 @@ EAPI void elm_genlist_item_promote(Elm_Gen_Item *it);
*
* @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
@ -1512,7 +1511,7 @@ EAPI void elm_genlist_item_demote(Elm_Gen_Item *it);
*
* @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
@ -1526,13 +1525,13 @@ EAPI void elm_genlist_item_fields_update(Elm_Genlist_It
*
* @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
@ -1546,12 +1545,12 @@ EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Gen
*
* @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
@ -1574,12 +1573,12 @@ EAPI void elm_genlist_item_tooltip_text_set(Elm_Genlist
*
* @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
@ -1591,12 +1590,12 @@ EAPI void elm_genlist_item_tooltip_content_cb_set(Elm_G
*
* @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)
*
@ -1614,12 +1613,12 @@ EAPI void elm_genlist_item_tooltip_unset(Elm_Genlist_It
*
* @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.
@ -1628,35 +1627,35 @@ EAPI void elm_genlist_item_tooltip_style_set(Elm_Genlis
*
* @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
@ -1674,13 +1673,13 @@ EAPI Eina_Bool elm_genlist_item_tooltip_window_mode_get(cons
*
* @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)
*
@ -1690,14 +1689,14 @@ EAPI void elm_genlist_item_cursor_set(Elm_Genlist_Item
*
* @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).
@ -1707,13 +1706,13 @@ EAPI const char *elm_genlist_item_cursor_get(const Elm_Genlist
*
* @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)
*
@ -1732,13 +1731,13 @@ EAPI void elm_genlist_item_cursor_unset(Elm_Genlist_Ite
*
* @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.
*
@ -1746,14 +1745,14 @@ EAPI void elm_genlist_item_cursor_style_set(Elm_Genlist
*
* @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.
@ -1766,14 +1765,14 @@ EAPI const char *elm_genlist_item_cursor_style_get(const Elm_G
*
* @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.
@ -1782,7 +1781,7 @@ EAPI void elm_genlist_item_cursor_engine_only_set(Elm_G
*
* @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.
@ -1792,7 +1791,7 @@ EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const
*
* @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.
@ -1852,7 +1851,7 @@ EAPI void elm_genlist_realized_items_update(Evas_Object
*
* @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.
@ -1884,7 +1883,7 @@ EAPI const char *elm_genlist_mode_get(const Evas_Object *obj);
*
* @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

View File

@ -42,7 +42,7 @@ struct _Elm_Store_Item
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;
@ -226,7 +226,7 @@ static void
_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++;
@ -239,7 +239,7 @@ static void
_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--;
@ -712,7 +712,7 @@ elm_store_item_store_get(const Elm_Store_Item *sti)
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;

View File

@ -108,4 +108,4 @@ EAPI Eina_Bool elm_store_sorted_get(const Elm_Store *st);
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);

View File

@ -292,7 +292,11 @@ struct _Elm_Object_Item
#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);