efl: Use Eina.Size2D for Efl.Canvas.max_image_size

Rarely use
This commit is contained in:
Jean-Philippe Andre 2017-09-18 17:49:20 +09:00
parent 89608b15ee
commit bfd9487b94
3 changed files with 7 additions and 9 deletions

View File

@ -19,8 +19,7 @@ interface Efl.Canvas ()
return: bool; [[$true on success, $false otherwise]] return: bool; [[$true on success, $false otherwise]]
} }
values { values {
maxw: int; [[Pointer to hold the return value in pixels of the maximum width.]] max: Eina.Size2D; [[The maximum image size (in pixels).]]
maxh: int; [[Pointer to hold the return value in pixels of the maximum height.]]
} }
} }
smart_objects_calculate { smart_objects_calculate {

View File

@ -2477,9 +2477,9 @@ _efl_ui_win_efl_input_interface_pointer_iterate(const Eo *obj, Efl_Ui_Win_Data *
} }
EOLIAN static Eina_Bool 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 EOLIAN static void

View File

@ -1198,16 +1198,15 @@ _evas_canvas_image_cache_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
} }
EOLIAN Eina_Bool 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; int w = 0, h = 0;
if (maxw) *maxw = 0xffff; if (max) *max = EINA_SIZE2D(0xffff, 0xffff);
if (maxh) *maxh = 0xffff;
if (!e->engine.func->image_max_size_get) return EINA_FALSE; 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); e->engine.func->image_max_size_get(_evas_engine_context(e), &w, &h);
if (maxw) *maxw = w; *max = EINA_SIZE2D(w, h);
if (maxh) *maxh = h;
return EINA_TRUE; return EINA_TRUE;
} }