From 48594e9d4dca37ecd5105a7feb5265a2f71f6467 Mon Sep 17 00:00:00 2001 From: shilpa singh Date: Wed, 6 Oct 2010 21:49:47 +0900 Subject: [PATCH] [elm_navigationbar_ex]: Added icon set and get function. --- src/lib/Elementary.h.in | 2 ++ src/lib/elm_navigationbar_ex.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index d7659be..4fe4757 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -2268,6 +2268,8 @@ extern "C" { EAPI Evas_Object *elm_navigationbar_ex_item_content_unset(Elm_Navigationbar_ex_Item* item); EAPI Evas_Object *elm_navigationbar_ex_item_content_get(Elm_Navigationbar_ex_Item* item); EAPI void elm_navigationbar_ex_delete_on_pop_set(Evas_Object *obj, Eina_Bool del_on_pop); + EAPI Evas_Object *elm_navigationbar_ex_item_icon_get(Elm_Navigationbar_ex_Item* item); + EAPI void elm_navigationbar_ex_item_icon_set(Elm_Navigationbar_ex_Item* item, Evas_Object *icon); /* Tab Bar */ diff --git a/src/lib/elm_navigationbar_ex.c b/src/lib/elm_navigationbar_ex.c index 0c0ca57..cdfcf7a 100644 --- a/src/lib/elm_navigationbar_ex.c +++ b/src/lib/elm_navigationbar_ex.c @@ -47,6 +47,7 @@ struct _Elm_Navigationbar_ex_Item const char *item_style; Eina_List *fnbtn_list; Evas_Object *title_obj; + Evas_Object *icon; Eina_Bool popme : 1; }; @@ -491,6 +492,24 @@ elm_navigationbar_ex_item_subtitle_label_get(Elm_Navigationbar_ex_Item* item) return item->subtitle; } + +EAPI void +elm_navigationbar_ex_item_icon_set(Elm_Navigationbar_ex_Item* item, Evas_Object *icon) +{ + if(!item) return; + edje_object_part_swallow(item->base, "elm.swallow.icon", icon); + elm_widget_sub_object_add(item->obj, icon); + item->icon = icon; +} + +EAPI Evas_Object * +elm_navigationbar_ex_item_icon_get(Elm_Navigationbar_ex_Item* item) +{ + if(!item) return NULL; + return item->icon; +} + + /** * Set the button object of the pushed content * -- 2.7.4