[Merge Conflict Resolved in elementary.h.in]
authorShilpa Singh <shilpa.singh@samsung.com>
Tue, 5 Apr 2011 05:09:10 +0000 (10:39 +0530)
committerShilpa Singh <shilpa.singh@samsung.com>
Fri, 8 Apr 2011 05:59:55 +0000 (11:29 +0530)
[elm_navigationbar_ex]: show/hide API for title object.

Change-Id: I9e7a96494763a1e466437820095e7febb4775910

src/lib/Elementary.h.in
src/lib/elm_navigationbar_ex.c

index a5142ba..f3342b3 100644 (file)
@@ -2781,6 +2781,8 @@ extern "C" {
    EAPI void         elm_navigationbar_ex_item_icon_set(Elm_Navigationbar_ex_Item* item, Evas_Object *icon);
    EAPI Evas_Object *elm_navigationbar_ex_item_title_button_unset(Elm_Navigationbar_ex_Item* item, int button_type);
    EAPI void         elm_navigationbar_ex_animation_disable_set(Evas_Object *obj, Eina_Bool disable);
+   EAPI void         elm_navigationbar_ex_title_object_visible_set(Elm_Navigationbar_ex_Item* item, Eina_Bool visible);
+   Eina_Bool         elm_navigationbar_ex_title_object_visible_get(Elm_Navigationbar_ex_Item* item);
    
    
    /* Control Bar */
index ee67723..56c8419 100644 (file)
@@ -393,7 +393,7 @@ _process_deletions(Widget_Data *wd)
 }\r
 \r
 static void\r
-_show_hide_titleobj(void *data, Evas_Object *obj , const char *emission, const char *source)\r
+_switch_titleobj_visibility(void *data, Evas_Object *obj , const char *emission, const char *source)\r
 {\r
    Elm_Navigationbar_ex_Item *item = (Elm_Navigationbar_ex_Item *)data;\r
    if(!item) return;\r
@@ -761,7 +761,7 @@ elm_navigationbar_ex_item_title_object_set(Elm_Navigationbar_ex_Item* item, Evas
         elm_widget_sub_object_add(item->obj,title_obj);\r
         edje_object_part_swallow(item->base, "elm.swallow.title", title_obj);\r
         edje_object_signal_callback_add(item->base, "elm,action,clicked", "elm",\r
-                                        _show_hide_titleobj, item);\r
+                                        _switch_titleobj_visibility, item);\r
      }\r
    _sizing_eval(item->obj);\r
 }\r
@@ -1108,5 +1108,38 @@ elm_navigationbar_ex_animation_disable_set(Evas_Object *obj, Eina_Bool disable)
    wd->disable_animation = disable;\r
 }\r
 \r
+/**\r
+ * This shows/hides title object area.\r
+ *\r
+ * @param[in] item The Navigationbar_ex item\r
+ * @param[in] visible  if EINA_TRUE title object is shown else its hidden.\r
+ * @ingroup Navigationbar_ex\r
+ */\r
+EAPI void\r
+elm_navigationbar_ex_title_object_visible_set(Elm_Navigationbar_ex_Item* item, Eina_Bool visible)\r
+{\r
+   if(!item) return;\r
+   if(!item->title_obj) return;\r
+   if(visible)\r
+     edje_object_signal_emit(item->base, "elm,state,show,title", "elm");\r
+   else\r
+     edje_object_signal_emit(item->base, "elm,state,hide,title", "elm");\r
+   item->titleobj_visible = visible;\r
+}\r
+\r
+/**\r
+ * This gets the status whether title object is shown/hidden.\r
+ *\r
+ * @param[in] item The Navigationbar_ex item\r
+ * @return The status whether title object is shown/hidden.\r
+ * @ingroup Navigationbar_ex\r
+ */\r
+Eina_Bool\r
+elm_navigationbar_ex_title_object_visible_get(Elm_Navigationbar_ex_Item* item)\r
+{\r
+   if (!item) return NULL;\r
+   return item->titleobj_visible;\r
+}\r
+\r
 \r
 \r