summaryrefslogtreecommitdiff
path: root/src/lib/ector
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/ector
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/ector')
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c4
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c4
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c2
-rw-r--r--src/lib/ector/ector_renderer.eo4
-rw-r--r--src/lib/ector/gl/ector_gl_surface.eo2
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_gradient_linear.c4
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_gradient_radial.c4
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.c4
8 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
index ceccc57d53..95b42432c2 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
@@ -114,8 +114,8 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_cairo_fill(Eo *obj,
114 114
115static void 115static void
116_ector_renderer_cairo_gradient_linear_ector_renderer_bounds_get(Eo *obj, 116_ector_renderer_cairo_gradient_linear_ector_renderer_bounds_get(Eo *obj,
117 Ector_Renderer_Cairo_Gradient_Linear_Data *pd EINA_UNUSED, 117 Ector_Renderer_Cairo_Gradient_Linear_Data *pd EINA_UNUSED,
118 Eina_Rectangle *r) 118 Eina_Rect *r)
119{ 119{
120 Ector_Renderer_Gradient_Linear_Data *gld; 120 Ector_Renderer_Gradient_Linear_Data *gld;
121 Ector_Renderer_Cairo_Data *bd; 121 Ector_Renderer_Cairo_Data *bd;
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
index 94225b6590..0011968ce2 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
@@ -120,8 +120,8 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_cairo_fill(Eo *obj,
120 120
121static void 121static void
122_ector_renderer_cairo_gradient_radial_ector_renderer_bounds_get(Eo *obj EINA_UNUSED, 122_ector_renderer_cairo_gradient_radial_ector_renderer_bounds_get(Eo *obj EINA_UNUSED,
123 Ector_Renderer_Cairo_Gradient_Radial_Data *pd EINA_UNUSED, 123 Ector_Renderer_Cairo_Gradient_Radial_Data *pd EINA_UNUSED,
124 Eina_Rectangle *r) 124 Eina_Rect *r)
125{ 125{
126 Ector_Renderer_Gradient_Radial_Data *gld; 126 Ector_Renderer_Gradient_Radial_Data *gld;
127 Ector_Renderer_Cairo_Data *bd; 127 Ector_Renderer_Cairo_Data *bd;
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index fb08cec7b8..00bc3d43e1 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -233,7 +233,7 @@ _ector_renderer_cairo_shape_ector_renderer_cairo_fill(Eo *obj EINA_UNUSED,
233static void 233static void
234_ector_renderer_cairo_shape_ector_renderer_bounds_get(Eo *obj, 234_ector_renderer_cairo_shape_ector_renderer_bounds_get(Eo *obj,
235 Ector_Renderer_Cairo_Shape_Data *pd EINA_UNUSED, 235 Ector_Renderer_Cairo_Shape_Data *pd EINA_UNUSED,
236 Eina_Rectangle *r) 236 Eina_Rect *r)
237{ 237{
238 Ector_Renderer_Cairo_Data *bd; 238 Ector_Renderer_Cairo_Data *bd;
239 239
diff --git a/src/lib/ector/ector_renderer.eo b/src/lib/ector/ector_renderer.eo
index 67e4f76260..0d33f1e2f0 100644
--- a/src/lib/ector/ector_renderer.eo
+++ b/src/lib/ector/ector_renderer.eo
@@ -110,7 +110,7 @@ abstract Ector.Renderer (Efl.Object)
110 bounds_get @pure_virtual { 110 bounds_get @pure_virtual {
111 [[Retrieves the bounds of the renderer]] 111 [[Retrieves the bounds of the renderer]]
112 params { 112 params {
113 @out r: Eina.Rectangle; [[Bounds as @Eina.Rectangle]] 113 @out r: Eina.Rect; [[Bounds as @Eina.Rect]]
114 } 114 }
115 } 115 }
116 draw @pure_virtual { 116 draw @pure_virtual {
@@ -118,7 +118,7 @@ abstract Ector.Renderer (Efl.Object)
118 return: bool; [[$true on success, $false otherwise]] 118 return: bool; [[$true on success, $false otherwise]]
119 params { 119 params {
120 @in op: Efl.Gfx.Render_Op; [[Renderer operation]] 120 @in op: Efl.Gfx.Render_Op; [[Renderer operation]]
121 @in clips: array<ptr(Eina.Rectangle)>; [[Array of @Eina.Rectangle clip]] 121 @in clips: array<ptr(Eina.Rect)>; [[Array of @Eina.Rect clip]]
122 @in mul_col: uint; [[Premultiplied color]] 122 @in mul_col: uint; [[Premultiplied color]]
123 } 123 }
124 } 124 }
diff --git a/src/lib/ector/gl/ector_gl_surface.eo b/src/lib/ector/gl/ector_gl_surface.eo
index 505257160a..798befa70d 100644
--- a/src/lib/ector/gl/ector_gl_surface.eo
+++ b/src/lib/ector/gl/ector_gl_surface.eo
@@ -27,7 +27,7 @@ class Ector.GL.Surface (Ector.GL.Buffer, Ector.Surface)
27 return: bool; [[$true on success, $false otherwise]] 27 return: bool; [[$true on success, $false otherwise]]
28 params { 28 params {
29 @in op: Efl.Gfx.Render_Op; [[Render operation]] 29 @in op: Efl.Gfx.Render_Op; [[Render operation]]
30 @in clips: array<ptr(Eina.Rectangle)>; [[Array of @Eina.Rectangle clip]] 30 @in clips: array<ptr(Eina.Rect)>; [[Array of @Eina.Rect clip]]
31 } 31 }
32 } 32 }
33 } 33 }
diff --git a/src/lib/ector/gl/ector_renderer_gl_gradient_linear.c b/src/lib/ector/gl/ector_renderer_gl_gradient_linear.c
index 69e1c6d378..87c5594b88 100644
--- a/src/lib/ector/gl/ector_renderer_gl_gradient_linear.c
+++ b/src/lib/ector/gl/ector_renderer_gl_gradient_linear.c
@@ -41,8 +41,8 @@ _ector_renderer_gl_gradient_linear_ector_renderer_draw(Eo *obj, Ector_Renderer_G
41 41
42static void 42static void
43_ector_renderer_gl_gradient_linear_ector_renderer_bounds_get(Eo *obj EINA_UNUSED, 43_ector_renderer_gl_gradient_linear_ector_renderer_bounds_get(Eo *obj EINA_UNUSED,
44 Ector_Renderer_GL_Gradient_Linear_Data *pd, 44 Ector_Renderer_GL_Gradient_Linear_Data *pd,
45 Eina_Rectangle *r) 45 Eina_Rect *r)
46{ 46{
47 EINA_RECTANGLE_SET(r, 47 EINA_RECTANGLE_SET(r,
48 pd->base->origin.x + pd->linear->start.x, 48 pd->base->origin.x + pd->linear->start.x,
diff --git a/src/lib/ector/gl/ector_renderer_gl_gradient_radial.c b/src/lib/ector/gl/ector_renderer_gl_gradient_radial.c
index 8760bad429..827b120600 100644
--- a/src/lib/ector/gl/ector_renderer_gl_gradient_radial.c
+++ b/src/lib/ector/gl/ector_renderer_gl_gradient_radial.c
@@ -55,8 +55,8 @@ _ector_renderer_gl_gradient_radial_ector_renderer_gl_fill(Eo *obj, Ector_Rendere
55 55
56static void 56static void
57_ector_renderer_gl_gradient_radial_ector_renderer_bounds_get(Eo *obj EINA_UNUSED, 57_ector_renderer_gl_gradient_radial_ector_renderer_bounds_get(Eo *obj EINA_UNUSED,
58 Ector_Renderer_GL_Gradient_Radial_Data *pd, 58 Ector_Renderer_GL_Gradient_Radial_Data *pd,
59 Eina_Rectangle *r) 59 Eina_Rect *r)
60{ 60{
61 EINA_RECTANGLE_SET(r, 61 EINA_RECTANGLE_SET(r,
62 pd->base->origin.x + pd->radial->radial.x - pd->radial->radius, 62 pd->base->origin.x + pd->radial->radial.x - pd->radial->radius,
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.c b/src/lib/ector/gl/ector_renderer_gl_shape.c
index 1329a78313..b279129966 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.c
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.c
@@ -32,7 +32,7 @@ _ector_renderer_gl_shape_path_changed(void *data, const Efl_Event *event EINA_UN
32static Eina_Bool 32static Eina_Bool
33_ector_renderer_gl_shape_ector_renderer_prepare(Eo *obj, Ector_Renderer_GL_Shape_Data *pd) 33_ector_renderer_gl_shape_ector_renderer_prepare(Eo *obj, Ector_Renderer_GL_Shape_Data *pd)
34{ 34{
35 Eina_Rectangle bounding_box; 35 Eina_Rect bounding_box;
36 Eina_Bool r; 36 Eina_Bool r;
37 37
38 if (pd->vertex) return EINA_TRUE; 38 if (pd->vertex) return EINA_TRUE;
@@ -105,7 +105,7 @@ _ector_renderer_gl_shape_ector_renderer_gl_fill(Eo *obj EINA_UNUSED,
105} 105}
106 106
107static void 107static void
108_ector_renderer_gl_shape_ector_renderer_bounds_get(Eo *obj, Ector_Renderer_GL_Shape_Data *pd, Eina_Rectangle *r) 108_ector_renderer_gl_shape_ector_renderer_bounds_get(Eo *obj, Ector_Renderer_GL_Shape_Data *pd, Eina_Rect *r)
109{ 109{
110 efl_gfx_path_bounds_get(obj, r); 110 efl_gfx_path_bounds_get(obj, r);
111 111