Dear All, Hello.
_els_smart_icon_preload_set() and evas_object_image_preload() are ambiguous.
Actually they disable and cancel the preload. So I have changed each
names as attached patches.
Please review patches and give any feedbacks. Thanks.
Sincerely,
Shinwoo Kim.
Index: src/lib/canvas/evas_object_image.c
===================================================================
--- src/lib/canvas/evas_object_image.c (revision 68889)
+++ src/lib/canvas/evas_object_image.c (working copy)
@@ -1012,7 +1012,7 @@ evas_object_image_data_get(const Evas_Object *obj,
}
EAPI void
-evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel)
+evas_object_image_preload_cancel(Evas_Object *obj, Eina_Bool cancel)
{
Evas_Object_Image *o;
@@ -1053,6 +1053,12 @@ EAPI void
}
}
+EINA_DEPRECATED EAPI void
+evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel)
+{
+ evas_object_image_preload_cancel(obj, cancel);
+}
+
EAPI void
evas_object_image_data_copy_set(Evas_Object *obj, void *data)
{
Index: src/lib/Evas.h
===================================================================
--- src/lib/Evas.h (revision 68889)
+++ src/lib/Evas.h (working copy)
@@ -6323,11 +6323,11 @@ EAPI Evas_Object *evas_object_rectangle_add
* @code
* prev = evas_object_image_filled_add(canvas);
* evas_object_image_file_set(prev, "/path/to/prev", NULL);
- * evas_object_image_preload(prev, EINA_TRUE);
+ * evas_object_image_preload_cancel(prev, EINA_TRUE);
*
* next = evas_object_image_filled_add(canvas);
* evas_object_image_file_set(next, "/path/to/next", NULL);
- * evas_object_image_preload(next, EINA_TRUE);
+ * evas_object_image_preload_cancel(next, EINA_TRUE);
* @endcode
*
* If you're loading images which are too big, consider setting
@@ -7076,14 +7076,15 @@ EAPI Eina_Bool evas_object_image_sm
* Use @c EINA_TRUE for @p cancel on scenarios where you don't need
* the image data preloaded anymore.
*
- * @note Any evas_object_show() call after evas_object_image_preload()
+ * @note Any evas_object_show() call after evas_object_image_preload_cancel()
* will make the latter to be @b cancelled, with the loading process
* now taking place @b synchronously (and, thus, blocking the return
* of the former until the image is loaded). It is highly advisable,
* then, that the user preload an image with it being @b hidden, just
* to be shown on the #EVAS_CALLBACK_IMAGE_PRELOADED event's callback.
*/
-EAPI void evas_object_image_preload (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
+EAPI void evas_object_image_preload_cancel (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
+EINA_DEPRECATED EAPI void evas_object_image_preload (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
/**
* Reload an image object's image data.
Index: src/examples/evas-images2.c
===================================================================
--- src/examples/evas-images2.c (revision 68889)
+++ src/examples/evas-images2.c (working copy)
@@ -163,7 +163,7 @@ main(void)
evas_object_event_callback_add(
d.logo, EVAS_CALLBACK_IMAGE_PRELOADED, _on_preloaded, NULL);
- evas_object_image_preload(d.logo, EINA_TRUE);
+ evas_object_image_preload_cancel(d.logo, EINA_TRUE);
evas_object_image_file_set(d.logo, img_path, NULL);
evas_object_resize(d.logo, WIDTH / 2, HEIGHT / 2);
Index: src/lib/edje_util.c
===================================================================
--- src/lib/edje_util.c (revision 68675)
+++ src/lib/edje_util.c (working copy)
@@ -3895,7 +3895,7 @@ edje_object_preload(Evas_Object *obj, Eina_Bool ca
else
{
evas_object_event_callback_add(rp->object, EVAS_CALLBACK_IMAGE_PRELOADED, _edje_object_image_preload_cb, ed);
- evas_object_image_preload(rp->object, cancel);
+ evas_object_image_preload_cancel(rp->object, cancel);
}
count--;
}
Index: src/lib/els_icon.h
===================================================================
--- src/lib/els_icon.h (revision 68889)
+++ src/lib/els_icon.h (working copy)
@@ -24,4 +24,4 @@ Eina_Bool _els_smart_icon_edit_get(const Ev
Evas_Object *_els_smart_icon_edje_get(Evas_Object *obj);
void _els_smart_icon_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
Eina_Bool _els_smart_icon_aspect_fixed_get(const Evas_Object *obj);
-void _els_smart_icon_preload_set(Evas_Object *obj, Eina_Bool disable);
+void _els_smart_icon_preload_disabled_set(Evas_Object *obj, Eina_Bool disable);
Index: src/lib/els_icon.c
===================================================================
--- src/lib/els_icon.c (revision 68889)
+++ src/lib/els_icon.c (working copy)
@@ -111,7 +111,7 @@ _els_smart_icon_memfile_set(Evas_Object *obj, cons
sd->preloading = EINA_TRUE;
sd->show = EINA_TRUE;
evas_object_hide(sd->obj);
- evas_object_image_preload(sd->obj, EINA_FALSE);
+ evas_object_image_preload_cancel(sd->obj, EINA_FALSE);
if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
{
ERR("Things are going bad for some random " FMT_SIZE_T " byte chunk of memory (%p)", size, sd->obj);
@@ -137,7 +137,7 @@ _els_smart_icon_file_key_set(Evas_Object *obj, con
evas_object_hide(sd->obj);
_els_smart_icon_size_get(obj, &w, &h);
evas_object_image_load_size_set(sd->obj, w, h);
- evas_object_image_preload(sd->obj, EINA_FALSE);
+ evas_object_image_preload_cancel(sd->obj, EINA_FALSE);
if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
{
ERR("Things are going bad for '%s' (%p)", file, sd->obj);
@@ -148,13 +148,13 @@ _els_smart_icon_file_key_set(Evas_Object *obj, con
}
void
-_els_smart_icon_preload_set(Evas_Object *obj, Eina_Bool disable)
+_els_smart_icon_preload_disabled_set(Evas_Object *obj, Eina_Bool disable)
{
Smart_Data *sd;
sd = evas_object_smart_data_get(obj);
if ((!sd) || sd->edje) return;
- evas_object_image_preload(sd->obj, disable);
+ evas_object_image_preload_cancel(sd->obj, disable);
sd->preloading = !disable;
}
Index: src/lib/elm_image.c
===================================================================
--- src/lib/elm_image.c (revision 68889)
+++ src/lib/elm_image.c (working copy)
@@ -273,7 +273,7 @@ elm_image_preload_disabled_set(Evas_Object *obj, E
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- _els_smart_icon_preload_set(wd->img, !!disabled);
+ _els_smart_icon_preload_disabled_set(wd->img, !!disabled);
}
EAPI void
Index: src/lib/elm_icon.c
===================================================================
--- src/lib/elm_icon.c (revision 68889)
+++ src/lib/elm_icon.c (working copy)
@@ -993,7 +993,7 @@ elm_icon_preload_disabled_set(Evas_Object *obj, Ei
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- _els_smart_icon_preload_set(wd->img, !!disabled);
+ _els_smart_icon_preload_disabled_set(wd->img, !!disabled);
}
EINA_DEPRECATED EAPI void
Index: src/lib/elm_thumb.c
===================================================================
--- src/lib/elm_thumb.c (revision 68889)
+++ src/lib/elm_thumb.c (working copy)
@@ -216,7 +216,7 @@ _retry_thumb(Widget_Data *wd)
evas_object_event_callback_add(wd->view,
EVAS_CALLBACK_IMAGE_PRELOADED,
_thumb_loaded, wd);
- evas_object_image_preload(wd->view, EINA_TRUE);
+ evas_object_image_preload_cancel(wd->view, EINA_TRUE);
return EINA_TRUE;
}
@@ -307,7 +307,7 @@ _finished_thumb(Widget_Data *wd,
return ;
}
- evas_object_image_preload(wd->view, 0);
+ evas_object_image_preload_cancel(wd->view, 0);
return ;
}
Index: src/lib/elm_photocam.c
===================================================================
--- src/lib/elm_photocam.c (revision 68889)
+++ src/lib/elm_photocam.c (working copy)
@@ -440,7 +440,7 @@ grid_load(Evas_Object *obj, Grid *g)
g->grid[tn].src.w,
g->grid[tn].src.h);
evas_object_image_file_set(g->grid[tn].img, wd->file, NULL);
- evas_object_image_preload(g->grid[tn].img, 0);
+ evas_object_image_preload_cancel(g->grid[tn].img, 0);
wd->preload_num++;
if (wd->preload_num == 1)
{
@@ -460,14 +460,14 @@ grid_load(Evas_Object *obj, Grid *g)
}
g->grid[tn].want = 0;
evas_object_hide(g->grid[tn].img);
- evas_object_image_preload(g->grid[tn].img, 1);
+ evas_object_image_preload_cancel(g->grid[tn].img, 1);
evas_object_image_file_set(g->grid[tn].img, NULL, NULL);
}
else if ((g->grid[tn].have) && (!visible))
{
g->grid[tn].have = 0;
evas_object_hide(g->grid[tn].img);
- evas_object_image_preload(g->grid[tn].img, 1);
+ evas_object_image_preload_cancel(g->grid[tn].img, 1);
evas_object_image_file_set(g->grid[tn].img, NULL, NULL);
}
}
@@ -1454,7 +1454,7 @@ elm_photocam_file_set(Evas_Object *obj, const char
evas_object_image_file_set(wd->img, NULL, NULL);
evas_object_image_load_scale_down_set(wd->img, 8);
evas_object_image_file_set(wd->img, wd->file, NULL);
- evas_object_image_preload(wd->img, 0);
+ evas_object_image_preload_cancel(wd->img, 0);
wd->main_load_pending = 1;
if (wd->calc_job) ecore_job_del(wd->calc_job);
wd->calc_job = ecore_job_add(_calc_job, wd);
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel