summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-29 13:45:58 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-29 15:36:44 +0900
commit6225293d2ec7c82074cb2818487cd9ead06df863 (patch)
tree50f948478ffbcbf8e5970989cc14834ab6028801
parent6c5399266833a94ba3585fd09a1c8e6f32126c2e (diff)
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
-rw-r--r--src/lib/edje/Edje_Legacy.h19
-rw-r--r--src/lib/edje/edje_object.eo20
-rw-r--r--src/lib/edje/edje_util.c6
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 @@
52EAPI Evas_Object *edje_object_add (Evas *evas); 52EAPI Evas_Object *edje_object_add (Evas *evas);
53 53
54/** 54/**
55 * @brief Preloads the images on the Edje Object in the background.
56 *
57 * This function requests the preload of all data images (on the given object)
58 * in the background. The work is queued before being processed (because there
59 * might be other pending requests of this type). It emits a signal
60 * "preload,done" when finished.
61 *
62 * @note Use @c true on scenarios where you don't need the image data preloaded
63 * anymore.
64 *
65 * @param[in] obj The object.
66 * @param[in] cancel @c false will add it the preloading work queue, @c true
67 * will remove it (if it was issued before).
68 *
69 * @return @c false if obj was not a valid Edje object otherwise @c true
70 */
71EAPI Eina_Bool edje_object_preload(Evas_Object *obj, Eina_Bool cancel);
72
73/**
55 * @brief Adds a callback for an arriving Edje signal, emitted by a given Edje 74 * @brief Adds a callback for an arriving Edje signal, emitted by a given Edje
56 * object. 75 * object.
57 * 76 *
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,
66 } 66 }
67 } 67 }
68 68
69 // TODO: Legacy only. EO may rely on futures.
70 preload {
71 [[Preloads the images on the Edje Object in the background.
72
73 This function requests the preload of all data images (on the given
74 object) in the background. The work is queued before being processed
75 (because there might be other pending requests of this type).
76 It emits a signal "preload,done" when finished.
77
78 Note: Use $true on scenarios where you don't need
79 the image data preloaded anymore.]]
80
81 return: bool; [[$false if obj was not a valid Edje object
82 otherwise $true]]
83 params {
84 @in cancel: bool; [[$false will add it the preloading work queue,
85 $true will remove it (if it was issued before).]]
86 }
87 }
88
89 access_part_iterate @beta { 69 access_part_iterate @beta {
90 [[Iterates over all accessibility-enabled part names.]] 70 [[Iterates over all accessibility-enabled part names.]]
91 legacy: null; 71 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)
4944#define EDJE_PRELOAD_EMISSION "preload,done" 4944#define EDJE_PRELOAD_EMISSION "preload,done"
4945#define EDJE_PRELOAD_SOURCE NULL 4945#define EDJE_PRELOAD_SOURCE NULL
4946 4946
4947EOLIAN Eina_Bool 4947EAPI Eina_Bool
4948_edje_object_preload(Eo *obj, Edje *ed, Eina_Bool cancel) 4948edje_object_preload(Eo *obj, Eina_Bool cancel)
4949{ 4949{
4950 unsigned short count; 4950 unsigned short count;
4951 unsigned short i; 4951 unsigned short i;
4952 Edje *ed;
4952 4953
4954 ed = _edje_fetch(obj);
4953 if (!ed) return EINA_FALSE; 4955 if (!ed) return EINA_FALSE;
4954 4956
4955 _edje_recalc_do(ed); 4957 _edje_recalc_do(ed);