jpeg pushed a commit to branch master.

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

commit f0730f6f4ce7e9da485a6b9ddf0f5571c4b1a93e
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Thu Aug 3 10:29:21 2017 +0900

    layout: Move edje_get to legacy only
    
    Here's the reasoning:
     1. We will expose as many edje APIs as possible (and meaningful)
        through the elm layout class.
     2. Access to internal objects is usually risky, as it allows apps
        to bypass EFL in some ways, leading to potentially undefined
        behaviours.
     3. If the need arises we can still add a similar API back to EO,
        later.
    
    Back to #1, it seems that the need for edje_get() was mostly to
    call manual sizing functions, or the missing message_send(). I will
    make sure these are accessible from the layout itself.
    
    Ref T5315
---
 src/lib/elementary/elm_layout.c        |  5 +++--
 src/lib/elementary/elm_layout.eo       | 19 -------------------
 src/lib/elementary/elm_layout_legacy.h | 20 ++++++++++++++++++++
 3 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 1e3962b7a3..21ece8b98b 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1641,9 +1641,10 @@ _elm_layout_table_clear(Eo *obj, Elm_Layout_Smart_Data 
*sd, const char *part, Ei
    return EINA_TRUE;
 }
 
-EOLIAN static Evas_Object*
-_elm_layout_edje_get(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
+EAPI Evas_Object*
+elm_layout_edje_get(const Eo *obj)
 {
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(obj, MY_CLASS), NULL);
    ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
 
    return wd->resize_obj;
diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index bdd91673a6..4a13d85cb8 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -43,25 +43,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
             style: string; [[The style to used.]]
          }
       }
-      @property edje {
-         get {
-            [[Get the edje layout
-
-              This returns the edje object. It is not expected to be used
-              to then swallow objects via \@ref edje_object_part_swallow
-              for example. Use \@ref elm_layout_content_set instead so
-              child object handling and sizing is done properly.
-
-              Note: This function should only be used if you really need
-              to call some low level Edje function on this edje object.
-              All the common stuff (setting text, emitting signals,
-              hooking callbacks to signals, etc.) can be done with
-              proper elementary functions.
-            ]]
-            return: Efl.Canvas.Object; [[An Evas_Object with the edje layout
-                                     settings loaded \@ref 
elm_layout_file_set.]]
-         }
-      }
       sizing_eval {
          [[Eval sizing.
 
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index 0769014eaf..3fd1058a69 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -12,6 +12,26 @@
 EAPI Evas_Object                 *elm_layout_add(Evas_Object *parent);
 
 /**
+ * @brief Get the edje layout
+ *
+ * This returns the edje object. It is not expected to be used to then swallow
+ * objects via @ref edje_object_part_swallow for example. Use @ref
+ * elm_layout_content_set instead so child object handling and sizing is done
+ * properly.
+ *
+ * @note This function should only be used if you really need to call some low
+ * level Edje function on this edje object. All the common stuff (setting text,
+ * emitting signals, hooking callbacks to signals, etc.) can be done with
+ * proper elementary functions.
+ *
+ * @return An Evas_Object with the edje layout settings loaded @ref
+ * elm_layout_file_set.
+ *
+ * @ingroup Elm_Layout
+ */
+EAPI Efl_Canvas_Object *elm_layout_edje_get(const Evas_Object *obj);
+
+/**
  * Get the list of swallow parts of a given container widget
  *
  * @param obj The layout object

-- 


Reply via email to