Deprecate elm_object_cursor_engine_only_set/get.
authorsanjeev <sanjeev@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 5 Mar 2012 09:15:04 +0000 (09:15 +0000)
committersanjeev <sanjeev@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 5 Mar 2012 09:15:04 +0000 (09:15 +0000)
Signed-off-by: Sanjeev BA <as2902.b@samsung.com>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68683 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/test_cursor.c
src/lib/elm_cursor.h
src/lib/elm_deprecated.h
src/lib/elm_layout.c
src/lib/elm_widget.c
src/lib/els_cursor.c

index 68d9ec8..89e1359 100644 (file)
@@ -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);
index 8822ec5..2e55d06 100644 (file)
@@ -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
index c20b871..7cfdb82 100644 (file)
@@ -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);
+
+/**
  * @}
  */
index acee0da..215704d 100644 (file)
@@ -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);
 }
index ecc9e20..681b7aa 100644 (file)
@@ -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
index 6c0c881..69a5589 100644 (file)
@@ -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;
 }