forked from enlightenment/efl
elementary/gengrid - Elm_Gengrid_Item -> Elm_Object_Item
Be happy! now all widgets are using the Elm_Object_Item interface. SVN revision: 67599
This commit is contained in:
parent
fd909fc341
commit
7c0738c762
|
@ -7,7 +7,7 @@
|
|||
|
||||
typedef struct _Testitem
|
||||
{
|
||||
Elm_Gengrid_Item *item;
|
||||
Elm_Object_Item *item;
|
||||
const char *path;
|
||||
int mode;
|
||||
int onoff;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef ELM_LIB_QUICKLAUNCH
|
||||
typedef struct _Testitem
|
||||
{
|
||||
Elm_Gengrid_Item *item;
|
||||
Elm_Object_Item *item;
|
||||
const char *path;
|
||||
int mode;
|
||||
int onoff;
|
||||
|
@ -210,7 +210,7 @@ _before_bt_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __U
|
|||
{
|
||||
Testitem *ti;
|
||||
Evas_Object *grid = data;
|
||||
Elm_Gengrid_Item *sel;
|
||||
Elm_Object_Item *sel;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
sel = elm_gengrid_selected_item_get(grid);
|
||||
|
@ -229,7 +229,7 @@ _after_bt_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
|
|||
{
|
||||
Testitem *ti;
|
||||
Evas_Object *grid = data;
|
||||
Elm_Gengrid_Item *sel;
|
||||
Elm_Object_Item *sel;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
sel = elm_gengrid_selected_item_get(grid);
|
||||
|
@ -248,12 +248,12 @@ _delete_bt_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __U
|
|||
{
|
||||
Evas_Object *grid = data;
|
||||
Eina_List *l, *l2, *l3;
|
||||
Elm_Gengrid_Item *it;
|
||||
Elm_Object_Item *gg_it;
|
||||
|
||||
l = (Eina_List*)elm_gengrid_selected_items_get(grid);
|
||||
if (!l) return;
|
||||
EINA_LIST_FOREACH_SAFE(l, l2, l3, it)
|
||||
elm_gengrid_item_del(it);
|
||||
EINA_LIST_FOREACH_SAFE(l, l2, l3, gg_it)
|
||||
elm_gengrid_item_del(gg_it);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
typedef struct _Testitem
|
||||
{
|
||||
Elm_Gengrid_Item *item;
|
||||
Elm_Object_Item *item;
|
||||
const char *path;
|
||||
int mode;
|
||||
int onoff;
|
||||
|
|
|
@ -41,9 +41,9 @@ static void
|
|||
_it_sel_cb(void *data, Evas_Object *obj __UNUSED__, void *event)
|
||||
{
|
||||
App_Inwin_Data *aid = data;
|
||||
Elm_Gengrid_Item *it = event;
|
||||
Elm_Object_Item *gg_it = event;
|
||||
|
||||
aid->emo = elm_gengrid_item_data_get(it);
|
||||
aid->emo = elm_gengrid_item_data_get(gg_it);
|
||||
|
||||
elm_pager_content_promote(aid->pager, aid->settings);
|
||||
}
|
||||
|
|
|
@ -106,10 +106,10 @@ _multi_change(void *data,
|
|||
|
||||
if (!multi)
|
||||
{
|
||||
Elm_Gengrid_Item *it;
|
||||
Elm_Object_Item *gg_it;
|
||||
const Eina_List *selected = elm_gengrid_selected_items_get(grid), *l;
|
||||
EINA_LIST_FOREACH(selected, l, it)
|
||||
elm_gengrid_item_selected_set(it, EINA_FALSE);
|
||||
EINA_LIST_FOREACH(selected, l, gg_it)
|
||||
elm_gengrid_item_selected_set(gg_it, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ _before_bt_clicked(void *data,
|
|||
{
|
||||
Example_Item *it;
|
||||
Evas_Object *grid = data;
|
||||
Elm_Gengrid_Item *sel;
|
||||
Elm_Object_Item *sel;
|
||||
|
||||
sel = elm_gengrid_selected_item_get(grid);
|
||||
if (!sel)
|
||||
|
@ -181,7 +181,7 @@ _after_bt_clicked(void *data,
|
|||
{
|
||||
Example_Item *it;
|
||||
Evas_Object *grid = data;
|
||||
Elm_Gengrid_Item *sel;
|
||||
Elm_Object_Item *sel;
|
||||
|
||||
sel = elm_gengrid_selected_item_get(grid);
|
||||
if (!sel)
|
||||
|
@ -233,11 +233,11 @@ _bring_1st_clicked(void *data,
|
|||
Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Gengrid_Item *it = elm_gengrid_first_item_get(data);
|
||||
Elm_Object_Item *gg_it = elm_gengrid_first_item_get(data);
|
||||
|
||||
if (!it) return;
|
||||
if (!gg_it) return;
|
||||
|
||||
elm_gengrid_item_bring_in(it);
|
||||
elm_gengrid_item_bring_in(gg_it);
|
||||
}
|
||||
|
||||
/* show last item */
|
||||
|
@ -246,11 +246,11 @@ _show_last_clicked(void *data,
|
|||
Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Gengrid_Item *it = elm_gengrid_last_item_get(data);
|
||||
Elm_Object_Item *gg_it = elm_gengrid_last_item_get(data);
|
||||
|
||||
if (!it) return;
|
||||
if (!gg_it) return;
|
||||
|
||||
elm_gengrid_item_show(it);
|
||||
elm_gengrid_item_show(gg_it);
|
||||
}
|
||||
|
||||
/* disable selected item */
|
||||
|
@ -259,12 +259,12 @@ _toggle_disabled_cb(void *data,
|
|||
Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Gengrid_Item *it = elm_gengrid_selected_item_get(data);
|
||||
Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(data);
|
||||
|
||||
if (!it) return;
|
||||
if (!gg_it) return;
|
||||
|
||||
elm_gengrid_item_selected_set(it, EINA_FALSE);
|
||||
elm_gengrid_item_disabled_set(it, EINA_TRUE);
|
||||
elm_gengrid_item_selected_set(gg_it, EINA_FALSE);
|
||||
elm_gengrid_item_disabled_set(gg_it, EINA_TRUE);
|
||||
}
|
||||
|
||||
/* change items' size */
|
||||
|
|
|
@ -97,7 +97,7 @@ elm_main(int argc __UNUSED__,
|
|||
char **argv __UNUSED__)
|
||||
{
|
||||
Evas_Object *win, *bg, *grid, *index;
|
||||
Elm_Gengrid_Item *it;
|
||||
Elm_Object_Item *gg_it;
|
||||
unsigned int i;
|
||||
|
||||
Elm_Gengrid_Item_Class gic;
|
||||
|
@ -134,11 +134,11 @@ elm_main(int argc __UNUSED__,
|
|||
{
|
||||
char buf[32];
|
||||
|
||||
it = elm_gengrid_item_append(grid, &gic, (void *)i, NULL, NULL);
|
||||
gg_it = elm_gengrid_item_append(grid, &gic, (void *)i, NULL, NULL);
|
||||
|
||||
/* indexing by first letters */
|
||||
snprintf(buf, sizeof(buf), "%c", items[i][0]);
|
||||
elm_index_item_sorted_insert(index, buf, it, _index_icmp, NULL);
|
||||
elm_index_item_sorted_insert(index, buf, gg_it, _index_icmp, NULL);
|
||||
}
|
||||
|
||||
evas_object_smart_callback_add(index, "delay,changed", _index_changed, NULL);
|
||||
|
|
|
@ -584,8 +584,8 @@ _filter_cb(void *data __UNUSED__, Eio_File *handler, const Eina_File_Direct_Info
|
|||
static int
|
||||
_file_grid_cmp(const void *a, const void *b)
|
||||
{
|
||||
const Elm_Gengrid_Item *ga = a;
|
||||
const Elm_Gengrid_Item *gb = b;
|
||||
const Elm_Object_Item *ga = a;
|
||||
const Elm_Object_Item *gb = b;
|
||||
const Elm_Gengrid_Item_Class *ca = elm_gengrid_item_item_class_get(ga);
|
||||
const Elm_Gengrid_Item_Class *cb = elm_gengrid_item_item_class_get(gb);
|
||||
|
||||
|
@ -1154,15 +1154,13 @@ elm_fileselector_selected_get(const Evas_Object *obj)
|
|||
|
||||
if (wd->mode == ELM_FILESELECTOR_LIST)
|
||||
{
|
||||
Elm_Object_Item *it;
|
||||
it = elm_genlist_selected_item_get(wd->files_list);
|
||||
if (it) return elm_object_item_data_get(it);
|
||||
Elm_Object_Item *gg_it = elm_genlist_selected_item_get(wd->files_list);
|
||||
if (gg_it) return elm_object_item_data_get(gg_it);
|
||||
}
|
||||
else
|
||||
{
|
||||
Elm_Gengrid_Item *it;
|
||||
it = elm_gengrid_selected_item_get(wd->files_grid);
|
||||
if (it) return elm_gengrid_item_data_get(it);
|
||||
Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(wd->files_grid);
|
||||
if (gg_it) return elm_gengrid_item_data_get(gg_it);
|
||||
}
|
||||
|
||||
return wd->path;
|
||||
|
|
|
@ -138,5 +138,5 @@ elm_gen_item_prev_get(const Elm_Gen_Item *it)
|
|||
EAPI Evas_Object *
|
||||
elm_gen_item_widget_get(const Elm_Gen_Item *it)
|
||||
{
|
||||
return _elm_genlist_item_widget_get(it);
|
||||
return WIDGET(it);
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ _event_hook(Evas_Object *obj,
|
|||
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;
|
||||
|
@ -345,7 +345,8 @@ _deselect_all_items(Widget_Data *wd)
|
|||
{
|
||||
if (!wd->selected) return EINA_FALSE;
|
||||
while (wd->selected)
|
||||
elm_gengrid_item_selected_set(wd->selected->data, EINA_FALSE);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item *) wd->selected->data,
|
||||
EINA_FALSE);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -355,13 +356,14 @@ _item_multi_select_left(Widget_Data *wd)
|
|||
{
|
||||
if (!wd->selected) return EINA_FALSE;
|
||||
|
||||
Elm_Gen_Item *prev = elm_gengrid_item_prev_get(wd->last_selected_item);
|
||||
Elm_Object_Item *prev =
|
||||
elm_gengrid_item_prev_get((Elm_Object_Item *) wd->last_selected_item);
|
||||
if (!prev) return EINA_TRUE;
|
||||
if (elm_gengrid_item_selected_get(prev))
|
||||
{
|
||||
elm_gengrid_item_selected_set(wd->last_selected_item, EINA_FALSE);
|
||||
wd->last_selected_item = prev;
|
||||
elm_gengrid_item_show(wd->last_selected_item);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item *) wd->last_selected_item, EINA_FALSE);
|
||||
wd->last_selected_item = (Elm_Gen_Item *) prev;
|
||||
elm_gengrid_item_show((Elm_Object_Item *) wd->last_selected_item);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -377,13 +379,14 @@ _item_multi_select_right(Widget_Data *wd)
|
|||
{
|
||||
if (!wd->selected) return EINA_FALSE;
|
||||
|
||||
Elm_Gen_Item *next = elm_gengrid_item_next_get(wd->last_selected_item);
|
||||
Elm_Object_Item *next =
|
||||
elm_gengrid_item_next_get((Elm_Object_Item *) wd->last_selected_item);
|
||||
if (!next) return EINA_TRUE;
|
||||
if (elm_gengrid_item_selected_get(next))
|
||||
{
|
||||
elm_gengrid_item_selected_set(wd->last_selected_item, EINA_FALSE);
|
||||
wd->last_selected_item = next;
|
||||
elm_gengrid_item_show(wd->last_selected_item);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item * ) wd->last_selected_item, EINA_FALSE);
|
||||
wd->last_selected_item = (Elm_Gen_Item *) next;
|
||||
elm_gengrid_item_show((Elm_Object_Item *) wd->last_selected_item);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -434,25 +437,27 @@ _item_single_select_up(Widget_Data *wd)
|
|||
prev = ELM_GEN_ITEM_FROM_INLIST(wd->items->last);
|
||||
while ((prev) && (prev->generation < wd->generation))
|
||||
prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
|
||||
elm_gengrid_item_selected_set(prev, EINA_TRUE);
|
||||
elm_gengrid_item_show(prev);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item *) prev, EINA_TRUE);
|
||||
elm_gengrid_item_show((Elm_Object_Item *) prev);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else prev = elm_gengrid_item_prev_get(wd->last_selected_item);
|
||||
else
|
||||
prev = (Elm_Gen_Item *) elm_gengrid_item_prev_get((Elm_Object_Item *) wd->last_selected_item);
|
||||
|
||||
if (!prev) return EINA_FALSE;
|
||||
|
||||
for (i = 1; i < wd->nmax; i++)
|
||||
{
|
||||
Elm_Gen_Item *tmp = elm_gengrid_item_prev_get(prev);
|
||||
Elm_Object_Item *tmp =
|
||||
elm_gengrid_item_prev_get((Elm_Object_Item *) prev);
|
||||
if (!tmp) return EINA_FALSE;
|
||||
prev = tmp;
|
||||
prev = (Elm_Gen_Item *) tmp;
|
||||
}
|
||||
|
||||
_deselect_all_items(wd);
|
||||
|
||||
elm_gengrid_item_selected_set(prev, EINA_TRUE);
|
||||
elm_gengrid_item_show(prev);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item *) prev, EINA_TRUE);
|
||||
elm_gengrid_item_show((Elm_Object_Item *) prev);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -468,25 +473,27 @@ _item_single_select_down(Widget_Data *wd)
|
|||
next = ELM_GEN_ITEM_FROM_INLIST(wd->items);
|
||||
while ((next) && (next->generation < wd->generation))
|
||||
next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
|
||||
elm_gengrid_item_selected_set(next, EINA_TRUE);
|
||||
elm_gengrid_item_show(next);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item *) next, EINA_TRUE);
|
||||
elm_gengrid_item_show((Elm_Object_Item *) next);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else next = elm_gengrid_item_next_get(wd->last_selected_item);
|
||||
else
|
||||
next = (Elm_Gen_Item *) elm_gengrid_item_next_get((Elm_Object_Item *) wd->last_selected_item);
|
||||
|
||||
if (!next) return EINA_FALSE;
|
||||
|
||||
for (i = 1; i < wd->nmax; i++)
|
||||
{
|
||||
Elm_Gen_Item *tmp = elm_gengrid_item_next_get(next);
|
||||
Elm_Object_Item *tmp =
|
||||
elm_gengrid_item_next_get((Elm_Object_Item *) next);
|
||||
if (!tmp) return EINA_FALSE;
|
||||
next = tmp;
|
||||
next = (Elm_Gen_Item *) tmp;
|
||||
}
|
||||
|
||||
_deselect_all_items(wd);
|
||||
|
||||
elm_gengrid_item_selected_set(next, EINA_TRUE);
|
||||
elm_gengrid_item_show(next);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item *) next, EINA_TRUE);
|
||||
elm_gengrid_item_show((Elm_Object_Item *) next);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -500,14 +507,15 @@ _item_single_select_left(Widget_Data *wd)
|
|||
while ((prev) && (prev->generation < wd->generation))
|
||||
prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
|
||||
}
|
||||
else prev = elm_gengrid_item_prev_get(wd->last_selected_item);
|
||||
else
|
||||
prev = (Elm_Gen_Item *) elm_gengrid_item_prev_get((Elm_Object_Item *) wd->last_selected_item);
|
||||
|
||||
if (!prev) return EINA_FALSE;
|
||||
|
||||
_deselect_all_items(wd);
|
||||
|
||||
elm_gengrid_item_selected_set(prev, EINA_TRUE);
|
||||
elm_gengrid_item_show(prev);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item *) prev, EINA_TRUE);
|
||||
elm_gengrid_item_show((Elm_Object_Item *) prev);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -521,14 +529,15 @@ _item_single_select_right(Widget_Data *wd)
|
|||
while ((next) && (next->generation < wd->generation))
|
||||
next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
|
||||
}
|
||||
else next = elm_gengrid_item_next_get(wd->last_selected_item);
|
||||
else
|
||||
next = (Elm_Gen_Item *) elm_gengrid_item_next_get((Elm_Object_Item *) wd->last_selected_item);
|
||||
|
||||
if (!next) return EINA_FALSE;
|
||||
|
||||
_deselect_all_items(wd);
|
||||
|
||||
elm_gengrid_item_selected_set(next, EINA_TRUE);
|
||||
elm_gengrid_item_show(next);
|
||||
elm_gengrid_item_selected_set((Elm_Object_Item *) next, EINA_TRUE);
|
||||
elm_gengrid_item_show((Elm_Object_Item *) next);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -565,7 +574,7 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
|||
while (it)
|
||||
{
|
||||
edje_object_mirrored_set(VIEW(it), rtl);
|
||||
elm_gengrid_item_update(it);
|
||||
elm_gengrid_item_update((Elm_Object_Item *) it);
|
||||
it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
|
||||
}
|
||||
}
|
||||
|
@ -2040,7 +2049,7 @@ elm_gengrid_align_get(const Evas_Object *obj,
|
|||
if (align_y) *align_y = wd->align_y;
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_item_append(Evas_Object *obj,
|
||||
const Elm_Gengrid_Item_Class *itc,
|
||||
const void *data,
|
||||
|
@ -2062,10 +2071,10 @@ elm_gengrid_item_append(Evas_Object *obj,
|
|||
if (wd->calc_job) ecore_job_del(wd->calc_job);
|
||||
wd->calc_job = ecore_job_add(_calc_job, wd);
|
||||
|
||||
return it;
|
||||
return (Elm_Object_Item *) it;
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_item_prepend(Evas_Object *obj,
|
||||
const Elm_Gengrid_Item_Class *itc,
|
||||
const void *data,
|
||||
|
@ -2086,70 +2095,70 @@ elm_gengrid_item_prepend(Evas_Object *obj,
|
|||
if (wd->calc_job) ecore_job_del(wd->calc_job);
|
||||
wd->calc_job = ecore_job_add(_calc_job, wd);
|
||||
|
||||
return it;
|
||||
return (Elm_Object_Item *) it;
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_item_insert_before(Evas_Object *obj,
|
||||
const Elm_Gengrid_Item_Class *itc,
|
||||
const void *data,
|
||||
Elm_Gen_Item *relative,
|
||||
Elm_Object_Item *relative,
|
||||
Evas_Smart_Cb func,
|
||||
const void *func_data)
|
||||
{
|
||||
Elm_Gen_Item *it;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(relative, NULL);
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(relative, NULL);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return NULL;
|
||||
|
||||
it = _item_new(wd, itc, data, func, func_data);
|
||||
if (!it) return NULL;
|
||||
wd->items = eina_inlist_prepend_relative
|
||||
(wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(relative));
|
||||
(wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET((Elm_Gen_Item *) relative));
|
||||
if (it->group)
|
||||
wd->group_items = eina_list_append_relative(wd->group_items, it, relative->parent);
|
||||
wd->group_items = eina_list_append_relative(wd->group_items, it, ((Elm_Gen_Item *) relative)->parent);
|
||||
|
||||
if (wd->calc_job) ecore_job_del(wd->calc_job);
|
||||
wd->calc_job = ecore_job_add(_calc_job, wd);
|
||||
|
||||
return it;
|
||||
return (Elm_Object_Item *) it;
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_item_insert_after(Evas_Object *obj,
|
||||
const Elm_Gengrid_Item_Class *itc,
|
||||
const void *data,
|
||||
Elm_Gen_Item *relative,
|
||||
Elm_Object_Item *relative,
|
||||
Evas_Smart_Cb func,
|
||||
const void *func_data)
|
||||
{
|
||||
Elm_Gen_Item *it;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(relative, NULL);
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(relative, NULL);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return NULL;
|
||||
|
||||
it = _item_new(wd, itc, data, func, func_data);
|
||||
if (!it) return NULL;
|
||||
wd->items = eina_inlist_append_relative
|
||||
(wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(relative));
|
||||
(wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET((Elm_Gen_Item *) relative));
|
||||
if (it->group)
|
||||
wd->group_items = eina_list_prepend_relative(wd->group_items, it, relative->parent);
|
||||
wd->group_items = eina_list_prepend_relative(wd->group_items, it, ((Elm_Gen_Item *) relative)->parent);
|
||||
|
||||
if (wd->calc_job) ecore_job_del(wd->calc_job);
|
||||
wd->calc_job = ecore_job_add(_calc_job, wd);
|
||||
|
||||
return it;
|
||||
return (Elm_Object_Item *) it;
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_item_direct_sorted_insert(Evas_Object *obj,
|
||||
const Elm_Gengrid_Item_Class *itc,
|
||||
const void *data,
|
||||
Eina_Compare_Cb comp,
|
||||
Evas_Smart_Cb func,
|
||||
const void *func_data)
|
||||
const Elm_Gengrid_Item_Class *itc,
|
||||
const void *data,
|
||||
Eina_Compare_Cb comp,
|
||||
Evas_Smart_Cb func,
|
||||
const void *func_data)
|
||||
{
|
||||
Elm_Gen_Item *it;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
|
@ -2168,10 +2177,10 @@ elm_gengrid_item_direct_sorted_insert(Evas_Object *obj,
|
|||
if (wd->calc_job) ecore_job_del(wd->calc_job);
|
||||
wd->calc_job = ecore_job_add(_calc_job, wd);
|
||||
|
||||
return it;
|
||||
return (Elm_Object_Item *) it;
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_item_sorted_insert(Evas_Object *obj,
|
||||
const Elm_Gengrid_Item_Class *itc,
|
||||
const void *data,
|
||||
|
@ -2186,16 +2195,18 @@ elm_gengrid_item_sorted_insert(Evas_Object *obj,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_del(Elm_Gen_Item *it)
|
||||
elm_gengrid_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_del_notserious(it);
|
||||
_elm_genlist_item_del_notserious(_it);
|
||||
return;
|
||||
}
|
||||
|
||||
_item_del(it);
|
||||
_item_del(_it);
|
||||
elm_widget_item_free(it);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -2229,65 +2240,66 @@ elm_gengrid_clear(Evas_Object *obj)
|
|||
}
|
||||
|
||||
EAPI const Evas_Object *
|
||||
elm_gengrid_item_object_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_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_gengrid_item_update(Elm_Gen_Item *it)
|
||||
elm_gengrid_item_update(Elm_Object_Item *it)
|
||||
{
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
|
||||
if (!it->realized) return;
|
||||
if (it->want_unrealize) return;
|
||||
_elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
_item_realize(it);
|
||||
_item_place(it, it->x, it->y);
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
|
||||
Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
|
||||
if (!_it->realized) return;
|
||||
if (_it->want_unrealize) return;
|
||||
_elm_genlist_item_unrealize(_it, EINA_FALSE);
|
||||
_item_realize(_it);
|
||||
_item_place(_it, _it->x, _it->y);
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
elm_gengrid_item_data_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_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_gengrid_item_data_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_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 const Elm_Gengrid_Item_Class *
|
||||
elm_gengrid_item_item_class_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_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;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_item_class_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_item_item_class_set(Elm_Object_Item *it,
|
||||
const Elm_Gengrid_Item_Class *itc)
|
||||
{
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
|
||||
EINA_SAFETY_ON_NULL_RETURN(itc);
|
||||
if (it->generation < it->wd->generation) return;
|
||||
it->itc = itc;
|
||||
Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
|
||||
if (_it->generation < _it->wd->generation) return;
|
||||
_it->itc = itc;
|
||||
elm_gengrid_item_update(it);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_pos_get(const Elm_Gen_Item *it,
|
||||
elm_gengrid_item_pos_get(const Elm_Object_Item *it,
|
||||
unsigned int *x,
|
||||
unsigned int *y)
|
||||
{
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
|
||||
if (x) *x = it->x;
|
||||
if (y) *y = it->y;
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
|
||||
if (x) *x = ((Elm_Gen_Item *) it)->x;
|
||||
if (y) *y = ((Elm_Gen_Item *) it)->y;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -2309,7 +2321,7 @@ elm_gengrid_multi_select_get(const Evas_Object *obj)
|
|||
return wd->multi;
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_selected_item_get(const Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
|
@ -2329,41 +2341,45 @@ elm_gengrid_selected_items_get(const Evas_Object *obj)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_selected_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_item_selected_set(Elm_Object_Item *it,
|
||||
Eina_Bool selected)
|
||||
{
|
||||
elm_genlist_item_selected_set((Elm_Object_Item *) it, selected);
|
||||
elm_genlist_item_selected_set(it, selected);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_gengrid_item_selected_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_item_selected_get(const Elm_Object_Item *it)
|
||||
{
|
||||
return elm_genlist_item_selected_get((const Elm_Object_Item *) it);
|
||||
return elm_genlist_item_selected_get(it);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_disabled_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_item_disabled_set(Elm_Object_Item *it,
|
||||
Eina_Bool disabled)
|
||||
{
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
|
||||
if (it->base.disabled == disabled) return;
|
||||
if (it->generation < it->wd->generation) return;
|
||||
it->base.disabled = !!disabled;
|
||||
if (it->realized)
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
|
||||
Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
|
||||
|
||||
if (_it->base.disabled == disabled) return;
|
||||
if (_it->generation < _it->wd->generation) return;
|
||||
_it->base.disabled = !!disabled;
|
||||
if (_it->realized)
|
||||
{
|
||||
if (elm_widget_item_disabled_get(it))
|
||||
edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
|
||||
if (elm_widget_item_disabled_get(_it))
|
||||
edje_object_signal_emit(VIEW(_it), "elm,state,disabled", "elm");
|
||||
else
|
||||
edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
|
||||
edje_object_signal_emit(VIEW(_it), "elm,state,enabled", "elm");
|
||||
}
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_gengrid_item_disabled_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_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 elm_widget_item_disabled_get(it);
|
||||
Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
|
||||
|
||||
if (_it->generation < _it->wd->generation) return EINA_FALSE;
|
||||
return elm_widget_item_disabled_get(_it);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
@ -2389,10 +2405,10 @@ _elm_gengrid_item_label_del_cb(void *data,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_tooltip_text_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_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_gengrid_item_tooltip_content_cb_set(it, _elm_gengrid_item_label_create,
|
||||
text,
|
||||
|
@ -2400,29 +2416,29 @@ elm_gengrid_item_tooltip_text_set(Elm_Gen_Item *it,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_tooltip_content_cb_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_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);
|
||||
it->tooltip.content_cb = func;
|
||||
it->tooltip.data = data;
|
||||
it->tooltip.del_cb = del_cb;
|
||||
if (VIEW(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;
|
||||
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;
|
||||
|
@ -2432,111 +2448,114 @@ error:
|
|||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_tooltip_unset(Elm_Gen_Item *it)
|
||||
elm_gengrid_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_gengrid_item_tooltip_style_set(it, NULL);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_tooltip_style_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_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);
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
|
||||
eina_stringshare_replace(&((Elm_Gen_Item *) it)->tooltip.style, style);
|
||||
if (VIEW(it)) elm_widget_item_tooltip_style_set(it, style);
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
elm_gengrid_item_tooltip_style_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_item_tooltip_style_get(const Elm_Object_Item *it)
|
||||
{
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
|
||||
return it->tooltip.style;
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
|
||||
return ((Elm_Gen_Item *) it)->tooltip.style;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_gengrid_item_tooltip_window_mode_set(Elm_Gen_Item *it, Eina_Bool disable)
|
||||
elm_gengrid_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;
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
|
||||
((Elm_Gen_Item *) 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_gengrid_item_tooltip_window_mode_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_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;
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
|
||||
return ((Elm_Gen_Item *) it)->tooltip.free_size;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_cursor_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_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);
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
|
||||
eina_stringshare_replace(&((Elm_Gen_Item *) it)->mouse_cursor, cursor);
|
||||
if (VIEW(it)) elm_widget_item_cursor_set(it, cursor);
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
elm_gengrid_item_cursor_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_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_gengrid_item_cursor_unset(Elm_Gen_Item *it)
|
||||
elm_gengrid_item_cursor_unset(Elm_Object_Item *it)
|
||||
{
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
|
||||
if (!it->mouse_cursor)
|
||||
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_gengrid_item_cursor_style_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_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_gengrid_item_cursor_style_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_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_gengrid_item_cursor_engine_only_set(Elm_Gen_Item *it,
|
||||
elm_gengrid_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_gengrid_item_cursor_engine_only_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_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);
|
||||
}
|
||||
|
||||
|
@ -2647,84 +2666,85 @@ elm_gengrid_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenu
|
|||
_elm_genlist_page_bring_in(obj, h_pagenumber, v_pagenumber);
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_first_item_get(const Evas_Object *obj)
|
||||
{
|
||||
return (Elm_Gen_Item *) elm_genlist_first_item_get(obj);
|
||||
return elm_genlist_first_item_get(obj);
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_last_item_get(const Evas_Object *obj)
|
||||
{
|
||||
return (Elm_Gen_Item *) elm_genlist_last_item_get(obj);
|
||||
return elm_genlist_last_item_get(obj);
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
elm_gengrid_item_next_get(const Elm_Gen_Item *it)
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_item_next_get(const Elm_Object_Item *it)
|
||||
{
|
||||
return (Elm_Gen_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it);
|
||||
return elm_genlist_item_next_get(it);
|
||||
}
|
||||
|
||||
EAPI Elm_Gen_Item *
|
||||
elm_gengrid_item_prev_get(const Elm_Gen_Item *it)
|
||||
EAPI Elm_Object_Item *
|
||||
elm_gengrid_item_prev_get(const Elm_Object_Item *it)
|
||||
{
|
||||
return (Elm_Gen_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) it);
|
||||
return elm_genlist_item_prev_get(it);
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
elm_gengrid_item_gengrid_get(const Elm_Gen_Item *it)
|
||||
elm_gengrid_item_gengrid_get(const Elm_Object_Item *it)
|
||||
{
|
||||
return _elm_genlist_item_widget_get(it);
|
||||
return elm_object_item_widget_get(it);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_show(Elm_Gen_Item *it)
|
||||
elm_gengrid_item_show(Elm_Object_Item *it)
|
||||
{
|
||||
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;
|
||||
Evas_Coord minx = 0, miny = 0;
|
||||
|
||||
if (!wd) return;
|
||||
if ((!it) || (it->generation < it->wd->generation)) return;
|
||||
if ((_it->generation < _it->wd->generation)) return;
|
||||
_pan_min_get(wd->pan_smart, &minx, &miny);
|
||||
|
||||
if (wd->horizontal)
|
||||
elm_smart_scroller_region_bring_in(it->wd->scr,
|
||||
((it->x - it->item->prev_group) * wd->item_width) + (it->item->prev_group * it->wd->group_item_width) + minx,
|
||||
it->y * wd->item_height + miny,
|
||||
it->wd->item_width,
|
||||
it->wd->item_height);
|
||||
elm_smart_scroller_region_bring_in(_it->wd->scr,
|
||||
((_it->x - _it->item->prev_group) * wd->item_width) + (_it->item->prev_group * _it->wd->group_item_width) + minx,
|
||||
_it->y * wd->item_height + miny,
|
||||
_it->wd->item_width,
|
||||
_it->wd->item_height);
|
||||
else
|
||||
elm_smart_scroller_region_bring_in(it->wd->scr,
|
||||
it->x * wd->item_width + minx,
|
||||
((it->y - it->item->prev_group)* wd->item_height) + (it->item->prev_group * it->wd->group_item_height) + miny,
|
||||
it->wd->item_width,
|
||||
it->wd->item_height);
|
||||
elm_smart_scroller_region_bring_in(_it->wd->scr,
|
||||
_it->x * wd->item_width + minx,
|
||||
((_it->y - _it->item->prev_group) * wd->item_height) + (_it->item->prev_group * _it->wd->group_item_height) + miny,
|
||||
_it->wd->item_width,
|
||||
_it->wd->item_height);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_gengrid_item_bring_in(Elm_Gen_Item *it)
|
||||
elm_gengrid_item_bring_in(Elm_Object_Item *it)
|
||||
{
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
|
||||
if (it->generation < it->wd->generation) return;
|
||||
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
|
||||
Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
|
||||
|
||||
if (_it->generation < _it->wd->generation) return;
|
||||
|
||||
Evas_Coord minx = 0, miny = 0;
|
||||
Widget_Data *wd = it->wd;
|
||||
if (!wd) return;
|
||||
Widget_Data *wd = _it->wd;
|
||||
_pan_min_get(wd->pan_smart, &minx, &miny);
|
||||
|
||||
if (wd->horizontal)
|
||||
elm_smart_scroller_region_bring_in(it->wd->scr,
|
||||
((it->x - it->item->prev_group) * wd->item_width) + (it->item->prev_group * it->wd->group_item_width) + minx,
|
||||
it->y * wd->item_height + miny,
|
||||
it->wd->item_width,
|
||||
it->wd->item_height);
|
||||
elm_smart_scroller_region_bring_in(_it->wd->scr,
|
||||
((_it->x - _it->item->prev_group) * wd->item_width) + (_it->item->prev_group * _it->wd->group_item_width) + minx,
|
||||
_it->y * wd->item_height + miny,
|
||||
_it->wd->item_width,
|
||||
_it->wd->item_height);
|
||||
else
|
||||
elm_smart_scroller_region_bring_in(it->wd->scr,
|
||||
it->x * wd->item_width + minx,
|
||||
((it->y - it->item->prev_group)* wd->item_height) + (it->item->prev_group * it->wd->group_item_height) + miny,
|
||||
it->wd->item_width,
|
||||
it->wd->item_height);
|
||||
elm_smart_scroller_region_bring_in(_it->wd->scr,
|
||||
_it->x * wd->item_width + minx,
|
||||
((_it->y - _it->item->prev_group)* wd->item_height) + (_it->item->prev_group * _it->wd->group_item_height) + miny,
|
||||
_it->wd->item_width,
|
||||
_it->wd->item_height);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -212,8 +212,6 @@
|
|||
|
||||
typedef struct _Elm_Gengrid_Item_Class Elm_Gengrid_Item_Class; /**< Gengrid item class definition structs */
|
||||
#define Elm_Gengrid_Item_Class Elm_Gen_Item_Class
|
||||
typedef struct _Elm_Gengrid_Item Elm_Gengrid_Item; /**< Gengrid item handles */
|
||||
#define Elm_Gengrid_Item Elm_Gen_Item /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */
|
||||
typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func; /**< Class functions for gengrid item classes. */
|
||||
|
||||
/**
|
||||
|
@ -458,7 +456,7 @@ EAPI Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Objec
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_item_append(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data);
|
||||
EAPI Elm_Object_Item *elm_gengrid_item_append(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data);
|
||||
|
||||
/**
|
||||
* Prepend a new item in a given gengrid widget.
|
||||
|
@ -480,7 +478,7 @@ EAPI Elm_Gengrid_Item *elm_gengrid_item_append(Evas_Object *obj, con
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_item_prepend(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data);
|
||||
EAPI Elm_Object_Item *elm_gengrid_item_prepend(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data);
|
||||
|
||||
/**
|
||||
* Insert an item before another in a gengrid widget
|
||||
|
@ -503,7 +501,7 @@ EAPI Elm_Gengrid_Item *elm_gengrid_item_prepend(Evas_Object *obj, co
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_before(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Gengrid_Item *relative, Evas_Smart_Cb func, const void *func_data);
|
||||
EAPI Elm_Object_Item *elm_gengrid_item_insert_before(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Object_Item *relative, Evas_Smart_Cb func, const void *func_data);
|
||||
|
||||
/**
|
||||
* Insert an item after another in a gengrid widget
|
||||
|
@ -526,7 +524,7 @@ EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_before(Evas_Object *o
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_after(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Gengrid_Item *relative, Evas_Smart_Cb func, const void *func_data);
|
||||
EAPI Elm_Object_Item *elm_gengrid_item_insert_after(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Object_Item *relative, Evas_Smart_Cb func, const void *func_data);
|
||||
|
||||
/**
|
||||
* Insert an item in a gengrid widget using a user-defined sort function.
|
||||
|
@ -534,8 +532,8 @@ EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_after(Evas_Object *ob
|
|||
* @param obj The gengrid object.
|
||||
* @param gic The item class for the item.
|
||||
* @param data The item data.
|
||||
* @param comp User defined comparison function that defines the sort order based on
|
||||
* Elm_Gen_Item and its data param.
|
||||
* @param comp User defined comparison function that defines the sort order
|
||||
* based on Elm_Gen_Item and its data param.
|
||||
* @param func Convenience function called when the item is selected.
|
||||
* @param func_data Data to be passed to @p func.
|
||||
* @return A handle to the item added or @c NULL, on errors.
|
||||
|
@ -550,7 +548,7 @@ EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_after(Evas_Object *ob
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_item_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
|
||||
EAPI Elm_Object_Item *elm_gengrid_item_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
|
||||
|
||||
/**
|
||||
* Insert an item in a gengrid widget using a user-defined sort function.
|
||||
|
@ -558,8 +556,8 @@ EAPI Elm_Gengrid_Item *elm_gengrid_item_sorted_insert(Evas_Object *o
|
|||
* @param obj The gengrid object.
|
||||
* @param gic The item class for the item.
|
||||
* @param data The item data.
|
||||
* @param comp User defined comparison function that defines the sort order based on
|
||||
* Elm_Gen_Item.
|
||||
* @param comp User defined comparison function that defines the sort order
|
||||
* based on Elm_Gen_Item.
|
||||
* @param func Convenience function called when the item is selected.
|
||||
* @param func_data Data to be passed to @p func.
|
||||
* @return A handle to the item added or @c NULL, on errors.
|
||||
|
@ -574,7 +572,7 @@ EAPI Elm_Gengrid_Item *elm_gengrid_item_sorted_insert(Evas_Object *o
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_item_direct_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
|
||||
EAPI Elm_Object_Item *elm_gengrid_item_direct_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
|
||||
|
||||
/**
|
||||
* Set whether items on a given gengrid widget are to get their
|
||||
|
@ -929,7 +927,7 @@ EAPI Eina_Bool elm_gengrid_horizontal_get(const Evas_Object
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_first_item_get(const Evas_Object *obj);
|
||||
EAPI Elm_Object_Item *elm_gengrid_first_item_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* Get the last item in a given gengrid widget
|
||||
|
@ -945,13 +943,13 @@ EAPI Elm_Gengrid_Item *elm_gengrid_first_item_get(const Evas_Object
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_last_item_get(const Evas_Object *obj);
|
||||
EAPI Elm_Object_Item *elm_gengrid_last_item_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* Get the @b next item in a gengrid widget's internal list of items,
|
||||
* given a handle to one of those items.
|
||||
*
|
||||
* @param item The gengrid item to fetch next from
|
||||
* @param it The gengrid item to fetch next from
|
||||
* @return The item after @p item, or @c NULL if there's none (and
|
||||
* on errors)
|
||||
*
|
||||
|
@ -962,13 +960,13 @@ EAPI Elm_Gengrid_Item *elm_gengrid_last_item_get(const Evas_Object *
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_item_next_get(const Elm_Gengrid_Item *item);
|
||||
EAPI Elm_Object_Item *elm_gengrid_item_next_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Get the @b previous item in a gengrid widget's internal list of items,
|
||||
* given a handle to one of those items.
|
||||
*
|
||||
* @param item The gengrid item to fetch previous from
|
||||
* @param it The gengrid item to fetch previous from
|
||||
* @return The item before @p item, or @c NULL if there's none (and
|
||||
* on errors)
|
||||
*
|
||||
|
@ -979,25 +977,24 @@ EAPI Elm_Gengrid_Item *elm_gengrid_item_next_get(const Elm_Gengrid_I
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_item_prev_get(const Elm_Gengrid_Item *item);
|
||||
EAPI Elm_Object_Item *elm_gengrid_item_prev_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Get the gengrid object's handle which contains a given gengrid
|
||||
* item
|
||||
* Get the gengrid object's handle which contains a given gengrid item
|
||||
*
|
||||
* @param item The item to fetch the container from
|
||||
* @param it The item to fetch the container from
|
||||
* @return The gengrid (parent) object
|
||||
*
|
||||
* This returns the gengrid object itself that an item belongs to.
|
||||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Evas_Object *elm_gengrid_item_gengrid_get(const Elm_Gengrid_Item *item);
|
||||
EAPI Evas_Object *elm_gengrid_item_gengrid_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Remove a gengrid item from 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_gengrid_clear(), to remove all items in a gengrid at
|
||||
|
@ -1005,12 +1002,12 @@ EAPI Evas_Object *elm_gengrid_item_gengrid_get(const Elm_Gengri
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_del(Elm_Gengrid_Item *item);
|
||||
EAPI void elm_gengrid_item_del(Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Update the contents of a given gengrid item
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
*
|
||||
* This updates an item by calling all the item class functions
|
||||
* again to get the contents, texts and states. Use this when the
|
||||
|
@ -1019,19 +1016,19 @@ EAPI void elm_gengrid_item_del(Elm_Gengrid_Item *item);
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_update(Elm_Gengrid_Item *item);
|
||||
EAPI void elm_gengrid_item_update(Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Get the Gengrid Item class for the given Gengrid Item.
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
*
|
||||
* This returns the Gengrid_Item_Class for the given item. It can be used to examine
|
||||
* the function pointers and item_style.
|
||||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Gengrid_Item *item);
|
||||
EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Get the Gengrid Item class for the given Gengrid Item.
|
||||
|
@ -1039,17 +1036,17 @@ EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Gen
|
|||
* This sets the Gengrid_Item_Class for the given item. It can be used to examine
|
||||
* the function pointers and item_style.
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
* @param gic The gengrid item class describing the function pointers and the item style.
|
||||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_item_class_set(Elm_Gengrid_Item *item, const Elm_Gengrid_Item_Class *gic);
|
||||
EAPI void elm_gengrid_item_item_class_set(Elm_Object_Item *it, const Elm_Gengrid_Item_Class *gic);
|
||||
|
||||
/**
|
||||
* Return the data associated to a given gengrid item
|
||||
*
|
||||
* @param item The gengrid item.
|
||||
* @param it The gengrid item.
|
||||
* @return the data associated with this item.
|
||||
*
|
||||
* This returns the @c data value passed on the
|
||||
|
@ -1060,12 +1057,12 @@ EAPI void elm_gengrid_item_item_class_set(Elm_Gengrid_I
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void *elm_gengrid_item_data_get(const Elm_Gengrid_Item *item);
|
||||
EAPI void *elm_gengrid_item_data_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Set the data associated with a given gengrid item
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
* @param data The data pointer to set on it
|
||||
*
|
||||
* This @b overrides the @c data value passed on the
|
||||
|
@ -1079,13 +1076,13 @@ EAPI void *elm_gengrid_item_data_get(const Elm_Gengrid_I
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_data_set(Elm_Gengrid_Item *item, const void *data);
|
||||
EAPI void elm_gengrid_item_data_set(Elm_Object_Item *it, const void *data);
|
||||
|
||||
/**
|
||||
* Get a given gengrid item's position, relative to the whole
|
||||
* gengrid's grid area.
|
||||
*
|
||||
* @param item The Gengrid item.
|
||||
* @param it The Gengrid item.
|
||||
* @param x Pointer to variable to store the item's <b>row number</b>.
|
||||
* @param y Pointer to variable to store the item's <b>column number</b>.
|
||||
*
|
||||
|
@ -1095,12 +1092,12 @@ EAPI void elm_gengrid_item_data_set(Elm_Gengrid_Item *i
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_pos_get(const Elm_Gengrid_Item *item, unsigned int *x, unsigned int *y);
|
||||
EAPI void elm_gengrid_item_pos_get(const Elm_Object_Item *it, unsigned int *x, unsigned int *y);
|
||||
|
||||
/**
|
||||
* Set whether a given gengrid item is selected or not
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
* @param selected Use @c EINA_TRUE, to make it selected, @c
|
||||
* EINA_FALSE to make it unselected
|
||||
*
|
||||
|
@ -1113,12 +1110,12 @@ EAPI void elm_gengrid_item_pos_get(const Elm_Gengrid_It
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_selected_set(Elm_Gengrid_Item *item, Eina_Bool selected);
|
||||
EAPI void elm_gengrid_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
|
||||
|
||||
/**
|
||||
* Get whether a given gengrid item is selected or not
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
* @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise
|
||||
*
|
||||
* This API returns EINA_TRUE for all the items selected in multi-select mode as well.
|
||||
|
@ -1127,13 +1124,13 @@ EAPI void elm_gengrid_item_selected_set(Elm_Gengrid_Ite
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Gengrid_Item *item);
|
||||
EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Get the real Evas object created to implement the view of a
|
||||
* given gengrid item
|
||||
*
|
||||
* @param item The gengrid item.
|
||||
* @param it The gengrid item.
|
||||
* @return the Evas object implementing this item's view.
|
||||
*
|
||||
* This returns the actual Evas object used to implement the
|
||||
|
@ -1149,13 +1146,13 @@ EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Gengr
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI const Evas_Object *elm_gengrid_item_object_get(const Elm_Gengrid_Item *item);
|
||||
EAPI const Evas_Object *elm_gengrid_item_object_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Show the portion of a gengrid's internal grid containing a given
|
||||
* item, @b immediately.
|
||||
*
|
||||
* @param item The item to display
|
||||
* @param it The item to display
|
||||
*
|
||||
* This causes gengrid to @b redraw its viewport's contents to the
|
||||
* region contining the given @p item item, if it is not fully
|
||||
|
@ -1165,13 +1162,13 @@ EAPI const Evas_Object *elm_gengrid_item_object_get(const Elm_Gengrid
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_show(Elm_Gengrid_Item *item);
|
||||
EAPI void elm_gengrid_item_show(Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Animatedly bring in, to the visible area of a gengrid, a given
|
||||
* item on it.
|
||||
*
|
||||
* @param item The gengrid item to display
|
||||
* @param it The gengrid item to display
|
||||
*
|
||||
* This causes gengrid to jump to the given @p item and show
|
||||
* it (by scrolling), if it is not fully visible. This will use
|
||||
|
@ -1181,12 +1178,12 @@ EAPI void elm_gengrid_item_show(Elm_Gengrid_Item *item)
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_bring_in(Elm_Gengrid_Item *item);
|
||||
EAPI void elm_gengrid_item_bring_in(Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Set whether a given gengrid item is disabled or not.
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
* @param disabled Use @c EINA_TRUE, true disable it, @c EINA_FALSE
|
||||
* to enable it back.
|
||||
*
|
||||
|
@ -1197,12 +1194,12 @@ EAPI void elm_gengrid_item_bring_in(Elm_Gengrid_Item *i
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_disabled_set(Elm_Gengrid_Item *item, Eina_Bool disabled);
|
||||
EAPI void elm_gengrid_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
|
||||
|
||||
/**
|
||||
* Get whether a given gengrid item is disabled or not.
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
* @return @c EINA_TRUE, if it's disabled, @c EINA_FALSE otherwise
|
||||
* (and on errors).
|
||||
*
|
||||
|
@ -1210,12 +1207,12 @@ EAPI void elm_gengrid_item_disabled_set(Elm_Gengrid_Ite
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Eina_Bool elm_gengrid_item_disabled_get(const Elm_Gengrid_Item *item);
|
||||
EAPI Eina_Bool elm_gengrid_item_disabled_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Set the text to be shown in a given gengrid item's tooltips.
|
||||
*
|
||||
* @param item The gengrid item
|
||||
* @param it The gengrid item
|
||||
* @param text The text to set in the content
|
||||
*
|
||||
* This call will setup the text to be used as tooltip to that item
|
||||
|
@ -1226,12 +1223,12 @@ EAPI Eina_Bool elm_gengrid_item_disabled_get(const Elm_Gengr
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_tooltip_text_set(Elm_Gengrid_Item *item, const char *text);
|
||||
EAPI void elm_gengrid_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
|
||||
|
||||
/**
|
||||
* Set the content to be shown in a given gengrid item's tooltip
|
||||
*
|
||||
* @param item The gengrid item.
|
||||
* @param it The gengrid 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
|
||||
|
@ -1251,12 +1248,12 @@ EAPI void elm_gengrid_item_tooltip_text_set(Elm_Gengrid
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_tooltip_content_cb_set(Elm_Gengrid_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
|
||||
EAPI void elm_gengrid_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 gengrid item
|
||||
*
|
||||
* @param item gengrid item to remove a previously set tooltip from.
|
||||
* @param it gengrid 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
|
||||
|
@ -1268,12 +1265,12 @@ EAPI void elm_gengrid_item_tooltip_content_cb_set(Elm_G
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_tooltip_unset(Elm_Gengrid_Item *item);
|
||||
EAPI void elm_gengrid_item_tooltip_unset(Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Set a different @b style for a given gengrid item's tooltip.
|
||||
*
|
||||
* @param item gengrid item with tooltip set
|
||||
* @param it gengrid item with tooltip set
|
||||
* @param style the <b>theme style</b> to use on tooltips (e.g. @c
|
||||
* "default", @c "transparent", etc)
|
||||
*
|
||||
|
@ -1291,12 +1288,12 @@ EAPI void elm_gengrid_item_tooltip_unset(Elm_Gengrid_It
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_tooltip_style_set(Elm_Gengrid_Item *item, const char *style);
|
||||
EAPI void elm_gengrid_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
|
||||
|
||||
/**
|
||||
* Get the style set a given gengrid item's tooltip.
|
||||
*
|
||||
* @param item gengrid item with tooltip already set on.
|
||||
* @param it gengrid 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.
|
||||
|
@ -1305,35 +1302,35 @@ EAPI void elm_gengrid_item_tooltip_style_set(Elm_Gengri
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI const char *elm_gengrid_item_tooltip_style_get(const Elm_Gengrid_Item *item);
|
||||
EAPI const char *elm_gengrid_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_gengrid_item_tooltip_window_mode_set(Elm_Gengrid_Item *item, Eina_Bool disable);
|
||||
EAPI Eina_Bool elm_gengrid_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_gengrid_item_tooltip_window_mode_get(const Elm_Gengrid_Item *item);
|
||||
EAPI Eina_Bool elm_gengrid_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 gengrid widget item
|
||||
*
|
||||
* @param item gengrid item to customize cursor on
|
||||
* @param it gengrid item to customize cursor on
|
||||
* @param cursor the cursor type's name
|
||||
*
|
||||
* This function works analogously as elm_object_cursor_set(), but
|
||||
|
@ -1351,13 +1348,13 @@ EAPI Eina_Bool elm_gengrid_item_tooltip_window_mode_get(cons
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_cursor_set(Elm_Gengrid_Item *item, const char *cursor);
|
||||
EAPI void elm_gengrid_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 gengrid widget item
|
||||
*
|
||||
* @param item gengrid item with custom cursor set
|
||||
* @param it gengrid 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)
|
||||
*
|
||||
|
@ -1367,14 +1364,14 @@ EAPI void elm_gengrid_item_cursor_set(Elm_Gengrid_Item
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI const char *elm_gengrid_item_cursor_get(const Elm_Gengrid_Item *item);
|
||||
EAPI const char *elm_gengrid_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 gengrid widget
|
||||
* item, thus making it show the @b default cursor again.
|
||||
*
|
||||
* @param item a gengrid item
|
||||
* @param it a gengrid item
|
||||
*
|
||||
* Use this call to undo any custom settings on this item's cursor
|
||||
* decoration, bringing it back to defaults (no custom style set).
|
||||
|
@ -1384,13 +1381,13 @@ EAPI const char *elm_gengrid_item_cursor_get(const Elm_Gengrid
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_cursor_unset(Elm_Gengrid_Item *item);
|
||||
EAPI void elm_gengrid_item_cursor_unset(Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Set a different @b style for a given custom cursor set for a
|
||||
* gengrid item.
|
||||
*
|
||||
* @param item gengrid item with custom cursor set
|
||||
* @param it gengrid item with custom cursor set
|
||||
* @param style the <b>theme style</b> to use (e.g. @c "default",
|
||||
* @c "transparent", etc)
|
||||
*
|
||||
|
@ -1409,13 +1406,13 @@ EAPI void elm_gengrid_item_cursor_unset(Elm_Gengrid_Ite
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_cursor_style_set(Elm_Gengrid_Item *item, const char *style);
|
||||
EAPI void elm_gengrid_item_cursor_style_set(Elm_Object_Item *it, const char *style);
|
||||
|
||||
/**
|
||||
* Get the current @b style set for a given gengrid item's custom
|
||||
* cursor
|
||||
*
|
||||
* @param item gengrid item with custom cursor set.
|
||||
* @param it gengrid 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.
|
||||
*
|
||||
|
@ -1423,14 +1420,14 @@ EAPI void elm_gengrid_item_cursor_style_set(Elm_Gengrid
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI const char *elm_gengrid_item_cursor_style_get(const Elm_Gengrid_Item *item);
|
||||
EAPI const char *elm_gengrid_item_cursor_style_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Set if the (custom) cursor for a given gengrid 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.
|
||||
|
@ -1443,14 +1440,14 @@ EAPI const char *elm_gengrid_item_cursor_style_get(const Elm_G
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI void elm_gengrid_item_cursor_engine_only_set(Elm_Gengrid_Item *item, Eina_Bool engine_only);
|
||||
EAPI void elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
|
||||
|
||||
/**
|
||||
* Get if the (custom) cursor for a given gengrid item is being
|
||||
* searched in its theme, also, or is only relying on the rendering
|
||||
* engine.
|
||||
*
|
||||
* @param item a gengrid item
|
||||
* @param it a gengrid 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.
|
||||
|
@ -1459,7 +1456,7 @@ EAPI void elm_gengrid_item_cursor_engine_only_set(Elm_G
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Eina_Bool elm_gengrid_item_cursor_engine_only_get(const Elm_Gengrid_Item *item);
|
||||
EAPI Eina_Bool elm_gengrid_item_cursor_engine_only_get(const Elm_Object_Item *it);
|
||||
|
||||
/**
|
||||
* Remove all items from a given gengrid widget
|
||||
|
@ -1489,7 +1486,7 @@ EAPI void elm_gengrid_clear(Evas_Object *obj);
|
|||
*
|
||||
* @ingroup Gengrid
|
||||
*/
|
||||
EAPI Elm_Gengrid_Item *elm_gengrid_selected_item_get(const Evas_Object *obj);
|
||||
EAPI Elm_Object_Item *elm_gengrid_selected_item_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* Get <b>a list</b> of selected items in a given gengrid
|
||||
|
@ -1501,7 +1498,7 @@ EAPI Elm_Gengrid_Item *elm_gengrid_selected_item_get(const Evas_Obje
|
|||
* This returns a list of the selected items, in the order that
|
||||
* they appear in the grid. This list is only valid as long as no
|
||||
* more items are selected or unselected (or unselected implictly
|
||||
* by deletion). The list contains #Elm_Gengrid_Item pointers as
|
||||
* by deletion). The list contains #Gengrid item pointers as
|
||||
* data, naturally.
|
||||
*
|
||||
* @see elm_gengrid_selected_item_get()
|
||||
|
|
|
@ -5412,13 +5412,6 @@ _elm_genlist_page_bring_in(const Evas_Object *obj,
|
|||
elm_smart_scroller_page_bring_in(wd->scr, h_pagenumber, v_pagenumber);
|
||||
}
|
||||
|
||||
Evas_Object *
|
||||
_elm_genlist_item_widget_get(const Elm_Gen_Item *it)
|
||||
{
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
|
||||
return WIDGET(it);
|
||||
}
|
||||
|
||||
void
|
||||
_elm_genlist_item_unrealize(Elm_Gen_Item *it,
|
||||
Eina_Bool calc)
|
||||
|
|
Loading…
Reference in New Issue