aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-10-31 16:30:43 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-01 11:22:33 +0900
commitb8ca1272aee00314ca2cfb10214f36590084f6f0 (patch)
tree254ffbef717c72e39a272d82546c35aaceb6e080 /src/lib
parentedje_cc: Fix shadow warning (global scope) (diff)
downloadefl-b8ca1272aee00314ca2cfb10214f36590084f6f0.tar.gz
evas: Add seat argument to 'pointer_inside' (EO)
This merges pointer_inside and pointer_inside_by_device. Affects only EO.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/efl/interfaces/efl_canvas.eo4
-rw-r--r--src/lib/elementary/efl_ui_win.c4
-rw-r--r--src/lib/evas/Evas_Legacy.h14
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo11
-rw-r--r--src/lib/evas/canvas/evas_main.c20
5 files changed, 28 insertions, 25 deletions
diff --git a/src/lib/efl/interfaces/efl_canvas.eo b/src/lib/efl/interfaces/efl_canvas.eo
index 2711111c73..98da146f5f 100644
--- a/src/lib/efl/interfaces/efl_canvas.eo
+++ b/src/lib/efl/interfaces/efl_canvas.eo
@@ -209,10 +209,10 @@ interface Efl.Canvas ()
A canvas begins with the mouse being assumed outside ($false).
]]
}
- /* keys {
+ 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]]
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 09615f78f8..58b7fc1171 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -2363,9 +2363,9 @@ _efl_ui_win_efl_canvas_pointer_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data
}
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_canvas_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eo *dev)
{
- return evas_pointer_inside_get(sd->evas);
+ return efl_canvas_pointer_inside_get(sd->evas, dev);
}
/* multi touch support */
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 32ef78e4c1..e900090b88 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -1033,6 +1033,20 @@ EAPI const Evas_Lock *evas_key_lock_get(const Evas *obj) EINA_WARN_UNUSED_RESULT
*/
/**
+ * @brief Returns whether the mouse pointer is logically inside the canvas.
+ *
+ * @param[in] obj The object.
+ * @param[in] dev The pointer device.
+ *
+ * @return @c true if the pointer is inside, @c false otherwise.
+ *
+ * @since 1.19
+ *
+ * @ingroup Evas_Canvas
+ */
+EAPI Eina_Bool evas_pointer_inside_by_device_get(const Evas *obj, Efl_Input_Device *dev);
+
+/**
* @brief Returns whether the default mouse pointer is logically inside the
* canvas.
*
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index cb6b902738..6da7eef058 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -269,17 +269,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
y: int; [[The pointer to an integer to be filled in.]]
}
}
- @property pointer_inside_by_device {
- [[Returns whether the mouse pointer is logically inside the
- canvas. @since 1.19]]
- keys {
- dev: Efl.Input.Device; [[The pointer device.]]
- }
- get {}
- values {
- in: bool; [[$true if the pointer is inside, $false otherwise.]]
- }
- }
@property image_max_size {
get {
[[Get the maximum image size evas can possibly handle.
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 3266af17ad..04c6cb06a7 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -634,9 +634,9 @@ _evas_canvas_pointer_button_down_mask_by_device_get(Eo *eo_e EINA_UNUSED,
}
EOLIAN static Eina_Bool
-_evas_canvas_pointer_inside_by_device_get(Eo *eo_e EINA_UNUSED,
- Evas_Public_Data *e,
- Efl_Input_Device *dev)
+_evas_canvas_efl_canvas_pointer_inside_get(Eo *eo_e EINA_UNUSED,
+ Evas_Public_Data *e,
+ Eo *dev)
{
Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, dev);
if (!pdata) return EINA_FALSE;
@@ -661,12 +661,6 @@ _evas_canvas_pointer_button_down_mask_get(Eo *eo_e, Evas_Public_Data *e)
return _evas_canvas_pointer_button_down_mask_by_device_get(eo_e, e, NULL);
}
-EOLIAN static Eina_Bool
-_evas_canvas_efl_canvas_pointer_inside_get(Eo *eo_e, Evas_Public_Data *e)
-{
- return _evas_canvas_pointer_inside_by_device_get(eo_e, e, NULL);
-}
-
EOLIAN static void
_evas_canvas_data_attach_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, void *data)
{
@@ -1300,7 +1294,13 @@ _evas_pointer_list_in_rect_get(Evas_Public_Data *edata, Evas_Object *obj,
EAPI Eina_Bool
evas_pointer_inside_get(const Evas *obj)
{
- return efl_canvas_pointer_inside_get(obj);
+ return efl_canvas_pointer_inside_get(obj, NULL);
+}
+
+EAPI Eina_Bool
+evas_pointer_inside_by_device_get(const Evas *obj, Eo *dev)
+{
+ return efl_canvas_pointer_inside_get(obj, dev);
}
/* Internal EO APIs */