From 80f4a5b1d1b68beee7e3ee875a77455fca4466af Mon Sep 17 00:00:00 2001 From: hermet Date: Wed, 7 Mar 2012 16:52:22 +0000 Subject: [PATCH] elementary/naviframe - added obj parameters to insert_before, insert_after APis to keep the consistency. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69003 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elc_naviframe.c | 12 ++++++++---- src/lib/elc_naviframe.h | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index f69b4e8..b586583 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -1160,18 +1160,20 @@ elm_naviframe_item_push(Evas_Object *obj, } 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, @@ -1187,18 +1189,20 @@ elm_naviframe_item_insert_before(Elm_Object_Item *before, } 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; - 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, diff --git a/src/lib/elc_naviframe.h b/src/lib/elc_naviframe.h index ab8efb6..d43d209 100644 --- a/src/lib/elc_naviframe.h +++ b/src/lib/elc_naviframe.h @@ -113,6 +113,7 @@ EAPI Elm_Object_Item *elm_naviframe_item_push(Evas_Object *obj, const char *titl /** * @brief Insert a new item into the naviframe before item @p before. * + * @param obj The naviframe object * @param before The naviframe item to insert before. * @param title_label The label in the title area. The name of the title * label part is "elm.text.title" @@ -139,11 +140,12 @@ EAPI Elm_Object_Item *elm_naviframe_item_push(Evas_Object *obj, const char *titl * * @ingroup Naviframe */ -EAPI Elm_Object_Item *elm_naviframe_item_insert_before(Elm_Object_Item *before, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style); +EAPI Elm_Object_Item *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); /** * @brief Insert a new item into the naviframe after item @p after. * + * @param obj The naviframe object * @param after The naviframe item to insert after. * @param title_label The label in the title area. The name of the title * label part is "elm.text.title" @@ -170,7 +172,7 @@ EAPI Elm_Object_Item *elm_naviframe_item_insert_before(Elm_Object_Item *before, * * @ingroup Naviframe */ -EAPI Elm_Object_Item *elm_naviframe_item_insert_after(Elm_Object_Item *after, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style); +EAPI Elm_Object_Item *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); /** * @brief Pop an item that is on top of the stack -- 2.7.4