remove gross genlistitemmoved function thingy and implement smart cb
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 21 Oct 2011 01:49:15 +0000 (01:49 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 21 Oct 2011 01:49:15 +0000 (01:49 +0000)
also removed relevant item on TODO

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64222 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

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

index ed8ed44..c83ed57 100644 (file)
@@ -18082,6 +18082,7 @@ extern "C" {
     *   pinched out.  "- @c multi,pinch,in" - This is called when the genlist is
     *   multi-touch pinched in.
     * - @c "swipe" - This is called when the genlist is swiped.
+    * - @c "moved" - This is called when a genlist item is moved.
     * - @c "language,changed" - This is called when the program's language is
     *   changed.
     *
@@ -18123,7 +18124,6 @@ extern "C" {
    typedef Evas_Object *(*Elm_Genlist_Item_Icon_Get_Cb)  (void *data, Evas_Object *obj, const char *part); /**< Icon fetching class function for genlist item classes. */
    typedef Eina_Bool    (*Elm_Genlist_Item_State_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< State fetching class function for genlist item classes. */
    typedef void         (*Elm_Genlist_Item_Del_Cb)      (void *data, Evas_Object *obj); /**< Deletion class function for genlist item classes. */
-   typedef void         (*GenlistItemMovedFunc)    (Evas_Object *obj, Elm_Genlist_Item *item, Elm_Genlist_Item *rel_item, Eina_Bool move_after); /** TODO: remove this by SeoZ **/
 
    typedef char        *(*GenlistItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Genlist_Item_Label_Get_Cb instead. */
    typedef Evas_Object *(*GenlistItemIconGetFunc)  (void *data, Evas_Object *obj, const char *part) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Genlist_Item_Icon_Get_Cb instead. */
@@ -18149,7 +18149,6 @@ extern "C" {
              Elm_Genlist_Item_Icon_Get_Cb   icon_get; /**< Icon fetching class function for genlist item classes. */
              Elm_Genlist_Item_State_Get_Cb  state_get; /**< State fetching class function for genlist item classes. */
              Elm_Genlist_Item_Del_Cb        del; /**< Deletion class function for genlist item classes. */
-             GenlistItemMovedFunc     moved; // TODO: do not use this. change this to smart callback.
           } func;
         const char                *mode_item_style;
      };
index 9c6a367..16065f9 100644 (file)
@@ -276,6 +276,7 @@ static const char SIG_MULTI_SWIPE_DOWN[] = "multi,swipe,down";
 static const char SIG_MULTI_PINCH_OUT[] = "multi,pinch,out";
 static const char SIG_MULTI_PINCH_IN[] = "multi,pinch,in";
 static const char SIG_SWIPE[] = "swipe";
+static const char SIG_MOVED[] = "moved";
 
 static const Evas_Smart_Cb_Description _signals[] = {
    {SIG_CLICKED_DOUBLE, ""},
@@ -314,6 +315,7 @@ static const Evas_Smart_Cb_Description _signals[] = {
    {SIG_MULTI_PINCH_OUT, ""},
    {SIG_MULTI_PINCH_IN, ""},
    {SIG_SWIPE, ""},
+   {SIG_MOVED, ""},
    {NULL, NULL}
 };
 
@@ -3474,9 +3476,7 @@ _item_move_after(Elm_Genlist_Item *it, Elm_Genlist_Item *after)
    if (after->group_item) it->group_item = after->group_item;
    _item_queue(it->wd, it);
 
-   // TODO: change this to smart callback
-   if (it->itc->func.moved)
-     it->itc->func.moved(WIDGET(it), it, after, EINA_TRUE);
+   evas_object_smart_callback_call(WIDGET(it), SIG_MOVED, it);
 }
 
 static void
@@ -3494,9 +3494,7 @@ _item_move_before(Elm_Genlist_Item *it, Elm_Genlist_Item *before)
    if (before->group_item) it->group_item = before->group_item;
    _item_queue(it->wd, it);
 
-   // TODO: change this to smart callback
-   if (it->itc->func.moved)
-     it->itc->func.moved(WIDGET(it), it, before, EINA_FALSE);
+   evas_object_smart_callback_call(WIDGET(it), SIG_MOVED, it);
 }
 
 EAPI Elm_Genlist_Item *