win: Use Eina.Size2D for pointer position
Also rename the function for more consistency.
This commit is contained in:
parent
64ebdd9c7b
commit
3617053547
|
@ -2366,10 +2366,12 @@ _efl_ui_win_efl_gfx_visible_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Bool vis)
|
|||
else _efl_ui_win_hide(obj, sd);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_efl_input_interface_pointer_xy_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int *x, int *y)
|
||||
EOLIAN static Eina_Position2D
|
||||
_efl_ui_win_efl_input_interface_pointer_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
{
|
||||
evas_pointer_canvas_xy_get(sd->evas, x, y);
|
||||
Eina_Position2D pos;
|
||||
evas_pointer_canvas_xy_get(sd->evas, &pos.x, &pos.y);
|
||||
return pos;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
|
@ -849,7 +849,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Efl.Access.Window,
|
|||
Efl.Gfx.Size.Hint.hint_aspect { set; }
|
||||
Efl.Gfx.Size.Hint.hint_max { set; }
|
||||
Efl.Text.text { get; set; }
|
||||
Efl.Input.Interface.pointer_xy { get; }
|
||||
Efl.Input.Interface.pointer_position { get; }
|
||||
Efl.Input.Interface.pointer_inside { get; }
|
||||
Efl.Input.Interface.pointer_iterate;
|
||||
Efl.Canvas.image_max_size { get; }
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import eina_types;
|
||||
|
||||
interface Efl.Input.Interface ()
|
||||
{
|
||||
[[An object implementing this interface can send pointer events.
|
||||
|
@ -24,19 +26,16 @@ interface Efl.Input.Interface ()
|
|||
eo_prefix: efl_input;
|
||||
event_prefix: efl;
|
||||
methods {
|
||||
@property pointer_xy {
|
||||
@property pointer_position {
|
||||
get {
|
||||
[[This function returns the current known pointer coordinates
|
||||
|
||||
This function returns the current known canvas unit
|
||||
coordinates of the mouse pointer and sets the contents of
|
||||
the Evas_Coords pointed to by $x and $y to contain these
|
||||
coordinates.
|
||||
This function returns the current position of the main input
|
||||
pointer (mouse, pen, etc...).
|
||||
]]
|
||||
}
|
||||
values {
|
||||
x: int; [[The pointer to hold the return value of pointer's x position.]]
|
||||
y: int; [[The pointer to hold the return value of pointer's y position.]]
|
||||
pos: Eina.Position2D; [[The pointer position in pixels.]]
|
||||
}
|
||||
}
|
||||
@property pointer_inside {
|
||||
|
|
Loading…
Reference in New Issue