*/
EAPI Eina_List *evas_objects_at_xy_get(Eo *eo_e, int x, int y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects);
+
+/**
+ * @brief Retrieve the object stacked at the top of a given position in a
+ * canvas.
+ *
+ * This function will traverse all the layers of the given canvas, from top to
+ * bottom, querying for objects with areas covering the given position. The
+ * user can remove from the query objects which are hidden and/or which are set
+ * to pass events.
+ *
+ * @warning This function will skip objects parented by smart objects, acting
+ * only on the ones at the "top level", with regard to object parenting.
+ *
+ * @param[in] obj The object.
+ * @param[in] x The pixel position.
+ * @param[in] y The pixel position.
+ * @param[in] include_pass_events_objects Boolean flag to include or not
+ * objects which pass events in this calculation.
+ * @param[in] include_hidden_objects Boolean flag to include or not hidden
+ * objects in this calculation.
+ *
+ * @return The Evas object that is over all other objects at the given
+ * position.
+ */
+ EAPI Evas_Object* evas_object_top_at_xy_get(Eo *eo_e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects);
+
/**
* @}
*/
[[Force the given evas and associated engine to flush its font cache.]]
}
- object_top_at_xy_get @const {
- [[Retrieve the Evas object stacked at the top of a given position
- in a canvas.
-
- This function will traverse all the layers of the given canvas,
- from top to bottom, querying for objects with areas covering the
- given position. The user can remove from the query
- objects which are hidden and/or which are set to pass events.
-
- Warning: This function will skip objects parented by smart
- objects, acting only on the ones at the "top level", with
- regard to object parenting.
- ]]
- return: Efl.Canvas.Object @warn_unused; [[The Evas object that is over all other objects at the given position.]]
- params {
- @in x: int; [[The horizontal coordinate of the position.]]
- @in y: int; [[The vertical coordinate of the position.]]
- @in include_pass_events_objects: bool; [[
- Boolean flag to include or not objects which pass events
- in this calculation.
- ]]
- @in include_hidden_objects: bool; [[
- Boolean flag to include or not hidden objects in this
- calculation.
- ]]
- }
- }
key_modifier_on {
[[Enables or turns on programmatically the modifier key with name
$keyname for the default seat.
Efl.Canvas.seat { get; }
Efl.Canvas.image_max_size { get; }
Efl.Canvas.objects_at_xy_get;
+ Efl.Canvas.object_top_at_xy_get;
}
}
return &it->iterator;
}
-EOLIAN Evas_Object*
-_evas_canvas_object_top_at_xy_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
+EOLIAN static Evas_Object*
+_evas_canvas_efl_canvas_object_top_at_xy_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Eina_Position2D pos, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
{
Evas_Layer *lay;
int xx, yy;
- xx = x;
- yy = y;
+ xx = pos.x;
+ yy = pos.y;
//// xx = evas_coord_world_x_to_screen(eo_e, x);
//// yy = evas_coord_world_y_to_screen(eo_e, y);
EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
return NULL;
}
+EAPI Evas_Object*
+evas_object_top_at_xy_get(Eo *eo_e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
+{
+ Eina_Position2D pos = {x, y};
+ return efl_canvas_object_top_at_xy_get(eo_e, pos, include_pass_events_objects, include_hidden_objects);
+}
+
EAPI Evas_Object *
evas_object_top_at_pointer_get(const Evas *eo_e)
{
Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(pdata, NULL);
- return evas_canvas_object_top_at_xy_get((Eo *)eo_e, pdata->seat->x, pdata->seat->y, EINA_TRUE, EINA_TRUE);
+ return efl_canvas_object_top_at_xy_get((Eo *)eo_e, EINA_POSITION2D(pdata->seat->x, pdata->seat->y), EINA_TRUE, EINA_TRUE);
}
EOLIAN Evas_Object*