forked from enlightenment/efl
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
This commit is contained in:
parent
6c53992668
commit
6225293d2e
|
@ -51,6 +51,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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue