summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-15 12:14:32 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 13:22:54 +0900
commit8fb194d969ccb9227e56ea60f538d977393408d7 (patch)
tree0673442275d29108e58a4cb0ab9fc0946db91b59 /src/lib/edje
parentf3eff6eb3ee6e9b56c0be5cd7f8905f14b388e4f (diff)
efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most it's more convenient than (x,y).
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_calc.c10
-rw-r--r--src/lib/edje/edje_smart.c12
-rw-r--r--src/lib/edje/edje_text.c5
3 files changed, 15 insertions, 12 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 54aca19613..b5020c9cf7 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -5264,15 +5264,15 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
5264 } 5264 }
5265 } 5265 }
5266 else 5266 else
5267 efl_gfx_position_set(ep->object, ed->x + pf->final.x, ed->y + pf->final.y); 5267 efl_gfx_position_set(ep->object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
5268#else 5268#else
5269 efl_gfx_position_set(ep->object, ed->x + pf->final.x, ed->y + pf->final.y); 5269 efl_gfx_position_set(ep->object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
5270 efl_gfx_size_set(ep->object, pf->final.w, pf->final.h); 5270 efl_gfx_size_set(ep->object, pf->final.w, pf->final.h);
5271#endif 5271#endif
5272 5272
5273 if (ep->nested_smart) /* Move, Resize all nested parts */ 5273 if (ep->nested_smart) /* Move, Resize all nested parts */
5274 { /* Not really needed but will improve the bounding box evaluation done by Evas */ 5274 { /* Not really needed but will improve the bounding box evaluation done by Evas */
5275 efl_gfx_position_set(ep->nested_smart, ed->x + pf->final.x, ed->y + pf->final.y); 5275 efl_gfx_position_set(ep->nested_smart, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
5276 efl_gfx_size_set(ep->nested_smart, pf->final.w, pf->final.h); 5276 efl_gfx_size_set(ep->nested_smart, pf->final.w, pf->final.h);
5277 } 5277 }
5278 if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 5278 if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
@@ -5312,7 +5312,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
5312 5312
5313 pd_camera = (Edje_Part_Description_Camera*) ep->chosen_description; 5313 pd_camera = (Edje_Part_Description_Camera*) ep->chosen_description;
5314 5314
5315 efl_gfx_position_set(ep->object, ed->x + pf->final.x, ed->y + pf->final.y), 5315 efl_gfx_position_set(ep->object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y)),
5316 efl_gfx_size_set(ep->object, pf->final.w, pf->final.h); 5316 efl_gfx_size_set(ep->object, pf->final.w, pf->final.h);
5317 5317
5318 viewport = evas_object_image_source_get(ep->object); 5318 viewport = evas_object_image_source_get(ep->object);
@@ -5563,7 +5563,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
5563 5563
5564 if (ep->part->type == EDJE_PART_TYPE_GROUP) 5564 if (ep->part->type == EDJE_PART_TYPE_GROUP)
5565 vis = evas_object_visible_get(ed->obj); 5565 vis = evas_object_visible_get(ed->obj);
5566 efl_gfx_position_set(ep->typedata.swallow->swallowed_object, ed->x + pf->final.x, ed->y + pf->final.y); 5566 efl_gfx_position_set(ep->typedata.swallow->swallowed_object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
5567 efl_gfx_size_set(ep->typedata.swallow->swallowed_object, pf->final.w, pf->final.h); 5567 efl_gfx_size_set(ep->typedata.swallow->swallowed_object, pf->final.w, pf->final.h);
5568 efl_gfx_visible_set(ep->typedata.swallow->swallowed_object, vis); 5568 efl_gfx_visible_set(ep->typedata.swallow->swallowed_object, vis);
5569 } 5569 }
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 843bb90f9b..bd25e58101 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -167,18 +167,18 @@ _edje_object_efl_canvas_group_group_del(Eo *obj, Edje *ed)
167} 167}
168 168
169EOLIAN static void 169EOLIAN static void
170_edje_object_efl_gfx_position_set(Eo *obj, Edje *ed, Evas_Coord x, Evas_Coord y) 170_edje_object_efl_gfx_position_set(Eo *obj, Edje *ed, Eina_Position2D pos)
171{ 171{
172 unsigned short i; 172 unsigned short i;
173 173
174 if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y)) 174 if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
175 return; 175 return;
176 176
177 efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y); 177 efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
178 178
179 if ((ed->x == x) && (ed->y == y)) return; 179 if ((ed->x == pos.x) && (ed->y == pos.y)) return;
180 ed->x = x; 180 ed->x = pos.x;
181 ed->y = y; 181 ed->y = pos.y;
182// evas_object_move(ed->clipper, ed->x, ed->y); 182// evas_object_move(ed->clipper, ed->x, ed->y);
183 183
184 if (_edje_lua_script_only(ed)) 184 if (_edje_lua_script_only(ed))
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 3c3e1c14c3..bb90d17f79 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -515,7 +515,10 @@ arrange_text:
515 515
516 if (!calc_only) 516 if (!calc_only)
517 { 517 {
518 efl_gfx_position_set(ep->object, ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x, ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y); 518 Eina_Position2D pos;
519 pos.x = ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x;
520 pos.y = ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y;
521 efl_gfx_position_set(ep->object, pos);
519 efl_gfx_visible_set(ep->object, params->visible); 522 efl_gfx_visible_set(ep->object, params->visible);
520 } 523 }
521 524