interface: add Efl.Canvas.Pointer intf for pointer related functions.

and remove pointer_inside function from Efl.Canvas{}
This commit is contained in:
Amitesh Singh 2017-12-06 14:34:51 +09:00
parent dc821546ad
commit 80463f0e2e
10 changed files with 44 additions and 33 deletions

View File

@ -14,6 +14,7 @@ efl_eolian_legacy_files = \
efl_eolian_files = \ efl_eolian_files = \
lib/efl/interfaces/efl_canvas.eo \ lib/efl/interfaces/efl_canvas.eo \
lib/efl/interfaces/efl_canvas_pointer.eo \
lib/efl/interfaces/efl_config.eo \ lib/efl/interfaces/efl_config.eo \
lib/efl/interfaces/efl_control.eo \ lib/efl/interfaces/efl_control.eo \
lib/efl/interfaces/efl_dup.eo \ lib/efl/interfaces/efl_dup.eo \

View File

@ -5,6 +5,7 @@ set(LIBRARIES eo eina)
set(PUBLIC_EO_FILES set(PUBLIC_EO_FILES
interfaces/efl_animator.eo interfaces/efl_animator.eo
interfaces/efl_canvas.eo interfaces/efl_canvas.eo
interfaces/efl_canvas_pointer.eo
interfaces/efl_config.eo interfaces/efl_config.eo
interfaces/efl_container.eo interfaces/efl_container.eo
interfaces/efl_content.eo interfaces/efl_content.eo

View File

@ -134,6 +134,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
/* Canvas & UI */ /* Canvas & UI */
#include "interfaces/efl_canvas.eo.h" #include "interfaces/efl_canvas.eo.h"
#include "interfaces/efl_canvas_pointer.eo.h"
#include "interfaces/efl_ui_view.eo.h" #include "interfaces/efl_ui_view.eo.h"
#include "interfaces/efl_ui_model_connect.eo.h" #include "interfaces/efl_ui_model_connect.eo.h"
#include "interfaces/efl_ui_factory.eo.h" #include "interfaces/efl_ui_factory.eo.h"

View File

@ -193,31 +193,6 @@ interface Efl.Canvas ()
pos: Eina.Position2D; [[The pointer position in pixels.]] pos: Eina.Position2D; [[The pointer position in pixels.]]
} }
} }
@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).
]]
}
keys {
seat: Efl.Input.Device @optional; [[The seat to consider, if $null
then the default seat will be used.]]
}
values {
inside: bool; [[$true if the mouse pointer is inside the canvas,
$false otherwise]]
}
}
/* FIXME: maybe not necessary if gesture supports this */ /* FIXME: maybe not necessary if gesture supports this */
pointer_iterate @const { pointer_iterate @const {
[[Returns an iterator over the current known pointer positions. [[Returns an iterator over the current known pointer positions.

View File

@ -0,0 +1,32 @@
import efl_input_device;
interface Efl.Canvas.Pointer ()
{
methods {
@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).
]]
}
keys {
seat: Efl.Input.Device @optional; [[The seat to consider, if $null
then the default seat will be used.]]
}
values {
inside: bool; [[$true if the mouse pointer is inside the canvas,
$false otherwise]]
}
}
}
}

View File

@ -39,6 +39,7 @@
#include "interfaces/efl_gfx_size_hint.eo.c" #include "interfaces/efl_gfx_size_hint.eo.c"
#include "interfaces/efl_canvas.eo.c" #include "interfaces/efl_canvas.eo.c"
#include "interfaces/efl_canvas_pointer.eo.c"
#include "interfaces/efl_vpath.eo.c" #include "interfaces/efl_vpath.eo.c"

View File

@ -2383,7 +2383,7 @@ _efl_ui_win_efl_canvas_pointer_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data
} }
EOLIAN static Eina_Bool EOLIAN static Eina_Bool
_efl_ui_win_efl_canvas_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eo *dev) _efl_ui_win_efl_canvas_pointer_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eo *dev)
{ {
return efl_canvas_pointer_inside_get(sd->evas, dev); return efl_canvas_pointer_inside_get(sd->evas, dev);
} }

View File

@ -157,7 +157,7 @@ enum Efl.Ui.Win.Move_Resize_Mode
right = (1 << 4) [[Start resizing window to the right]] right = (1 << 4) [[Start resizing window to the right]]
} }
class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Efl.Access.Window, class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Efl.Canvas.Pointer, Efl.Access.Window,
Efl.Access.Component, Efl.Access.Widget.Action, Efl.Access.Component, Efl.Access.Widget.Action,
Efl.Content, Efl.Input.State, Efl.Input.Interface, Efl.Screen, Efl.Content, Efl.Input.State, Efl.Input.Interface, Efl.Screen,
Efl.Gfx.Size.Hint, Efl.Text, Efl.Config.Global, Efl.Part, Efl.Gfx.Size.Hint, Efl.Text, Efl.Config.Global, Efl.Part,
@ -825,7 +825,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Efl.Access.Window,
Efl.Gfx.Size.Hint.hint_max { set; } Efl.Gfx.Size.Hint.hint_max { set; }
Efl.Text.text { get; set; } Efl.Text.text { get; set; }
Efl.Canvas.pointer_position { get; } Efl.Canvas.pointer_position { get; }
Efl.Canvas.pointer_inside { get; } Efl.Canvas.Pointer.pointer_inside { get; }
Efl.Canvas.pointer_iterate; Efl.Canvas.pointer_iterate;
Efl.Canvas.image_max_size { get; } Efl.Canvas.image_max_size { get; }
Efl.Canvas.smart_objects_calculate; Efl.Canvas.smart_objects_calculate;

View File

@ -1,7 +1,7 @@
import efl_input_types; import efl_input_types;
class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface, class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
Efl.Loop_User) Efl.Loop_User, Efl.Canvas.Pointer)
{ {
[[Evas canvas class]] [[Evas canvas class]]
legacy_prefix: evas; legacy_prefix: evas;
@ -1129,7 +1129,7 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
Efl.Object.provider_find; Efl.Object.provider_find;
Efl.Loop_User.loop { get; } Efl.Loop_User.loop { get; }
//Efl.Canvas.seats; //Efl.Canvas.seats;
Efl.Canvas.pointer_inside { get; } Efl.Canvas.Pointer.pointer_inside { get; }
Efl.Canvas.device { get; } Efl.Canvas.device { get; }
Efl.Canvas.seat { get; } Efl.Canvas.seat { get; }
} }

View File

@ -634,9 +634,9 @@ _evas_canvas_pointer_button_down_mask_by_device_get(Eo *eo_e EINA_UNUSED,
} }
EOLIAN static Eina_Bool EOLIAN static Eina_Bool
_evas_canvas_efl_canvas_pointer_inside_get(Eo *eo_e EINA_UNUSED, _evas_canvas_efl_canvas_pointer_pointer_inside_get(Eo *eo_e EINA_UNUSED,
Evas_Public_Data *e, Evas_Public_Data *e,
Eo *dev) Efl_Input_Device *dev)
{ {
Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, dev); Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, dev);
if (!pdata) return EINA_FALSE; if (!pdata) return EINA_FALSE;