jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=32dc8f092c7f0906b75c950df137da5f3e18a468

commit 32dc8f092c7f0906b75c950df137da5f3e18a468
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Thu Jul 2 14:26:44 2015 +0900

    Evas.Image: Deprecate some functions and remove from Eo
    
    This patch deprecates the following functions:
    - evas_object_image_data_convert
    - evas_object_image_pixels_import
    - evas_object_image_reload
    
    I could not find any place where they are used.
    
    The old documentation is kept in the header, but not as a doxygen
    anymore.
---
 src/lib/evas/Evas_Legacy.h              | 37 +++++++++++++++++++++++++++++++
 src/lib/evas/canvas/evas_image.eo       | 37 -------------------------------
 src/lib/evas/canvas/evas_object_image.c | 39 ++++++++++++++++++++++++++-------
 3 files changed, 68 insertions(+), 45 deletions(-)

diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index d8581d5..2f6fa55 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -2917,6 +2917,43 @@ EAPI void evas_object_image_size_set(Evas_Object *obj, 
int w, int h);
  */
 EAPI void evas_object_image_size_get(const Evas_Object *obj, int *w, int *h);
 
+/*
+ * Converts the raw image data of the given image object to the
+ * specified colorspace.
+ *
+ * Note that this function does not modify the raw image data.  If the
+ * requested colorspace is the same as the image colorspace nothing is
+ * done and @c NULL is returned. You should use
+ * evas_object_image_colorspace_get() to check the current image
+ * colorspace.
+ *
+ * See @ref evas_object_image_colorspace_get.
+ *
+ * @return data A newly allocated data in the format specified by to_cspace.
+ *
+ * @param[in] to_cspace The colorspace to which the image raw data will be 
converted.
+ */
+/** @deprecated evas_object_image_data_convert */
+EAPI void *evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace 
to_cspace) EINA_WARN_UNUSED_RESULT EINA_DEPRECATED;
+
+/*
+ * Import pixels from given source to a given canvas image object.
+ *
+ * This function imports pixels from a given source to a given canvas image.
+ *
+ * @param[in] pixels The pixel's source to be imported.
+ */
+/** @deprecated evas_object_image_pixels_import */
+EAPI Eina_Bool evas_object_image_pixels_import(Evas_Object *obj, 
Evas_Pixel_Import_Source *pixels) EINA_ARG_NONNULL(2) EINA_DEPRECATED;
+
+/*
+ * Reload an image object's image data.
+ *
+ * This function reloads the image data bound to image object @p obj.
+ */
+/** @deprecated evas_object_image_reload */
+EAPI void evas_object_image_reload(Evas_Object *obj) EINA_DEPRECATED;
+
 #include "canvas/evas_image.eo.legacy.h"
 
 /**
diff --git a/src/lib/evas/canvas/evas_image.eo 
b/src/lib/evas/canvas/evas_image.eo
index cec824a..53c9076 100644
--- a/src/lib/evas/canvas/evas_image.eo
+++ b/src/lib/evas/canvas/evas_image.eo
@@ -879,43 +879,6 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, 
Efl.Gfx.Fill, Efl.Gfx.View,
          /*@ Cancel preloading an image object's image data in the background 
*/
          legacy: null;
       }
-      data_convert {
-         /*@
-         Converts the raw image data of the given image object to the
-         specified colorspace.
-
-         Note that this function does not modify the raw image data.  If the
-         requested colorspace is the same as the image colorspace nothing is
-         done and @c NULL is returned. You should use
-         evas_object_image_colorspace_get() to check the current image
-         colorspace.
-
-         See @ref evas_object_image_colorspace_get.
-
-         @return data A newly allocated data in the format specified by 
to_cspace. */
-
-         return: void * @warn_unused;
-         params {
-            @in to_cspace: Evas_Colorspace; /*@ The colorspace to which the 
image raw data will be converted. */
-         }
-      }
-      pixels_import {
-         /*@
-         Import pixels from given source to a given canvas image object.
-
-         This function imports pixels from a given source to a given canvas 
image. */
-
-         return: bool;
-         params {
-            @in pixels: Evas_Pixel_Import_Source * @nonull; /*@ The pixel's 
source to be imported. */
-         }
-      }
-      reload {
-         /*@
-         Reload an image object's image data.
-
-         This function reloads the image data bound to image object @p obj. */
-      }
    }
    implements {
       Eo.Base.constructor;
diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 221ed08..b0d1c05 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1209,16 +1209,23 @@ _evas_image_load_error_get(Eo *eo_obj EINA_UNUSED, 
Evas_Image_Data *o)
    return o->load_error;
 }
 
-EOLIAN static void*
-_evas_image_data_convert(Eo *eo_obj, Evas_Image_Data *o, Evas_Colorspace 
to_cspace)
+/* deprecated */
+EAPI void*
+evas_object_image_data_convert(Evas_Object *eo_obj, Evas_Colorspace to_cspace)
 {
    Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
+   Evas_Image_Data *o;
    DATA32 *data;
    void* result = NULL;
 
-   // FIXME: This function is not really useful, and can't work with GL.
+   if (!eo_isa(eo_obj, MY_CLASS))
+     {
+        CRI("Object is not an %s!", eo_class_name_get(MY_CLASS));
+        return EINA_FALSE;
+     }
 
    evas_object_async_block(obj);
+   o = eo_data_scope_get(eo_obj, MY_CLASS);
    if ((o->preloading) && (o->engine_data))
      {
         o->preloading = EINA_FALSE;
@@ -1592,12 +1599,21 @@ _evas_image_efl_image_smooth_scale_get(Eo *eo_obj 
EINA_UNUSED, Evas_Image_Data *
    return o->cur->smooth_scale;
 }
 
-EOLIAN static void
-_evas_image_reload(Eo *eo_obj, Evas_Image_Data *o)
+/* deprecated */
+EAPI void
+_evas_image_reload(Eo *eo_obj)
 {
    Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
+   Evas_Image_Data *o;
+
+   if (!eo_isa(eo_obj, MY_CLASS))
+     {
+        CRI("Object is not an %s!", eo_class_name_get(MY_CLASS));
+        return;
+     }
 
    evas_object_async_block(obj);
+   o = eo_data_scope_get(eo_obj, MY_CLASS);
    if ((o->preloading) && (o->engine_data))
      {
         o->preloading = EINA_FALSE;
@@ -1736,14 +1752,21 @@ _evas_image_efl_file_save(const Eo *eo_obj, 
Evas_Image_Data *o, const char *file
    return ok;
 }
 
-EOLIAN static Eina_Bool
-_evas_image_pixels_import(Eo *eo_obj, Evas_Image_Data *o, 
Evas_Pixel_Import_Source *pixels)
+/* deprecated */
+EAPI Eina_Bool
+evas_object_image_pixels_import(Evas_Object *eo_obj, Evas_Pixel_Import_Source 
*pixels)
 {
    Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
+   Evas_Image_Data *o;
 
-   // FIXME: This function is not really useful, and can't work with GL.
+   if (!eo_isa(eo_obj, MY_CLASS))
+     {
+        CRI("Object is not an %s!", eo_class_name_get(MY_CLASS));
+        return EINA_FALSE;
+     }
 
    evas_object_async_block(obj);
+   o = eo_data_scope_get(eo_obj, MY_CLASS);
    _evas_object_image_cleanup(eo_obj, obj, o);
    if ((pixels->w != o->cur->image.w) || (pixels->h != o->cur->image.h)) 
return EINA_FALSE;
 

-- 


Reply via email to