adree with XXX -> rename focus funcs, deprecate old.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 6 Mar 2012 12:30:16 +0000 (12:30 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 6 Mar 2012 12:30:16 +0000 (12:30 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68822 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_deprecated.h
src/lib/elm_focus.h
src/lib/elm_main.c

index c710dd3..41eb55a 100644 (file)
@@ -4998,5 +4998,41 @@ EINA_DEPRECATED EAPI const char                *elm_multibuttonentry_guide_text_
 EINA_DEPRECATED EAPI void                       elm_multibuttonentry_guide_text_set(Evas_Object *obj, const char *guidetext);
 
 /**
+ * Make the elementary object and its children to be unfocusable
+ * (or focusable).
+ *
+ * @param obj The Elementary object to operate on
+ * @param tree_unfocusable @c EINA_TRUE for unfocusable,
+ *        @c EINA_FALSE for focusable.
+ *
+ * This sets whether the object @p obj and its children objects
+ * are able to take focus or not. If the tree is set as unfocusable,
+ * newest focused object which is not in this tree will get focus.
+ * This API can be helpful for an object to be deleted.
+ * When an object will be deleted soon, it and its children may not
+ * want to get focus (by focus reverting or by other focus controls).
+ * Then, just use this API before deleting.
+ *
+ * @see elm_object_tree_unfocusable_get()
+ *
+ * @ingroup Focus
+ * @deprecated Please use elm_object_tree_unfocusable_set()
+ */
+EINA_DEPRECATED EAPI void                 elm_object_tree_unfocusable_set(Evas_Object *obj, Eina_Bool tree_unfocusable);
+
+/**
+ * Get whether an Elementary object and its children are unfocusable or not.
+ *
+ * @param obj The Elementary object to get the information from
+ * @return @c EINA_TRUE, if the tree is unfocussable,
+ *         @c EINA_FALSE if not (and on errors).
+ *
+ * @see elm_object_tree_unfocusable_set()
+ *
+ * @ingroup Focus
+ * @deprecated Please use elm_object_tree_unfocusable_get()
+ */
+EINA_DEPRECATED EAPI Eina_Bool            elm_object_tree_unfocusable_get(const Evas_Object *obj);
+/**
  * @}
  */
index 2fff962..aa29d11 100644 (file)
@@ -181,7 +181,7 @@ EAPI void                 elm_object_focus_next(Evas_Object *obj, Elm_Focus_Dire
  * (or focusable).
  *
  * @param obj The Elementary object to operate on
- * @param tree_unfocusable @c EINA_TRUE for unfocusable,
+ * @param unfocusable @c EINA_TRUE for unfocusable,
  *        @c EINA_FALSE for focusable.
  *
  * This sets whether the object @p obj and its children objects
@@ -192,24 +192,22 @@ EAPI void                 elm_object_focus_next(Evas_Object *obj, Elm_Focus_Dire
  * want to get focus (by focus reverting or by other focus controls).
  * Then, just use this API before deleting.
  *
- * @see elm_object_tree_unfocusable_get()
+ * @see elm_object_tree_focus_allow_get()
  *
  * @ingroup Focus
  *
  */
- //XXX: How about elm_object_tree_focus_allow_set()?
-EAPI void                 elm_object_tree_unfocusable_set(Evas_Object *obj, Eina_Bool tree_unfocusable);
+EAPI void                 elm_object_tree_focus_allow_set(Evas_Object *obj, Eina_Bool unfocusable);
 
 /**
  * Get whether an Elementary object and its children are unfocusable or not.
  *
  * @param obj The Elementary object to get the information from
- * @return @c EINA_TRUE, if the tree is unfocussable,
+ * @return @c EINA_TRUE, if the tree is unfocusable,
  *         @c EINA_FALSE if not (and on errors).
  *
- * @see elm_object_tree_unfocusable_set()
+ * @see elm_object_tree_focus_allow_set()
  *
  * @ingroup Focus
  */
-//XXX: How about elm_object_tree_focus_allow_get()?
-EAPI Eina_Bool            elm_object_tree_unfocusable_get(const Evas_Object *obj);
+EAPI Eina_Bool            elm_object_tree_focus_allow_get(const Evas_Object *obj);
index 4d18beb..a7d6ae6 100644 (file)
@@ -1187,8 +1187,21 @@ elm_object_focus_direction_go(Evas_Object *obj,
    elm_widget_focus_direction_go(obj, x, y);
 }
 
-EAPI void
+EINA_DEPRECATED EAPI void
 elm_object_tree_unfocusable_set(Evas_Object *obj,
+                                Eina_Bool    unfocusable)
+{
+   elm_object_tree_focus_allow_set(obj, unfocusable);
+}
+
+EINA_DEPRECATED EAPI Eina_Bool
+elm_object_tree_unfocusable_get(const Evas_Object *obj)
+{
+   return elm_object_tree_focus_allow_get(obj);
+}
+
+EAPI void
+elm_object_tree_focus_allow_set(Evas_Object *obj,
                                 Eina_Bool    tree_unfocusable)
 {
    EINA_SAFETY_ON_NULL_RETURN(obj);
@@ -1196,7 +1209,7 @@ elm_object_tree_unfocusable_set(Evas_Object *obj,
 }
 
 EAPI Eina_Bool
-elm_object_tree_unfocusable_get(const Evas_Object *obj)
+elm_object_tree_focus_allow_get(const Evas_Object *obj)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
    return elm_widget_tree_unfocusable_get(obj);