forked from enlightenment/efl
evas: remove Evas_Canvas.objects_in_rectangle_get
also implement Efl_Canvas method
This commit is contained in:
parent
7bfaf6b63d
commit
17687f4066
|
@ -82,7 +82,7 @@ interface Efl.Canvas ()
|
|||
]]
|
||||
}
|
||||
}
|
||||
objects_in_rectangle_get @const {
|
||||
objects_in_rectangle_get {
|
||||
[[Retrieve a list of objects lying over a given
|
||||
rectangular region in a canvas.
|
||||
|
||||
|
|
|
@ -2531,7 +2531,7 @@ _efl_ui_win_efl_canvas_object_top_at_xy_get(const Eo *obj EINA_UNUSED, Efl_Ui_Wi
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Iterator *
|
||||
_efl_ui_win_efl_canvas_objects_in_rectangle_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Rect r, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
||||
_efl_ui_win_efl_canvas_objects_in_rectangle_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Rect r, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
||||
{
|
||||
Eina_List *objs = NULL;
|
||||
objs = evas_objects_in_rectangle_get(sd->evas, r.x, r.y, r.w, r.h, include_pass_events_objects, include_hidden_objects);
|
||||
|
|
|
@ -2343,6 +2343,24 @@ EAPI Evas *evas_object_evas_get(const Eo *obj);
|
|||
*/
|
||||
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);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get all objects in the given rectangle
|
||||
*
|
||||
* @param[in] obj The object.
|
||||
* @param[in] x X coordinate
|
||||
* @param[in] y Y coordinate
|
||||
* @param[in] w Width
|
||||
* @param[in] h Height
|
||||
* @param[in] include_pass_events_objects @c true if the list should include
|
||||
* objects which pass events
|
||||
* @param[in] include_hidden_objects @c true if the list should include hidden
|
||||
* objects
|
||||
*
|
||||
* @return List of objects
|
||||
*/
|
||||
EAPI Eina_List *evas_objects_in_rectangle_get(const Eo *obj, int x, int y, int w, int h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -593,18 +593,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
|
|||
after you're done.
|
||||
]]
|
||||
}
|
||||
objects_in_rectangle_get @const {
|
||||
[[Get all objects in the given rectangle]]
|
||||
return: list<Efl.Canvas.Object> @warn_unused; [[List of objects]]
|
||||
params {
|
||||
@in x: int; [[X coordinate]]
|
||||
@in y: int; [[Y coordinate]]
|
||||
@in w: int; [[Width]]
|
||||
@in h: int; [[Height]]
|
||||
@in include_pass_events_objects: bool; [[$true if the list should include objects which pass events]]
|
||||
@in include_hidden_objects: bool; [[$true if the list should include hidden objects]]
|
||||
}
|
||||
}
|
||||
object_name_find @const {
|
||||
[[Retrieves the object on the given evas with the given name.
|
||||
|
||||
|
@ -1059,5 +1047,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
|
|||
Efl.Canvas.image_max_size { get; }
|
||||
Efl.Canvas.objects_at_xy_get;
|
||||
Efl.Canvas.object_top_at_xy_get;
|
||||
Efl.Canvas.objects_in_rectangle_get;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1603,8 +1603,8 @@ _evas_canvas_efl_canvas_objects_at_xy_get(Eo *eo_e, Evas_Public_Data *e, Eina_Po
|
|||
* @return The list of evas object in the rectangle region.
|
||||
*
|
||||
*/
|
||||
EOLIAN Eina_List*
|
||||
_evas_canvas_objects_in_rectangle_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
||||
static Eina_List*
|
||||
_efl_canvas_objects_in_rectangle_get_helper(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
||||
{
|
||||
Eina_List *in = NULL;
|
||||
Evas_Layer *lay;
|
||||
|
@ -1651,6 +1651,21 @@ _evas_canvas_objects_in_rectangle_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Da
|
|||
return in;
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static Eina_Iterator*
|
||||
_evas_canvas_efl_canvas_objects_in_rectangle_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Eina_Rect rect, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
||||
{
|
||||
Eina_List *l = _efl_canvas_objects_in_rectangle_get_helper(eo_e, e, rect.x, rect.y, rect.w, rect.h, include_pass_events_objects, include_hidden_objects);
|
||||
if (!l) return NULL;
|
||||
return efl_canvas_iterator_create(eo_e, eina_list_iterator_new(l), l);
|
||||
}
|
||||
|
||||
EAPI Eina_List *
|
||||
evas_objects_in_rectangle_get(const Evas_Canvas *eo_e, int x, int y, int w, int h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
||||
{
|
||||
return _efl_canvas_objects_in_rectangle_get_helper(eo_e, efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS), x, y, w, h, include_pass_events_objects, include_hidden_objects);
|
||||
}
|
||||
|
||||
/* font related api */
|
||||
|
||||
EOLIAN static void
|
||||
|
|
Loading…
Reference in New Issue