summaryrefslogtreecommitdiff
path: root/src/lib/evas
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/evas
parentdaa15475865d0e77ef3aa0fb06b36226b7e7f11e (diff)
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/evas')
-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
3 files changed, 24 insertions, 21 deletions
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
1033 */ 1033 */
1034 1034
1035/** 1035/**
1036 * @brief Returns whether the mouse pointer is logically inside the canvas.
1037 *
1038 * @param[in] obj The object.
1039 * @param[in] dev The pointer device.
1040 *
1041 * @return @c true if the pointer is inside, @c false otherwise.
1042 *
1043 * @since 1.19
1044 *
1045 * @ingroup Evas_Canvas
1046 */
1047EAPI Eina_Bool evas_pointer_inside_by_device_get(const Evas *obj, Efl_Input_Device *dev);
1048
1049/**
1036 * @brief Returns whether the default mouse pointer is logically inside the 1050 * @brief Returns whether the default mouse pointer is logically inside the
1037 * canvas. 1051 * canvas.
1038 * 1052 *
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,
269 y: int; [[The pointer to an integer to be filled in.]] 269 y: int; [[The pointer to an integer to be filled in.]]
270 } 270 }
271 } 271 }
272 @property pointer_inside_by_device {
273 [[Returns whether the mouse pointer is logically inside the
274 canvas. @since 1.19]]
275 keys {
276 dev: Efl.Input.Device; [[The pointer device.]]
277 }
278 get {}
279 values {
280 in: bool; [[$true if the pointer is inside, $false otherwise.]]
281 }
282 }
283 @property image_max_size { 272 @property image_max_size {
284 get { 273 get {
285 [[Get the maximum image size evas can possibly handle. 274 [[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,
634} 634}
635 635
636EOLIAN static Eina_Bool 636EOLIAN static Eina_Bool
637_evas_canvas_pointer_inside_by_device_get(Eo *eo_e EINA_UNUSED, 637_evas_canvas_efl_canvas_pointer_inside_get(Eo *eo_e EINA_UNUSED,
638 Evas_Public_Data *e, 638 Evas_Public_Data *e,
639 Efl_Input_Device *dev) 639 Eo *dev)
640{ 640{
641 Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, dev); 641 Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, dev);
642 if (!pdata) return EINA_FALSE; 642 if (!pdata) return EINA_FALSE;
@@ -661,12 +661,6 @@ _evas_canvas_pointer_button_down_mask_get(Eo *eo_e, Evas_Public_Data *e)
661 return _evas_canvas_pointer_button_down_mask_by_device_get(eo_e, e, NULL); 661 return _evas_canvas_pointer_button_down_mask_by_device_get(eo_e, e, NULL);
662} 662}
663 663
664EOLIAN static Eina_Bool
665_evas_canvas_efl_canvas_pointer_inside_get(Eo *eo_e, Evas_Public_Data *e)
666{
667 return _evas_canvas_pointer_inside_by_device_get(eo_e, e, NULL);
668}
669
670EOLIAN static void 664EOLIAN static void
671_evas_canvas_data_attach_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, void *data) 665_evas_canvas_data_attach_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, void *data)
672{ 666{
@@ -1300,7 +1294,13 @@ _evas_pointer_list_in_rect_get(Evas_Public_Data *edata, Evas_Object *obj,
1300EAPI Eina_Bool 1294EAPI Eina_Bool
1301evas_pointer_inside_get(const Evas *obj) 1295evas_pointer_inside_get(const Evas *obj)
1302{ 1296{
1303 return efl_canvas_pointer_inside_get(obj); 1297 return efl_canvas_pointer_inside_get(obj, NULL);
1298}
1299
1300EAPI Eina_Bool
1301evas_pointer_inside_by_device_get(const Evas *obj, Eo *dev)
1302{
1303 return efl_canvas_pointer_inside_get(obj, dev);
1304} 1304}
1305 1305
1306/* Internal EO APIs */ 1306/* Internal EO APIs */