diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index 94b06d0f12..9c29fb1b2a 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -2243,6 +2243,27 @@ EAPI Eina_Bool evas_object_pointer_inside_by_device_get(const Evas_Object *obj, */ EAPI Eina_Bool evas_object_pointer_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT; +/** + * @brief Returns whether the coords are logically inside the object. + * + * When this function is called it will return a value of either @c false or + * @c true, depending on if the coords are inside the object's current + * geometry. + * + * A return value of @c true indicates the position is logically inside the + * object, and @c false implies it is logically outside the object. + * + * If @c e is not a valid object, the return value is undefined. + * + * @param[in] x The canvas-relative x coordinate. + * @param[in] y The canvas-relative y coordinate. + * + * @return @c true if the coords are inside the object, @c false otherwise + * + * @ingroup Evas_Object + */ + +EAPI Eina_Bool evas_object_pointer_coords_inside_get(const Evas_Object *eo_obj, int x, int y) EINA_WARN_UNUSED_RESULT; #include "canvas/efl_canvas_object.eo.legacy.h" diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index b2c1e4c864..011865d570 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -566,6 +566,7 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, Efl.Gfx.Stack, Efl.Animator, If $e is not a valid object, the return value is undefined. ]] + legacy: null; } keys { pos: Eina.Position2D; [[The position in pixels.]] diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 5e2313d40f..afee978ced 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -2970,6 +2970,14 @@ evas_object_pointer_inside_by_device_get(const Evas_Object *eo_obj, Efl_Input_De return efl_canvas_pointer_inside_get(eo_obj, dev); } +EAPI Eina_Bool +evas_object_pointer_coords_inside_get(const Evas_Object *eo_obj, int x, int y) +{ + Eina_Position2D pos = EINA_POSITION2D(x, y); + + return efl_canvas_object_coords_inside_get(eo_obj, pos); +} + EAPI Eina_Bool evas_object_pointer_inside_get(const Evas_Object *eo_obj) {