bu5hm4n pushed a commit to branch master.

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

commit e166486107565e70431ab08bb02cceca2ed58637
Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Feb 14 13:59:54 2019 -0500

    interfaces: move pointer_iterate method efl.canvas.scene -> efl.ui.win
    
    this method should probably be merged into a gesture class somewhere,
    but it's @beta anyway so shuffling it around to reduce spaghettification
    of code is fine for now
    
    ref T7584
    
    Reviewed-by: Cedric BAIL <[email protected]>
    Reviewed-by: Marcel Hollerbach <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D7955
---
 src/lib/efl/interfaces/efl_canvas_scene.eo | 24 ------------------------
 src/lib/elementary/efl_ui_win.c            |  2 +-
 src/lib/elementary/efl_ui_win.eo           | 25 ++++++++++++++++++++++++-
 src/tests/elementary/elm_test_win.c        |  4 ++--
 4 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_canvas_scene.eo 
b/src/lib/efl/interfaces/efl_canvas_scene.eo
index 07f9d6cf80..c98e28f0ab 100644
--- a/src/lib/efl/interfaces/efl_canvas_scene.eo
+++ b/src/lib/efl/interfaces/efl_canvas_scene.eo
@@ -204,30 +204,6 @@ interface @beta Efl.Canvas.Scene
             pos: Eina.Position2D; [[The pointer position in pixels.]]
          }
       }
-      /* FIXME: maybe not necessary if gesture supports this */
-      pointer_iterate @const @beta {
-         [[Returns an iterator over the current known pointer positions.
-
-           This is used to iterate over the current known multi-touch 
positions,
-           including the first finger. Each pointer position is represented by
-           an object of type @Efl.Input.Pointer.
-
-           Each finger in a multi touch environment can then be identified
-           by the @Efl.Input.Pointer.tool property. The order of the pointers
-           in this iterator is not defined.
-
-           Note: If the input surface supports hovering input, some pointers
-           may not be in a "down" state. To retrieve the list of such pointers,
-           set the $hover value to $true. Remember though that most devices
-           currently don't support this.
-         ]]
-         params {
-            /* FIXME: missing seat. hover is not useful */
-            hover: bool @optional; [[$false by default, $true means to include
-                                     fingers that are currently hovering.]]
-         }
-         return: iterator<const(Efl.Input.Pointer)>; [[Iterator to pointer 
positions]]
-      }
    }
    events {
       focus,in: Efl.Input.Focus; [[Called when canvas got focus]]
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index edc05d71fe..e6f1741dfe 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -2503,7 +2503,7 @@ _input_pointer_iterator_free(Input_Pointer_Iterator *it)
 }
 
 EOLIAN static Eina_Iterator *
-_efl_ui_win_efl_canvas_scene_pointer_iterate(const Eo *obj, Efl_Ui_Win_Data 
*sd,
+_efl_ui_win_pointer_iterate(const Eo *obj, Efl_Ui_Win_Data *sd,
                                        Eina_Bool hover EINA_UNUSED)
 {
    Input_Pointer_Iterator *it;
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index af1ab0ad80..bb493f7285 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -821,6 +821,30 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements 
Efl.Canvas.Scene, Efl.Ac
             sz: Eina.Size2D; [[Step size (hint) in pixels.]]
          }
       }
+      /* FIXME: maybe not necessary if gesture supports this */
+      pointer_iterate @const @beta {
+         [[Returns an iterator over the current known pointer positions.
+
+           This is used to iterate over the current known multi-touch 
positions,
+           including the first finger. Each pointer position is represented by
+           an object of type @Efl.Input.Pointer.
+
+           Each finger in a multi touch environment can then be identified
+           by the @Efl.Input.Pointer.tool property. The order of the pointers
+           in this iterator is not defined.
+
+           Note: If the input surface supports hovering input, some pointers
+           may not be in a "down" state. To retrieve the list of such pointers,
+           set the $hover value to $true. Remember though that most devices
+           currently don't support this.
+         ]]
+         params {
+            /* FIXME: missing seat. hover is not useful */
+            hover: bool @optional; [[$false by default, $true means to include
+                                     fingers that are currently hovering.]]
+         }
+         return: iterator<const(Efl.Input.Pointer)>; [[Iterator to pointer 
positions]]
+      }
    }
    implements {
       class.constructor;
@@ -858,7 +882,6 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements 
Efl.Canvas.Scene, Efl.Ac
       Efl.Text.text { get; set; }
       Efl.Canvas.Scene.pointer_position { get; }
       Efl.Canvas.Pointer.pointer_inside { get; }
-      Efl.Canvas.Scene.pointer_iterate;
       Efl.Canvas.Scene.image_max_size { get; }
       Efl.Canvas.Scene.smart_objects_calculate;
       Efl.Canvas.Scene.objects_at_xy_get;
diff --git a/src/tests/elementary/elm_test_win.c 
b/src/tests/elementary/elm_test_win.c
index 06b268d80d..1b67eabb12 100644
--- a/src/tests/elementary/elm_test_win.c
+++ b/src/tests/elementary/elm_test_win.c
@@ -315,7 +315,7 @@ _inputs_timer2_cb(void *data)
    size_t cnt = 0;
    int i = 0;
 
-   it = efl_canvas_scene_pointer_iterate(win, 0);
+   it = efl_ui_win_pointer_iterate(win, 0);
    EINA_ITERATOR_FOREACH(it, ptr)
      {
         double x, y;
@@ -378,7 +378,7 @@ _inputs_timer3_cb(void *data)
    size_t cnt = 0;
    int i = 0;
 
-   it = efl_canvas_scene_pointer_iterate(win, 0);
+   it = efl_ui_win_pointer_iterate(win, 0);
    EINA_ITERATOR_FOREACH(it, ptr)
      {
         int tool, ok = 0;

-- 


Reply via email to