summaryrefslogtreecommitdiff
path: root/src/lib/efl
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-14 11:59:44 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 13:22:52 +0900
commitf3eff6eb3ee6e9b56c0be5cd7f8905f14b388e4f (patch)
tree473b3d1b3e56cc5875d4496bf40fe8279165e132 /src/lib/efl
parentcb3b4cc8d7794bea575a85325c8a58f25f0507b2 (diff)
efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle also work on Eina_Rect out of the box, most of the code dealing with x,y,w,h will require no modifications either. But Eina_Rect provides direct access to a size or position 2d component, as well as the usual x,y,w,h. The field "rect" is provided as a convenience for code dealing with both Eina_Rectangle and Eina_Rect. We may or may not require it. Note: Size2D could use unsigned values but I have spotted a few places in the code that actually use -1 to indicate invalid size (as opposed to 0x0). @feature
Diffstat (limited to 'src/lib/efl')
-rw-r--r--src/lib/efl/interfaces/efl_animator.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_fill.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.c4
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_types.eot2
6 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/efl/interfaces/efl_animator.eo b/src/lib/efl/interfaces/efl_animator.eo
index dd1322a587..ac7e86ba28 100644
--- a/src/lib/efl/interfaces/efl_animator.eo
+++ b/src/lib/efl/interfaces/efl_animator.eo
@@ -2,7 +2,7 @@ import eina_types;
2 2
3struct Efl.Event.Animator_Tick { 3struct Efl.Event.Animator_Tick {
4 [[EFL event animator tick data structure]] 4 [[EFL event animator tick data structure]]
5 update_area: Eina.Rectangle; [[Area of the canvas that will be pushed to screen.]] 5 update_area: Eina.Rect; [[Area of the canvas that will be pushed to screen.]]
6} 6}
7 7
8interface Efl.Animator { 8interface Efl.Animator {
diff --git a/src/lib/efl/interfaces/efl_gfx.eo b/src/lib/efl/interfaces/efl_gfx.eo
index bea1ca652a..eccc2a0aaf 100644
--- a/src/lib/efl/interfaces/efl_gfx.eo
+++ b/src/lib/efl/interfaces/efl_gfx.eo
@@ -46,7 +46,7 @@ interface Efl.Gfx {
46 @property geometry { 46 @property geometry {
47 [[Rectangular geometry that combines both position and size.]] 47 [[Rectangular geometry that combines both position and size.]]
48 values { 48 values {
49 rect: Eina.Rectangle; [[The X,Y position and W,H size, in pixels.]] 49 rect: Eina.Rect; [[The X,Y position and W,H size, in pixels.]]
50 } 50 }
51 } 51 }
52 @property color { 52 @property color {
diff --git a/src/lib/efl/interfaces/efl_gfx_fill.eo b/src/lib/efl/interfaces/efl_gfx_fill.eo
index 385f79fce5..566f26daad 100644
--- a/src/lib/efl/interfaces/efl_gfx_fill.eo
+++ b/src/lib/efl/interfaces/efl_gfx_fill.eo
@@ -38,7 +38,7 @@ interface Efl.Gfx.Fill {
38 set {} 38 set {}
39 get {} 39 get {}
40 values { 40 values {
41 fill: Eina.Rectangle; [[The top-left corner to start drawing from 41 fill: Eina.Rect; [[The top-left corner to start drawing from
42 as well as the size at which the bound image will be displayed.]] 42 as well as the size at which the bound image will be displayed.]]
43 } 43 }
44 } 44 }
diff --git a/src/lib/efl/interfaces/efl_gfx_path.c b/src/lib/efl/interfaces/efl_gfx_path.c
index 5c3aa64649..3501379a75 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.c
+++ b/src/lib/efl/interfaces/efl_gfx_path.c
@@ -207,9 +207,7 @@ _efl_gfx_path_length_get(Eo *obj EINA_UNUSED, Efl_Gfx_Path_Data *pd,
207} 207}
208 208
209static void 209static void
210_efl_gfx_path_bounds_get(Eo *obj EINA_UNUSED, 210_efl_gfx_path_bounds_get(Eo *obj EINA_UNUSED, Efl_Gfx_Path_Data *pd, Eina_Rect *r)
211 Efl_Gfx_Path_Data *pd,
212 Eina_Rectangle *r)
213{ 211{
214 double minx, miny, maxx, maxy; 212 double minx, miny, maxx, maxy;
215 unsigned int i; 213 unsigned int i;
diff --git a/src/lib/efl/interfaces/efl_gfx_path.eo b/src/lib/efl/interfaces/efl_gfx_path.eo
index ca0c3b4922..c4d15d8f63 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.eo
+++ b/src/lib/efl/interfaces/efl_gfx_path.eo
@@ -64,7 +64,7 @@ mixin Efl.Gfx.Path
64 @since 1.18 64 @since 1.18
65 ]] 65 ]]
66 params { 66 params {
67 @out r: Eina.Rectangle; [[Contain the bounding box of the currently set path]] 67 @out r: Eina.Rect; [[Contain the bounding box of the currently set path]]
68 } 68 }
69 } 69 }
70 reset { 70 reset {
diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot
index bd156ba1db..20ddeea09f 100644
--- a/src/lib/efl/interfaces/efl_gfx_types.eot
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -158,7 +158,7 @@ enum Efl.Gfx.Change.Flag
158struct Efl.Gfx.Event.Render_Post 158struct Efl.Gfx.Event.Render_Post
159{ 159{
160 [[Data sent along a "render,post" event, after a frame has been rendered.]] 160 [[Data sent along a "render,post" event, after a frame has been rendered.]]
161 updated_area: list <Eina.Rectangle>; [[A list of rectangles that were 161 updated_area: list <Eina.Rect>; [[A list of rectangles that were
162 updated in the canvas.]] 162 updated in the canvas.]]
163} 163}
164 164