interfaces: move pointer_iterate method efl.canvas.scene -> efl.ui.win
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 14 Feb 2019 18:59:54 +0000 (13:59 -0500)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 8 Mar 2019 11:49:35 +0000 (20:49 +0900)
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 <cedric.bail@free.fr>
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7955

src/lib/efl/interfaces/efl_canvas_scene.eo
src/lib/elementary/efl_ui_win.c
src/lib/elementary/efl_ui_win.eo
src/tests/elementary/elm_test_win.c

index 07f9d6c..c98e28f 100644 (file)
@@ -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]]
index e6d1e71..ee81272 100644 (file)
@@ -2983,7 +2983,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;
index fc02b64..452c4a0 100644 (file)
@@ -854,6 +854,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;
@@ -891,7 +915,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;
index 06b268d..1b67eab 100644 (file)
@@ -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;