diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/efl/interfaces/efl_canvas.eo | 4 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_win.c | 4 | ||||
-rw-r--r-- | src/lib/evas/Evas_Legacy.h | 14 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_canvas.eo | 11 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_main.c | 20 | ||||
-rw-r--r-- | src/tests/elementary/elm_test_win.c | 2 |
6 files changed, 29 insertions, 26 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 () | |||
209 | A canvas begins with the mouse being assumed outside ($false). | 209 | A canvas begins with the mouse being assumed outside ($false). |
210 | ]] | 210 | ]] |
211 | } | 211 | } |
212 | /* keys { | 212 | keys { |
213 | seat: Efl.Input.Device @optional; [[The seat to consider, if $null | 213 | seat: Efl.Input.Device @optional; [[The seat to consider, if $null |
214 | then the default seat will be used.]] | 214 | then the default seat will be used.]] |
215 | } */ | 215 | } |
216 | values { | 216 | values { |
217 | inside: bool; [[$true if the mouse pointer is inside the canvas, | 217 | inside: bool; [[$true if the mouse pointer is inside the canvas, |
218 | $false otherwise]] | 218 | $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 | |||
2363 | } | 2363 | } |
2364 | 2364 | ||
2365 | EOLIAN static Eina_Bool | 2365 | EOLIAN static Eina_Bool |
2366 | _efl_ui_win_efl_canvas_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) | 2366 | _efl_ui_win_efl_canvas_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eo *dev) |
2367 | { | 2367 | { |
2368 | return evas_pointer_inside_get(sd->evas); | 2368 | return efl_canvas_pointer_inside_get(sd->evas, dev); |
2369 | } | 2369 | } |
2370 | 2370 | ||
2371 | /* multi touch support */ | 2371 | /* 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 | |||
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 | */ | ||
1047 | EAPI 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 | ||
636 | EOLIAN static Eina_Bool | 636 | EOLIAN 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 | ||
664 | EOLIAN 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 | |||
670 | EOLIAN static void | 664 | EOLIAN 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, | |||
1300 | EAPI Eina_Bool | 1294 | EAPI Eina_Bool |
1301 | evas_pointer_inside_get(const Evas *obj) | 1295 | evas_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 | |||
1300 | EAPI Eina_Bool | ||
1301 | evas_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 */ |
diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c index 45855647ba..62315ff60b 100644 --- a/src/tests/elementary/elm_test_win.c +++ b/src/tests/elementary/elm_test_win.c | |||
@@ -349,7 +349,7 @@ _inputs_timer3_cb(void *data) | |||
349 | eina_iterator_free(it); | 349 | eina_iterator_free(it); |
350 | fail_if(cnt != 2); // 2 moves (in the list), 2 ups (gone) | 350 | fail_if(cnt != 2); // 2 moves (in the list), 2 ups (gone) |
351 | 351 | ||
352 | fail_if(!efl_canvas_pointer_inside_get(win)); | 352 | fail_if(!efl_canvas_pointer_inside_get(win, NULL)); |
353 | pos = efl_canvas_pointer_position_get(win); | 353 | pos = efl_canvas_pointer_position_get(win); |
354 | ck_assert_int_eq(pos.x, points[1][0].x); | 354 | ck_assert_int_eq(pos.x, points[1][0].x); |
355 | ck_assert_int_eq(pos.y, points[1][0].y); | 355 | ck_assert_int_eq(pos.y, points[1][0].y); |