summaryrefslogtreecommitdiff
path: root/src/lib/eo
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/eo
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/eo')
-rw-r--r--src/lib/eo/eina_types.eot24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/lib/eo/eina_types.eot b/src/lib/eo/eina_types.eot
index 83be600926..f340ef3b0a 100644
--- a/src/lib/eo/eina_types.eot
+++ b/src/lib/eo/eina_types.eot
@@ -1,10 +1,22 @@
1/* FIXME: Move to Eina when we decide they are handled properly. */ 1/* FIXME: Move to Eina when we decide they are handled properly. */
2struct @extern Eina.Rectangle { 2struct @extern Eina.Rect {
3 [[Eina Rectangle]] 3 [[A rectangle in pixel dimensions.]]
4 x: int; [[X coordinate of the rectangle]] 4 x: int; [[X coordinate of the rectangle, from the top-left corner.]]
5 y: int; [[Y coordinate of the rectangle]] 5 y: int; [[Y coordinate of the rectangle, from the top-left corner.]]
6 w: int; [[Width of the rectangle]] 6 w: int; [[Width of the rectangle in pixels.]]
7 h: int; [[Height of the rectangle]] 7 h: int; [[Height of the rectangle in pixels.]]
8}
9
10struct @extern Eina.Position2D {
11 [[A 2D location in pixels.]]
12 x: int; [[X position in pixels, from the top-left corner.]]
13 y: int; [[Y position in pixels, from the top-left corner.]]
14}
15
16struct @extern Eina.Size2D {
17 [[A 2D size in pixels.]]
18 w: int; [[X position in pixels, from the top-left corner.]]
19 h: int; [[Y position in pixels, from the top-left corner.]]
8} 20}
9 21
10struct @extern Eina.File; [[Eina file data structure]] 22struct @extern Eina.File; [[Eina file data structure]]