struct _Widget_Data
{
- Eina_List *stack;
+ Eina_Inlist *stack;
Evas_Object *base;
Evas_Object *rect;
Eina_Bool preserve: 1;
struct _Elm_Naviframe_Item
{
Elm_Widget_Item base;
+ EINA_INLIST;
Eina_List *content_list;
Eina_List *text_list;
Evas_Object *content;
_del_hook(Evas_Object *obj)
{
Widget_Data *wd;
- Eina_List *list;
Elm_Naviframe_Item *it;
wd = elm_widget_data_get(obj);
if (!wd) return;
- EINA_LIST_REVERSE_FOREACH(wd->stack, list, it)
+ EINA_INLIST_REVERSE_FOREACH(wd->stack, it)
_item_del(it);
- eina_list_free(wd->stack);
free(wd);
}
_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
{
Widget_Data *wd;
- Eina_List *l;
Elm_Naviframe_Item *it;
wd = elm_widget_data_get(obj);
if (!wd) return;
- EINA_LIST_FOREACH(wd->stack, l, it)
+ EINA_INLIST_FOREACH(wd->stack, it)
edje_object_mirrored_set(it->base.view, rtl);
edje_object_mirrored_set(wd->base, rtl);
}
_sizing_eval(Evas_Object *obj)
{
Widget_Data *wd;
- Eina_List *list;
Elm_Naviframe_Item *it;
wd = elm_widget_data_get(obj);
if (!wd) return;
- list = eina_list_last(wd->stack);
- if (!list) return;
-
- EINA_LIST_FOREACH(wd->stack, list, it)
+ EINA_INLIST_FOREACH(wd->stack, it)
_item_sizing_eval(it);
}
eina_list_free(it->content_list);
eina_list_free(it->text_list);
- wd->stack = eina_list_remove(wd->stack, it);
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(it));
elm_widget_item_del(it);
}
_item_text_set_hook(ELM_CAST(it), "elm.text.title", title_label);
//title buttons
- if ((!prev_btn) && wd->auto_pushed && eina_list_count(wd->stack))
+ if ((!prev_btn) && wd->auto_pushed && eina_inlist_count(wd->stack))
{
prev_btn = _back_btn_new(obj);
_title_prev_btn_set(it, prev_btn, EINA_TRUE);
"elm");
}
it->title_visible = EINA_TRUE;
- wd->stack = eina_list_append(wd->stack, it);
+ wd->stack = eina_inlist_append(wd->stack, EINA_INLIST_GET(it));
return ELM_CAST(it);
}
it = ELM_CAST(elm_naviframe_top_item_get(obj));
if (!it) return NULL;
- wd->stack = eina_list_remove(wd->stack, it);
-
if (wd->preserve)
content = it->content;
- prev_it = ELM_CAST(elm_naviframe_top_item_get(obj));
+ prev_it = EINA_INLIST_CONTAINER_GET(wd->stack->last->prev,
+ Elm_Naviframe_Item);
if (prev_it)
{
if (wd->freeze_events)
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Elm_Naviframe_Item *navi_it = ELM_CAST(it);
Widget_Data *wd = elm_widget_data_get(navi_it->base.widget);
- Eina_List *l, *prev_l;
+ Eina_Inlist *l, *prev_l;
if (it == elm_naviframe_top_item_get(navi_it->base.widget)) return;
- l = eina_list_last(wd->stack)->prev;
+ l = wd->stack->last->prev;
while(l)
{
- if (l->data == it) break;
+ if (ELM_CAST(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item)) == it)
+ break;
prev_l = l->prev;
- _item_del(l->data);
+ _item_del(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item));
l = prev_l;
}
elm_naviframe_item_pop(navi_it->base.widget);
if (it == elm_naviframe_top_item_get(navi_it->base.widget))
{
_item_del(navi_it);
- navi_it = ELM_CAST(eina_list_last(wd->stack)->data);
+ navi_it = ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack->last, Elm_Naviframe_Item));
evas_object_show(navi_it->base.view);
evas_object_raise(navi_it->base.view);
edje_object_signal_emit(navi_it->base.view, "elm,state,visible", "elm");
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->stack)) return NULL;
- return eina_list_last(wd->stack)->data;
+ return ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack->last,
+ Elm_Naviframe_Item));
}
EAPI Elm_Object_Item*
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->stack)) return NULL;
- return wd->stack->data;
+ return ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack,
+ Elm_Naviframe_Item));
}
EAPI void