aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 17:49:20 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-19 10:51:48 +0900
commitbfd9487b94a39421639a0c65fa2b43067cb090b6 (patch)
treefbda82a29cb5a99aba2b3e400356cc82c29c6c80 /src
parenteo-cxx: Fix test errors with new Eolian @own framework (diff)
downloadefl-bfd9487b94a39421639a0c65fa2b43067cb090b6.tar.gz
efl: Use Eina.Size2D for Efl.Canvas.max_image_size
Rarely use
Diffstat (limited to 'src')
-rw-r--r--src/lib/efl/interfaces/efl_canvas.eo3
-rw-r--r--src/lib/elementary/efl_ui_win.c4
-rw-r--r--src/lib/evas/canvas/evas_object_image.c9
3 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/efl/interfaces/efl_canvas.eo b/src/lib/efl/interfaces/efl_canvas.eo
index 2740d5fb35..15cb2ef45f 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 46c97b5fc3..967a3ed440 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 9b6871743e..0bc3fe7673 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;
}