From: sanjeev Date: Mon, 5 Mar 2012 09:15:04 +0000 (+0000) Subject: Deprecate elm_object_cursor_engine_only_set/get. X-Git-Tag: REL_F_I9500_20120323_1~17^2~419 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44d1abac3f676bb662ed2652edee30c2738b0985;p=framework%2Fuifw%2Felementary.git Deprecate elm_object_cursor_engine_only_set/get. Signed-off-by: Sanjeev BA git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68683 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/test_cursor.c b/src/bin/test_cursor.c index 68d9ec8..89e1359 100644 --- a/src/bin/test_cursor.c +++ b/src/bin/test_cursor.c @@ -312,7 +312,7 @@ test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf o = elm_button_add(win); elm_object_cursor_set(o, ELM_CURSOR_HAND1); - elm_object_cursor_engine_only_set(o, EINA_FALSE); + elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE); elm_object_text_set(o, "hand1"); elm_box_pack_end(bx, o); evas_object_show(o); @@ -325,21 +325,21 @@ test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf o = elm_button_add(win); elm_object_cursor_set(o, ELM_CURSOR_HAND2); - elm_object_cursor_engine_only_set(o, EINA_FALSE); + elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE); elm_object_text_set(o, "hand2"); elm_box_pack_end(bx, o); evas_object_show(o); o = elm_button_add(win); elm_object_cursor_set(o, "hand3"); - elm_object_cursor_engine_only_set(o, EINA_FALSE); + elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE); elm_object_text_set(o, "hand3"); elm_box_pack_end(bx, o); evas_object_show(o); o = elm_button_add(win); elm_object_cursor_set(o, "hand3"); - elm_object_cursor_engine_only_set(o, EINA_FALSE); + elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE); elm_object_cursor_style_set(o, "transparent"); elm_object_text_set(o, "hand3 transparent"); elm_box_pack_end(bx, o); @@ -347,7 +347,7 @@ test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf o = elm_button_add(win); elm_object_cursor_set(o, "hand3"); - elm_object_cursor_engine_only_set(o, EINA_FALSE); + elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE); elm_object_cursor_unset(o); elm_object_text_set(o, "unset"); elm_box_pack_end(bx, o); diff --git a/src/lib/elm_cursor.h b/src/lib/elm_cursor.h index 8822ec5..2e55d06 100644 --- a/src/lib/elm_cursor.h +++ b/src/lib/elm_cursor.h @@ -101,8 +101,7 @@ EAPI const char *elm_object_cursor_style_get(const Evas_Object *obj); * * @ingroup Cursors */ -// XXX: EAPI void elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_search) or xxx_search_theme_xxx -EAPI void elm_object_cursor_engine_only_set(Evas_Object *obj, Eina_Bool engine_only); +EAPI void elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_search); /** * Get the cursor engine only usage for this object cursor. @@ -115,8 +114,7 @@ EAPI void elm_object_cursor_engine_only_set(Evas_Object *obj, Eina_Bool e * * @ingroup Cursors */ -// XXX: EAPI Eina_Bool elm_object_cursor_theme_search_enabled_get(const Evas_Object *obj) or xxx_search_theme_xxx -EAPI Eina_Bool elm_object_cursor_engine_only_get(const Evas_Object *obj); +EAPI Eina_Bool elm_object_cursor_theme_search_enabled_get(const Evas_Object *obj); /** * Get the configured cursor engine only usage diff --git a/src/lib/elm_deprecated.h b/src/lib/elm_deprecated.h index c20b871..7cfdb82 100644 --- a/src/lib/elm_deprecated.h +++ b/src/lib/elm_deprecated.h @@ -1299,7 +1299,6 @@ EINA_DEPRECATED EAPI const char *elm_diskselector_item_cursor_style_g * 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 @@ -1314,7 +1313,6 @@ EINA_DEPRECATED EAPI void elm_diskselector_item_cursor_engine_ * 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 * @@ -4608,5 +4606,30 @@ EINA_DEPRECATED EAPI void elm_web_history_enable_set(Evas_Object *o EINA_DEPRECATED EAPI Elm_Object_Item *elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data); /** + * Set if the cursor set should be searched on the theme or should use + * the provided by the engine, only. + * + * @param obj an object with cursor already set. + * @param engine_only boolean to define if cursors should be looked only + * between the provided by the engine or searched on widget's theme as well. + * + * @deprecated Use elm_object_cursor_theme_search_enabled_set() + */ +EINA_DEPRECATED EAPI void elm_object_cursor_engine_only_set(Evas_Object *obj, Eina_Bool engine_only); + +/** + * Get the cursor engine only usage for this object cursor. + * + * @param obj an object 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 object does not have a cursor + * set, then EINA_FALSE is returned. + * + * @deprecated Use elm_object_cursor_theme_search_enabled_get(); + */ +EINA_DEPRECATED EAPI Eina_Bool elm_object_cursor_engine_only_get(const Evas_Object *obj); + +/** * @} */ diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c index acee0da..215704d 100644 --- a/src/lib/elm_layout.c +++ b/src/lib/elm_layout.c @@ -206,7 +206,7 @@ _part_cursor_part_apply(const Part_Cursor *pc) { elm_object_cursor_set(pc->obj, pc->cursor); elm_object_cursor_style_set(pc->obj, pc->style); - elm_object_cursor_engine_only_set(pc->obj, pc->engine_only); + elm_object_cursor_theme_search_enabled_set(pc->obj, pc->engine_only); } static Part_Cursor * @@ -958,7 +958,7 @@ elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, EINA_FALSE); pc->engine_only = !!engine_only; - elm_object_cursor_engine_only_set(pc->obj, pc->engine_only); + elm_object_cursor_theme_search_enabled_set(pc->obj, pc->engine_only); return EINA_TRUE; } @@ -972,5 +972,5 @@ elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_ Part_Cursor *pc = _parts_cursors_find(wd, part_name); EINA_SAFETY_ON_NULL_RETURN_VAL(pc, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, EINA_FALSE); - return elm_object_cursor_engine_only_get(pc->obj); + return elm_object_cursor_theme_search_enabled_get(pc->obj); } diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index ecc9e20..681b7aa 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -3358,7 +3358,7 @@ _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, Eina_Bool engine_only) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); - elm_object_cursor_engine_only_set(item->view, engine_only); + elm_object_cursor_theme_search_enabled_set(item->view, engine_only); } /** @@ -3377,7 +3377,7 @@ EAPI Eina_Bool _elm_widget_item_cursor_engine_only_get(const Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); - return elm_object_cursor_engine_only_get(item->view); + return elm_object_cursor_theme_search_enabled_get(item->view); } // smart object funcs diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c index 6c0c881..69a5589 100644 --- a/src/lib/els_cursor.c +++ b/src/lib/els_cursor.c @@ -483,11 +483,16 @@ elm_cursor_theme(Elm_Cursor *cur) _elm_cursor_set_hot_spots(cur); } -EAPI void +EINA_DEPRECATED EAPI void elm_object_cursor_engine_only_set(Evas_Object *obj, Eina_Bool engine_only) { + elm_object_cursor_theme_search_enabled_set(obj, engine_only); +} + +EAPI void elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_search) +{ ELM_CURSOR_GET_OR_RETURN(cur, obj); - cur->engine_only = engine_only; + cur->engine_only = theme_search; if (cur->obj) { evas_object_del(cur->obj); @@ -496,9 +501,16 @@ elm_object_cursor_engine_only_set(Evas_Object *obj, Eina_Bool engine_only) _elm_cursor_cur_set(cur); } -EAPI Eina_Bool + +EINA_DEPRECATED EAPI Eina_Bool elm_object_cursor_engine_only_get(const Evas_Object *obj) { + return elm_object_cursor_theme_search_enabled_get(obj); +} + +EAPI Eina_Bool +elm_object_cursor_theme_search_enabled_get(const Evas_Object *obj) +{ ELM_CURSOR_GET_OR_RETURN(cur, obj, EINA_FALSE); return cur->engine_only; }