jpeg pushed a commit to branch master.

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

commit 6225293d2ec7c82074cb2818487cd9ead06df863
Author: Jean-Philippe Andre <[email protected]>
Date:   Wed Nov 29 13:45:58 2017 +0900

    edje: Move "preload" to legacy only
    
    EO file API is still in flux, especially wrt. async loading. Let's just
    keep this in legacy for now.
    
    A few more patches and Edje.Object will reach its final form.
    
    Ref T5315
---
 src/lib/edje/Edje_Legacy.h  | 19 +++++++++++++++++++
 src/lib/edje/edje_object.eo | 20 --------------------
 src/lib/edje/edje_util.c    |  6 ++++--
 3 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index edd30e25da..018ef463b8 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -52,6 +52,25 @@
 EAPI Evas_Object *edje_object_add                 (Evas *evas);
 
 /**
+ * @brief Preloads the images on the Edje Object in the background.
+ *
+ * This function requests the preload of all data images (on the given object)
+ * in the background. The work is queued before being processed (because there
+ * might be other pending requests of this type). It emits a signal
+ * "preload,done" when finished.
+ *
+ * @note Use @c true on scenarios where you don't need the image data preloaded
+ * anymore.
+ *
+ * @param[in] obj The object.
+ * @param[in] cancel @c false will add it the preloading work queue, @c true
+ * will remove it (if it was issued before).
+ *
+ * @return @c false if obj was not a valid Edje object otherwise @c true
+ */
+EAPI Eina_Bool edje_object_preload(Evas_Object *obj, Eina_Bool cancel);
+
+/**
  * @brief Adds a callback for an arriving Edje signal, emitted by a given Edje
  * object.
  *
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index 99121aaaa4..b8b83fe525 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -66,26 +66,6 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, 
Efl.Container, Efl.Part,
          }
       }
 
-      // TODO: Legacy only. EO may rely on futures.
-      preload {
-         [[Preloads the images on the Edje Object in the background.
-
-           This function requests the preload of all data images (on the given
-           object) in the background. The work is queued before being processed
-           (because there might be other pending requests of this type).
-           It emits a signal "preload,done" when finished.
-
-           Note: Use $true on scenarios where you don't need
-           the image data preloaded anymore.]]
-
-         return: bool; [[$false if obj was not a valid Edje object
-                         otherwise $true]]
-         params {
-            @in cancel: bool; [[$false will add it the preloading work queue,
-                                $true will remove it (if it was issued 
before).]]
-         }
-      }
-
       access_part_iterate @beta {
          [[Iterates over all accessibility-enabled part names.]]
          legacy: null;
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 9b43647029..d26774bd92 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -4944,12 +4944,14 @@ _edje_object_perspective_get(Eo *obj EINA_UNUSED, Edje 
*ed)
 #define EDJE_PRELOAD_EMISSION "preload,done"
 #define EDJE_PRELOAD_SOURCE   NULL
 
-EOLIAN Eina_Bool
-_edje_object_preload(Eo *obj, Edje *ed, Eina_Bool cancel)
+EAPI Eina_Bool
+edje_object_preload(Eo *obj, Eina_Bool cancel)
 {
    unsigned short count;
    unsigned short i;
+   Edje *ed;
 
+   ed = _edje_fetch(obj);
    if (!ed) return EINA_FALSE;
 
    _edje_recalc_do(ed);

-- 


Reply via email to