Functions that allows finding objects by their position, name or other properties. More...
Functions | |
Evas_Object * | evas_focus_get (const Evas *e) |
Retrieve the object that currently has focus. More... | |
Evas_Object * | evas_object_name_find (const Evas *e, const char *name) |
Retrieves the object on the given evas with the given name. More... | |
Evas_Object * | evas_object_name_child_find (const Evas_Object *obj, const char *name, int recurse) |
Retrieves the object from children of the given object with the given name. More... | |
Evas_Object * | evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) |
Retrieve the Evas object stacked at the top of a given position in a canvas. More... | |
Evas_Object * | evas_object_top_at_pointer_get (const Evas *e) |
Retrieve the Evas object stacked at the top at the position of the mouse cursor, over a given canvas. More... | |
Evas_Object * | evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) |
Retrieve the Evas object stacked at the top of a given rectangular region in a canvas. More... | |
Eina_List * | evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) |
Retrieve a list of Evas objects lying over a given position in a canvas. More... | |
Eina_List * | evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) |
Retrieves the objects in the given rectangle region. More... | |
Evas_Object * | evas_object_bottom_get (const Evas *e) |
Get the lowest (stacked) Evas object on the canvas e . More... | |
Evas_Object * | evas_object_top_get (const Evas *e) |
Get the highest (stacked) Evas object on the canvas e . More... | |
Detailed Description
Functions that allows finding objects by their position, name or other properties.
Function Documentation
Evas_Object* evas_focus_get | ( | const Evas * | e) |
Retrieve the object that currently has focus.
- Parameters
-
e The Evas canvas to query for focused object on.
- Returns
- The object that has focus or
NULL
if there is not one.
Evas can have (at most) one of its objects focused at a time. Focused objects will be the ones having key events delivered to, which the programmer can act upon by means of evas_object_event_callback_add() usage.
- Note
- Most users wouldn't be dealing directly with Evas' focused objects. Instead, they would be using a higher level library for that (like a toolkit, as Elementary) to handle focus and who's receiving input for them.
This call returns the object that currently has focus on the canvas e
or NULL
, if none.
Example:
In this example the event_info
is exactly a pointer to that focused rectangle. See the full example.
Evas_Object* evas_object_bottom_get | ( | const Evas * | e) |
Get the lowest (stacked) Evas object on the canvas e
.
- Parameters
-
e a valid canvas pointer
- Returns
- a pointer to the lowest object on it, if any, or
NULL
, otherwise
This function will take all populated layers in the canvas into account, getting the lowest object for the lowest layer, naturally.
- See Also
- evas_object_layer_get()
- evas_object_layer_set()
- evas_object_below_get()
- evas_object_above_get()
- Warning
- This function will skip objects parented by smart objects, acting only on the ones at the "top level", with regard to object parenting.
Evas_Object* evas_object_name_child_find | ( | const Evas_Object * | obj, |
const char * | name, | ||
int | recurse | ||
) |
Retrieves the object from children of the given object with the given name.
- Parameters
-
obj The parent (smart) object whose children to search. name The given name. recurse Set to the number of child levels to recurse (0 == don't recurse, 1 == only look at the children of obj
or their immediate children, but no further etc.).
- Returns
- If successful, the Evas object with the given name. Otherwise,
NULL
.
This looks for the evas object given a name by evas_object_name_set(), but it ONLY looks at the children of the object *p obj, and will only recurse into those children if recurse
is greater than 0. If the name is not unique within immediate children (or the whole child tree) then it is not defined which child object will be returned. If recurse
is set to -1 then it will recurse without limit.
- Since
- 1.2
Evas_Object* evas_object_name_find | ( | const Evas * | e, |
const char * | name | ||
) |
Retrieves the object on the given evas with the given name.
- Parameters
-
e The given evas. name The given name.
- Returns
- If successful, the Evas object with the given name. Otherwise,
NULL
.
This looks for the evas object given a name by evas_object_name_set(). If the name is not unique canvas-wide, then which one of the many objects with that name is returned is undefined, so only use this if you can ensure the object name is unique.
Evas_Object* evas_object_top_at_pointer_get | ( | const Evas * | e) |
Retrieve the Evas object stacked at the top at the position of the mouse cursor, over a given canvas.
- Parameters
-
e A handle to the canvas.
- Returns
- The Evas object that is over all other objects at the mouse pointer's position
This function will traverse all the layers of the given canvas, from top to bottom, querying for objects with areas covering the mouse pointer's position, over e
.
- Warning
- This function will skip objects parented by smart objects, acting only on the ones at the "top level", with regard to object parenting.
References evas_object_top_at_xy_get().
Evas_Object* evas_object_top_at_xy_get | ( | const Evas * | e, |
Evas_Coord | x, | ||
Evas_Coord | y, | ||
Eina_Bool | include_pass_events_objects, | ||
Eina_Bool | include_hidden_objects | ||
) |
Retrieve the Evas object stacked at the top of a given position in a canvas.
- Parameters
-
e A handle to the canvas. x The horizontal coordinate of the position y The vertical coordinate of the position include_pass_events_objects Boolean flag to include or not objects which pass events in this calculation include_hidden_objects Boolean flag to include or not hidden objects in this calculation
- Returns
- The Evas object that is over all other objects at the given position.
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 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.
Referenced by evas_object_top_at_pointer_get().
Evas_Object* evas_object_top_get | ( | const Evas * | e) |
Get the highest (stacked) Evas object on the canvas e
.
- Parameters
-
e a valid canvas pointer
- Returns
- a pointer to the highest object on it, if any, or
NULL
, otherwise
This function will take all populated layers in the canvas into account, getting the highest object for the highest layer, naturally.
- See Also
- evas_object_layer_get()
- evas_object_layer_set()
- evas_object_below_get()
- evas_object_above_get()
- Warning
- This function will skip objects parented by smart objects, acting only on the ones at the "top level", with regard to object parenting.
Evas_Object* evas_object_top_in_rectangle_get | ( | const Evas * | e, |
Evas_Coord | x, | ||
Evas_Coord | y, | ||
Evas_Coord | w, | ||
Evas_Coord | h, | ||
Eina_Bool | include_pass_events_objects, | ||
Eina_Bool | include_hidden_objects | ||
) |
Retrieve the Evas object stacked at the top of a given rectangular region in a canvas.
- Parameters
-
e A handle to the canvas. x The top left corner's horizontal coordinate for the rectangular region y The top left corner's vertical coordinate for the rectangular region w The width of the rectangular region h The height of the rectangular region include_pass_events_objects Boolean flag to include or not objects which pass events in this calculation include_hidden_objects Boolean flag to include or not hidden objects in this calculation
- Returns
- The Evas object that is over all other objects at the given rectangular region.
This function will traverse all the layers of the given canvas, from top to bottom, querying for objects with areas overlapping with the given rectangular region inside e
. 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.
Eina_List* evas_objects_at_xy_get | ( | const Evas * | e, |
Evas_Coord | x, | ||
Evas_Coord | y, | ||
Eina_Bool | include_pass_events_objects, | ||
Eina_Bool | include_hidden_objects | ||
) |
Retrieve a list of Evas objects lying over a given position in a canvas.
- Parameters
-
e A handle to the canvas. x The horizontal coordinate of the position y The vertical coordinate of the position include_pass_events_objects Boolean flag to include or not objects which pass events in this calculation include_hidden_objects Boolean flag to include or not hidden objects in this calculation
- Returns
- The list of Evas objects that are over the given position in
e
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 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.
Eina_List* evas_objects_in_rectangle_get | ( | const Evas * | e, |
Evas_Coord | x, | ||
Evas_Coord | y, | ||
Evas_Coord | w, | ||
Evas_Coord | h, | ||
Eina_Bool | include_pass_events_objects, | ||
Eina_Bool | include_hidden_objects | ||
) |
Retrieves the objects in the given rectangle region.
- Parameters
-
e The given evas object. x The horizontal coordinate. y The vertical coordinate. w The width size. h The height size. include_pass_events_objects Boolean Flag to include or not pass events objects include_hidden_objects Boolean Flag to include or not hidden objects
- Returns
- The list of evas object in the rectangle region.