summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-02-14 13:59:54 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-21 20:24:30 +0100
commite166486107565e70431ab08bb02cceca2ed58637 (patch)
tree9530bda2d9d8f1f1177aea825d7c9d799d84fd3f /src
parent5d651d523bd8d883b76e14953339e1fb80be7021 (diff)
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 <cedric.bail@free.fr> Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7955
Diffstat (limited to 'src')
-rw-r--r--src/lib/efl/interfaces/efl_canvas_scene.eo24
-rw-r--r--src/lib/elementary/efl_ui_win.c2
-rw-r--r--src/lib/elementary/efl_ui_win.eo25
-rw-r--r--src/tests/elementary/elm_test_win.c4
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
204 pos: Eina.Position2D; [[The pointer position in pixels.]] 204 pos: Eina.Position2D; [[The pointer position in pixels.]]
205 } 205 }
206 } 206 }
207 /* FIXME: maybe not necessary if gesture supports this */
208 pointer_iterate @const @beta {
209 [[Returns an iterator over the current known pointer positions.
210
211 This is used to iterate over the current known multi-touch positions,
212 including the first finger. Each pointer position is represented by
213 an object of type @Efl.Input.Pointer.
214
215 Each finger in a multi touch environment can then be identified
216 by the @Efl.Input.Pointer.tool property. The order of the pointers
217 in this iterator is not defined.
218
219 Note: If the input surface supports hovering input, some pointers
220 may not be in a "down" state. To retrieve the list of such pointers,
221 set the $hover value to $true. Remember though that most devices
222 currently don't support this.
223 ]]
224 params {
225 /* FIXME: missing seat. hover is not useful */
226 hover: bool @optional; [[$false by default, $true means to include
227 fingers that are currently hovering.]]
228 }
229 return: iterator<const(Efl.Input.Pointer)>; [[Iterator to pointer positions]]
230 }
231 } 207 }
232 events { 208 events {
233 focus,in: Efl.Input.Focus; [[Called when canvas got focus]] 209 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)
2503} 2503}
2504 2504
2505EOLIAN static Eina_Iterator * 2505EOLIAN static Eina_Iterator *
2506_efl_ui_win_efl_canvas_scene_pointer_iterate(const Eo *obj, Efl_Ui_Win_Data *sd, 2506_efl_ui_win_pointer_iterate(const Eo *obj, Efl_Ui_Win_Data *sd,
2507 Eina_Bool hover EINA_UNUSED) 2507 Eina_Bool hover EINA_UNUSED)
2508{ 2508{
2509 Input_Pointer_Iterator *it; 2509 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
821 sz: Eina.Size2D; [[Step size (hint) in pixels.]] 821 sz: Eina.Size2D; [[Step size (hint) in pixels.]]
822 } 822 }
823 } 823 }
824 /* FIXME: maybe not necessary if gesture supports this */
825 pointer_iterate @const @beta {
826 [[Returns an iterator over the current known pointer positions.
827
828 This is used to iterate over the current known multi-touch positions,
829 including the first finger. Each pointer position is represented by
830 an object of type @Efl.Input.Pointer.
831
832 Each finger in a multi touch environment can then be identified
833 by the @Efl.Input.Pointer.tool property. The order of the pointers
834 in this iterator is not defined.
835
836 Note: If the input surface supports hovering input, some pointers
837 may not be in a "down" state. To retrieve the list of such pointers,
838 set the $hover value to $true. Remember though that most devices
839 currently don't support this.
840 ]]
841 params {
842 /* FIXME: missing seat. hover is not useful */
843 hover: bool @optional; [[$false by default, $true means to include
844 fingers that are currently hovering.]]
845 }
846 return: iterator<const(Efl.Input.Pointer)>; [[Iterator to pointer positions]]
847 }
824 } 848 }
825 implements { 849 implements {
826 class.constructor; 850 class.constructor;
@@ -858,7 +882,6 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac
858 Efl.Text.text { get; set; } 882 Efl.Text.text { get; set; }
859 Efl.Canvas.Scene.pointer_position { get; } 883 Efl.Canvas.Scene.pointer_position { get; }
860 Efl.Canvas.Pointer.pointer_inside { get; } 884 Efl.Canvas.Pointer.pointer_inside { get; }
861 Efl.Canvas.Scene.pointer_iterate;
862 Efl.Canvas.Scene.image_max_size { get; } 885 Efl.Canvas.Scene.image_max_size { get; }
863 Efl.Canvas.Scene.smart_objects_calculate; 886 Efl.Canvas.Scene.smart_objects_calculate;
864 Efl.Canvas.Scene.objects_at_xy_get; 887 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)
315 size_t cnt = 0; 315 size_t cnt = 0;
316 int i = 0; 316 int i = 0;
317 317
318 it = efl_canvas_scene_pointer_iterate(win, 0); 318 it = efl_ui_win_pointer_iterate(win, 0);
319 EINA_ITERATOR_FOREACH(it, ptr) 319 EINA_ITERATOR_FOREACH(it, ptr)
320 { 320 {
321 double x, y; 321 double x, y;
@@ -378,7 +378,7 @@ _inputs_timer3_cb(void *data)
378 size_t cnt = 0; 378 size_t cnt = 0;
379 int i = 0; 379 int i = 0;
380 380
381 it = efl_canvas_scene_pointer_iterate(win, 0); 381 it = efl_ui_win_pointer_iterate(win, 0);
382 EINA_ITERATOR_FOREACH(it, ptr) 382 EINA_ITERATOR_FOREACH(it, ptr)
383 { 383 {
384 int tool, ok = 0; 384 int tool, ok = 0;