jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a0b8408021fc0dd46e5e4d8425755448d4d28c53

commit a0b8408021fc0dd46e5e4d8425755448d4d28c53
Author: Jean-Philippe Andre <[email protected]>
Date:   Tue Oct 11 12:02:20 2016 +0900

    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.
---
 src/lib/evas/canvas/efl_canvas_group.eo         | 15 ---------------
 src/lib/evas/canvas/evas_object_smart.c         | 22 ++++++++++++++++++++++
 src/lib/evas/canvas/evas_object_smart_clipped.c | 23 -----------------------
 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 2c55ff7..1f80b4d 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 17b6d17..b3ff29c 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 f658235..caab428 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)
 {

-- 


Reply via email to