elm image: Added elm_image_preload_disabled_set(). Patch by Shinwoo Kim.
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 7 Mar 2012 06:26:20 +0000 (06:26 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 7 Mar 2012 06:26:20 +0000 (06:26 +0000)
On Wed, Mar 7, 2012 at 12:21 PM, cnook <kimcinoo@gmail.com> wrote:
> Dear All, Hello.
>
> There was no API for preload cancel. simple
>
> Sincerely,
> Shinwoo Kim.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68879 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_image.c
src/lib/elm_image.h

index d586d92..868dc00 100644 (file)
@@ -267,6 +267,16 @@ elm_image_fill_outside_get(const Evas_Object *obj)
 }
 
 EAPI void
+elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+
+   if (!wd) return;
+   _els_smart_icon_preload_set(wd->img, !!disable);
+}
+
+EAPI void
 elm_image_prescale_set(Evas_Object *obj, int size)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
index 0de8dff..bc96178 100644 (file)
@@ -238,6 +238,15 @@ EAPI void             elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fil
 EAPI Eina_Bool        elm_image_fill_outside_get(const Evas_Object *obj);
 
 /**
+ * Enable or disable preloading of the image
+ *
+ * @param obj The image object
+ * @param disable If EINA_TRUE, preloading will be disabled
+ * @ingroup Icon
+ */
+EAPI void                  elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled);
+
+/**
  * Set the prescale size for the image
  *
  * @param obj The image object