summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-12-13 13:42:17 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-12-13 13:43:02 +0900
commit1264fb4af2d8cc98fc43589253c1988650b80880 (patch)
treeb5f37d984f74f7b849ed39b3d6f6b7a7841183b9
parent86f2e0f8ceba5b341eeefaa87ef7423721e367c8 (diff)
Efl.Canvas.Object: add legacy APIs for pointer_coords_inside_get()
fix the b0rkage after 8fb49de5eb179ba
-rw-r--r--src/lib/evas/Evas_Legacy.h21
-rw-r--r--src/lib/evas/canvas/efl_canvas_object.eo1
-rw-r--r--src/lib/evas/canvas/evas_object_main.c8
3 files changed, 30 insertions, 0 deletions
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,
2243 */ 2243 */
2244EAPI Eina_Bool evas_object_pointer_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT; 2244EAPI Eina_Bool evas_object_pointer_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT;
2245 2245
2246/**
2247 * @brief Returns whether the coords are logically inside the object.
2248 *
2249 * When this function is called it will return a value of either @c false or
2250 * @c true, depending on if the coords are inside the object's current
2251 * geometry.
2252 *
2253 * A return value of @c true indicates the position is logically inside the
2254 * object, and @c false implies it is logically outside the object.
2255 *
2256 * If @c e is not a valid object, the return value is undefined.
2257 *
2258 * @param[in] x The canvas-relative x coordinate.
2259 * @param[in] y The canvas-relative y coordinate.
2260 *
2261 * @return @c true if the coords are inside the object, @c false otherwise
2262 *
2263 * @ingroup Evas_Object
2264 */
2265
2266EAPI Eina_Bool evas_object_pointer_coords_inside_get(const Evas_Object *eo_obj, int x, int y) EINA_WARN_UNUSED_RESULT;
2246 2267
2247#include "canvas/efl_canvas_object.eo.legacy.h" 2268#include "canvas/efl_canvas_object.eo.legacy.h"
2248 2269
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,
566 566
567 If $e is not a valid object, the return value is undefined. 567 If $e is not a valid object, the return value is undefined.
568 ]] 568 ]]
569 legacy: null;
569 } 570 }
570 keys { 571 keys {
571 pos: Eina.Position2D; [[The position in pixels.]] 572 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
@@ -2971,6 +2971,14 @@ evas_object_pointer_inside_by_device_get(const Evas_Object *eo_obj, Efl_Input_De
2971} 2971}
2972 2972
2973EAPI Eina_Bool 2973EAPI Eina_Bool
2974evas_object_pointer_coords_inside_get(const Evas_Object *eo_obj, int x, int y)
2975{
2976 Eina_Position2D pos = EINA_POSITION2D(x, y);
2977
2978 return efl_canvas_object_coords_inside_get(eo_obj, pos);
2979}
2980
2981EAPI Eina_Bool
2974evas_object_pointer_inside_get(const Evas_Object *eo_obj) 2982evas_object_pointer_inside_get(const Evas_Object *eo_obj)
2975{ 2983{
2976 return evas_object_pointer_inside_by_device_get(eo_obj, NULL); 2984 return evas_object_pointer_inside_by_device_get(eo_obj, NULL);