summaryrefslogtreecommitdiff
path: root/src/lib
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/lib
parent89608b15eeaa7e3844a8286a36bed5ce6a43f46b (diff)
efl: Use Eina.Size2D for Efl.Canvas.max_image_size
Rarely use
Diffstat (limited to 'src/lib')
-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 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 ()
19 return: bool; [[$true on success, $false otherwise]] 19 return: bool; [[$true on success, $false otherwise]]
20 } 20 }
21 values { 21 values {
22 maxw: int; [[Pointer to hold the return value in pixels of the maximum width.]] 22 max: Eina.Size2D; [[The maximum image size (in pixels).]]
23 maxh: int; [[Pointer to hold the return value in pixels of the maximum height.]]
24 } 23 }
25 } 24 }
26 smart_objects_calculate { 25 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 *
2477} 2477}
2478 2478
2479EOLIAN static Eina_Bool 2479EOLIAN static Eina_Bool
2480_efl_ui_win_efl_canvas_image_max_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int *maxw, int *maxh) 2480_efl_ui_win_efl_canvas_image_max_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Size2D *max)
2481{ 2481{
2482 return evas_image_max_size_get(sd->evas, maxw, maxh); 2482 return efl_canvas_image_max_size_get(sd->evas, max);
2483} 2483}
2484 2484
2485EOLIAN static void 2485EOLIAN 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)
1198} 1198}
1199 1199
1200EOLIAN Eina_Bool 1200EOLIAN Eina_Bool
1201_evas_canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int *maxw, int *maxh) 1201_evas_canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Eina_Size2D *max)
1202{ 1202{
1203 int w = 0, h = 0; 1203 int w = 0, h = 0;
1204 1204
1205 if (maxw) *maxw = 0xffff; 1205 if (max) *max = EINA_SIZE2D(0xffff, 0xffff);
1206 if (maxh) *maxh = 0xffff;
1207 if (!e->engine.func->image_max_size_get) return EINA_FALSE; 1206 if (!e->engine.func->image_max_size_get) return EINA_FALSE;
1207 if (!max) return EINA_TRUE;
1208 e->engine.func->image_max_size_get(_evas_engine_context(e), &w, &h); 1208 e->engine.func->image_max_size_get(_evas_engine_context(e), &w, &h);
1209 if (maxw) *maxw = w; 1209 *max = EINA_SIZE2D(w, h);
1210 if (maxh) *maxh = h;
1211 return EINA_TRUE; 1210 return EINA_TRUE;
1212} 1211}
1213 1212