jpeg pushed a commit to branch master.

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

commit 3617053547dd130115af7c79346339ca86375679
Author: Jean-Philippe Andre <[email protected]>
Date:   Mon Sep 18 21:54:55 2017 +0900

    win: Use Eina.Size2D for pointer position
    
    Also rename the function for more consistency.
---
 src/lib/elementary/efl_ui_win.c            |  8 +++++---
 src/lib/elementary/efl_ui_win.eo           |  2 +-
 src/lib/evas/canvas/efl_input_interface.eo | 13 ++++++-------
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 86b04d4de4..d7dab7c39d 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -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
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index 6fd70db5f0..2cae3d776e 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -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; }
diff --git a/src/lib/evas/canvas/efl_input_interface.eo 
b/src/lib/evas/canvas/efl_input_interface.eo
index 5ee9782a77..2db729c84b 100644
--- a/src/lib/evas/canvas/efl_input_interface.eo
+++ b/src/lib/evas/canvas/efl_input_interface.eo
@@ -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 {

-- 


Reply via email to