jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f63a5648179bec9e9d817cdb7227d1d902b3c439

commit f63a5648179bec9e9d817cdb7227d1d902b3c439
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Wed Aug 2 15:17:54 2017 +0900

    layout: Move edje_object_can_access to legacy
    
    This is an API enabling accessibility on text(block) parts
    in a layout. But it is said to have many issues. I can already
    see that it only changes a flag but doesn't trigger any code
    to create the appropriate objects, so definitely not fully
    working.
    
    According to @kimcinoo this may remain in legacy land for now.
---
 src/lib/elementary/elm_layout.c        | 12 ++++++++----
 src/lib/elementary/elm_layout.eo       | 23 -----------------------
 src/lib/elementary/elm_layout_legacy.h | 28 ++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index c4a33568f3..66922ce911 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1870,16 +1870,20 @@ _elm_layout_part_cursor_engine_only_get(const Eo *obj 
EINA_UNUSED, Elm_Layout_Sm
    return !elm_object_cursor_theme_search_enabled_get(pc->obj);
 }
 
-EOLIAN static Eina_Bool
-_elm_layout_edje_object_can_access_set(Eo *obj EINA_UNUSED, 
Elm_Layout_Smart_Data *sd, Eina_Bool can_access)
+EAPI Eina_Bool
+elm_layout_edje_object_can_access_set(Eo *obj, Eina_Bool can_access)
 {
+   Elm_Layout_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
    sd->can_access = !!can_access;
    return EINA_TRUE;
 }
 
-EOLIAN static Eina_Bool
-_elm_layout_edje_object_can_access_get(Eo *obj EINA_UNUSED, 
Elm_Layout_Smart_Data *sd)
+EAPI Eina_Bool
+elm_layout_edje_object_can_access_get(const Eo *obj)
 {
+   Elm_Layout_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
    return sd->can_access;
 }
 
diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index b03518dbfd..0e11461bf4 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -26,29 +26,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
    event_prefix: elm_layout;
    data: Elm_Layout_Smart_Data;
    methods {
-      @property edje_object_can_access {
-         set {
-            [[Set accessibility to all texblock(text) parts in the layout
-              object.
-
-              @since 1.7
-            ]]
-            return: bool; [[$true on success or $false on failure. If $obj
-                            is not a proper layout object, $false is 
returned.]]
-         }
-         get {
-            [[Get accessibility state of texblock(text) parts in the layout
-              object
-
-              @since 1.7
-            ]]
-         }
-         values {
-            can_access: bool; [[Makes all textblock(text) parts in the layout
-                                $obj possible to have accessibility. $true
-                                means textblock(text) parts can be 
accessible.]]
-         }
-      }
       @property theme {
          set {
             [[Set the edje group from the elementary theme that will be used
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index dc245f8fe2..24228ed861 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -391,4 +391,32 @@ EAPI Eina_Bool elm_layout_text_set(Evas_Object *obj, const 
char * part, const ch
  */
 EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char * 
part);
 
+/**
+ * @brief Set accessibility to all texblock(text) parts in the layout object.
+ *
+ * @param[in] can_access Makes all textblock(text) parts in the layout @c obj
+ * possible to have accessibility. @c true means textblock(text) parts can be
+ * accessible.
+ *
+ * @return @c true on success or @c false on failure. If @c obj is not a proper
+ * layout object, @c false is returned.
+ *
+ * @since 1.7
+ *
+ * @ingroup Elm_Layout
+ */
+EAPI Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, 
Eina_Bool can_access);
+
+/**
+ * @brief Get accessibility state of texblock(text) parts in the layout object
+ *
+ * @return Makes all textblock(text) parts in the layout @c obj possible to
+ * have accessibility. @c true means textblock(text) parts can be accessible.
+ *
+ * @since 1.7
+ *
+ * @ingroup Elm_Layout
+ */
+EAPI Eina_Bool elm_layout_edje_object_can_access_get(const Evas_Object *obj);
+
 #include "elm_layout.eo.legacy.h"

-- 


Reply via email to