From: Jean-Philippe Andre Date: Mon, 18 Sep 2017 08:49:20 +0000 (+0900) Subject: efl: Use Eina.Size2D for Efl.Canvas.max_image_size X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2599 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bfd9487b94a39421639a0c65fa2b43067cb090b6;p=platform%2Fupstream%2Fefl.git efl: Use Eina.Size2D for Efl.Canvas.max_image_size Rarely use --- diff --git a/src/lib/efl/interfaces/efl_canvas.eo b/src/lib/efl/interfaces/efl_canvas.eo index 2740d5f..15cb2ef 100644 --- a/src/lib/efl/interfaces/efl_canvas.eo +++ b/src/lib/efl/interfaces/efl_canvas.eo @@ -19,8 +19,7 @@ interface Efl.Canvas () return: bool; [[$true on success, $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.]] + max: Eina.Size2D; [[The maximum image size (in pixels).]] } } smart_objects_calculate { diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 46c97b5..967a3ed 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -2477,9 +2477,9 @@ _efl_ui_win_efl_input_interface_pointer_iterate(const Eo *obj, Efl_Ui_Win_Data * } EOLIAN static Eina_Bool -_efl_ui_win_efl_canvas_image_max_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int *maxw, int *maxh) +_efl_ui_win_efl_canvas_image_max_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Size2D *max) { - return evas_image_max_size_get(sd->evas, maxw, maxh); + return efl_canvas_image_max_size_get(sd->evas, max); } EOLIAN static void diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 9b68717..0bc3fe7 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -1198,16 +1198,15 @@ _evas_canvas_image_cache_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) } EOLIAN Eina_Bool -_evas_canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int *maxw, int *maxh) +_evas_canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Eina_Size2D *max) { int w = 0, h = 0; - if (maxw) *maxw = 0xffff; - if (maxh) *maxh = 0xffff; + if (max) *max = EINA_SIZE2D(0xffff, 0xffff); if (!e->engine.func->image_max_size_get) return EINA_FALSE; + if (!max) return EINA_TRUE; e->engine.func->image_max_size_get(_evas_engine_context(e), &w, &h); - if (maxw) *maxw = w; - if (maxh) *maxh = h; + *max = EINA_SIZE2D(w, h); return EINA_TRUE; }