forked from enlightenment/efl
always call image preloaded callback.
if image was already preloaded, inform user. regular use case is to have image hidden, ask for preload and then show image on callback, if there is no callback, image is never shown. SVN revision: 38236
This commit is contained in:
parent
e58ac7064c
commit
4821dcf1f8
|
@ -1049,6 +1049,9 @@ evas_object_image_data_get(const Evas_Object *obj, Evas_Bool for_writing)
|
|||
* This function request the preload of the data image in the background. The
|
||||
* worked is queued before being processed.
|
||||
*
|
||||
* If image data is already loaded, it will callback
|
||||
* EVAS_CALLBACK_IMAGE_PRELOADED immediatelly and do nothing else.
|
||||
*
|
||||
* If cancel is set, it will remove the image from the workqueue.
|
||||
*
|
||||
* @param obj The given image object.
|
||||
|
@ -1066,7 +1069,11 @@ evas_object_image_preload(const Evas_Object *obj, Evas_Bool cancel)
|
|||
MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
|
||||
return ;
|
||||
MAGIC_CHECK_END();
|
||||
if (!o->engine_data) return ;
|
||||
if (!o->engine_data)
|
||||
{
|
||||
evas_object_inform_call_image_preloaded((Evas_Object *)obj);
|
||||
return ;
|
||||
}
|
||||
if (cancel)
|
||||
obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
|
||||
o->engine_data);
|
||||
|
|
|
@ -38,3 +38,9 @@ evas_object_inform_call_changed_size_hints(Evas_Object *obj)
|
|||
{
|
||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
evas_object_inform_call_image_preloaded(Evas_Object *obj)
|
||||
{
|
||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL);
|
||||
}
|
||||
|
|
|
@ -750,6 +750,7 @@ void evas_object_inform_call_move(Evas_Object *obj);
|
|||
void evas_object_inform_call_resize(Evas_Object *obj);
|
||||
void evas_object_inform_call_restack(Evas_Object *obj);
|
||||
void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
|
||||
void evas_object_inform_call_image_preloaded(Evas_Object *obj);
|
||||
void evas_object_intercept_cleanup(Evas_Object *obj);
|
||||
int evas_object_intercept_call_show(Evas_Object *obj);
|
||||
int evas_object_intercept_call_hide(Evas_Object *obj);
|
||||
|
|
Loading…
Reference in New Issue