summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-03-24 16:41:49 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-03-24 16:41:53 +0830
commitae64b6366713c3e579f8a6905ee444dd97149f75 (patch)
tree9f530f4aecfd0d6f0eee489cb08aca5af6c79d1d
parent388805ea6c17919c62b79d9d9c2c7d42e8e4580f (diff)
downloadelementary-ae64b6366713c3e579f8a6905ee444dd97149f75.tar.gz
Elm_image: move preload_disabled API from eo to legacy.
-rw-r--r--src/lib/elm_image.c48
-rw-r--r--src/lib/elm_image.eo8
-rw-r--r--src/lib/elm_image_legacy.h10
3 files changed, 36 insertions, 30 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index 7ae9e4634..c5ebf5f7e 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -1230,28 +1230,6 @@ _elm_image_resizable_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, Eina_Bool *siz
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)
@@ -1668,4 +1646,30 @@ elm_image_fill_outside_get(const Evas_Object *obj)
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"
diff --git a/src/lib/elm_image.eo b/src/lib/elm_image.eo
index 8c54a43b9..a65eca8b7 100644
--- a/src/lib/elm_image.eo
+++ b/src/lib/elm_image.eo
@@ -155,14 +155,6 @@ class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, Evas.Clickable_Interface,
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.
diff --git a/src/lib/elm_image_legacy.h b/src/lib/elm_image_legacy.h
index 860cd99c1..4d4e1d8f7 100644
--- a/src/lib/elm_image_legacy.h
+++ b/src/lib/elm_image_legacy.h
@@ -365,4 +365,14 @@ EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside);
*/
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"