Efl.Canvas.Object: rename pointer_coords_inside_get to coords_inside property.

Also change the signature of the function. Pass Eina_Position2D instead.
This commit is contained in:
Amitesh Singh 2017-12-12 16:44:41 +09:00
parent 72b96bc4c5
commit 8fb49de5eb
2 changed files with 12 additions and 9 deletions

View File

@ -551,8 +551,9 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, Efl.Gfx.Stack, Efl.Animator,
enable: bool; [[Enable "no-render" mode.]] enable: bool; [[Enable "no-render" mode.]]
} }
} }
pointer_coords_inside_get { @property coords_inside {
[[Returns whether the coords are logically inside the get {
[[Returns whether the coords are logically inside the
object. object.
When this function is called it will return a value of either When this function is called it will return a value of either
@ -564,12 +565,14 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, Efl.Gfx.Stack, Efl.Animator,
outside the object. outside the object.
If $e is not a valid object, the return value is undefined. If $e is not a valid object, the return value is undefined.
]] ]]
params { }
@in x: int; [[The canvas-relative x coordinate.]] keys {
@in y: int; [[The canvas-relative y coordinate.]] pos: Eina.Position2D; [[The position in pixels.]]
}
values {
return: bool; [[$true if the coords are inside the object, $false otherwise]]
} }
return: bool @warn_unused; [[$true if the coords are inside the object, $false otherwise]]
} }
@property event_animation { @property event_animation {
[[Set the $animation which starts when the given $event_name happens to the object.]] [[Set the $animation which starts when the given $event_name happens to the object.]]

View File

@ -2662,7 +2662,7 @@ _efl_canvas_object_precise_is_inside_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Pro
} }
EOLIAN static Eina_Bool EOLIAN static Eina_Bool
_efl_canvas_object_pointer_coords_inside_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y) _efl_canvas_object_coords_inside_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Position2D pos)
{ {
Eina_Rectangle c; Eina_Rectangle c;
@ -2679,7 +2679,7 @@ _efl_canvas_object_pointer_coords_inside_get(Eo *eo_obj EINA_UNUSED, Evas_Object
if (obj->clip.clipees) return EINA_FALSE; if (obj->clip.clipees) return EINA_FALSE;
c = obj->cur->geometry; c = obj->cur->geometry;
} }
return RECTS_INTERSECT(x, y, 1, 1, c.x, c.y, c.w, c.h); return RECTS_INTERSECT(pos.x, pos.y, 1, 1, c.x, c.y, c.w, c.h);
} }
static void static void