{
EINA_INLIST;
const char *part;
- Evas_Object *content;
Elm_Naviframe_Item *it;
};
{
EINA_INLIST;
const char *part;
- const char *text;
};
struct _Elm_Naviframe_Item
Evas_Object *title_next_btn;
Evas_Object *title_icon;
const char *style;
+ Evas_Coord minw;
+ Evas_Coord minh;
Eina_Bool back_btn: 1;
Eina_Bool title_visible: 1;
+ Eina_Bool content_unfocusable : 1;
};
static const char *widtype = NULL;
+//widget signals
static const char SIG_TRANSITION_FINISHED[] = "transition,finished";
-static const char SIG_PUSH_FINISHED[] = "push,finished";
-static const char SIG_POP_FINISHED[] = "pop,finished";
static const char SIG_TITLE_CLICKED[] = "title,clicked";
static const Evas_Smart_Cb_Description _signals[] = {
{NULL, NULL}
};
+static void _text_set_hook(Evas_Object *obj,
+ const char *part,
+ const char *label);
+static const char *_text_get_hook(const Evas_Object *obj, const char *part);
+static void _content_set_hook(Evas_Object *obj,
+ const char *part,
+ Evas_Object *content);
+static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part);
+static Evas_Object *_content_unset_hook(Evas_Object *obj, const char *part);
static void _del_hook(Evas_Object *obj);
static void _theme_hook(Evas_Object *obj);
static void _emit_hook(Evas_Object *obj,
const char *emission,
const char *source);
static void _disable_hook(Evas_Object *obj);
-static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
static void _item_text_set_hook(Elm_Object_Item *it,
const char *part,
const char *label);
const char *source);
static void _item_title_visible_update(Elm_Naviframe_Item *navi_it);
static void _sizing_eval(Evas_Object *obj);
-static void _item_sizing_eval(Elm_Naviframe_Item *it);
static void _move(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _resize(void *data,
Evas *e,
static Evas_Object * _title_content_unset(Elm_Naviframe_Item *it,
const char *part);
static void _item_del(Elm_Naviframe_Item *it);
+static Eina_Bool _item_del_pre_hook(Elm_Object_Item *it);
static void _pushed_finished(void *data,
Evas_Object *obj,
const char *emission,
Evas_Object *next_btn,
Evas_Object *content,
const char *item_style);
+static Eina_Bool _focus_next_hook(const Evas_Object *obj,
+ Elm_Focus_Direction dir,
+ Evas_Object **next);
static void
_del_hook(Evas_Object *obj)
Elm_Naviframe_Item);
wd->stack = eina_inlist_remove(wd->stack, wd->stack->last);
_item_del(it);
+ elm_widget_item_free(it);
if (!wd->stack) break;
}
}
_item_style_set(it, it->style);
_item_title_visible_update(it);
}
-
- _elm_widget_mirrored_reload(obj);
- _mirrored_set(obj, elm_widget_mirrored_get(obj));
}
static void _emit_hook(Evas_Object *obj,
const char *emission,
const char *source)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
-
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
-
- edje_object_signal_emit(wd->base, emission, source);
+ Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
+ if (!it) return;
+ elm_object_item_signal_emit(it, emission, source);
}
static void
}
static void
-_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
-{
- Widget_Data *wd;
- Elm_Naviframe_Item *it;
-
- wd = elm_widget_data_get(obj);
- if (!wd) return;
-
- EINA_INLIST_FOREACH(wd->stack, it)
- edje_object_mirrored_set(VIEW(it), rtl);
- edje_object_mirrored_set(wd->base, rtl);
-}
-
-static void
_item_text_set_hook(Elm_Object_Item *it,
const char *part,
const char *label)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-
Elm_Naviframe_Text_Item_Pair *pair = NULL;
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it;
char buf[1024];
if (!part || !strcmp(part, "default"))
snprintf(buf, sizeof(buf), "elm.text.title");
- else if(!strcmp("subtitle", part))
+ else if (!strcmp("subtitle", part))
snprintf(buf, sizeof(buf), "elm.text.subtitle");
else
snprintf(buf, sizeof(buf), "%s", part);
navi_it->text_list = eina_inlist_append(navi_it->text_list,
EINA_INLIST_GET(pair));
}
-
- eina_stringshare_replace(&pair->text, label);
- edje_object_part_text_set(VIEW(navi_it), buf, label);
+ elm_object_part_text_set(VIEW(navi_it), buf, label);
if (label)
{
- snprintf(buf, sizeof(buf), "elm,state,%s,show", buf);
- edje_object_signal_emit(VIEW(navi_it), buf, "elm");
+ snprintf(buf, sizeof(buf), "elm,state,%s,show", part);
+ elm_object_signal_emit(VIEW(navi_it), buf, "elm");
}
else
{
- snprintf(buf, sizeof(buf), "elm,state,%s,hide", buf);
- edje_object_signal_emit(VIEW(navi_it), buf, "elm");
+ snprintf(buf, sizeof(buf), "elm,state,%s,hide", part);
+ elm_object_signal_emit(VIEW(navi_it), buf, "elm");
}
_sizing_eval(WIDGET(navi_it));
static const char *
_item_text_get_hook(const Elm_Object_Item *it, const char *part)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- Elm_Naviframe_Text_Item_Pair *pair = NULL;
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
char buf[1024];
if (!part || !strcmp(part, "default"))
snprintf(buf, sizeof(buf), "elm.text.title");
- else if(!strcmp("subtitle", part))
+ else if (!strcmp("subtitle", part))
snprintf(buf, sizeof(buf), "elm.text.subtitle");
else
snprintf(buf, sizeof(buf), "%s", part);
- EINA_INLIST_FOREACH(navi_it->text_list, pair)
- {
- if (!strcmp(buf, pair->part))
- return pair->text;
- }
- return NULL;
+ return elm_object_part_text_get(VIEW(it), buf);
}
static void
const char *part,
Evas_Object *content)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it;
//specified parts
- if ((!part) || (!strcmp(part, "elm.swallow.content")))
+ if (!part || !strcmp("default", part))
{
_item_content_set(navi_it, content);
return;
}
- else if (!strcmp(part, "elm.swallow.prev_btn"))
+ else if (!strcmp(part, "prev_btn"))
{
_title_prev_btn_set(navi_it, content, EINA_FALSE);
return;
}
- else if (!strcmp(part, "elm.swallow.next_btn"))
+ else if (!strcmp(part, "next_btn"))
{
_title_next_btn_set(navi_it, content);
return;
static Evas_Object *
_item_content_get_hook(const Elm_Object_Item *it, const char *part)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- Elm_Naviframe_Content_Item_Pair *pair = NULL;
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it;
//specified parts
- if ((!part) || (!strcmp(part, "elm.swallow.content")))
+ if (!part || !strcmp("default", part))
return navi_it->content;
- else if (!strcmp(part, "elm.swallow.prev_btn"))
+ else if (!strcmp(part, "prev_btn"))
return navi_it->title_prev_btn;
- else if (!strcmp(part, "elm.swallow.next_btn"))
+ else if (!strcmp(part, "next_btn"))
return navi_it->title_next_btn;
else if (!strcmp(part, "icon"))
return navi_it->title_icon;
//common parts
- EINA_INLIST_FOREACH(navi_it->content_list, pair)
- {
- if (!strcmp(part, pair->part))
- return pair->content;
- }
- return NULL;
+ return elm_object_part_content_get(VIEW(navi_it), part);
}
static Evas_Object *
_item_content_unset_hook(Elm_Object_Item *it, const char *part)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it;
//specified parts
- if (!part || !strcmp("elm.swallow.content", part))
+ if (!part || !strcmp("default", part))
return _item_content_unset(navi_it);
- else if (!strcmp(part, "elm.swallow.prev_btn"))
+ else if (!strcmp(part, "prev_btn"))
return _title_prev_btn_unset(navi_it);
- else if (!strcmp(part, "elm.swallow.next_btn"))
+ else if (!strcmp(part, "next_btn"))
return _title_next_btn_unset(navi_it);
else if (!strcmp(part, "icon"))
return _title_icon_unset(navi_it);
const char *emission,
const char *source)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
- edje_object_signal_emit(VIEW(navi_it), emission, source);
+ elm_object_signal_emit(VIEW(it), emission, source);
}
static void
_item_title_visible_update(Elm_Naviframe_Item *navi_it)
{
if (navi_it->title_visible)
- edje_object_signal_emit(VIEW(navi_it), "elm,state,title,show", "elm");
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,title,show", "elm");
else
- edje_object_signal_emit(VIEW(navi_it), "elm,state,title,hide", "elm");
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,title,hide", "elm");
}
static void
{
Widget_Data *wd;
Elm_Naviframe_Item *it;
- wd = elm_widget_data_get(obj);
- if (!wd) return;
-
- EINA_INLIST_FOREACH(wd->stack, it)
- _item_sizing_eval(it);
-}
-
-static void
-_item_sizing_eval(Elm_Naviframe_Item *it)
-{
- Widget_Data *wd;
Evas_Coord x, y, w, h;
- if (!it) return;
+ Evas_Coord minw = -1, minh = -1;
- wd = elm_widget_data_get(WIDGET(it));
+ wd = elm_widget_data_get(obj);
if (!wd) return;
- evas_object_geometry_get(WIDGET(it), &x, &y, &w, &h);
- evas_object_move(VIEW(it), x, y);
- evas_object_resize(VIEW(it), w, h);
+ evas_object_geometry_get(obj, &x, &y, &w, &h);
+
+ EINA_INLIST_FOREACH(wd->stack, it)
+ {
+ evas_object_move(VIEW(it), x, y);
+ evas_object_resize(VIEW(it), w, h);
+ edje_object_size_min_calc(elm_layout_edje_get(VIEW(it)),
+ &it->minw,
+ &it->minh);
+ if (it->minw > minw) minw = it->minw;
+ if (it->minh > minh) minh = it->minh;
+ }
+ evas_object_size_hint_min_set(obj, minw, minh);
+ evas_object_size_hint_max_set(obj, -1, -1);
}
static void
btn = elm_button_add(obj);
if (!btn) return NULL;
evas_object_smart_callback_add(btn, "clicked", _back_btn_clicked, obj);
- snprintf(buf, sizeof(buf), "naviframe/back_btn/%s", elm_widget_style_get(obj));
+ snprintf(buf, sizeof(buf), "naviframe/back_btn/%s",
+ elm_widget_style_get(obj));
elm_object_style_set(btn, buf);
return btn;
}
+static void _text_set_hook(Evas_Object *obj,
+ const char *part,
+ const char *label)
+{
+ Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
+ if (!it) return;
+ elm_object_item_part_text_set(it, part, label);
+}
+
+static const char *_text_get_hook(const Evas_Object *obj, const char *part)
+{
+ Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
+ if (!it) return NULL;
+ return elm_object_item_part_text_get(it, part);
+}
+
+static void
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
+{
+ Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
+ if (!it) return;
+ elm_object_item_part_content_set(it, part, content);
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part)
+{
+ Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
+ if (!it) return NULL;
+ return elm_object_item_part_content_unset(it, part);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part)
+{
+ Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
+ if (!it) return NULL;
+ return elm_object_item_part_content_get(it, part);
+}
+
static void
_title_content_del(void *data,
Evas *e __UNUSED__,
Elm_Naviframe_Content_Item_Pair *pair = data;
Elm_Naviframe_Item *it = pair->it;
snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part);
- edje_object_signal_emit(VIEW(it), buf, "elm");
+ elm_object_signal_emit(VIEW(it), buf, "elm");
it->content_list = eina_inlist_remove(it->content_list,
EINA_INLIST_GET(pair));
eina_stringshare_del(pair->part);
Elm_Naviframe_Item *it = data;
it->back_btn = EINA_FALSE;
it->title_prev_btn = NULL;
- edje_object_signal_emit(VIEW(it), "elm,state,prev_btn,hide", "elm");
+ elm_object_signal_emit(VIEW(it), "elm,state,prev_btn,hide", "elm");
}
static void
{
Elm_Naviframe_Item *it = data;
it->title_next_btn = NULL;
- edje_object_signal_emit(VIEW(it), "elm,state,next_btn,hide", "elm");
+ elm_object_signal_emit(VIEW(it), "elm,state,next_btn,hide", "elm");
}
static void
{
Elm_Naviframe_Item *it = data;
it->title_icon = NULL;
- edje_object_signal_emit(VIEW(it), "elm,state,icon,hide", "elm");
+ elm_object_signal_emit(VIEW(it), "elm,state,icon,hide", "elm");
}
static void
{
Elm_Naviframe_Item *it = data;
it->content = NULL;
- edje_object_signal_emit(VIEW(it), "elm,state,content,hide", "elm");
+ elm_object_signal_emit(VIEW(it), "elm,state,content,hide", "elm");
}
static void
{
char buf[1024];
Elm_Naviframe_Content_Item_Pair *pair = NULL;
+ Evas_Object *prev_content = NULL;
EINA_INLIST_FOREACH(it->content_list, pair)
if (!strcmp(part, pair->part)) break;
if (pair)
{
- if (pair->content != content)
+ prev_content = elm_object_part_content_get(VIEW(it), part);
+ if (prev_content != content)
{
if (content)
{
- evas_object_event_callback_del(pair->content,
+ evas_object_event_callback_del(prev_content,
EVAS_CALLBACK_DEL,
_title_content_del);
- evas_object_event_callback_del(pair->content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints);
snprintf(buf, sizeof(buf), "elm,state,%s,hide", part);
- edje_object_signal_emit(VIEW(it), buf, "elm");
+ elm_object_signal_emit(VIEW(it), buf, "elm");
}
- evas_object_del(pair->content);
+ evas_object_del(prev_content);
if (!content) return;
}
}
it->content_list = eina_inlist_append(it->content_list,
EINA_INLIST_GET(pair));
}
- if (pair->content != content)
+ if (prev_content != content)
{
- elm_widget_sub_object_add(WIDGET(it), content);
evas_object_event_callback_add(content,
EVAS_CALLBACK_DEL,
_title_content_del,
pair);
- evas_object_event_callback_add(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints,
- WIDGET(it));
}
- edje_object_part_swallow(VIEW(it), part, content);
+ elm_object_part_content_set(VIEW(it), part, content);
snprintf(buf, sizeof(buf), "elm,state,%s,show", part);
- edje_object_signal_emit(VIEW(it), buf, "elm");
- pair->content = content;
+ elm_object_signal_emit(VIEW(it), buf, "elm");
_sizing_eval(WIDGET(it));
}
Eina_Bool back_btn)
{
if (it->title_prev_btn == btn) return;
-
- if (it->title_prev_btn)
- evas_object_del(it->title_prev_btn);
-
+ if (it->title_prev_btn) evas_object_del(it->title_prev_btn);
it->title_prev_btn = btn;
if (!btn) return;
- elm_widget_sub_object_add(WIDGET(it), btn);
evas_object_event_callback_add(btn,
EVAS_CALLBACK_DEL,
_title_prev_btn_del,
it);
- evas_object_event_callback_add(btn,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints,
- WIDGET(it));
- edje_object_part_swallow(VIEW(it), "elm.swallow.prev_btn", btn);
- edje_object_signal_emit(VIEW(it), "elm,state,prev_btn,show", "elm");
+ elm_object_part_content_set(VIEW(it), "elm.swallow.prev_btn", btn);
+ elm_object_signal_emit(VIEW(it), "elm,state,prev_btn,show", "elm");
it->back_btn = back_btn;
_sizing_eval(WIDGET(it));
_title_next_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn)
{
if (it->title_next_btn == btn) return;
-
- if (it->title_next_btn)
- evas_object_del(it->title_next_btn);
-
+ if (it->title_next_btn) evas_object_del(it->title_next_btn);
it->title_next_btn = btn;
if (!btn) return;
- elm_widget_sub_object_add(WIDGET(it), btn);
evas_object_event_callback_add(btn,
EVAS_CALLBACK_DEL,
_title_next_btn_del,
it);
- evas_object_event_callback_add(btn,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints,
- WIDGET(it));
- edje_object_part_swallow(VIEW(it), "elm.swallow.next_btn", btn);
- edje_object_signal_emit(VIEW(it), "elm,state,next_btn,show", "elm");
+ elm_object_part_content_set(VIEW(it), "elm.swallow.next_btn", btn);
+ elm_object_signal_emit(VIEW(it), "elm,state,next_btn,show", "elm");
_sizing_eval(WIDGET(it));
}
_title_icon_set(Elm_Naviframe_Item *it, Evas_Object *icon)
{
if (it->title_icon == icon) return;
-
- if (it->title_icon)
- evas_object_del(it->title_icon);
-
+ if (it->title_icon) evas_object_del(it->title_icon);
it->title_icon = icon;
if (!icon) return;
- elm_widget_sub_object_add(WIDGET(it), icon);
evas_object_event_callback_add(icon,
EVAS_CALLBACK_DEL,
_title_icon_del,
it);
- evas_object_event_callback_add(icon,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints,
- WIDGET(it));
- edje_object_part_swallow(VIEW(it), "elm.swallow.icon", icon);
- edje_object_signal_emit(VIEW(it), "elm,state,icon,show", "elm");
+ elm_object_part_content_set(VIEW(it), "elm.swallow.icon", icon);
+ elm_object_signal_emit(VIEW(it), "elm,state,icon,show", "elm");
_sizing_eval(WIDGET(it));
}
Evas_Object *content = it->content;
if (!content) return NULL;
- elm_widget_sub_object_del(WIDGET(it), content);
- edje_object_part_unswallow(VIEW(it), content);
- edje_object_signal_emit(VIEW(it), "elm,state,content,hide", "elm");
+ elm_object_part_content_unset(VIEW(it), "elm.swallow.content");
+ elm_object_signal_emit(VIEW(it), "elm,state,content,hide", "elm");
evas_object_event_callback_del(content,
EVAS_CALLBACK_DEL,
_item_content_del);
- evas_object_event_callback_del(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints);
_sizing_eval(WIDGET(it));
it->content = NULL;
Evas_Object *content = it->title_prev_btn;
if (!content) return NULL;
- elm_widget_sub_object_del(WIDGET(it), content);
- edje_object_part_unswallow(VIEW(it), content);
- edje_object_signal_emit(VIEW(it), "elm,state,prev_btn,hide", "elm");
+ elm_object_part_content_unset(VIEW(it), "elm.swallow.prev_btn");
+ elm_object_signal_emit(VIEW(it), "elm,state,prev_btn,hide", "elm");
evas_object_event_callback_del(content,
EVAS_CALLBACK_DEL,
_title_prev_btn_del);
- evas_object_event_callback_del(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints);
_sizing_eval(WIDGET(it));
it->title_prev_btn = NULL;
Evas_Object *content = it->title_next_btn;
if (!content) return NULL;
- elm_widget_sub_object_del(WIDGET(it), content);
- edje_object_part_unswallow(VIEW(it), content);
- edje_object_signal_emit(VIEW(it), "elm,state,next_btn,hide", "elm");
+ elm_object_part_content_unset(VIEW(it), "elm.swallow.next_btn");
+ elm_object_signal_emit(VIEW(it), "elm,state,next_btn,hide", "elm");
evas_object_event_callback_del(content,
EVAS_CALLBACK_DEL,
_title_next_btn_del);
- evas_object_event_callback_del(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints);
_sizing_eval(WIDGET(it));
it->title_next_btn = NULL;
Evas_Object *content = it->title_icon;
if (!content) return NULL;
- elm_widget_sub_object_del(WIDGET(it), content);
- edje_object_part_unswallow(VIEW(it), content);
- edje_object_signal_emit(VIEW(it), "elm,state,icon,hide", "elm");
+ elm_object_part_content_unset(VIEW(it), "elm.swallow.icon");
+ elm_object_signal_emit(VIEW(it), "elm,state,icon,hide", "elm");
evas_object_event_callback_del(content,
EVAS_CALLBACK_DEL,
_title_icon_del);
- evas_object_event_callback_del(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints);
_sizing_eval(WIDGET(it));
it->title_icon = NULL;
{
if (!strcmp(part, pair->part))
{
- content = pair->content;
+ content = elm_object_part_content_get(VIEW(it), part);
eina_stringshare_del(pair->part);
it->content_list = eina_inlist_remove(it->content_list,
EINA_INLIST_GET(pair));
if (!content) return NULL;
- elm_widget_sub_object_del(WIDGET(it), content);
- edje_object_part_unswallow(VIEW(it), content);
+ elm_object_part_content_unset(VIEW(it), part);
snprintf(buf, sizeof(buf), "elm,state,%s,hide", part);
- edje_object_signal_emit(VIEW(it), buf, "elm");
+ elm_object_signal_emit(VIEW(it), buf, "elm");
evas_object_event_callback_del(content,
EVAS_CALLBACK_DEL,
_title_content_del);
- evas_object_event_callback_del(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints);
_sizing_eval(WIDGET(it));
return content;
Widget_Data *wd;
Elm_Naviframe_Content_Item_Pair *content_pair;
Elm_Naviframe_Text_Item_Pair *text_pair;
+ Evas_Object *content;
if (!it) return;
wd = elm_widget_data_get(WIDGET(it));
if (!wd) return;
- if (it->title_prev_btn)
- evas_object_del(it->title_prev_btn);
- if (it->title_next_btn)
- evas_object_del(it->title_next_btn);
- if (it->title_icon)
- evas_object_del(it->title_icon);
- if ((it->content) && (!wd->preserve))
- evas_object_del(it->content);
-
while (it->content_list)
{
- content_pair = EINA_INLIST_CONTAINER_GET(it->content_list,
- Elm_Naviframe_Content_Item_Pair);
- evas_object_event_callback_del(content_pair->content,
+ content_pair =
+ EINA_INLIST_CONTAINER_GET(it->content_list,
+ Elm_Naviframe_Content_Item_Pair);
+ content = elm_object_part_content_get(VIEW(it), content_pair->part);
+ evas_object_event_callback_del(content,
EVAS_CALLBACK_DEL,
_title_content_del);
- evas_object_event_callback_del(content_pair->content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints);
- evas_object_del(content_pair->content);
eina_stringshare_del(content_pair->part);
it->content_list = eina_inlist_remove(it->content_list,
it->content_list);
text_pair = EINA_INLIST_CONTAINER_GET(it->text_list,
Elm_Naviframe_Text_Item_Pair);
eina_stringshare_del(text_pair->part);
- eina_stringshare_del(text_pair->text);
it->text_list = eina_inlist_remove(it->text_list,
it->text_list);
free(text_pair);
eina_stringshare_del(it->style);
- elm_widget_item_del(it);
+ if (wd->preserve && it->content)
+ {
+ elm_object_part_content_unset(VIEW(it), "elm.swallow.content");
+ evas_object_event_callback_del(it->content,
+ EVAS_CALLBACK_DEL,
+ _item_content_del);
+ }
+}
+
+static Eina_Bool
+_item_del_pre_hook(Elm_Object_Item *it)
+{
+ Elm_Naviframe_Item *navi_it;
+ Widget_Data *wd;
+
+ navi_it =(Elm_Naviframe_Item *)it;
+ wd = elm_widget_data_get(WIDGET(navi_it));
+ if (!wd) return EINA_FALSE;
+
+ if (it == elm_naviframe_top_item_get(WIDGET(navi_it)))
+ {
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
+ _item_del(navi_it);
+ //If the item is only one, the stack will be empty
+ if (!wd->stack) return EINA_TRUE;
+ navi_it = EINA_INLIST_CONTAINER_GET(wd->stack->last,
+ Elm_Naviframe_Item);
+ evas_object_show(VIEW(navi_it));
+ evas_object_raise(VIEW(navi_it));
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,visible", "elm");
+ }
+ else
+ {
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
+ _item_del(navi_it);
+ }
+
+ return EINA_TRUE;
}
static void
if (!wd) return;
evas_object_hide(VIEW(it));
- evas_object_smart_callback_call(WIDGET(it),
- SIG_PUSH_FINISHED,
- data);
+
+ if (it->content)
+ elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable);
+
if (wd->freeze_events)
evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
}
const char *emission __UNUSED__,
const char *source __UNUSED__)
{
+ Widget_Data *wd;
Elm_Naviframe_Item *it = data;
if (!it) return;
- evas_object_smart_callback_call(WIDGET(it),
- SIG_POP_FINISHED,
- data);
+
+ wd = elm_widget_data_get(WIDGET(it));
+ if (!wd) return;
+
+ if (wd->preserve && it->content)
+ elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable);
+
_item_del(data);
+
+ elm_widget_item_free(data);
}
static void
wd = elm_widget_data_get(WIDGET(it));
if (!wd) return;
+ elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable);
+
evas_object_smart_callback_call(WIDGET(it),
SIG_TRANSITION_FINISHED,
data);
{
if (navi_it->content == content) return;
if (navi_it->content) evas_object_del(navi_it->content);
- elm_widget_sub_object_add(WIDGET(navi_it), content);
- edje_object_part_swallow(VIEW(navi_it),
- "elm.swallow.content",
- content);
+ elm_object_part_content_set(VIEW(navi_it), "elm.swallow.content", content);
+
if (content)
- edje_object_signal_emit(VIEW(navi_it),
- "elm,state,content,show",
- "elm");
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,content,show", "elm");
else
- edje_object_signal_emit(VIEW(navi_it),
- "elm,state,content,hide",
- "elm");
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,content,hide", "elm");
+
evas_object_event_callback_add(content,
EVAS_CALLBACK_DEL,
_item_content_del,
navi_it);
- evas_object_event_callback_add(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints,
- WIDGET(navi_it));
navi_it->content = content;
_sizing_eval(WIDGET(navi_it));
}
if (!item_style)
{
- sprintf(buf, "item/basic");
+ strcpy(buf, "item/basic");
eina_stringshare_replace(&navi_it->style, "basic");
}
else
{
- if (strlen(item_style) > sizeof(buf))
- WRN("too much long style name! : naviframe=%p", WIDGET(navi_it));
- sprintf(buf, "item/%s", item_style);
+ snprintf(buf, sizeof(buf), "item/%s", item_style);
eina_stringshare_replace(&navi_it->style, item_style);
}
- _elm_theme_object_set(WIDGET(navi_it),
- VIEW(navi_it),
- "naviframe",
- buf,
- elm_widget_style_get(WIDGET(navi_it)));
+ elm_layout_theme_set(VIEW(navi_it),
+ "naviframe",
+ buf,
+ elm_widget_style_get(WIDGET(navi_it)));
//recover item
EINA_INLIST_FOREACH(navi_it->text_list, text_pair)
- _item_text_set_hook((Elm_Object_Item *) navi_it,
- text_pair->part,
- text_pair->text);
+ _item_text_set_hook((Elm_Object_Item *) navi_it,
+ text_pair->part,
+ elm_object_part_text_get(VIEW(navi_it),
+ text_pair->part));
EINA_INLIST_FOREACH(navi_it->content_list, content_pair)
- _item_content_set_hook((Elm_Object_Item *) navi_it,
- content_pair->part,
- content_pair->content);
+ _item_content_set_hook((Elm_Object_Item *) navi_it,
+ content_pair->part,
+ elm_object_part_content_get(VIEW(navi_it),
+ content_pair->part));
//content
if (navi_it->content)
- {
- edje_object_part_swallow(VIEW(navi_it),
- "elm.swallow.content",
- navi_it->content);
- edje_object_signal_emit(VIEW(navi_it),
- "elm,state,content,show",
- "elm");
- }
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,content,show", "elm");
//prev button
if (navi_it->title_prev_btn)
- {
- edje_object_part_swallow(VIEW(navi_it),
- "elm.swallow.prev_btn",
- navi_it->title_prev_btn);
- edje_object_signal_emit(VIEW(navi_it),
- "elm,state,prev_btn,show",
- "elm");
- }
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,prev_btn,show", "elm");
//next button
if (navi_it->title_next_btn)
- {
- edje_object_part_swallow(VIEW(navi_it),
- "elm.swallow.next_btn",
- navi_it->title_next_btn);
- edje_object_signal_emit(VIEW(navi_it),
- "elm,state,next_btn,show",
- "elm");
- }
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,next_btn,show", "elm");
- navi_it->title_visible = EINA_TRUE;
_sizing_eval(WIDGET(navi_it));
wd = elm_widget_data_get(WIDGET(navi_it));
return NULL;
}
+ elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
elm_widget_item_text_set_hook_set(it, _item_text_set_hook);
elm_widget_item_text_get_hook_set(it, _item_text_get_hook);
elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
elm_widget_item_signal_emit_hook_set(it, _item_signal_emit_hook);
//item base layout
- VIEW(it) = edje_object_add(evas_object_evas_get(obj));
- edje_object_mirrored_set(VIEW(it), elm_widget_mirrored_get(obj));
- evas_object_smart_member_add(VIEW(it), wd->base);
- elm_widget_sub_object_add(obj, VIEW(it));
- edje_object_signal_callback_add(VIEW(it),
+ VIEW(it) = elm_layout_add(obj);
+ evas_object_smart_member_add(VIEW(it), obj);
+
+ evas_object_event_callback_add(VIEW(it),
+ EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints,
+ obj);
+ elm_object_signal_callback_add(VIEW(it),
"elm,action,show,finished",
"",
_show_finished, it);
- edje_object_signal_callback_add(VIEW(it),
+ elm_object_signal_callback_add(VIEW(it),
"elm,action,pushed,finished",
"",
_pushed_finished, it);
- edje_object_signal_callback_add(VIEW(it),
+ elm_object_signal_callback_add(VIEW(it),
"elm,action,popped,finished",
"",
_popped_finished, it);
- edje_object_signal_callback_add(VIEW(it),
+ elm_object_signal_callback_add(VIEW(it),
"elm,action,title,clicked",
"",
_title_clicked, it);
_item_style_set(it, item_style);
- _item_text_set_hook((Elm_Object_Item *) it, "elm.text.title", title_label);
+ _item_text_set_hook((Elm_Object_Item *)it, "elm.text.title", title_label);
//title buttons
if ((!prev_btn) && wd->auto_pushed && eina_inlist_count(wd->stack))
return it;
}
+static Eina_Bool
+_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)
+{
+ Eina_Bool ret;
+ Elm_Naviframe_Item *top_it;
+ Eina_List *l = NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ void *(*list_data_get)(const Eina_List *list);
+ if (!wd) return EINA_FALSE;
+
+ top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj);
+ if (!top_it) return EINA_FALSE;
+
+ list_data_get = eina_list_data_get;
+
+ //Forcus order: prev button, next button, contents
+ if (top_it->title_prev_btn)
+ l = eina_list_append(l, top_it->title_prev_btn);
+ if (top_it->title_next_btn)
+ l = eina_list_append(l, top_it->title_next_btn);
+ l = eina_list_append(l, VIEW(top_it));
+
+ ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next);
+ eina_list_free(l);
+ return ret;
+}
+
EAPI Evas_Object *
elm_naviframe_add(Evas_Object *parent)
{
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_disable_hook_set(obj, _disable_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
+ elm_widget_text_set_hook_set(obj, _text_set_hook);
+ elm_widget_text_get_hook_set(obj, _text_get_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
elm_widget_signal_emit_hook_set(obj, _emit_hook);
+ elm_widget_can_focus_set(obj, EINA_FALSE);
+ elm_widget_focus_next_hook_set(obj, _focus_next_hook);
//base
- wd->base = edje_object_add(e);
- edje_object_mirrored_set(wd->base, elm_widget_mirrored_get(obj));
+ //FIXME: Is this base layout really needed?
+ wd->base = elm_layout_add(obj);
+ evas_object_event_callback_add(wd->base,
+ EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints,
+ obj);
elm_widget_resize_object_set(obj, wd->base);
- _elm_theme_object_set(obj, wd->base, "naviframe", "base", "default");
+ elm_layout_theme_set(wd->base, "naviframe", "base", "default");
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, obj);
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, obj);
evas_object_freeze_events_set(VIEW(it), EINA_TRUE);
evas_object_freeze_events_set(VIEW(prev_it), EINA_TRUE);
}
- edje_object_signal_emit(VIEW(prev_it),
- "elm,state,cur,pushed",
- "elm");
- edje_object_signal_emit(VIEW(it),
- "elm,state,new,pushed",
- "elm");
- edje_object_message_signal_process(VIEW(prev_it));
- edje_object_message_signal_process(VIEW(it));
+ elm_object_signal_emit(VIEW(prev_it), "elm,state,cur,pushed", "elm");
+ elm_object_signal_emit(VIEW(it), "elm,state,new,pushed", "elm");
+ edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it)));
+ if (prev_it->content)
+ {
+ prev_it->content_unfocusable = elm_widget_tree_unfocusable_get(prev_it->content);
+ elm_widget_tree_unfocusable_set(prev_it->content, EINA_TRUE);
+ }
+ edje_object_message_signal_process(elm_layout_edje_get(VIEW(it)));
}
wd->stack = eina_inlist_append(wd->stack, EINA_INLIST_GET(it));
_sizing_eval(obj);
- return (Elm_Object_Item *) it;
+ return (Elm_Object_Item *)it;
}
EAPI Elm_Object_Item *
-elm_naviframe_item_insert_before(Elm_Object_Item *before,
+elm_naviframe_item_insert_before(Evas_Object *obj,
+ Elm_Object_Item *before,
const char *title_label,
Evas_Object *prev_btn,
Evas_Object *next_btn,
Evas_Object *content,
const char *item_style)
{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
ELM_OBJ_ITEM_CHECK_OR_RETURN(before, NULL);
Elm_Naviframe_Item *it;
Widget_Data *wd;
- wd = elm_widget_data_get(WIDGET(before));
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- it = _item_new(WIDGET(before), title_label, prev_btn, next_btn, content,
- item_style);
+ it = _item_new(obj, title_label, prev_btn, next_btn, content, item_style);
if (!it) return NULL;
wd->stack =
- eina_inlist_prepend_relative(wd->stack, EINA_INLIST_GET(it),
+ eina_inlist_prepend_relative(wd->stack,
+ EINA_INLIST_GET(it),
EINA_INLIST_GET(((Elm_Naviframe_Item *) before)));
- _sizing_eval(WIDGET(before));
- return (Elm_Object_Item *) it;
+ _sizing_eval(obj);
+ return (Elm_Object_Item *)it;
}
EAPI Elm_Object_Item *
-elm_naviframe_item_insert_after(Elm_Object_Item *after,
+elm_naviframe_item_insert_after(Evas_Object *obj,
+ Elm_Object_Item *after,
const char *title_label,
Evas_Object *prev_btn,
Evas_Object *next_btn,
Evas_Object *content,
const char *item_style)
{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
ELM_OBJ_ITEM_CHECK_OR_RETURN(after, NULL);
Elm_Naviframe_Item *it;
Widget_Data *wd;
+ Eina_Bool top_inserted;
- wd = elm_widget_data_get(WIDGET(after));
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- it = _item_new(WIDGET(after), title_label, prev_btn, next_btn, content,
- item_style);
+ it = _item_new(obj, title_label, prev_btn, next_btn, content, item_style);
if (!it) return NULL;
- if (elm_naviframe_top_item_get(WIDGET(after)) == after)
+ if (elm_naviframe_top_item_get(obj) == after) top_inserted = EINA_TRUE;
+
+ wd->stack =
+ eina_inlist_append_relative(wd->stack,
+ EINA_INLIST_GET(it),
+ EINA_INLIST_GET(((Elm_Naviframe_Item *) after)));
+ if (top_inserted)
{
- evas_object_hide(VIEW(after));
evas_object_show(VIEW(it));
+ evas_object_hide(VIEW(after));
}
- wd->stack =
- eina_inlist_append_relative(wd->stack, EINA_INLIST_GET(it),
- EINA_INLIST_GET(((Elm_Naviframe_Item *) after)));
- _sizing_eval(WIDGET(after));
- return (Elm_Object_Item *) it;
+
+ _sizing_eval(obj);
+
+ return (Elm_Object_Item *)it;
}
EAPI Evas_Object *
it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(obj);
if (!it) return NULL;
- elm_widget_tree_unfocusable_set(it->content, EINA_TRUE);
if (wd->preserve)
content = it->content;
+ if (it->content)
+ {
+ it->content_unfocusable = elm_widget_tree_unfocusable_get(it->content);
+ elm_widget_tree_unfocusable_set(it->content, EINA_TRUE);
+ }
+
if (wd->stack->last->prev)
prev_it = EINA_INLIST_CONTAINER_GET(wd->stack->last->prev,
Elm_Naviframe_Item);
evas_object_freeze_events_set(VIEW(it), EINA_TRUE);
evas_object_freeze_events_set(VIEW(prev_it), EINA_TRUE);
}
- edje_object_signal_emit(VIEW(it), "elm,state,cur,popped", "elm");
+ elm_object_signal_emit(VIEW(it), "elm,state,cur,popped", "elm");
evas_object_show(VIEW(prev_it));
- evas_object_raise(VIEW(prev_it));
- edje_object_signal_emit(VIEW(prev_it),
- "elm,state,prev,popped",
- "elm");
- edje_object_message_signal_process(VIEW(it));
- edje_object_message_signal_process(VIEW(prev_it));
+ elm_object_signal_emit(VIEW(prev_it),
+ "elm,state,prev,popped",
+ "elm");
+ edje_object_message_signal_process(elm_layout_edje_get(VIEW(it)));
+ edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it)));
}
else
- _item_del(it);
+ {
+ _item_del(it);
+ elm_widget_item_free(it);
+ }
return content;
}
Widget_Data *wd;
Eina_Inlist *l, *prev_l;
- navi_it = (Elm_Naviframe_Item *) it;
+ navi_it = (Elm_Naviframe_Item *)it;
wd = elm_widget_data_get(WIDGET(navi_it));
if (!wd) return;
l = wd->stack->last->prev;
- while(l)
+ while (l)
{
if (EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item) ==
- ((Elm_Naviframe_Item *) it)) break;
+ ((Elm_Naviframe_Item *)it)) break;
prev_l = l->prev;
wd->stack = eina_inlist_remove(wd->stack, l);
_item_del(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item));
+ elm_widget_item_free(EINA_INLIST_CONTAINER_GET(l,
+ Elm_Naviframe_Item));
l = prev_l;
}
elm_naviframe_item_pop(WIDGET(navi_it));
Elm_Naviframe_Item *prev_it;
Widget_Data *wd;
- navi_it = (Elm_Naviframe_Item *) it;
+ navi_it = (Elm_Naviframe_Item *)it;
wd = elm_widget_data_get(navi_it->base.widget);
if (!wd) return;
wd->stack = eina_inlist_demote(wd->stack, EINA_INLIST_GET(navi_it));
prev_it = EINA_INLIST_CONTAINER_GET(wd->stack->last->prev,
Elm_Naviframe_Item);
+ if (prev_it->content)
+ {
+ prev_it->content_unfocusable = elm_widget_tree_unfocusable_get(prev_it->content);
+ elm_widget_tree_unfocusable_set(prev_it->content, EINA_TRUE);
+ }
+
if (wd->freeze_events)
{
evas_object_freeze_events_set(VIEW(it), EINA_TRUE);
evas_object_freeze_events_set(VIEW(prev_it), EINA_TRUE);
}
- edje_object_signal_emit(VIEW(prev_it),
- "elm,state,cur,pushed",
- "elm");
+ elm_object_signal_emit(VIEW(prev_it),
+ "elm,state,cur,pushed",
+ "elm");
evas_object_show(VIEW(navi_it));
evas_object_raise(VIEW(navi_it));
- edje_object_signal_emit(VIEW(navi_it),
- "elm,state,new,pushed",
- "elm");
- edje_object_message_signal_process(VIEW(prev_it));
- edje_object_message_signal_process(VIEW(navi_it));
+ elm_object_signal_emit(VIEW(navi_it),
+ "elm,state,new,pushed",
+ "elm");
+ edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it)));
+ edje_object_message_signal_process(elm_layout_edje_get(VIEW(navi_it)));
}
EAPI void
-elm_naviframe_item_del(Elm_Object_Item *it)
+elm_naviframe_item_simple_promote(Evas_Object *obj, Evas_Object *content)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it;
- Widget_Data *wd;
-
- navi_it =(Elm_Naviframe_Item *) it;
- wd = elm_widget_data_get(WIDGET(navi_it));
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-
- if (it == elm_naviframe_top_item_get(WIDGET(navi_it)))
- {
- wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
- _item_del(navi_it);
- //If the item is only one, the stack will be empty
- if (!wd->stack) return;
- navi_it = EINA_INLIST_CONTAINER_GET(wd->stack->last,
- Elm_Naviframe_Item);
- evas_object_show(VIEW(navi_it));
- evas_object_raise(VIEW(navi_it));
- edje_object_signal_emit(VIEW(navi_it), "elm,state,visible", "elm");
- }
- else
+ Elm_Naviframe_Item *itr;
+ EINA_INLIST_FOREACH(wd->stack, itr)
{
- wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
- _item_del(navi_it);
+ if (elm_object_item_content_get((Elm_Object_Item *)itr) == content)
+ {
+ elm_naviframe_item_promote((Elm_Object_Item *)itr);
+ break;
+ }
}
}
+
EAPI void
elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve)
{
elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it;
- //Return if new style is exsiting one.
if (item_style)
if (!strcmp(item_style, navi_it->style)) return;
if (!strcmp("basic", navi_it->style)) return;
_item_style_set(navi_it, item_style);
+ _item_title_visible_update(navi_it);
}
EAPI const char *
elm_naviframe_item_style_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it;
return navi_it->style;
}
elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it;
visible = !!visible;
if (navi_it->title_visible == visible) return;
elm_naviframe_item_title_visible_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
- Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *)it;
return navi_it->title_visible;
}
return wd->auto_pushed;
}
-EAPI Eina_Inlist *
+EAPI Eina_List *
elm_naviframe_items_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- return wd->stack;
+ Eina_List *ret = NULL;
+ Elm_Naviframe_Item *itr;
+ EINA_INLIST_FOREACH(wd->stack, itr)
+ ret = eina_list_append(ret, itr);
+ return ret;
}
EAPI void