From 10d93c86e86f9f1d0d391fd130f610f7dbdbc925 Mon Sep 17 00:00:00 2001 From: hermet Date: Tue, 31 Jan 2012 05:01:27 +0000 Subject: [PATCH] elementary/diskselector - deprecated elm_diskselector_item_cursor_* APIs. Please use elm_object_item_cursor_* APIs. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67625 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_deprecated.h | 108 +++++++++++++++++++++++++++++++++++++++++++++ src/lib/elm_diskselector.c | 36 +++++---------- src/lib/elm_diskselector.h | 1 - 3 files changed, 120 insertions(+), 25 deletions(-) diff --git a/src/lib/elm_deprecated.h b/src/lib/elm_deprecated.h index 22926b2..74ec0ff 100644 --- a/src/lib/elm_deprecated.h +++ b/src/lib/elm_deprecated.h @@ -1573,6 +1573,114 @@ EINA_DEPRECATED EAPI void elm_diskselector_item_tooltip_style_ */ EINA_DEPRECATED EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Object_Item *it); +/** + * Set the cursor to be shown when mouse is over the diskselector item + * + * @param it Target item + * @param cursor the cursor name to be used. + * + * @see elm_object_cursor_set() for more details. + * @deprecated Use elm_object_item_cursor_set() instead + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI void elm_diskselector_item_cursor_set(Elm_Object_Item *it, const char *cursor); + +/** + * Get the cursor to be shown when mouse is over the diskselector item + * + * @param it diskselector item with cursor already set. + * @return the cursor name. + * + * @see elm_object_cursor_get() for more details. + * @see elm_diskselector_cursor_set() + * @deprecated Use elm_object_item_cursor_get() instead + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI const char *elm_diskselector_item_cursor_get(const Elm_Object_Item *it); + +/** + * Unset the cursor to be shown when mouse is over the diskselector item + * + * @param it Target item + * + * @see elm_object_cursor_unset() for more details. + * @see elm_diskselector_cursor_set() + * @deprecated use elm_object_item_cursor_unset() instead + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI void elm_diskselector_item_cursor_unset(Elm_Object_Item *it); + +/** + * Sets a different style for this item cursor. + * + * @note before you set a style you should define a cursor with + * elm_diskselector_item_cursor_set() + * + * @param it diskselector item with cursor already set. + * @param style the theme style to use (default, transparent, ...) + * + * @see elm_object_cursor_style_set() for more details. + * @deprecated Use elm_object_item_cursor_style_set() instead + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI void elm_diskselector_item_cursor_style_set(Elm_Object_Item *it, const char *style); + +/** + * Get the style for this item cursor. + * + * @param it diskselector item with cursor already set. + * @return style the theme style in use, defaults to "default". If the + * object does not have a cursor set, then @c NULL is returned. + * + * @see elm_object_cursor_style_get() for more details. + * @see elm_diskselector_item_cursor_style_set() + * @deprecated Use elm_object_item_cursor_style_get() instead + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Object_Item *it); + +/** + * Set if the cursor set should be searched on the theme or should use + * the provided by the engine, only. + * + * @note before you set if should look on theme you should define a cursor + * with elm_diskselector_item_cursor_set(). + * By default it will only look for cursors provided by the engine. + * + * @param it widget item with cursor already set. + * @param engine_only boolean to define if cursors set with + * elm_diskselector_item_cursor_set() should be searched only + * between cursors provided by the engine or searched on widget's + * theme as well. + * + * @see elm_object_cursor_engine_only_set() for more details. + * @deprecated Use elm_object_item_cursor_engine_only_set() instead + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only); + +/** + * Get the cursor engine only usage for this item cursor. + * + * @param it widget item with cursor already set. + * @return engine_only boolean to define it cursors should be looked only + * between the provided by the engine or searched on widget's theme as well. + * If the item does not have a cursor set, then @c EINA_FALSE is returned. + * + * @see elm_object_cursor_engine_only_get() for more details. + * @see elm_diskselector_item_cursor_engine_only_set() + * @deprecated Use elm_object_item_cursor_engine_only_get() instead + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Object_Item *it); + EINA_DEPRECATED EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content); EINA_DEPRECATED EAPI Evas_Object *elm_factory_content_get(const Evas_Object *obj); diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c index 4a9a913..bdae20b 100644 --- a/src/lib/elm_diskselector.c +++ b/src/lib/elm_diskselector.c @@ -1397,85 +1397,73 @@ elm_diskselector_last_item_get(const Evas_Object *obj) EAPI void elm_diskselector_item_tooltip_text_set(Elm_Object_Item *it, const char *text) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - elm_widget_item_tooltip_text_set(it, text); + elm_object_item_tooltip_text_set(it, text); } EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - elm_widget_item_tooltip_content_cb_set(it, func, data, del_cb); + elm_object_item_tooltip_content_cb_set(it, func, data, del_cb); } EAPI void elm_diskselector_item_tooltip_unset(Elm_Object_Item *it) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - elm_widget_item_tooltip_unset(it); + elm_object_item_tooltip_unset(it); } EAPI void elm_diskselector_item_tooltip_style_set(Elm_Object_Item *it, const char *style) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - elm_widget_item_tooltip_style_set(it, style); + elm_object_item_tooltip_style_set(it, style); } EAPI const char * elm_diskselector_item_tooltip_style_get(const Elm_Object_Item *it) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); - return elm_widget_item_tooltip_style_get(it); + return elm_object_item_tooltip_style_get(it); } EAPI void elm_diskselector_item_cursor_set(Elm_Object_Item *it, const char *cursor) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - elm_widget_item_cursor_set(it, cursor); + elm_object_item_cursor_set(it, cursor); } EAPI const char * elm_diskselector_item_cursor_get(const Elm_Object_Item *it) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); - return elm_widget_item_cursor_get(it); + return elm_object_item_cursor_get(it); } EAPI void elm_diskselector_item_cursor_unset(Elm_Object_Item *it) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - elm_widget_item_cursor_unset(it); + elm_object_item_cursor_unset(it); } EAPI void elm_diskselector_item_cursor_style_set(Elm_Object_Item *it, const char *style) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - elm_widget_item_cursor_style_set(it, style); + elm_object_item_cursor_style_set(it, style); } EAPI const char * elm_diskselector_item_cursor_style_get(const Elm_Object_Item *it) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); - return elm_widget_item_cursor_style_get(it); + return elm_object_item_cursor_style_get(it); } EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - elm_widget_item_cursor_engine_only_set(it, engine_only); + elm_object_item_cursor_engine_only_set(it, engine_only); } EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Object_Item *it) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); - return elm_widget_item_cursor_engine_only_get(it); + return elm_object_item_cursor_engine_only_get(it); } EAPI void diff --git a/src/lib/elm_diskselector.h b/src/lib/elm_diskselector.h index 7185622..96d0b5f 100644 --- a/src/lib/elm_diskselector.h +++ b/src/lib/elm_diskselector.h @@ -429,7 +429,6 @@ EAPI Elm_Object_Item *elm_diskselector_item_prev_get(const Elm_Object_Item *it); */ EAPI Elm_Object_Item *elm_diskselector_item_next_get(const Elm_Object_Item *it); - /** * Set the cursor to be shown when mouse is over the diskselector item * -- 2.7.4