forked from enlightenment/efl
interface: add Efl.Canvas.Pointer intf for pointer related functions.
and remove pointer_inside function from Efl.Canvas{}
This commit is contained in:
parent
dc821546ad
commit
80463f0e2e
|
@ -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 \
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue