forked from enlightenment/efl
fix image preload signature and make it callback if already preloaded.
evas_object_image_preload() should not use object as const because it will mdofiy the object state (so it's semantic makes more sense). if data was already loaded, then callback before ignored it (return). SVN revision: 38246
This commit is contained in:
parent
4f96f46169
commit
089b1c7925
|
@ -532,7 +532,7 @@ extern "C" {
|
|||
EAPI Evas_Bool evas_object_image_alpha_get (const Evas_Object *obj);
|
||||
EAPI void evas_object_image_smooth_scale_set(Evas_Object *obj, Evas_Bool smooth_scale);
|
||||
EAPI Evas_Bool evas_object_image_smooth_scale_get(const Evas_Object *obj);
|
||||
EAPI void evas_object_image_preload (const Evas_Object *obj, Evas_Bool cancel);
|
||||
EAPI void evas_object_image_preload (Evas_Object *obj, Evas_Bool cancel);
|
||||
EAPI void evas_object_image_reload (Evas_Object *obj);
|
||||
EAPI Evas_Bool evas_object_image_save (const Evas_Object *obj, const char *file, const char *key, const char *flags);
|
||||
EAPI Evas_Bool evas_object_image_pixels_import (Evas_Object *obj, Evas_Pixel_Import_Source *pixels);
|
||||
|
|
|
@ -906,7 +906,11 @@ evas_cache_image_preload_data(Image_Entry *im, const void *target)
|
|||
assert(im);
|
||||
assert(im->cache);
|
||||
|
||||
if (im->flags.loaded) return ;
|
||||
if (im->flags.loaded)
|
||||
{
|
||||
evas_async_events_put(target, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, evas_object_event_callback_call);
|
||||
return ;
|
||||
}
|
||||
|
||||
cache = im->cache;
|
||||
|
||||
|
|
|
@ -1058,7 +1058,7 @@ evas_object_image_data_get(const Evas_Object *obj, Evas_Bool for_writing)
|
|||
* @param cancel 0 means add to the workqueue, 1 remove it.
|
||||
*/
|
||||
EAPI void
|
||||
evas_object_image_preload(const Evas_Object *obj, Evas_Bool cancel)
|
||||
evas_object_image_preload(Evas_Object *obj, Evas_Bool cancel)
|
||||
{
|
||||
Evas_Object_Image *o;
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ evas_object_image_preload(const Evas_Object *obj, Evas_Bool cancel)
|
|||
MAGIC_CHECK_END();
|
||||
if (!o->engine_data)
|
||||
{
|
||||
evas_object_inform_call_image_preloaded((Evas_Object *)obj);
|
||||
evas_object_inform_call_image_preloaded(obj);
|
||||
return ;
|
||||
}
|
||||
if (cancel)
|
||||
|
|
Loading…
Reference in New Issue