summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-13 16:49:04 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-13 18:03:34 +0900
commit13da5e980eb43288b9b9f502cb6a7a000e1f26ea (patch)
treee37670643988bb990b3101257332c490a2e21131 /src/lib/edje
parent0c46fc71033edda92f4e86b86f6d1d62751f8998 (diff)
efl_gfx: Use Eina.Rectangle for geometry (EO)
This saves a few lines already (without even having the proper helpers for stack rectangles).
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_part.c22
-rw-r--r--src/lib/edje/edje_private.h7
2 files changed, 12 insertions, 17 deletions
diff --git a/src/lib/edje/edje_part.c b/src/lib/edje/edje_part.c
index 061df2120e..b9790d8e5d 100644
--- a/src/lib/edje/edje_part.c
+++ b/src/lib/edje/edje_part.c
@@ -100,27 +100,17 @@ _efl_canvas_layout_part_efl_object_finalize(Eo *obj, Efl_Canvas_Layout_Part_Data
100 return efl_finalize(efl_super(obj, MY_CLASS)); 100 return efl_finalize(efl_super(obj, MY_CLASS));
101} 101}
102 102
103EOLIAN void 103EOLIAN Eina_Rectangle
104_efl_canvas_layout_part_efl_gfx_geometry_get(Eo *obj, Efl_Canvas_Layout_Part_Data *pd, int *x, int *y, int *w, int *h) 104_efl_canvas_layout_part_efl_gfx_geometry_get(Eo *obj, Efl_Canvas_Layout_Part_Data *pd)
105{ 105{
106 Edje_Real_Part *rp = pd->rp; 106 Edje_Real_Part *rp = pd->rp;
107 PROXY_CALL_BEGIN(pd); 107 Eina_Rectangle r = { 0, };
108 108
109 PROXY_CALL_BEGIN(pd);
109 _edje_recalc_do(pd->ed); 110 _edje_recalc_do(pd->ed);
110 if (!rp) 111 if (!rp) RETURN_VAL(r);
111 {
112 if (x) *x = 0;
113 if (y) *y = 0;
114 if (w) *w = 0;
115 if (h) *h = 0;
116 RETURN_VOID;
117 }
118 112
119 if (x) *x = rp->x; 113 RETURN_VAL(rp->rect);
120 if (y) *y = rp->y;
121 if (w) *w = rp->w;
122 if (h) *h = rp->h;
123 RETURN_VOID;
124} 114}
125 115
126EOLIAN static void 116EOLIAN static void
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 89867977a1..b98e02af13 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2034,7 +2034,12 @@ struct _Edje_Real_Part
2034 } typedata; // 4 2034 } typedata; // 4
2035 FLOAT_T description_pos; // 8 2035 FLOAT_T description_pos; // 8
2036 Edje_Rectangle req; // 16 2036 Edje_Rectangle req; // 16
2037 int x, y, w, h; // 16 2037 union {
2038 struct {
2039 int x, y, w, h; // 16
2040 };
2041 Eina_Rectangle rect;
2042 };
2038 Evas_Object_Pointer_Mode pointer_mode; 2043 Evas_Object_Pointer_Mode pointer_mode;
2039#ifdef EDJE_CALC_CACHE 2044#ifdef EDJE_CALC_CACHE
2040 unsigned short state; // 2 2045 unsigned short state; // 2