all smart objects in the canvas.
]]
}
- objects_at_xy_get @const {
+ objects_at_xy_get {
[[Retrieve a list of objects lying over a given position in
a canvas.
}
EOLIAN static Eina_Iterator *
-_efl_ui_win_efl_canvas_objects_at_xy_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Position2D pos, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
+_efl_ui_win_efl_canvas_objects_at_xy_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Position2D pos, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
{
Eina_List *objs = NULL;
objs = evas_objects_at_xy_get(sd->evas, pos.x, pos.y, include_pass_events_objects, include_hidden_objects);
EAPI Evas *evas_object_evas_get(const Eo *obj);
/**
+ * @brief Retrieve a list of objects lying over 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 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 list of objects that are over the given position in @c e.
+ *
+ * @ingroup Efl_Canvas
+ */
+ 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);
+
+/**
* @}
*/
@in keyname: string @nonull; [[The name of the modifier to disable.]]
}
}
- objects_at_xy_get @const {
- [[Retrieve a list of Evas objects lying over 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 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: list<Efl.Canvas.Object> @warn_unused; [[
- The list of Evas objects that are over the given position in $e.
- ]]
- 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.
- ]]
- }
- }
render_async {
[[Render the given Evas canvas asynchronously.
Efl.Canvas.device { get; }
Efl.Canvas.seat { get; }
Efl.Canvas.image_max_size { get; }
+ Efl.Canvas.objects_at_xy_get;
}
}
return NULL;
}
-EOLIAN Eina_List*
-_evas_canvas_objects_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)
+static Eina_List *
+_efl_canvas_evas_canvas_objects_at_xy_get_helper(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int x, int y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
{
Eina_List *in = NULL;
Evas_Layer *lay;
return in;
}
+EOLIAN static Eina_Iterator *
+_evas_canvas_efl_canvas_objects_at_xy_get(Eo *eo_e, Evas_Public_Data *e, Eina_Position2D pos, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
+{
+ Eina_List *l = _efl_canvas_evas_canvas_objects_at_xy_get_helper(eo_e, e, pos.x, pos.y, include_pass_events_objects, include_hidden_objects);
+ if (l) return efl_canvas_iterator_create(eo_e, eina_list_iterator_new(l), l);
+ return NULL;
+}
+
/**
* Retrieves the objects in the given rectangle region
* @param eo_e The given evas object.
return efl_canvas_pointer_inside_get(obj, dev);
}
+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)
+{
+ return _efl_canvas_evas_canvas_objects_at_xy_get_helper(eo_e, efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS), x, y, include_pass_events_objects, include_hidden_objects);
+}
/* Internal EO APIs */
EWAPI const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE =