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
This commit is contained in:
Mike Blumenkrantz 2019-02-14 13:59:54 -05:00 committed by Marcel Hollerbach
parent 5d651d523b
commit e166486107
4 changed files with 27 additions and 28 deletions

View 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]]

View File

@ -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;

View File

@ -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;

View 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;