edje: Remove external_object_get from EO
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 29 May 2017 13:33:28 +0000 (22:33 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 30 May 2017 04:54:34 +0000 (13:54 +0900)
This will be replaced by a trick: composition on the part
object itself!

src/lib/edje/Edje_Legacy.h
src/lib/edje/edje_external.c
src/lib/edje/edje_legacy.c
src/lib/edje/edje_object.eo
src/lib/edje/edje_private.h

index 70fccb5..3a802d4 100644 (file)
@@ -481,6 +481,29 @@ EAPI Eina_Bool edje_object_part_external_param_set(Edje_Object *obj, const char
 EAPI Eina_Bool edje_object_part_external_param_get(const Edje_Object *obj, const char *part, Edje_External_Param *param);
 
 /**
+ * @brief Gets the object created by this external part.
+ *
+ * Parts of type external creates the part object using information provided by
+ * external plugins. It's somehow like "swallow" (edje_object_part_swallow()),
+ * but it's all set automatically.
+ *
+ * This function returns the part created by such external plugins and being
+ * currently managed by this Edje.
+ *
+ * @note Almost all swallow rules apply: you should not move, resize, hide,
+ * show, set the color or clipper of such part. It's a bit more restrictive as
+ * one must  never delete this object!
+ *
+ * @param[in] part The part name
+ *
+ * @return The externally created object, or @c null if there is none or part
+ * is not an external.
+ *
+ * @ingroup Edje_Object
+ */
+EAPI Evas_Object *edje_object_part_external_object_get(const Edje_Object *obj, const char * part);
+
+/**
  * @brief Gets an object contained in an part of type EXTERNAL
  *
  * The content string must not be @c null. Its actual value depends on the code
index b067b5c..87ef983 100644 (file)
@@ -28,8 +28,8 @@ edje_external_param_type_str(Edje_External_Param_Type type)
      }
 }
 
-EOLIAN Evas_Object *
-_edje_object_part_external_object_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
+Evas_Object *
+_edje_object_part_external_object_get(Edje *ed, const char *part)
 {
    Edje_Real_Part *rp;
 
index 5bbb384..5773b58 100644 (file)
@@ -119,6 +119,13 @@ edje_object_part_external_param_type_get(const Eo *obj, const char *part, const
    return _edje_object_part_external_param_type_get(ed, part, param);
 }
 
+EAPI Evas_Object *
+edje_object_part_external_object_get(const Edje_Object *obj, const char *part)
+{
+   Edje *ed = _edje_fetch(obj);
+   return _edje_object_part_external_object_get(ed, part);
+}
+
 /* Legacy only. Shall we deprecate this API? */
 EAPI Evas_Object *
 edje_object_part_external_content_get(const Edje_Object *obj, const char *part, const char *content)
index 84482c5..7db36ce 100644 (file)
@@ -1006,27 +1006,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
             @in dy: double; [[The y step]]
          }
       }
-      @property part_external_object {
-         get {
-            [[Gets the object created by this external part.
-
-              Parts of type external creates the part object using information
-              provided by external plugins. It's somehow like "swallow"
-              (edje_object_part_swallow()), but it's all set automatically.
-
-              This function returns the part created by such external plugins and
-              being currently managed by this Edje.
-
-              Note: Almost all swallow rules apply: you should not move, resize,
-              hide, show, set the color or clipper of such part. It's a bit
-              more restrictive as one must  never delete this object!]]
-            return: Efl.Canvas.Object; [[The externally created object, or $null if there is none or
-                                         part is not an external.]]
-         }
-         keys {
-            part: string; [[The part name]]
-         }
-      }
       @property text_change_cb {
          set {
             [[Sets the object text callback.
index 531ec16..347873a 100644 (file)
@@ -3125,6 +3125,7 @@ Eo *_edje_external_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part
 Eina_Bool _edje_object_part_external_param_set(Edje *ed, const char *part, const Edje_External_Param *param);
 Eina_Bool _edje_object_part_external_param_get(Edje *ed, const char *part, Edje_External_Param *param);
 Edje_External_Param_Type _edje_object_part_external_param_type_get(Edje *ed, const char *part, const char *param);
+Evas_Object *_edje_object_part_external_object_get(Edje *ed, const char *part);
 Evas_Object *_edje_object_part_external_content_get(Edje *ed, const char *part, const char *content);
 
 void _edje_internal_proxy_shutdown(void);