forked from enlightenment/efl
elm gen/gengrid/genlist: Moved more gen stuffs to genlist. Most of all gen stuffs were moved to genlist as of now. This is for elementary 1.0 release.
SVN revision: 65722
This commit is contained in:
parent
0cabbec4e1
commit
35fc57e252
|
@ -37,306 +37,6 @@ struct _Widget_Data
|
|||
Ecore_Cb clear_cb;
|
||||
};
|
||||
|
||||
static const char SIG_ACTIVATED[] = "activated";
|
||||
static const char SIG_CLICKED_DOUBLE[] = "clicked,double";
|
||||
static const char SIG_SELECTED[] = "selected";
|
||||
static const char SIG_UNSELECTED[] = "unselected";
|
||||
static const char SIG_EXPANDED[] = "expanded";
|
||||
static const char SIG_CONTRACTED[] = "contracted";
|
||||
static const char SIG_EXPAND_REQUEST[] = "expand,request";
|
||||
static const char SIG_CONTRACT_REQUEST[] = "contract,request";
|
||||
static const char SIG_REALIZED[] = "realized";
|
||||
static const char SIG_UNREALIZED[] = "unrealized";
|
||||
static const char SIG_DRAG_START_UP[] = "drag,start,up";
|
||||
static const char SIG_DRAG_START_DOWN[] = "drag,start,down";
|
||||
static const char SIG_DRAG_START_LEFT[] = "drag,start,left";
|
||||
static const char SIG_DRAG_START_RIGHT[] = "drag,start,right";
|
||||
static const char SIG_DRAG_STOP[] = "drag,stop";
|
||||
static const char SIG_DRAG[] = "drag";
|
||||
static const char SIG_LONGPRESSED[] = "longpressed";
|
||||
static const char SIG_SCROLL_ANIM_START[] = "scroll,anim,start";
|
||||
static const char SIG_SCROLL_ANIM_STOP[] = "scroll,anim,stop";
|
||||
static const char SIG_SCROLL_DRAG_START[] = "scroll,drag,start";
|
||||
static const char SIG_SCROLL_DRAG_STOP[] = "scroll,drag,stop";
|
||||
static const char SIG_SCROLL_EDGE_TOP[] = "scroll,edge,top"; // TODO : remove this
|
||||
static const char SIG_SCROLL_EDGE_BOTTOM[] = "scroll,edge,bottom"; // TODO : remove this
|
||||
static const char SIG_SCROLL_EDGE_LEFT[] = "scroll,edge,left"; // TODO : remove this
|
||||
static const char SIG_SCROLL_EDGE_RIGHT[] = "scroll,edge,right"; // TODO : remove this
|
||||
static const char SIG_EDGE_TOP[] = "edge,top";
|
||||
static const char SIG_EDGE_BOTTOM[] = "edge,bottom";
|
||||
static const char SIG_EDGE_LEFT[] = "edge,left";
|
||||
static const char SIG_EDGE_RIGHT[] = "edge,right";
|
||||
static const char SIG_MULTI_SWIPE_LEFT[] = "multi,swipe,left";
|
||||
static const char SIG_MULTI_SWIPE_RIGHT[] = "multi,swipe,right";
|
||||
static const char SIG_MULTI_SWIPE_UP[] = "multi,swipe,up";
|
||||
static const char SIG_MULTI_SWIPE_DOWN[] = "multi,swipe,down";
|
||||
static const char SIG_MULTI_PINCH_OUT[] = "multi,pinch,out";
|
||||
static const char SIG_MULTI_PINCH_IN[] = "multi,pinch,in";
|
||||
static const char SIG_SWIPE[] = "swipe";
|
||||
static const char SIG_MOVED[] = "moved";
|
||||
|
||||
#if 0
|
||||
static Eina_Bool
|
||||
_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);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_item_multi_select_left(Widget_Data *wd)
|
||||
{
|
||||
if (!wd->selected) return EINA_FALSE;
|
||||
|
||||
Elm_Gengrid_Item *prev = elm_gengrid_item_prev_get(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);
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_gengrid_item_selected_set(prev, EINA_TRUE);
|
||||
elm_gengrid_item_show(prev);
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_item_multi_select_right(Widget_Data *wd)
|
||||
{
|
||||
if (!wd->selected) return EINA_FALSE;
|
||||
|
||||
Elm_Gengrid_Item *next = elm_gengrid_item_next_get(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);
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_gengrid_item_selected_set(next, EINA_TRUE);
|
||||
elm_gengrid_item_show(next);
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_item_multi_select_up(Widget_Data *wd)
|
||||
{
|
||||
unsigned int i;
|
||||
Eina_Bool r = EINA_TRUE;
|
||||
|
||||
if (!wd->selected) return EINA_FALSE;
|
||||
|
||||
for (i = 0; (r) && (i < wd->nmax); i++)
|
||||
r &= _item_multi_select_left(wd);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_item_multi_select_down(Widget_Data *wd)
|
||||
{
|
||||
unsigned int i;
|
||||
Eina_Bool r = EINA_TRUE;
|
||||
|
||||
if (!wd->selected) return EINA_FALSE;
|
||||
|
||||
for (i = 0; (r) && (i < wd->nmax); i++)
|
||||
r &= _item_multi_select_right(wd);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_item_single_select_up(Widget_Data *wd)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
Elm_Gengrid_Item *prev;
|
||||
|
||||
if (!wd->selected)
|
||||
{
|
||||
prev = ELM_GENGRID_ITEM_FROM_INLIST(wd->items->last);
|
||||
while ((prev) && (prev->delete_me))
|
||||
prev = ELM_GENGRID_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
|
||||
elm_gengrid_item_selected_set(prev, EINA_TRUE);
|
||||
elm_gengrid_item_show(prev);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else prev = elm_gengrid_item_prev_get(wd->last_selected_item);
|
||||
|
||||
if (!prev) return EINA_FALSE;
|
||||
|
||||
for (i = 1; i < wd->nmax; i++)
|
||||
{
|
||||
Elm_Gengrid_Item *tmp = elm_gengrid_item_prev_get(prev);
|
||||
if (!tmp) return EINA_FALSE;
|
||||
prev = tmp;
|
||||
}
|
||||
|
||||
_deselect_all_items(wd);
|
||||
|
||||
elm_gengrid_item_selected_set(prev, EINA_TRUE);
|
||||
elm_gengrid_item_show(prev);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_item_single_select_down(Widget_Data *wd)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
Elm_Gengrid_Item *next;
|
||||
|
||||
if (!wd->selected)
|
||||
{
|
||||
next = ELM_GENGRID_ITEM_FROM_INLIST(wd->items);
|
||||
while ((next) && (next->delete_me))
|
||||
next = ELM_GENGRID_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
|
||||
elm_gengrid_item_selected_set(next, EINA_TRUE);
|
||||
elm_gengrid_item_show(next);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else next = elm_gengrid_item_next_get(wd->last_selected_item);
|
||||
|
||||
if (!next) return EINA_FALSE;
|
||||
|
||||
for (i = 1; i < wd->nmax; i++)
|
||||
{
|
||||
Elm_Gengrid_Item *tmp = elm_gengrid_item_next_get(next);
|
||||
if (!tmp) return EINA_FALSE;
|
||||
next = tmp;
|
||||
}
|
||||
|
||||
_deselect_all_items(wd);
|
||||
|
||||
elm_gengrid_item_selected_set(next, EINA_TRUE);
|
||||
elm_gengrid_item_show(next);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_item_single_select_left(Widget_Data *wd)
|
||||
{
|
||||
Elm_Gengrid_Item *prev;
|
||||
if (!wd->selected)
|
||||
{
|
||||
prev = ELM_GENGRID_ITEM_FROM_INLIST(wd->items->last);
|
||||
while ((prev) && (prev->delete_me))
|
||||
prev = ELM_GENGRID_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
|
||||
}
|
||||
else prev = elm_gengrid_item_prev_get(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);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_item_single_select_right(Widget_Data *wd)
|
||||
{
|
||||
Elm_Gengrid_Item *next;
|
||||
if (!wd->selected)
|
||||
{
|
||||
next = ELM_GENGRID_ITEM_FROM_INLIST(wd->items);
|
||||
while ((next) && (next->delete_me))
|
||||
next = ELM_GENGRID_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
|
||||
}
|
||||
else next = elm_gengrid_item_next_get(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);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
void
|
||||
elm_gen_item_unrealize(Elm_Gen_Item *it,
|
||||
Eina_Bool calc)
|
||||
{
|
||||
Evas_Object *content;
|
||||
|
||||
if (!it->realized) return;
|
||||
if (it->wd->reorder_it == it) return;
|
||||
evas_event_freeze(evas_object_evas_get(WIDGET(it)));
|
||||
if (!calc)
|
||||
evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, it);
|
||||
if (it->long_timer)
|
||||
{
|
||||
ecore_timer_del(it->long_timer);
|
||||
it->long_timer = NULL;
|
||||
}
|
||||
|
||||
elm_widget_stringlist_free(it->labels);
|
||||
it->labels = NULL;
|
||||
elm_widget_stringlist_free(it->contents);
|
||||
it->contents = NULL;
|
||||
elm_widget_stringlist_free(it->states);
|
||||
it->states = NULL;
|
||||
|
||||
EINA_LIST_FREE(it->content_objs, content)
|
||||
evas_object_del(content);
|
||||
|
||||
it->unrealize_cb(it);
|
||||
|
||||
it->realized = EINA_FALSE;
|
||||
it->want_unrealize = EINA_FALSE;
|
||||
evas_event_thaw(evas_object_evas_get(WIDGET(it)));
|
||||
evas_event_thaw_eval(evas_object_evas_get(WIDGET(it)));
|
||||
}
|
||||
|
||||
void
|
||||
elm_gen_item_del_notserious(Elm_Gen_Item *it)
|
||||
{
|
||||
elm_widget_item_pre_notify_del(it);
|
||||
it->delete_me = EINA_TRUE;
|
||||
if (it->selected) it->wd->selected = eina_list_remove(it->wd->selected, it);
|
||||
|
||||
if (it->itc->func.del)
|
||||
it->itc->func.del((void *)it->base.data, WIDGET(it));
|
||||
}
|
||||
|
||||
void
|
||||
elm_gen_item_del_serious(Elm_Gen_Item *it)
|
||||
{
|
||||
elm_gen_item_del_notserious(it);
|
||||
it->wd->items = eina_inlist_remove(it->wd->items, EINA_INLIST_GET(it));
|
||||
if (it->tooltip.del_cb)
|
||||
it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
|
||||
it->wd->walking -= it->walking;
|
||||
if (it->long_timer) ecore_timer_del(it->long_timer);
|
||||
if (it->group)
|
||||
it->wd->group_items = eina_list_remove(it->wd->group_items, it);
|
||||
|
||||
if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
|
||||
it->wd->calc_job = ecore_job_add(it->wd->calc_cb, it->wd);
|
||||
free(it->item);
|
||||
it->item = NULL;
|
||||
elm_widget_item_del(it);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
EAPI void
|
||||
elm_gen_clear(Evas_Object *obj)
|
||||
{
|
||||
|
|
|
@ -65,12 +65,3 @@ struct Elm_Gen_Item
|
|||
Eina_Bool reorder : 1;
|
||||
Eina_Bool mode_set : 1; /* item uses style mode for highlight/select */
|
||||
};
|
||||
|
||||
void
|
||||
elm_gen_item_unrealize(Elm_Gen_Item *it,
|
||||
Eina_Bool calc);
|
||||
void
|
||||
elm_gen_item_del_serious(Elm_Gen_Item *it);
|
||||
|
||||
void
|
||||
elm_gen_item_del_notserious(Elm_Gen_Item *it);
|
||||
|
|
|
@ -866,7 +866,7 @@ _mouse_up(void *data,
|
|||
if (dragged)
|
||||
{
|
||||
if (it->want_unrealize)
|
||||
elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
_elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
}
|
||||
if ((it->disabled) || (dragged)) return;
|
||||
if (it->wd->multi)
|
||||
|
@ -1147,7 +1147,7 @@ _group_item_place(Pan *sd)
|
|||
evas_object_raise(VIEW(it));
|
||||
}
|
||||
else
|
||||
elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
_elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1411,7 +1411,7 @@ _item_place(Elm_Gen_Item *it,
|
|||
else
|
||||
{
|
||||
if (!it->group)
|
||||
elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
_elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
else
|
||||
it->item->group_realized = EINA_FALSE;
|
||||
}
|
||||
|
@ -1424,9 +1424,9 @@ _item_del(Elm_Gen_Item *it)
|
|||
|
||||
evas_event_freeze(evas_object_evas_get(obj));
|
||||
it->wd->selected = eina_list_remove(it->wd->selected, it);
|
||||
if (it->realized) elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
it->wd->count--;
|
||||
elm_gen_item_del_serious(it);
|
||||
_elm_genlist_item_del_serious(it);
|
||||
evas_event_thaw(evas_object_evas_get(obj));
|
||||
evas_event_thaw_eval(evas_object_evas_get(obj));
|
||||
}
|
||||
|
@ -2178,7 +2178,7 @@ elm_gengrid_item_del(Elm_Gen_Item *it)
|
|||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
|
||||
if ((it->relcount > 0) || (it->walking > 0))
|
||||
{
|
||||
elm_gen_item_del_notserious(it);
|
||||
_elm_genlist_item_del_notserious(it);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2228,7 +2228,7 @@ elm_gengrid_item_update(Elm_Gen_Item *it)
|
|||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
|
||||
if (!it->realized) return;
|
||||
if (it->want_unrealize) return;
|
||||
elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
_elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
_item_realize(it);
|
||||
_item_place(it, it->x, it->y);
|
||||
}
|
||||
|
|
|
@ -818,7 +818,7 @@ _item_del(Elm_Gen_Item *it)
|
|||
evas_event_freeze(evas_object_evas_get(obj));
|
||||
elm_genlist_item_subitems_clear(it);
|
||||
if (it->wd->show_item == it) it->wd->show_item = NULL;
|
||||
if (it->realized) elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
if (it->item->block) _item_block_del(it);
|
||||
if (it->item->queued)
|
||||
it->wd->queue = eina_list_remove(it->wd->queue, it);
|
||||
|
@ -831,7 +831,7 @@ _item_del(Elm_Gen_Item *it)
|
|||
if (it->parent)
|
||||
it->parent->item->items = eina_list_remove(it->parent->item->items, it);
|
||||
if (it->item->swipe_timer) ecore_timer_del(it->item->swipe_timer);
|
||||
elm_gen_item_del_serious(it);
|
||||
_elm_genlist_item_del_serious(it);
|
||||
evas_event_thaw(evas_object_evas_get(obj));
|
||||
evas_event_thaw_eval(evas_object_evas_get(obj));
|
||||
}
|
||||
|
@ -1368,7 +1368,7 @@ _mouse_up(void *data,
|
|||
{
|
||||
if (it->want_unrealize)
|
||||
{
|
||||
elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
_elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
if (it->item->block->want_unrealize)
|
||||
_item_block_unrealize(it->item->block);
|
||||
}
|
||||
|
@ -2079,13 +2079,13 @@ _item_block_recalc(Item_Block *itb,
|
|||
if (changed)
|
||||
{
|
||||
_item_realize(it, in, EINA_TRUE);
|
||||
elm_gen_item_unrealize(it, EINA_TRUE);
|
||||
_elm_genlist_item_unrealize(it, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_item_realize(it, in, EINA_TRUE);
|
||||
elm_gen_item_unrealize(it, EINA_TRUE);
|
||||
_elm_genlist_item_unrealize(it, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2132,7 +2132,7 @@ _item_block_unrealize(Item_Block *itb)
|
|||
it->want_unrealize = EINA_TRUE;
|
||||
}
|
||||
else
|
||||
elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
_elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
if (!dragging)
|
||||
|
@ -2314,7 +2314,7 @@ _item_block_position(Item_Block *itb,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!it->dragging) elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
if (!it->dragging) _elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
in++;
|
||||
|
@ -2351,7 +2351,7 @@ _group_items_recalc(void *data)
|
|||
else if (!git->item->want_realize && git->realized)
|
||||
{
|
||||
if (!git->dragging)
|
||||
elm_gen_item_unrealize(git, EINA_FALSE);
|
||||
_elm_genlist_item_unrealize(git, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
evas_event_thaw(evas_object_evas_get(wd->obj));
|
||||
|
@ -2530,14 +2530,14 @@ _update_job(void *data)
|
|||
it->item->updateme = EINA_FALSE;
|
||||
if (it->realized)
|
||||
{
|
||||
elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
_elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
_item_realize(it, num, EINA_FALSE);
|
||||
position = EINA_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
_item_realize(it, num, EINA_TRUE);
|
||||
elm_gen_item_unrealize(it, EINA_TRUE);
|
||||
_elm_genlist_item_unrealize(it, EINA_TRUE);
|
||||
}
|
||||
if ((it->item->minw != itminw) || (it->item->minh != itminh))
|
||||
recalc = EINA_TRUE;
|
||||
|
@ -4390,10 +4390,10 @@ elm_genlist_item_del(Elm_Gen_Item *it)
|
|||
{
|
||||
elm_genlist_item_subitems_clear(it);
|
||||
if (it->wd->show_item == it) it->wd->show_item = NULL;
|
||||
elm_gen_item_del_notserious(it);
|
||||
_elm_genlist_item_del_notserious(it);
|
||||
if (it->item->block)
|
||||
{
|
||||
if (it->realized) elm_gen_item_unrealize(it, EINA_FALSE);
|
||||
if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE);
|
||||
it->item->block->changed = EINA_TRUE;
|
||||
if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
|
||||
it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
|
||||
|
@ -5127,3 +5127,68 @@ _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)
|
||||
{
|
||||
Evas_Object *content;
|
||||
|
||||
if (!it->realized) return;
|
||||
if (it->wd->reorder_it == it) return;
|
||||
evas_event_freeze(evas_object_evas_get(WIDGET(it)));
|
||||
if (!calc)
|
||||
evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, it);
|
||||
if (it->long_timer)
|
||||
{
|
||||
ecore_timer_del(it->long_timer);
|
||||
it->long_timer = NULL;
|
||||
}
|
||||
|
||||
elm_widget_stringlist_free(it->labels);
|
||||
it->labels = NULL;
|
||||
elm_widget_stringlist_free(it->contents);
|
||||
it->contents = NULL;
|
||||
elm_widget_stringlist_free(it->states);
|
||||
it->states = NULL;
|
||||
|
||||
EINA_LIST_FREE(it->content_objs, content)
|
||||
evas_object_del(content);
|
||||
|
||||
it->unrealize_cb(it);
|
||||
|
||||
it->realized = EINA_FALSE;
|
||||
it->want_unrealize = EINA_FALSE;
|
||||
evas_event_thaw(evas_object_evas_get(WIDGET(it)));
|
||||
evas_event_thaw_eval(evas_object_evas_get(WIDGET(it)));
|
||||
}
|
||||
|
||||
void
|
||||
_elm_genlist_item_del_notserious(Elm_Gen_Item *it)
|
||||
{
|
||||
elm_widget_item_pre_notify_del(it);
|
||||
it->delete_me = EINA_TRUE;
|
||||
if (it->selected) it->wd->selected = eina_list_remove(it->wd->selected, it);
|
||||
|
||||
if (it->itc->func.del)
|
||||
it->itc->func.del((void *)it->base.data, WIDGET(it));
|
||||
}
|
||||
|
||||
void
|
||||
_elm_genlist_item_del_serious(Elm_Gen_Item *it)
|
||||
{
|
||||
_elm_genlist_item_del_notserious(it);
|
||||
it->wd->items = eina_inlist_remove(it->wd->items, EINA_INLIST_GET(it));
|
||||
if (it->tooltip.del_cb)
|
||||
it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
|
||||
it->wd->walking -= it->walking;
|
||||
if (it->long_timer) ecore_timer_del(it->long_timer);
|
||||
if (it->group)
|
||||
it->wd->group_items = eina_list_remove(it->wd->group_items, it);
|
||||
|
||||
if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
|
||||
it->wd->calc_job = ecore_job_add(it->wd->calc_cb, it->wd);
|
||||
free(it->item);
|
||||
it->item = NULL;
|
||||
elm_widget_item_del(it);
|
||||
}
|
||||
|
|
|
@ -47,3 +47,12 @@ void
|
|||
_elm_genlist_page_bring_in(const Evas_Object *obj,
|
||||
int h_pagenumber,
|
||||
int v_pagenumber);
|
||||
|
||||
void
|
||||
_elm_genlist_item_unrealize(Elm_Gen_Item *it,
|
||||
Eina_Bool calc);
|
||||
void
|
||||
_elm_genlist_item_del_serious(Elm_Gen_Item *it);
|
||||
|
||||
void
|
||||
_elm_genlist_item_del_notserious(Elm_Gen_Item *it);
|
||||
|
|
Loading…
Reference in New Issue