diff --git a/legacy/elementary/src/lib/elm_deprecated.h b/legacy/elementary/src/lib/elm_deprecated.h index bc5f90e437..cfdb51b3f6 100644 --- a/legacy/elementary/src/lib/elm_deprecated.h +++ b/legacy/elementary/src/lib/elm_deprecated.h @@ -3450,6 +3450,144 @@ EINA_DEPRECATED EAPI void elm_list_item_tooltip_style_se */ EINA_DEPRECATED EAPI const char *elm_list_item_tooltip_style_get(const Elm_Object_Item *it); +/** + * Set the type of mouse pointer/cursor decoration to be shown, + * when the mouse pointer is over the given list widget item + * + * @param it list item to customize cursor on + * @param cursor the cursor type's name + * + * This function works analogously as elm_object_cursor_set(), but + * here the cursor's changing area is restricted to the item's + * area, and not the whole widget's. Note that that item cursors + * have precedence over widget cursors, so that a mouse over an + * item with custom cursor set will always show @b that cursor. + * + * If this function is called twice for an object, a previously set + * cursor will be unset on the second call. + * + * @see elm_object_cursor_set() + * @see elm_list_item_cursor_get() + * @see elm_list_item_cursor_unset() + * + * @deprecated Please use elm_object_item_cursor_set() instead + * @ingroup List + */ +EINA_DEPRECATED EAPI void elm_list_item_cursor_set(Elm_Object_Item *it, const char *cursor); + +/* + * Get the type of mouse pointer/cursor decoration set to be shown, + * when the mouse pointer is over the given list widget item + * + * @param it list item with custom cursor set + * @return the cursor type's name or @c NULL, if no custom cursors + * were set to @p item (and on errors) + * + * @see elm_object_cursor_get() + * @see elm_list_item_cursor_set() + * @see elm_list_item_cursor_unset() + * + * @deprecated Please use elm_object_item_cursor_get() insteas + * @ingroup List + */ +EINA_DEPRECATED EAPI const char *elm_list_item_cursor_get(const Elm_Object_Item *it); + +/** + * Unset any custom mouse pointer/cursor decoration set to be + * shown, when the mouse pointer is over the given list widget + * item, thus making it show the @b default cursor again. + * + * @param it a list item + * + * Use this call to undo any custom settings on this item's cursor + * decoration, bringing it back to defaults (no custom style set). + * + * @see elm_object_cursor_unset() + * @see elm_list_item_cursor_set() + * + * @deprecated Please use elm_list_item_cursor_unset() instead + * @ingroup List + */ +EINA_DEPRECATED EAPI void elm_list_item_cursor_unset(Elm_Object_Item *it); + +/** + * Set a different @b style for a given custom cursor set for a + * list item. + * + * @param it list item with custom cursor set + * @param style the theme style to use (e.g. @c "default", + * @c "transparent", etc) + * + * This function only makes sense when one is using custom mouse + * cursor decorations defined in a theme file, which can have, + * given a cursor name/type, alternate styles on it. It + * works analogously as elm_object_cursor_style_set(), but here + * applyed only to list item objects. + * + * @warning Before you set a cursor style you should have definen a + * custom cursor previously on the item, with + * elm_list_item_cursor_set() + * + * @see elm_list_item_cursor_engine_only_set() + * @see elm_list_item_cursor_style_get() + * + * @deprecated Please use elm_list_item_cursor_style_set() instead + * @ingroup List + */ +EINA_DEPRECATED EAPI void elm_list_item_cursor_style_set(Elm_Object_Item *it, const char *style); + +/** + * Get the current @b style set for a given list item's custom + * cursor + * + * @param it list item with custom cursor set. + * @return style the cursor style in use. If the object does not + * have a cursor set, then @c NULL is returned. + * + * @see elm_list_item_cursor_style_set() for more details + * + * @deprecated Please use elm_list_item_cursor_style_get() instead + * @ingroup List + */ +EINA_DEPRECATED EAPI const char *elm_list_item_cursor_style_get(const Elm_Object_Item *it); + +/** + * Set if the (custom)cursor for a given list item should be + * searched in its theme, also, or should only rely on the + * rendering engine. + * + * @param it item with custom (custom) cursor already set on + * @param engine_only Use @c EINA_TRUE to have cursors looked for + * only on those provided by the rendering engine, @c EINA_FALSE to + * have them searched on the widget's theme, as well. + * + * @note This call is of use only if you've set a custom cursor + * for list items, with elm_list_item_cursor_set(). + * + * @note By default, cursors will only be looked for between those + * provided by the rendering engine. + * + * @deprecated Please use elm_list_item_cursor_engine_only_set() instead + * @ingroup List + */ +EINA_DEPRECATED EAPI void elm_list_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only); + +/** + * Get if the (custom) cursor for a given list item is being + * searched in its theme, also, or is only relying on the rendering + * engine. + * + * @param it a list item + * @return @c EINA_TRUE, if cursors are being looked for only on + * those provided by the rendering engine, @c EINA_FALSE if they + * are being searched on the widget's theme, as well. + * + * @see elm_list_item_cursor_engine_only_set(), for more details + * + * @deprecated Please use elm_list_item_cursor_engine_only_get() instead + * @ingroup List + */ +EINA_DEPRECATED EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_Object_Item *it); /** * Set the shrink state of toolbar @p obj. diff --git a/legacy/elementary/src/lib/elm_list.c b/legacy/elementary/src/lib/elm_list.c index f17a468466..8d03ae4e49 100644 --- a/legacy/elementary/src/lib/elm_list.c +++ b/legacy/elementary/src/lib/elm_list.c @@ -2081,42 +2081,42 @@ elm_list_item_cursor_set(Elm_Object_Item *it, const char *cursor) elm_widget_item_cursor_set(it, cursor); } -EAPI const char * +EINA_DEPRECATED EAPI const char * elm_list_item_cursor_get(const Elm_Object_Item *it) { ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL); return elm_widget_item_cursor_get(it); } -EAPI void +EINA_DEPRECATED EAPI void elm_list_item_cursor_unset(Elm_Object_Item *it) { ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); elm_widget_item_cursor_unset(it); } -EAPI void +EINA_DEPRECATED EAPI void elm_list_item_cursor_style_set(Elm_Object_Item *it, const char *style) { ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); elm_widget_item_cursor_style_set(it, style); } -EAPI const char * +EINA_DEPRECATED EAPI const char * elm_list_item_cursor_style_get(const Elm_Object_Item *it) { ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL); return elm_widget_item_cursor_style_get(it); } -EAPI void +EINA_DEPRECATED EAPI void elm_list_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only) { ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); elm_widget_item_cursor_engine_only_set(it, engine_only); } -EAPI Eina_Bool +EINA_DEPRECATED EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_Object_Item *it) { ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE); diff --git a/legacy/elementary/src/lib/elm_list.h b/legacy/elementary/src/lib/elm_list.h index 811a56f27b..20927d3871 100644 --- a/legacy/elementary/src/lib/elm_list.h +++ b/legacy/elementary/src/lib/elm_list.h @@ -775,139 +775,6 @@ EAPI Elm_Object_Item *elm_list_item_prev(const Elm_Object_Item *it */ EAPI Elm_Object_Item *elm_list_item_next(const Elm_Object_Item *it); - -/** - * Set the type of mouse pointer/cursor decoration to be shown, - * when the mouse pointer is over the given list widget item - * - * @param it list item to customize cursor on - * @param cursor the cursor type's name - * - * This function works analogously as elm_object_cursor_set(), but - * here the cursor's changing area is restricted to the item's - * area, and not the whole widget's. Note that that item cursors - * have precedence over widget cursors, so that a mouse over an - * item with custom cursor set will always show @b that cursor. - * - * If this function is called twice for an object, a previously set - * cursor will be unset on the second call. - * - * @see elm_object_cursor_set() - * @see elm_list_item_cursor_get() - * @see elm_list_item_cursor_unset() - * - * @ingroup List - */ -EAPI void elm_list_item_cursor_set(Elm_Object_Item *it, const char *cursor); - -/* - * Get the type of mouse pointer/cursor decoration set to be shown, - * when the mouse pointer is over the given list widget item - * - * @param it list item with custom cursor set - * @return the cursor type's name or @c NULL, if no custom cursors - * were set to @p item (and on errors) - * - * @see elm_object_cursor_get() - * @see elm_list_item_cursor_set() - * @see elm_list_item_cursor_unset() - * - * @ingroup List - */ -EAPI const char *elm_list_item_cursor_get(const Elm_Object_Item *it); - -/** - * Unset any custom mouse pointer/cursor decoration set to be - * shown, when the mouse pointer is over the given list widget - * item, thus making it show the @b default cursor again. - * - * @param it a list item - * - * Use this call to undo any custom settings on this item's cursor - * decoration, bringing it back to defaults (no custom style set). - * - * @see elm_object_cursor_unset() - * @see elm_list_item_cursor_set() - * - * @ingroup List - */ -EAPI void elm_list_item_cursor_unset(Elm_Object_Item *it); - -/** - * Set a different @b style for a given custom cursor set for a - * list item. - * - * @param it list item with custom cursor set - * @param style the theme style to use (e.g. @c "default", - * @c "transparent", etc) - * - * This function only makes sense when one is using custom mouse - * cursor decorations defined in a theme file, which can have, - * given a cursor name/type, alternate styles on it. It - * works analogously as elm_object_cursor_style_set(), but here - * applyed only to list item objects. - * - * @warning Before you set a cursor style you should have definen a - * custom cursor previously on the item, with - * elm_list_item_cursor_set() - * - * @see elm_list_item_cursor_engine_only_set() - * @see elm_list_item_cursor_style_get() - * - * @ingroup List - */ -EAPI void elm_list_item_cursor_style_set(Elm_Object_Item *it, const char *style); - -/** - * Get the current @b style set for a given list item's custom - * cursor - * - * @param it list item with custom cursor set. - * @return style the cursor style in use. If the object does not - * have a cursor set, then @c NULL is returned. - * - * @see elm_list_item_cursor_style_set() for more details - * - * @ingroup List - */ -EAPI const char *elm_list_item_cursor_style_get(const Elm_Object_Item *it); - -/** - * Set if the (custom)cursor for a given list item should be - * searched in its theme, also, or should only rely on the - * rendering engine. - * - * @param it item with custom (custom) cursor already set on - * @param engine_only Use @c EINA_TRUE to have cursors looked for - * only on those provided by the rendering engine, @c EINA_FALSE to - * have them searched on the widget's theme, as well. - * - * @note This call is of use only if you've set a custom cursor - * for list items, with elm_list_item_cursor_set(). - * - * @note By default, cursors will only be looked for between those - * provided by the rendering engine. - * - * @ingroup List - */ -EAPI void elm_list_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only); - -/** - * Get if the (custom) cursor for a given list item is being - * searched in its theme, also, or is only relying on the rendering - * engine. - * - * @param it a list item - * @return @c EINA_TRUE, if cursors are being looked for only on - * those provided by the rendering engine, @c EINA_FALSE if they - * are being searched on the widget's theme, as well. - * - * @see elm_list_item_cursor_engine_only_set(), for more details - * - * @ingroup List - */ -EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_Object_Item *it); - /** * @} */ diff --git a/legacy/elementary/src/lib/elm_main.c b/legacy/elementary/src/lib/elm_main.c index d9e595ea15..77bb3bf8ac 100644 --- a/legacy/elementary/src/lib/elm_main.c +++ b/legacy/elementary/src/lib/elm_main.c @@ -2186,3 +2186,45 @@ elm_object_item_object_get(const Elm_Object_Item *it) { return elm_object_item_widget_get(it); } + +EAPI void +elm_object_item_cursor_set(Elm_Object_Item *item, const char *cursor) +{ + elm_widget_item_tooltip_style_set(item, cursor); +} + +EAPI const char * +elm_object_item_cursor_get(const Elm_Object_Item *item) +{ + return elm_widget_item_cursor_get(item); +} + +EAPI void +elm_object_item_cursor_unset(Elm_Object_Item *item) +{ + elm_widget_item_cursor_unset(item); +} + +EAPI void +elm_object_item_cursor_style_set(Elm_Object_Item *item, const char *style) +{ + elm_widget_item_cursor_style_set(item, style); +} + +EAPI const char * +elm_object_item_cursor_style_get(const Elm_Object_Item *item) +{ + return elm_widget_item_cursor_style_get(item); +} + +EAPI void +elm_object_item_cursor_engine_only_set(Elm_Object_Item *item, Eina_Bool engine_only) +{ + elm_widget_item_cursor_engine_only_set(item, engine_only); +} + +EAPI Eina_Bool +elm_object_item_cursor_engine_only_get(const Elm_Object_Item *item) +{ + return elm_widget_item_cursor_engine_only_get(item); +} diff --git a/legacy/elementary/src/lib/elm_object_item.h b/legacy/elementary/src/lib/elm_object_item.h index ccd0d62d2f..de6599f10c 100644 --- a/legacy/elementary/src/lib/elm_object_item.h +++ b/legacy/elementary/src/lib/elm_object_item.h @@ -296,3 +296,137 @@ EAPI void elm_object_item_tooltip_style_set(Elm_Object_I * @ingroup General */ EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *item); + + +/** + * Set the type of mouse pointer/cursor decoration to be shown, + * when the mouse pointer is over the given item + * + * @param ite, item to customize cursor on + * @param cursor the cursor type's name + * + * This function works analogously as elm_object_cursor_set(), but + * here the cursor's changing area is restricted to the item's + * area, and not the whole widget's. Note that that item cursors + * have precedence over widget cursors, so that a mouse over an + * item with custom cursor set will always show @b that cursor. + * + * If this function is called twice for an object, a previously set + * cursor will be unset on the second call. + * + * @see elm_object_cursor_set() + * @see elm_object_item_cursor_get() + * @see elm_object_item_cursor_unset() + * + * @ingroup General + */ +EAPI void elm_object_item_cursor_set(Elm_Object_Item *item, const char *cursor); + +/* + * Get the type of mouse pointer/cursor decoration set to be shown, + * when the mouse pointer is over the given item + * + * @param item item with custom cursor set + * @return the cursor type's name or @c NULL, if no custom cursors + * were set to @p item (and on errors) + * + * @see elm_object_cursor_get() + * @see elm_object_item_cursor_set() + * @see elm_object_item_cursor_unset() + * + * @ingroup General + */ +EAPI const char *elm_object_item_cursor_get(const Elm_Object_Item *item); + +/** + * Unset any custom mouse pointer/cursor decoration set to be + * shown, when the mouse pointer is over the given + * item, thus making it show the @b default cursor again. + * + * @param item the item + * + * Use this call to undo any custom settings on this item's cursor + * decoration, bringing it back to defaults (no custom style set). + * + * @see elm_object_cursor_unset() + * @see elm_object_item_cursor_set() + * + * @ingroup General + */ +EAPI void elm_list_item_cursor_unset(Elm_Object_Item *item); + +/** + * Set a different @b style for a given custom cursor set for an + * item. + * + * @param item item with custom cursor set + * @param style the theme style to use (e.g. @c "default", + * @c "transparent", etc) + * + * This function only makes sense when one is using custom mouse + * cursor decorations defined in a theme file, which can have, + * given a cursor name/type, alternate styles on it. It + * works analogously as elm_object_cursor_style_set(), but here + * applyed only to item objects. + * + * @warning Before you set a cursor style you should have definen a + * custom cursor previously on the item, with + * elm_list_item_cursor_set() + * + * @see elm_object_item_cursor_engine_only_set() + * @see elm_object_item_cursor_style_get() + * + * @ingroup General + */ +EAPI void elm_list_item_cursor_style_set(Elm_Object_Item *item, const char *style); + +/** + * Get the current @b style set for a given item's custom + * cursor + * + * @param item item with custom cursor set. + * @return style the cursor style in use. If the object does not + * have a cursor set, then @c NULL is returned. + * + * @see elm_object_item_cursor_style_set() for more details + * + * @ingroup General + */ +EAPI const char *elm_list_item_cursor_style_get(const Elm_Object_Item *item); + +/** + * Set if the (custom)cursor for a given item should be + * searched in its theme, also, or should only rely on the + * rendering engine. + * + * @param item item with custom (custom) cursor already set on + * @param engine_only Use @c EINA_TRUE to have cursors looked for + * only on those provided by the rendering engine, @c EINA_FALSE to + * have them searched on the widget's theme, as well. + * + * @note This call is of use only if you've set a custom cursor + * for items, with elm_object_item_cursor_set(). + * + * @note By default, cursors will only be looked for between those + * provided by the rendering engine. + * + * @ingroup General + */ +EAPI void elm_list_item_cursor_engine_only_set(Elm_Object_Item *item, Eina_Bool engine_only); + +/** + * Get if the (custom) cursor for a given item is being + * searched in its theme, also, or is only relying on the rendering + * engine. + * + * @param item an item + * @return @c EINA_TRUE, if cursors are being looked for only on + * those provided by the rendering engine, @c EINA_FALSE if they + * are being searched on the widget's theme, as well. + * + * @see elm_object_item_cursor_engine_only_set(), for more details + * + * @ingroup General + */ +EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_Object_Item *item); +