summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-10-11 12:02:20 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-12 11:25:56 +0900
commita0b8408021fc0dd46e5e4d8425755448d4d28c53 (patch)
treedbeaa19d0f50031a9a918f9616e0209d68e7a2ce
parent97c9fa64a461ccf60e63fd8a8982c9b8c5c6290e (diff)
downloadefl-a0b8408021fc0dd46e5e4d8425755448d4d28c53.tar.gz
evas: Move move_children_relative to legacy only
While this kind of API seems to make sense with smart objects (relative coordinates), it is currently not used apart from the smart object class itself. So, for now, I'm moving this to legacy to clean up Efl.Canvas.Group and we can later add the equivalent in a clean "group" API.
-rw-r--r--src/lib/evas/canvas/efl_canvas_group.eo15
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c22
-rw-r--r--src/lib/evas/canvas/evas_object_smart_clipped.c23
3 files changed, 22 insertions, 38 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo
index 2c55ff7aac..1f80b4d504 100644
--- a/src/lib/evas/canvas/efl_canvas_group.eo
+++ b/src/lib/evas/canvas/efl_canvas_group.eo
@@ -45,21 +45,6 @@ class Efl.Canvas.Group (Efl.Canvas.Object)
]]
legacy: evas_object_smart_changed;
}
- group_children_move {
- [[Move all children of this object using relative coordinates.
-
- This will make each children move, from where they before, by
- a certain delta (offsets) in both directions.
-
- Note: Clipped smart objects already make use of this function on
- their $move smart function definition.
- ]]
- params {
- @in dx: int; [[Horizontal offset (delta).]]
- @in dy: int; [[Vertical offset (delta).]]
- }
- legacy: evas_object_smart_move_children_relative;
- }
group_calculate {
[[Triggers an immediate recalculation of this object's geometry.
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 17b6d1789f..b3ff29c74c 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -594,6 +594,28 @@ _efl_canvas_group_efl_object_constructor(Eo *eo_obj, Evas_Smart_Data *class_data
return eo_obj;
}
+EAPI void
+evas_object_smart_move_children_relative(Eo *eo_obj, Evas_Coord dx, Evas_Coord dy)
+{
+ Evas_Object_Protected_Data *child;
+ const Eina_Inlist *lst;
+
+ if ((dx == 0) && (dy == 0)) return;
+ if (!efl_isa(eo_obj, MY_CLASS)) return;
+
+ lst = evas_object_smart_members_get_direct(eo_obj);
+ EINA_INLIST_FOREACH(lst, child)
+ {
+ Evas_Coord orig_x, orig_y;
+
+ if (child->delete_me) continue;
+ if (child->is_static_clip) continue;
+ orig_x = child->cur->geometry.x;
+ orig_y = child->cur->geometry.y;
+ evas_object_move(child->object, orig_x + dx, orig_y + dy);
+ }
+}
+
EOLIAN static void
_efl_canvas_group_group_add(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED)
{
diff --git a/src/lib/evas/canvas/evas_object_smart_clipped.c b/src/lib/evas/canvas/evas_object_smart_clipped.c
index f6582355b7..caab4286fe 100644
--- a/src/lib/evas/canvas/evas_object_smart_clipped.c
+++ b/src/lib/evas/canvas/evas_object_smart_clipped.c
@@ -12,29 +12,6 @@
CSO_DATA_GET(eo_obj, ptr) \
if (!ptr) return;
-EOLIAN void
-_efl_canvas_group_group_children_move(Eo *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_Coord dx, Evas_Coord dy)
-{
-
- const Eina_Inlist *lst;
- Evas_Object_Protected_Data *child;
-
- if ((dx == 0) && (dy == 0))
- return;
-
- lst = evas_object_smart_members_get_direct(eo_obj);
- EINA_INLIST_FOREACH(lst, child)
- {
- Evas_Coord orig_x, orig_y;
-
- if (child->delete_me) continue;
- if (child->is_static_clip) continue;
- orig_x = child->cur->geometry.x;
- orig_y = child->cur->geometry.y;
- evas_object_move(child->object, orig_x + dx, orig_y + dy);
- }
-}
-
EAPI Evas_Object *
evas_object_smart_clipped_clipper_get(const Evas_Object *eo_obj)
{