Almost every evas object created will have some generic function used to manipulate it. More...
#define | evas_obj_position_set(x, y) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_POSITION_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y) |
#define | evas_obj_position_get(x, y) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_POSITION_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y) |
#define | evas_obj_size_set(w, h) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_SIZE_SET), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h) |
#define | evas_obj_size_get(w, h) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_SIZE_GET), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h) |
#define | evas_obj_visibility_set(v) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_VISIBILITY_SET), EO_TYPECHECK(Eina_Bool, v) |
#define | evas_obj_visibility_get(v) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_VISIBILITY_GET), EO_TYPECHECK(Eina_Bool *, v) |
#define | evas_obj_color_set(r, g, b, a) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_COLOR_SET), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a) |
#define | evas_obj_color_get(r, g, b, a) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_COLOR_GET), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a) |
#define | evas_obj_evas_get(evas) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_EVAS_GET), EO_TYPECHECK(Evas **, evas) |
#define | evas_obj_type_get(type) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_TYPE_GET), EO_TYPECHECK(const char **, type) |
#define | evas_obj_type_set(type) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_TYPE_SET), EO_TYPECHECK(const char *, type) |
#define | evas_obj_raise() EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_RAISE) |
#define | evas_obj_lower() EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_LOWER) |
#define | evas_obj_stack_above(above) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_STACK_ABOVE), EO_TYPECHECK(Evas_Object *, above) |
#define | evas_obj_stack_below(below) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_STACK_BELOW), EO_TYPECHECK(Evas_Object *, below) |
#define | evas_obj_above_get(ret) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_ABOVE_GET), EO_TYPECHECK(Evas_Object **, ret) |
#define | evas_obj_below_get(ret) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_BELOW_GET), EO_TYPECHECK(Evas_Object **, ret) |
#define | evas_obj_clip_set(clip) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIP_SET), EO_TYPECHECK(Evas_Object *, clip) |
#define | evas_obj_clip_get(clip) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIP_GET), EO_TYPECHECK(Evas_Object **, clip) |
#define | evas_obj_clip_unset() EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIP_UNSET) |
#define | evas_obj_clipees_get(clipees) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIPEES_GET), EO_TYPECHECK(const Eina_List **, clipees) |
#define | evas_obj_clipees_has(clipees_has) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIPEES_HAS), EO_TYPECHECK(const Eina_Bool *, clipees_has) |
#define | evas_obj_focus_set(focus) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_FOCUS_SET), EO_TYPECHECK(Eina_Bool, focus) |
#define | evas_obj_focus_get(focus) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_FOCUS_GET), EO_TYPECHECK(Eina_Bool *, focus) |
#define | evas_obj_name_set(name) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_NAME_SET), EO_TYPECHECK(const char *, name) |
#define | evas_obj_name_get(name) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_NAME_GET), EO_TYPECHECK(const char **, name) |
#define | evas_obj_key_grab(keyname, modifiers, not_modifiers, exclusive, ret) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_KEY_GRAB), EO_TYPECHECK(const char *, keyname), EO_TYPECHECK(Evas_Modifier_Mask, modifiers), EO_TYPECHECK(Evas_Modifier_Mask, not_modifiers), EO_TYPECHECK(Eina_Bool, exclusive), EO_TYPECHECK(Eina_Bool *, ret) |
#define | evas_obj_key_ungrab(keyname, modifiers, not_modifiers) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_KEY_UNGRAB), EO_TYPECHECK(const char *, keyname), EO_TYPECHECK(Evas_Modifier_Mask, modifiers), EO_TYPECHECK(Evas_Modifier_Mask, not_modifiers) |
#define | evas_obj_layer_set(l) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_LAYER_SET), EO_TYPECHECK(short, l) |
#define | evas_obj_layer_get(l) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_LAYER_GET), EO_TYPECHECK(short *, l) |
void | evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) |
Clip one object to another. More... | |
void | evas_object_ref (Evas_Object *obj) |
Increments object reference count to defer its deletion. More... | |
void | evas_object_unref (Evas_Object *obj) |
Decrements object reference count. More... | |
int | evas_object_ref_get (const Evas_Object *obj) |
Get the object reference count. More... | |
void | evas_object_del (Evas_Object *obj) |
Marks the given Evas object for deletion (when Evas will free its memory). More... | |
void | evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) |
Move the given Evas object to the given location inside its canvas' viewport. More... | |
void | evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) |
Changes the size of the given Evas object. More... | |
void | evas_object_geometry_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) |
Retrieves the position and (rectangular) size of the given Evas object. More... | |
void | evas_object_geometry_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) |
Set the position and (rectangular) size of the given Evas object. More... | |
void | evas_object_show (Evas_Object *obj) |
Makes the given Evas object visible. More... | |
void | evas_object_hide (Evas_Object *obj) |
Makes the given Evas object invisible. More... | |
Eina_Bool | evas_object_visible_get (const Evas_Object *obj) |
Retrieves whether or not the given Evas object is visible. More... | |
void | evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a) |
Sets the general/main color of the given Evas object to the given one. More... | |
void | evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) |
Retrieves the general/main color of the given Evas object. More... | |
Evas * | evas_object_evas_get (const Evas_Object *obj) |
Retrieves the Evas canvas that the given object lives on. More... | |
Evas_Object * | evas_object_clip_get (const Evas_Object *obj) |
Get the object clipping obj (if any). More... | |
void | evas_object_clip_unset (Evas_Object *obj) |
Disable/cease clipping on a clipped obj object. More... | |
const Eina_List * | evas_object_clipees_get (const Evas_Object *obj) |
Return a list of objects currently clipped by obj . More... | |
Eina_Bool | evas_object_clipees_has (const Evas_Object *obj) |
Test if any object is clipped by obj . More... | |
void | evas_object_focus_set (Evas_Object *obj, Eina_Bool focus) |
Sets or unsets a given object as the currently focused one on its canvas. More... | |
Eina_Bool | evas_object_focus_get (const Evas_Object *obj) |
Retrieve whether an object has the focus. More... | |
void | evas_object_layer_set (Evas_Object *obj, short l) |
Sets the layer of its canvas that the given object will be part of. More... | |
short | evas_object_layer_get (const Evas_Object *obj) |
Retrieves the layer of its canvas that the given object is part of. More... | |
void | evas_object_name_set (Evas_Object *obj, const char *name) |
Sets the name of the given Evas object to the given name. More... | |
const char * | evas_object_name_get (const Evas_Object *obj) |
Retrieves the name of the given Evas object. More... | |
const char * | evas_object_type_get (const Evas_Object *obj) |
Retrieves the type of the given Evas object. More... | |
void | evas_object_raise (Evas_Object *obj) |
Raise obj to the top of its layer. More... | |
void | evas_object_lower (Evas_Object *obj) |
Lower obj to the bottom of its layer. More... | |
void | evas_object_stack_above (Evas_Object *obj, Evas_Object *above) |
Stack obj immediately above above . More... | |
void | evas_object_stack_below (Evas_Object *obj, Evas_Object *below) |
Stack obj immediately below below . More... | |
Evas_Object * | evas_object_above_get (const Evas_Object *obj) |
Get the Evas object stacked right above obj . More... | |
Evas_Object * | evas_object_below_get (const Evas_Object *obj) |
Get the Evas object stacked right below obj . More... | |
Almost every evas object created will have some generic function used to manipulate it.
That's because there are a number of basic actions to be done to objects that are irrespective of the object's type, things like:
All of this issues are handled through the functions here grouped. Examples of these function can be seen in Evas objects basic manipulation example(which deals with the most common ones) and in Evas object stacking functions (and some event handling)(which deals with stacking functions).
#define evas_obj_position_set | ( | x, | |
y | |||
) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_POSITION_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y) |
Move the given Evas object to the given location inside its canvas' viewport.
[in] | x | in |
[in] | y | in |
Referenced by evas_object_geometry_set(), and evas_object_move().
#define evas_obj_evas_get | ( | evas | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_EVAS_GET), EO_TYPECHECK(Evas **, evas) |
[out] | evas |
#define evas_obj_clip_set | ( | clip | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIP_SET), EO_TYPECHECK(Evas_Object *, clip) |
[in] | clip | in |
Referenced by evas_object_clip_set().
#define evas_obj_layer_set | ( | l | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_LAYER_SET), EO_TYPECHECK(short, l) |
[in] | l | in |
Referenced by evas_object_layer_set().
#define evas_obj_position_get | ( | x, | |
y | |||
) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_POSITION_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y) |
Retrieves the position of the given Evas object.
[out] | x | out |
[out] | y | out |
Referenced by evas_object_geometry_get().
#define evas_obj_size_set | ( | w, | |
h | |||
) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_SIZE_SET), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h) |
[in] | w | in |
[in] | h | in |
Referenced by evas_object_geometry_set(), and evas_object_resize().
#define evas_obj_size_get | ( | w, | |
h | |||
) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_SIZE_GET), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h) |
Retrieves the (rectangular) size of the given Evas object.
[out] | w | out |
[out] | h | out |
Referenced by evas_object_geometry_get().
#define evas_obj_visibility_set | ( | v | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_VISIBILITY_SET), EO_TYPECHECK(Eina_Bool, v) |
Makes the given Evas object visible or invisible.
[in] | v | EINA_TRUE if to make the object visible, EINA_FALSE otherwise. |
Referenced by evas_object_hide(), and evas_object_show().
#define evas_obj_visibility_get | ( | v | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_VISIBILITY_GET), EO_TYPECHECK(Eina_Bool *, v) |
Retrieves whether or not the given Evas object is visible.
[out] | v | EINA_TRUE if the object is visible, EINA_FALSE otherwise. |
Referenced by evas_object_visible_get().
#define evas_obj_color_set | ( | r, | |
g, | |||
b, | |||
a | |||
) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_COLOR_SET), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a) |
Sets the general/main color of the given Evas object to the given one.
[in] | r | in |
[in] | g | in |
[in] | b | in |
[in] | a | in |
Referenced by evas_object_color_set().
#define evas_obj_color_get | ( | r, | |
g, | |||
b, | |||
a | |||
) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_COLOR_GET), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a) |
[out] | r | out |
[out] | g | out |
[out] | b | out |
[out] | a | out |
Referenced by evas_object_color_get().
#define evas_obj_type_get | ( | type | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_TYPE_GET), EO_TYPECHECK(const char **, type) |
[out] | type | out |
Referenced by evas_object_type_get().
#define evas_obj_type_set | ( | type | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_TYPE_SET), EO_TYPECHECK(const char *, type) |
[in] | type | in |
#define evas_obj_raise | ( | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_RAISE) |
Raise obj to the top of its layer.
Referenced by evas_object_raise().
#define evas_obj_lower | ( | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_LOWER) |
Lower obj to the bottom of its layer.
Referenced by evas_object_lower().
#define evas_obj_stack_above | ( | above | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_STACK_ABOVE), EO_TYPECHECK(Evas_Object *, above) |
Stack the object immediately above above
[in] | above | in |
Referenced by evas_object_stack_above().
#define evas_obj_stack_below | ( | below | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_STACK_BELOW), EO_TYPECHECK(Evas_Object *, below) |
Stack the object immediately below below
[in] | below | in |
Referenced by evas_object_stack_below().
#define evas_obj_above_get | ( | ret | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_ABOVE_GET), EO_TYPECHECK(Evas_Object **, ret) |
Get the Evas object stacked right above the object
[out] | ret | out |
Referenced by evas_object_above_get().
#define evas_obj_below_get | ( | ret | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_BELOW_GET), EO_TYPECHECK(Evas_Object **, ret) |
Get the Evas object stacked right below the object
[out] | ret | out |
Referenced by evas_object_below_get().
#define evas_obj_clip_get | ( | clip | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIP_GET), EO_TYPECHECK(Evas_Object **, clip) |
obj
(if any).[out] | clip | out |
Referenced by evas_object_clip_get().
#define evas_obj_clip_unset | ( | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIP_UNSET) |
obj
object.Referenced by evas_object_clip_unset().
#define evas_obj_clipees_get | ( | clipees | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIPEES_GET), EO_TYPECHECK(const Eina_List **, clipees) |
obj
.[out] | clipees | out |
Referenced by evas_object_clipees_get().
#define evas_obj_clipees_has | ( | clipees_has | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CLIPEES_HAS), EO_TYPECHECK(const Eina_Bool *, clipees_has) |
obj
.[out] | clipees_has | out |
Referenced by evas_object_clipees_has().
#define evas_obj_focus_set | ( | focus | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_FOCUS_SET), EO_TYPECHECK(Eina_Bool, focus) |
[in] | focus | in |
Referenced by evas_object_focus_set().
#define evas_obj_focus_get | ( | focus | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_FOCUS_GET), EO_TYPECHECK(Eina_Bool *, focus) |
[out] | focus | out |
Referenced by evas_object_focus_get().
#define evas_obj_name_set | ( | name | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_NAME_SET), EO_TYPECHECK(const char *, name) |
[in] | name | in |
Referenced by evas_object_name_set().
#define evas_obj_name_get | ( | name | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_NAME_GET), EO_TYPECHECK(const char **, name) |
Retrieves the name of the given Evas object.
[out] | name | out |
Referenced by evas_object_name_get().
#define evas_obj_key_grab | ( | keyname, | |
modifiers, | |||
not_modifiers, | |||
exclusive, | |||
ret | |||
) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_KEY_GRAB), EO_TYPECHECK(const char *, keyname), EO_TYPECHECK(Evas_Modifier_Mask, modifiers), EO_TYPECHECK(Evas_Modifier_Mask, not_modifiers), EO_TYPECHECK(Eina_Bool, exclusive), EO_TYPECHECK(Eina_Bool *, ret) |
Requests keyname
key events be directed to the obj.
[in] | keyname | in |
[in] | modifiers | in |
[in] | not_modifiers | in |
[in] | exclusive | in |
[out] | ret | out |
Referenced by evas_object_key_grab().
#define evas_obj_key_ungrab | ( | keyname, | |
modifiers, | |||
not_modifiers | |||
) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_KEY_UNGRAB), EO_TYPECHECK(const char *, keyname), EO_TYPECHECK(Evas_Modifier_Mask, modifiers), EO_TYPECHECK(Evas_Modifier_Mask, not_modifiers) |
Removes the grab on keyname
key events by the obj.
[in] | keyname | |
[in] | modifiers | |
[in] | not_modifiers |
Referenced by evas_object_key_ungrab().
#define evas_obj_layer_get | ( | l | ) | EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_LAYER_GET), EO_TYPECHECK(short *, l) |
[out] | l | out |
Referenced by evas_object_layer_get().
void evas_object_clip_set | ( | Evas_Object * | obj, |
Evas_Object * | clip | ||
) |
Clip one object to another.
obj | The object to be clipped |
clip | The object to clip obj by |
This function will clip the object obj
to the area occupied by the object clip
. This means the object obj
will only be visible within the area occupied by the clipping object (clip
).
The color of the object being clipped will be multiplied by the color of the clipping one, so the resulting color for the former will be RESULT = (OBJ * CLIP) / (255 * 255)
, per color element (red, green, blue and alpha).
Clipping is recursive, so clipping objects may be clipped by others, and their color will in term be multiplied. You may not set up circular clipping lists (i.e. object 1 clips object 2, which clips object 1): the behavior of Evas is undefined in this case.
Objects which do not clip others are visible in the canvas as normal; those that clip one or more objects become invisible themselves, only affecting what they clip. If an object ceases to have other objects being clipped by it, it will become visible again.
The visibility of an object affects the objects that are clipped by it, so if the object clipping others is not shown (as in evas_object_show()), the objects clipped by it will not be shown either.
If obj
was being clipped by another object when this function is called, it gets implicitly removed from the old clipper's domain and is made now to be clipped by its new clipper.
The following figure illustrates some clipping in Evas:
clip
must be a valid object, but can also be NULL
, in which case the effect of this function is the same as calling evas_object_clip_unset() on the obj
object.Example:
See the full example.
References evas_obj_clip_set.
Referenced by edje_edit_part_clip_to_set(), and edje_edit_part_del().
void evas_object_ref | ( | Evas_Object * | obj | ) |
Increments object reference count to defer its deletion.
obj | The given Evas object to reference |
This increments the reference count of an object, which if greater than 0 will defer deletion by evas_object_del() until all references are released back (counter back to 0). References cannot go below 0 and unreferencing past that will result in the reference count being limited to 0. References are limited to 2^32 - 1
for an object. Referencing it more than this will result in it being limited to this value.
Example:
void evas_object_unref | ( | Evas_Object * | obj | ) |
Decrements object reference count.
obj | The given Evas object to unreference |
This decrements the reference count of an object. If the object has had evas_object_del() called on it while references were more than 0, it will be deleted at the time this function is called and puts the counter back to 0. See evas_object_ref() for more information.
References evas_object_del().
int evas_object_ref_get | ( | const Evas_Object * | obj | ) |
Get the object reference count.
obj | The given Evas object to query |
This gets the reference count for an object (normally 0 until it is referenced). Values of 1 or greater mean that someone is holding a reference to this object that needs to be unreffed before it can be deleted.
void evas_object_del | ( | Evas_Object * | obj | ) |
Marks the given Evas object for deletion (when Evas will free its memory).
obj | The given Evas object. |
This call will mark obj
for deletion, which will take place whenever it has no more references to it (see evas_object_ref() and evas_object_unref()).
At actual deletion time, which may or may not be just after this call, EVAS_CALLBACK_DEL and EVAS_CALLBACK_FREE callbacks will be called. If the object currently had the focus, its EVAS_CALLBACK_FOCUS_OUT callback will also be called.
References EINA_TRUE.
Referenced by ecore_evas_ews_background_set(), edje_edit_part_source_set(), edje_perspective_free(), and evas_object_unref().
void evas_object_move | ( | Evas_Object * | obj, |
Evas_Coord | x, | ||
Evas_Coord | y | ||
) |
Move the given Evas object to the given location inside its canvas' viewport.
obj | The given Evas object. |
x | X position to move the object to, in canvas units. |
y | Y position to move the object to, in canvas units. |
Besides being moved, the object's EVAS_CALLBACK_MOVE callback will be called.
0, 0
.Example:
See the full example.
References evas_obj_position_set.
Referenced by ecore_evas_ews_background_set(), and ecore_evas_ews_new().
void evas_object_resize | ( | Evas_Object * | obj, |
Evas_Coord | w, | ||
Evas_Coord | h | ||
) |
Changes the size of the given Evas object.
obj | The given Evas object. |
w | The new width of the Evas object. |
h | The new height of the Evas object. |
Besides being resized, the object's EVAS_CALLBACK_RESIZE callback will be called.
References evas_obj_size_set.
Referenced by ecore_evas_cursor_set(), ecore_evas_ews_background_set(), and ecore_evas_ews_new().
void evas_object_geometry_get | ( | const Evas_Object * | obj, |
Evas_Coord * | x, | ||
Evas_Coord * | y, | ||
Evas_Coord * | w, | ||
Evas_Coord * | h | ||
) |
Retrieves the position and (rectangular) size of the given Evas object.
obj | The given Evas object. |
x | Pointer to an integer in which to store the X coordinate of the object. |
y | Pointer to an integer in which to store the Y coordinate of the object. |
w | Pointer to an integer in which to store the width of the object. |
h | Pointer to an integer in which to store the height of the object. |
The position, naturally, will be relative to the top left corner of the canvas' viewport.
NULL
pointers on the geometry components you're not interested in: they'll be ignored by the function.Example:
See the full example.
References evas_obj_position_get, and evas_obj_size_get.
Referenced by emotion_object_border_set(), and emotion_object_keep_aspect_set().
void evas_object_geometry_set | ( | Evas_Object * | obj, |
Evas_Coord | x, | ||
Evas_Coord | y, | ||
Evas_Coord | w, | ||
Evas_Coord | h | ||
) |
Set the position and (rectangular) size of the given Evas object.
obj | The given Evas object. |
x | X position to move the object to, in canvas units. |
y | Y position to move the object to, in canvas units. |
w | The new width of the Evas object. |
h | The new height of the Evas object. |
The position, naturally, will be relative to the top left corner of the canvas' viewport.
If the object get moved, the object's EVAS_CALLBACK_MOVE callback will be called.
If the object get resized, the object's EVAS_CALLBACK_RESIZE callback will be called.
References evas_obj_position_set, and evas_obj_size_set.
void evas_object_show | ( | Evas_Object * | obj | ) |
Makes the given Evas object visible.
obj | The given Evas object. |
Besides becoming visible, the object's EVAS_CALLBACK_SHOW callback will be called.
References EINA_TRUE, and evas_obj_visibility_set.
Referenced by ecore_evas_ews_background_set(), and emotion_object_bg_color_set().
void evas_object_hide | ( | Evas_Object * | obj | ) |
Makes the given Evas object invisible.
obj | The given Evas object. |
Hidden objects, besides not being shown at all in your canvas, won't be checked for changes on the canvas rendering process. Furthermore, they will not catch input events. Thus, they are much ligher (in processing needs) than an object that is invisible due to indirect causes, such as being clipped or out of the canvas' viewport.
Besides becoming hidden, obj
object's EVAS_CALLBACK_SHOW callback will be called.
Example:
See the full example.
References EINA_FALSE, and evas_obj_visibility_set.
Referenced by edje_edit_part_del(), and emotion_object_bg_color_set().
Eina_Bool evas_object_visible_get | ( | const Evas_Object * | obj | ) |
Retrieves whether or not the given Evas object is visible.
obj | The given Evas object. |
EINA_TRUE
if the object is visible, EINA_FALSE
otherwise.This retrieves an object's visibility as the one enforced by evas_object_show() and evas_object_hide().
obj
, it being out of its canvas' viewport or stacked below other object.References EINA_FALSE, and evas_obj_visibility_get.
Referenced by emotion_object_bg_color_set().
void evas_object_color_set | ( | Evas_Object * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the general/main color of the given Evas object to the given one.
obj | The given Evas object. |
r | The red component of the given color. |
g | The green component of the given color. |
b | The blue component of the given color. |
a | The alpha component of the given color. |
a
. References evas_obj_color_set.
Referenced by ecore_evas_ews_background_set(), and emotion_object_bg_color_set().
void evas_object_color_get | ( | const Evas_Object * | obj, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Retrieves the general/main color of the given Evas object.
obj | The given Evas object to retrieve color from. |
r | Pointer to an integer in which to store the red component of the color. |
g | Pointer to an integer in which to store the green component of the color. |
b | Pointer to an integer in which to store the blue component of the color. |
a | Pointer to an integer in which to store the alpha component of the color. |
Retrieves the “main” color's RGB component (and alpha channel) values, which range from 0 to 255. For the alpha channel, which defines the object's transparency level, 0 means totally transparent, while 255 means opaque. These color values are premultiplied by the alpha value.
Usually you’ll use this attribute for text and rectangle objects, where the “main” color is their unique one. If set for objects which themselves have colors, like the images one, those colors get modulated by this one.
255 255 255 255
(opaque white).NULL
pointers on the components you're not interested in: they'll be ignored by the function.Example:
See the full example.
References evas_obj_color_get.
Referenced by emotion_object_bg_color_get().
Evas* evas_object_evas_get | ( | const Evas_Object * | obj | ) |
Retrieves the Evas canvas that the given object lives on.
obj | The given Evas object. |
This function is most useful at code contexts where you need to operate on the canvas but have only the object pointer.
Referenced by ecore_evas_ews_background_set(), edje_perspective_global_set(), and evas_textblock_cursor_visible_range_get().
Evas_Object* evas_object_clip_get | ( | const Evas_Object * | obj | ) |
Get the object clipping obj
(if any).
obj | The object to get the clipper from |
This function returns the object clipping obj
. If obj
is not being clipped at all, NULL
is returned. The object obj
must be a valid Evas_Object.
See also evas_object_clip_set(), evas_object_clip_unset() and evas_object_clipees_get().
Example:
See the full example.
References evas_obj_clip_get.
Referenced by edje_edit_part_clip_to_set().
void evas_object_clip_unset | ( | Evas_Object * | obj | ) |
Disable/cease clipping on a clipped obj
object.
obj | The object to cease clipping on |
This function disables clipping for the object obj
, if it was already clipped, i.e., its visibility and color get detached from the previous clipper. If it wasn't, this has no effect. The object obj
must be a valid Evas_Object.
See also evas_object_clip_set() (for an example), evas_object_clipees_get() and evas_object_clip_get().
References evas_obj_clip_unset.
Referenced by edje_edit_part_clip_to_set().
const Eina_List* evas_object_clipees_get | ( | const Evas_Object * | obj | ) |
Return a list of objects currently clipped by obj
.
obj | The object to get a list of clippees from |
obj
This returns the internal list handle that contains all objects clipped by the object obj
. If none are clipped by it, the call returns NULL
. This list is only valid until the clip list is changed and should be fetched again with another call to evas_object_clipees_get() if any objects being clipped by this object are unclipped, clipped by a new object, deleted or get the clipper deleted. These operations will invalidate the list returned, so it should not be used anymore after that point. Any use of the list after this may have undefined results, possibly leading to crashes. The object obj
must be a valid Evas_Object.
See also evas_object_clip_set(), evas_object_clip_unset() and evas_object_clip_get().
Example:
References evas_obj_clipees_get.
Eina_Bool evas_object_clipees_has | ( | const Evas_Object * | obj | ) |
Test if any object is clipped by obj
.
obj | The object to get a list of clippees from |
obj
clip any object. References evas_obj_clipees_has.
void evas_object_focus_set | ( | Evas_Object * | obj, |
Eina_Bool | focus | ||
) |
Sets or unsets a given object as the currently focused one on its canvas.
obj | The object to be focused or unfocused. |
focus | EINA_TRUE , to set it as focused or EINA_FALSE , to take away the focus from it. |
Changing focus only affects where (key) input events go. There can be only one object focused at any time. If focus
is EINA_TRUE
, obj
will be set as the currently focused object and it will receive all keyboard events that are not exclusive key grabs on other objects.
Example:
See the full example here.
References evas_obj_focus_set.
Eina_Bool evas_object_focus_get | ( | const Evas_Object * | obj | ) |
Retrieve whether an object has the focus.
obj | The object to retrieve focus information from. |
EINA_TRUE
if the object has the focus, EINA_FALSE
otherwise.If the passed object is the currently focused one, EINA_TRUE
is returned. EINA_FALSE
is returned, otherwise.
Example:
See the full example here.
References evas_obj_focus_get.
void evas_object_layer_set | ( | Evas_Object * | obj, |
short | l | ||
) |
Sets the layer of its canvas that the given object will be part of.
obj | The given Evas object. |
l | The number of the layer to place the object on. Must be between EVAS_LAYER_MIN and EVAS_LAYER_MAX. |
If you don't use this function, you'll be dealing with an unique layer of objects, the default one. Additional layers are handy when you don't want a set of objects to interfere with another set with regard to stacking. Two layers are completely disjoint in that matter.
This is a low-level function, which you'd be using when something should be always on top, for example.
References evas_obj_layer_set.
Referenced by ecore_evas_ews_background_set().
short evas_object_layer_get | ( | const Evas_Object * | obj | ) |
Retrieves the layer of its canvas that the given object is part of.
obj | The given Evas object to query layer from |
References evas_obj_layer_get.
void evas_object_name_set | ( | Evas_Object * | obj, |
const char * | name | ||
) |
Sets the name of the given Evas object to the given name.
obj | The given object. |
name | The given name. |
There might be occasions where one would like to name his/her objects.
Example:
See the full example.
References evas_obj_name_set.
Referenced by edje_perspective_global_set().
const char* evas_object_name_get | ( | const Evas_Object * | obj | ) |
Retrieves the name of the given Evas object.
obj | The given object. |
NULL
, if no name has been given to it.Example:
See the full example.
References evas_obj_name_get.
const char* evas_object_type_get | ( | const Evas_Object * | obj | ) |
Retrieves the type of the given Evas object.
obj | The given object. |
For Evas' builtin types, the return strings will be one of:
"rectangle"
,"line"
,"polygon"
,"text"
,"textblock"
and"image"
.For Evas smart objects (see Smart Functions), the name of the smart class itself is returned on this call. For the built-in smart objects, these names are:
"EvasObjectSmartClipped"
, for the clipped smart object"Evas_Object_Box"
, for the box object and"Evas_Object_Table"
, for the table object.Example:
See the full example.
References evas_obj_type_get.
void evas_object_raise | ( | Evas_Object * | obj | ) |
Raise obj
to the top of its layer.
obj | the object to raise |
obj
will, then, be the highest one in the layer it belongs to. Object on other layers won't get touched.
References evas_obj_raise.
void evas_object_lower | ( | Evas_Object * | obj | ) |
Lower obj
to the bottom of its layer.
obj | the object to lower |
obj
will, then, be the lowest one in the layer it belongs to. Objects on other layers won't get touched.
References evas_obj_lower.
Referenced by ecore_evas_ews_background_set().
void evas_object_stack_above | ( | Evas_Object * | obj, |
Evas_Object * | above | ||
) |
Stack obj
immediately above above
.
obj | the object to stack |
above | the object above which to stack |
Objects, in a given canvas, are stacked in the order they get added to it. This means that, if they overlap, the highest ones will cover the lowest ones, in that order. This function is a way to change the stacking order for the objects.
This function is intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
If you have smart objects on your canvas and obj
is a member of one of them, then above
must also be a member of the same smart object.
Similarly, if obj
is not a member of a smart object, above
must not be either.
References evas_obj_stack_above.
Referenced by edje_edit_part_restack_above(), and edje_edit_part_restack_below().
void evas_object_stack_below | ( | Evas_Object * | obj, |
Evas_Object * | below | ||
) |
Stack obj
immediately below below
.
obj | the object to stack |
below | the object below which to stack |
Objects, in a given canvas, are stacked in the order they get added to it. This means that, if they overlap, the highest ones will cover the lowest ones, in that order. This function is a way to change the stacking order for the objects.
This function is intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
If you have smart objects on your canvas and obj
is a member of one of them, then below
must also be a member of the same smart object.
Similarly, if obj
is not a member of a smart object, below
must not be either.
References evas_obj_stack_below.
Referenced by edje_edit_part_restack_below().
Evas_Object* evas_object_above_get | ( | const Evas_Object * | obj | ) |
Get the Evas object stacked right above obj
.
obj | an Evas_Object |
obj
, if any, or NULL
, if noneThis function will traverse layers in its search, if there are objects on layers above the one obj
is placed at.
References evas_obj_above_get.
Evas_Object* evas_object_below_get | ( | const Evas_Object * | obj | ) |
Get the Evas object stacked right below obj
.
obj | an Evas_Object |
obj
, if any, or NULL
, if noneThis function will traverse layers in its search, if there are objects on layers below the one obj
is placed at.
References evas_obj_below_get.