elementary/naviframe - the first widget appiled the item smart callbacks.
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 24 Feb 2012 07:02:01 +0000 (07:02 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 24 Feb 2012 07:02:01 +0000 (07:02 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68388 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elc_naviframe.c
src/lib/elc_naviframe.h

index 3221cd5..2aa05e9 100644 (file)
@@ -48,14 +48,19 @@ struct _Elm_Naviframe_Item
 
 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";
 
+//widget item signals
+static const char SIG_ITEM_SHOW_BEGIN[] = "show,begin";
+static const char SIG_ITEM_HIDE_FINISHED[] = "hide,finished";
+
 static const Evas_Smart_Cb_Description _signals[] = {
        {SIG_TRANSITION_FINISHED, ""},
        {SIG_TITLE_CLICKED, ""},
+       {SIG_ITEM_SHOW_BEGIN, ""},
+       {SIG_ITEM_HIDE_FINISHED, ""},
        {NULL, NULL}
 };
 
@@ -874,11 +879,12 @@ _pushed_finished(void *data,
    if (!wd) return;
 
    evas_object_hide(VIEW(it));
-   evas_object_smart_callback_call(WIDGET(it),
-                                   SIG_PUSH_FINISHED,
-                                   data);
    if (wd->freeze_events)
      evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
+
+   elm_widget_item_smart_callback_call(it,
+                                       SIG_ITEM_HIDE_FINISHED,
+                                       NULL);
 }
 
 static void
@@ -889,9 +895,6 @@ _popped_finished(void *data,
 {
    Elm_Naviframe_Item *it = data;
    if (!it) return;
-   evas_object_smart_callback_call(WIDGET(it),
-                                   SIG_POP_FINISHED,
-                                   data);
    _item_del(data);
    elm_widget_item_free(data);
 }
@@ -1184,7 +1187,8 @@ elm_naviframe_item_insert_before(Elm_Object_Item *before,
    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;
@@ -1215,7 +1219,8 @@ elm_naviframe_item_insert_after(Elm_Object_Item *after,
         evas_object_show(VIEW(it));
      }
    wd->stack =
-      eina_inlist_append_relative(wd->stack, EINA_INLIST_GET(it),
+      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;
@@ -1257,6 +1262,9 @@ elm_naviframe_item_pop(Evas_Object *obj)
                                "elm");
         edje_object_message_signal_process(elm_layout_edje_get(VIEW(it)));
         edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it)));
+        elm_widget_item_smart_callback_call(prev_it,
+                                            SIG_ITEM_SHOW_BEGIN,
+                                            NULL);
      }
    else
      {
index d51f9e4..bd59115 100644 (file)
  * item
  * @li "title,clicked" - User clicked title area
  *
+ * Item Signals that you can add callback for are:
+ * @li "show,begin" - When the item is started to be top item.
+ * @li "hide,finished" - When a new top item is finished to push onto the
+ * item.
+ *
  * Default content parts of the naviframe items that you can use content hooks
  * for are:
  * @li "default" - The main content of the page