discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=59583a6f898c061639f862a13b2ae6de9e2b76cc

commit 59583a6f898c061639f862a13b2ae6de9e2b76cc
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Feb 14 21:14:51 2018 -0500

    evas: properly implement evas_image_max_size_get() as a wrapper
    
    ref 457dc16cffdd5f9c6ce42e72beddad06fa36f0c0
---
 src/lib/evas/Evas_Legacy.h              | 17 +++++++++++++++++
 src/lib/evas/canvas/evas_canvas.eo      | 21 +--------------------
 src/lib/evas/canvas/evas_image_legacy.c | 15 +++++++++++++++
 src/lib/evas/canvas/evas_main.c         |  2 +-
 4 files changed, 34 insertions(+), 21 deletions(-)

diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 9c29fb1b2a..9c1156d4f8 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -85,6 +85,23 @@ EAPI Eina_Bool evas_engine_info_set(Evas *obj, 
Evas_Engine_Info *info);
  */
 EAPI Evas_Engine_Info *evas_engine_info_get(const Evas *obj);
 
+/**
+ * @brief Get the maximum image size evas can possibly handle.
+ *
+ * This function returns the largest image or surface size that evas can handle
+ * in pixels, and if there is one, returns @c true. It returns @c false if no
+ * extra constraint on maximum image size exists. You still should check the
+ * return values of @c maxw and @c maxh as there may still be a limit, just a
+ * much higher one.
+ *
+ * @param[in] obj The object.
+ * @param[out] max The maximum image size (in pixels).
+ *
+ * @return @c true on success, @c false otherwise
+ */
+EAPI Eina_Bool evas_image_max_size_get(Eo *eo_e, int *w, int *h);
+
+
 #include "canvas/evas_canvas.eo.legacy.h"
 
 /**
diff --git a/src/lib/evas/canvas/evas_canvas.eo 
b/src/lib/evas/canvas/evas_canvas.eo
index 257aed661d..6f40d5fc3f 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -269,26 +269,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, 
Efl.Input.Interface,
             y: int; [[The pointer to an integer to be filled in.]]
          }
       }
-      @property image_max_size {
-         get {
-            [[Get the maximum image size evas can possibly handle.
-
-              This function returns the largest image or surface size that
-              evas can handle in pixels, and if there is one, returns $true.
-              It returns $false if no extra constraint on maximum image
-              size exists. You still should check the return values of
-              $maxw and $maxh as there may still be a limit, just a
-              much higher one.
-
-              @since 1.1
-            ]]
-            return: bool; [[$true if it can handle the maximum image size, 
$false otherwise]]
-         }
-         values {
-            maxw: int; [[Pointer to hold the return value in pixels of the 
maximum width.]]
-            maxh: int; [[Pointer to hold the return value in pixels of the 
maximum height.]]
-         }
-      }
       @property object_bottom {
          get {
             [[Get the lowest (stacked) Evas object on the canvas $e.
@@ -1132,5 +1112,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, 
Efl.Input.Interface,
       Efl.Canvas.Pointer.pointer_inside { get; }
       Efl.Canvas.device { get; }
       Efl.Canvas.seat { get; }
+      Efl.Canvas.image_max_size { get; }
    }
 }
diff --git a/src/lib/evas/canvas/evas_image_legacy.c 
b/src/lib/evas/canvas/evas_image_legacy.c
index 797cb2708f..0f814e586e 100644
--- a/src/lib/evas/canvas/evas_image_legacy.c
+++ b/src/lib/evas/canvas/evas_image_legacy.c
@@ -1214,6 +1214,21 @@ evas_object_image_pixels_import(Evas_Object *eo_obj, 
Evas_Pixel_Import_Source *p
    return EINA_TRUE;
 }
 
+EAPI Eina_Bool
+evas_image_max_size_get(Eo *eo_e, int *w, int *h)
+{
+   Eina_Size2D size;
+   Eina_Bool ret;
+
+   ret = efl_canvas_image_max_size_get(eo_e, &size);
+   if (ret)
+     {
+        if (w) *w = size.w;
+        if (h) *h = size.h;
+     }
+   return ret;
+}
+
 /* deprecated */
 EAPI void
 evas_object_image_alpha_mask_set(Evas_Object *eo_obj EINA_UNUSED, Eina_Bool 
ismask EINA_UNUSED)
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 03d6d414cf..c7ee059a1a 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -1049,7 +1049,7 @@ _evas_canvas_image_cache_get(Eo *eo_e EINA_UNUSED, 
Evas_Public_Data *e)
 }
 
 EOLIAN static Eina_Bool
-_evas_canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, 
Eina_Size2D *max)
+_evas_canvas_efl_canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, 
Evas_Public_Data *e, Eina_Size2D *max)
 {
    int w = 0, h = 0;
 

-- 


Reply via email to