From: raster Date: Tue, 3 Jan 2012 11:48:34 +0000 (+0000) Subject: deprecate 2 callls already using the new infra X-Git-Tag: REL_F_I9500_20120323_1~17^2~961 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbe0373a1b14b58a4fd331395f68b216a87a1fe7;p=framework%2Fuifw%2Felementary.git deprecate 2 callls already using the new infra git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66788 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_deprecated.h b/src/lib/elm_deprecated.h index 810a35e..0d78f68 100644 --- a/src/lib/elm_deprecated.h +++ b/src/lib/elm_deprecated.h @@ -2679,3 +2679,42 @@ EINA_DEPRECATED EAPI void elm_list_item_disabled_set(Elm * @ingroup List */ EINA_DEPRECATED EAPI Eina_Bool elm_list_item_disabled_get(const Elm_List_Item *it); + +/** + * Set the function called when a list item is freed. + * + * @param item The item to set the callback on + * @param func The function called + * + * If there is a @p func, then it will be called prior item's memory release. + * That will be called with the following arguments: + * @li item's data; + * @li item's Evas object; + * @li item itself; + * + * This way, a data associated to a list item could be properly freed. + * + * @deprecated Please use elm_widget_item_del_cb_set() instead. + * + * @ingroup List + */ +EINA_DEPRECATED EAPI void elm_list_item_del_cb_set(Elm_List_Item *item, Evas_Smart_Cb func); + +/** + * Get the data associated to the item. + * + * @param item The list item + * @return The data associated to @p item + * + * The return value is a pointer to data associated to @p item when it was + * created, with function elm_list_item_append() or similar. If no data + * was passed as argument, it will return @c NULL. + * + * @see elm_list_item_append() + * + * @deprecated Please use elm_widget_item_data_get() instead. + * + * @ingroup List + */ +EINA_DEPRECATED EAPI void *elm_list_item_data_get(const Elm_List_Item *item); + diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index e9aac44..175de2b 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -1863,8 +1863,6 @@ elm_list_item_disabled_get(const Elm_List_Item *it) return elm_object_item_disabled_get((Elm_Object_Item *)it); } -// XXX: the below need to use the elm_object_item infra indicated -// use elm_object_item_data_set EINA_DEPRECATED EAPI void elm_list_item_del_cb_set(Elm_List_Item *it, Evas_Smart_Cb func) { @@ -1872,7 +1870,6 @@ elm_list_item_del_cb_set(Elm_List_Item *it, Evas_Smart_Cb func) elm_widget_item_del_cb_set(it, func); } -// use elm_object_item_data_get EINA_DEPRECATED EAPI void * elm_list_item_data_get(const Elm_List_Item *it) { @@ -1880,6 +1877,7 @@ elm_list_item_data_get(const Elm_List_Item *it) return elm_widget_item_data_get(it); } +// XXX: the below need to use the elm_object_item infra indicated // use elm_object_item_part_content_get EINA_DEPRECATED EAPI Evas_Object * elm_list_item_icon_get(const Elm_List_Item *it) diff --git a/src/lib/elm_list.h b/src/lib/elm_list.h index 090f00b..0a3f09e 100644 --- a/src/lib/elm_list.h +++ b/src/lib/elm_list.h @@ -336,7 +336,7 @@ EAPI void elm_list_scroller_policy_get(const Evas_Object * elm_list_item_del(). * * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). + * callback function is set with elm_widget_item_del_cb_set(). * * If a function is passed as argument, it will be called everytime this item * is selected, i.e., the user clicks over an unselected item. @@ -358,7 +358,7 @@ EAPI void elm_list_scroller_policy_get(const Evas_Object * * @see elm_list_always_select_mode_set() * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() + * @see elm_widget_item_del_cb_set() * @see elm_list_clear() * @see elm_icon_add() * @@ -388,7 +388,7 @@ EAPI Elm_List_Item *elm_list_item_append(Evas_Object *obj, const c * elm_list_item_del(). * * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). + * callback function is set with elm_widget_item_del_cb_set(). * * If a function is passed as argument, it will be called everytime this item * is selected, i.e., the user clicks over an unselected item. @@ -400,7 +400,7 @@ EAPI Elm_List_Item *elm_list_item_append(Evas_Object *obj, const c * @see elm_list_item_append() for a simple code example. * @see elm_list_always_select_mode_set() * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() + * @see elm_widget_item_del_cb_set() * @see elm_list_clear() * @see elm_icon_add() * @@ -431,7 +431,7 @@ EAPI Elm_List_Item *elm_list_item_prepend(Evas_Object *obj, const * elm_list_item_del(). * * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). + * callback function is set with elm_widget_item_del_cb_set(). * * If a function is passed as argument, it will be called everytime this item * is selected, i.e., the user clicks over an unselected item. @@ -443,7 +443,7 @@ EAPI Elm_List_Item *elm_list_item_prepend(Evas_Object *obj, const * @see elm_list_item_append() for a simple code example. * @see elm_list_always_select_mode_set() * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() + * @see elm_widget_item_del_cb_set() * @see elm_list_clear() * @see elm_icon_add() * @@ -474,7 +474,7 @@ EAPI Elm_List_Item *elm_list_item_insert_before(Evas_Object *obj, * elm_list_item_del(). * * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). + * callback function is set with elm_widget_item_del_cb_set(). * * If a function is passed as argument, it will be called everytime this item * is selected, i.e., the user clicks over an unselected item. @@ -486,7 +486,7 @@ EAPI Elm_List_Item *elm_list_item_insert_before(Evas_Object *obj, * @see elm_list_item_append() for a simple code example. * @see elm_list_always_select_mode_set() * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() + * @see elm_widget_item_del_cb_set() * @see elm_list_clear() * @see elm_icon_add() * @@ -525,7 +525,7 @@ EAPI Elm_List_Item *elm_list_item_insert_after(Evas_Object *obj, E * elm_list_item_del(). * * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). + * callback function is set with elm_widget_item_del_cb_set(). * * If a function is passed as argument, it will be called everytime this item * is selected, i.e., the user clicks over an unselected item. @@ -537,7 +537,7 @@ EAPI Elm_List_Item *elm_list_item_insert_after(Evas_Object *obj, E * @see elm_list_item_append() for a simple code example. * @see elm_list_always_select_mode_set() * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() + * @see elm_widget_item_del_cb_set() * @see elm_list_clear() * @see elm_icon_add() * @@ -713,47 +713,13 @@ EAPI void elm_list_item_bring_in(Elm_List_Item *item); * * @see elm_list_clear() * @see elm_list_item_append() - * @see elm_list_item_del_cb_set() + * @see elm_widget_item_del_cb_set() * * @ingroup List */ EAPI void elm_list_item_del(Elm_List_Item *item); /** - * Set the function called when a list item is freed. - * - * @param item The item to set the callback on - * @param func The function called - * - * If there is a @p func, then it will be called prior item's memory release. - * That will be called with the following arguments: - * @li item's data; - * @li item's Evas object; - * @li item itself; - * - * This way, a data associated to a list item could be properly freed. - * - * @ingroup List - */ -EAPI void elm_list_item_del_cb_set(Elm_List_Item *item, Evas_Smart_Cb func); - -/** - * Get the data associated to the item. - * - * @param item The list item - * @return The data associated to @p item - * - * The return value is a pointer to data associated to @p item when it was - * created, with function elm_list_item_append() or similar. If no data - * was passed as argument, it will return @c NULL. - * - * @see elm_list_item_append() - * - * @ingroup List - */ -EAPI void *elm_list_item_data_get(const Elm_List_Item *item); - -/** * Get the left side icon associated to the item. * * @param item The list item