if (size_down) *size_down = sd->resize_down;
}
-EOLIAN static void
-_elm_image_preload_disabled_set(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, Eina_Bool disable)
-{
- if (sd->edje || !sd->img) return;
-
- if (disable)
- {
- if (sd->preload_status == ELM_IMAGE_PRELOADING)
- {
- evas_object_image_preload(sd->img, disable);
- if (sd->show) evas_object_show(sd->img);
- ELM_SAFE_FREE(sd->prev_img, evas_object_del);
- }
- sd->preload_status = ELM_IMAGE_PRELOAD_DISABLED;
- }
- else if (sd->preload_status == ELM_IMAGE_PRELOAD_DISABLED)
- {
- sd->preload_status = ELM_IMAGE_PRELOADING;
- evas_object_image_preload(sd->img, disable);
- }
-}
-
EAPI void
elm_image_prescale_set(Evas_Object *obj,
int size)
return !sd->fill_inside;
}
+// TODO: merge preload and async code
+EAPI void
+elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disable)
+{
+ ELM_IMAGE_CHECK(obj);
+ ELM_IMAGE_DATA_GET(obj, sd);
+
+ if (sd->edje || !sd->img) return;
+
+ if (disable)
+ {
+ if (sd->preload_status == ELM_IMAGE_PRELOADING)
+ {
+ evas_object_image_preload(sd->img, disable);
+ if (sd->show) evas_object_show(sd->img);
+ ELM_SAFE_FREE(sd->prev_img, evas_object_del);
+ }
+ sd->preload_status = ELM_IMAGE_PRELOAD_DISABLED;
+ }
+ else if (sd->preload_status == ELM_IMAGE_PRELOAD_DISABLED)
+ {
+ sd->preload_status = ELM_IMAGE_PRELOADING;
+ evas_object_image_preload(sd->img, disable);
+ }
+}
+
#include "elm_image.eo.c"
down: bool; [[A bool to set if the object is resizable down. Default is $true.]]
}
}
- @property preload_disabled {
- set {
- [[Enable or disable preloading of the image]]
- }
- values {
- disabled: bool; [[If true, preloading will be disabled]]
- }
- }
@property object {
get {
[[Get the inlined image object of the image widget.
*/
EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj);
+/**
+ * @brief Enable or disable preloading of the image
+ *
+ * @param[in] disabled If true, preloading will be disabled
+ *
+ * @ingroup Elm_Image
+ */
+
+EAPI void elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled);
#include "elm_image.eo.legacy.h"