jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e61b7139ffba55504b653e14801d956eac180a63
commit e61b7139ffba55504b653e14801d956eac180a63 Author: Jean-Philippe Andre <jp.an...@samsung.com> Date: Wed Aug 31 14:24:14 2016 +0900 win: Move pointer "xy" and "inside" to input interface Those two properties aren't related to a "drawing" canvas but to the current state of input. Note: both Efl.Input.Pointer (pointer input event data) and Efl.Input.Interface (common interface for input handling objects) expose a pointer position API. Not sure what to do about that. --- src/lib/efl/interfaces/efl_canvas.eo | 41 ++---------------------------- src/lib/elementary/efl_ui_win.c | 4 +-- src/lib/elementary/efl_ui_win.eo | 4 +-- src/lib/evas/canvas/efl_input_interface.eo | 36 ++++++++++++++++++++++++++ src/lib/evas/canvas/efl_input_pointer.eo | 2 +- src/lib/evas/canvas/efl_input_state.eo | 1 - 6 files changed, 43 insertions(+), 45 deletions(-) diff --git a/src/lib/efl/interfaces/efl_canvas.eo b/src/lib/efl/interfaces/efl_canvas.eo index afcd77f..7df573f 100644 --- a/src/lib/efl/interfaces/efl_canvas.eo +++ b/src/lib/efl/interfaces/efl_canvas.eo @@ -2,43 +2,6 @@ interface Efl.Canvas () { [[Common interface for Window and some internal classes in EFL.]] methods { - @property pointer_canvas_xy { - 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. If $e is not a valid canvas the results of - this function are undefined. - ]] - } - 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.]] - } - } - @property pointer_inside { - get { - [[Returns whether the mouse pointer is logically inside the - canvas. - - When this function is called it will return a value of either - $false or $true, depending on if event_feed_mouse_in or - event_feed_mouse_out have been called to feed in a mouse - enter event into the canvas. - - A return value of $true indicates the mouse is logically - inside the canvas, and $false implies it is logically - outside the canvas. - - A canvas begins with the mouse being assumed outside ($false). - - If $e is not a valid canvas, the return value is undefined. - ]] - return: bool @warn_unused; - } - } @property image_max_size { get { [[Get the maximum image size evas can possibly handle. @@ -187,8 +150,8 @@ interface Efl.Canvas () events { focus,in; focus,out; - object,focus,in: Efl.Gfx; - object,focus,out: Efl.Gfx; + object,focus,in: Efl.Canvas.Object; + object,focus,out: Efl.Canvas.Object; render,pre; render,post; device,changed: Efl.Input.Device; diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index c31b3f3..90f16ab 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -2146,13 +2146,13 @@ _efl_ui_win_efl_canvas_group_group_hide(Eo *obj, Efl_Ui_Win_Data *sd) } EOLIAN static void -_efl_ui_win_efl_canvas_pointer_canvas_xy_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int *x, int *y) +_efl_ui_win_efl_input_interface_pointer_xy_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int *x, int *y) { evas_pointer_canvas_xy_get(sd->evas, x, y); } EOLIAN static Eina_Bool -_efl_ui_win_efl_canvas_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) +_efl_ui_win_efl_input_interface_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) { return evas_pointer_inside_get(sd->evas); } diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 6ee123f..425cbfe 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -844,8 +844,8 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, Efl.Gfx.Size.Hint.hint_aspect.get; Efl.Text.text.set; Efl.Text.text.get; - Efl.Canvas.pointer_canvas_xy.get; - Efl.Canvas.pointer_inside.get; + Efl.Input.Interface.pointer_xy.get; + Efl.Input.Interface.pointer_inside.get; Efl.Canvas.image_max_size.get; Efl.Canvas.smart_objects_calculate; Efl.Canvas.objects_at_xy_get; diff --git a/src/lib/evas/canvas/efl_input_interface.eo b/src/lib/evas/canvas/efl_input_interface.eo index 609fbb1..754dd62 100644 --- a/src/lib/evas/canvas/efl_input_interface.eo +++ b/src/lib/evas/canvas/efl_input_interface.eo @@ -21,7 +21,43 @@ interface Efl.Input.Interface () @since 1.19 ]] + eo_prefix: efl_input; event_prefix: efl; + methods { + @property pointer_xy { + 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. + ]] + } + 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.]] + } + } + @property pointer_inside { + get { + [[Returns whether the mouse pointer is logically inside the + canvas. + + When this function is called it will return a value of either + $false or $true, depending on whether a pointer,in or pointer,out + event has been called previously. + + A return value of $true indicates the mouse is logically + inside the canvas, and $false implies it is logically + outside the canvas. + + A canvas begins with the mouse being assumed outside ($false). + ]] + return: bool; + } + } + } events { pointer,move: Efl.Input.Pointer; [[Main pointer move (current and previous positions are known).]] pointer,down: Efl.Input.Pointer; [[Main pointer button pressed (button id is known).]] diff --git a/src/lib/evas/canvas/efl_input_pointer.eo b/src/lib/evas/canvas/efl_input_pointer.eo index 28a201f..5f05dfa 100644 --- a/src/lib/evas/canvas/efl_input_pointer.eo +++ b/src/lib/evas/canvas/efl_input_pointer.eo @@ -1,7 +1,7 @@ import efl_orientation; import efl_input_types; -class Efl.Input.Pointer (Efl.Object, Efl.Input.Event, Efl.Input.State, Efl.Input.Event) +class Efl.Input.Pointer (Efl.Object, Efl.Input.Event, Efl.Input.State) { [[Event data carried over with any pointer event (mouse, touch, pen, ...) diff --git a/src/lib/evas/canvas/efl_input_state.eo b/src/lib/evas/canvas/efl_input_state.eo index 0622adc..bed8316 100644 --- a/src/lib/evas/canvas/efl_input_state.eo +++ b/src/lib/evas/canvas/efl_input_state.eo @@ -2,7 +2,6 @@ interface Efl.Input.State () { eo_prefix: efl_input; methods { - /* FIXME: legacy name was 'modifier_is_set' */ @property modifier_enabled { [[Indicates whether a key modifier is on, such as Ctrl, Shift,...]] get {} --