Basic Object Manipulation

Almost every evas object created will have some generic function used to manipulate it. More...

Functions

EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip)
 Clip one object to another. More...
 
EAPI Evas_Objectevas_object_clip_get (const Evas_Object *obj)
 Get the object clipping obj (if any). More...
 
EAPI void evas_object_clip_unset (Evas_Object *obj)
 Disable/cease clipping on a clipped obj object. More...
 
EAPI const Eina_List * evas_object_clipees_get (const Evas_Object *obj)
 Return a list of objects currently clipped by obj. More...
 
EAPI 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...
 
EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj)
 Retrieve whether an object has the focus. More...
 
EAPI 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...
 
EAPI short evas_object_layer_get (const Evas_Object *obj)
 Retrieves the layer of its canvas that the given object is part of. More...
 
EAPI void evas_object_name_set (Evas_Object *obj, const char *name)
 Sets the name of the given Evas object to the given name. More...
 
EAPI const char * evas_object_name_get (const Evas_Object *obj)
 Retrieves the name of the given Evas object. More...
 
EAPI void evas_object_ref (Evas_Object *obj)
 Increments object reference count to defer its deletion. More...
 
EAPI void evas_object_unref (Evas_Object *obj)
 Decrements object reference count. More...
 
EAPI int evas_object_ref_get (const Evas_Object *obj)
 Get the object reference count. More...
 
EAPI void evas_object_del (Evas_Object *obj)
 Marks the given Evas object for deletion (when Evas will free its memory). More...
 
EAPI 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...
 
EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 Changes the size of the given Evas object. More...
 
EAPI 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...
 
EAPI void evas_object_show (Evas_Object *obj)
 Makes the given Evas object visible. More...
 
EAPI void evas_object_hide (Evas_Object *obj)
 Makes the given Evas object invisible. More...
 
EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj)
 Retrieves whether or not the given Evas object is visible. More...
 
EAPI 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...
 
EAPI 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...
 
EAPI Evasevas_object_evas_get (const Evas_Object *obj)
 Retrieves the Evas canvas that the given object lives on. More...
 
EAPI const char * evas_object_type_get (const Evas_Object *obj)
 Retrieves the type of the given Evas object. More...
 
EAPI void evas_object_raise (Evas_Object *obj)
 Raise obj to the top of its layer. More...
 
EAPI void evas_object_lower (Evas_Object *obj)
 Lower obj to the bottom of its layer. More...
 
EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above)
 Stack obj immediately above above. More...
 
EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below)
 Stack obj immediately below below. More...
 
EAPI Evas_Objectevas_object_above_get (const Evas_Object *obj)
 Get the Evas object stacked right above obj. More...
 
EAPI Evas_Objectevas_object_below_get (const Evas_Object *obj)
 Get the Evas object stacked right below obj. More...
 

Detailed Description

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:

  • Showing/Hiding
  • Setting(and getting) geometry
  • Bring up or down a layer
  • Color management
  • Handling focus
  • Clipping
  • Reference counting

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).

Function Documentation

EAPI Evas_Object* evas_object_above_get ( const Evas_Object obj)

Get the Evas object stacked right above obj.

Parameters
objan Evas_Object
Returns
the Evas_Object directly above obj, if any, or NULL, if none

This function will traverse layers in its search, if there are objects on layers above the one obj is placed at.

See Also
evas_object_layer_get()
evas_object_layer_set()
evas_object_below_get()
EAPI Evas_Object* evas_object_below_get ( const Evas_Object obj)

Get the Evas object stacked right below obj.

Parameters
objan Evas_Object
Returns
the Evas_Object directly below obj, if any, or NULL, if none

This function will traverse layers in its search, if there are objects on layers below the one obj is placed at.

See Also
evas_object_layer_get()
evas_object_layer_set()
evas_object_below_get()

Referenced by evas_event_feed_mouse_move().

EAPI Evas_Object* evas_object_clip_get ( const Evas_Object obj)

Get the object clipping obj (if any).

Parameters
objThe 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:

if (evas_object_clip_get(d.img) == d.clipper)
{
fprintf(stdout, "off\n");
}
else
{
evas_object_clip_set(d.img, d.clipper);
fprintf(stdout, "on\n");
}
return;

See the full example.

EAPI void evas_object_clip_set ( Evas_Object obj,
Evas_Object clip 
)

Clip one object to another.

Parameters
objThe object to be clipped
clipThe 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:

clipping.png
Note
At the moment the only objects that can validly be used to clip other objects are rectangle objects. All other object types are invalid and the result of using them is undefined. The clip object 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:

/* solid white clipper (note that it's the default color for a
* rectangle) - it won't change clippees' colors, then (multiplying
* by 255) */
d.clipper = evas_object_rectangle_add(d.canvas);
evas_object_move(d.clipper, WIDTH / 4, HEIGHT / 4);
evas_object_resize(d.clipper, WIDTH / 2, HEIGHT / 2);
evas_object_clip_set(d.img, d.clipper);
evas_object_show(d.clipper);

See the full example.

References evas_damage_rectangle_add(), evas_event_feed_mouse_move(), and evas_object_clip_unset().

EAPI void evas_object_clip_unset ( Evas_Object obj)

Disable/cease clipping on a clipped obj object.

Parameters
objThe 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_damage_rectangle_add(), and evas_event_feed_mouse_move().

Referenced by evas_object_clip_set(), and evas_object_del().

EAPI const Eina_List* evas_object_clipees_get ( const Evas_Object obj)

Return a list of objects currently clipped by obj.

Parameters
objThe object to get a list of clippees from
Returns
a list of objects being clipped by 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:

extern Evas_Object *obj;
Evas_Object *clipper;
clipper = evas_object_clip_get(obj);
if (clipper)
{
Eina_List *clippees, *l;
Evas_Object *obj_tmp;
clippees = evas_object_clipees_get(clipper);
printf("Clipper clips %i objects\n", eina_list_count(clippees));
EINA_LIST_FOREACH(clippees, l, obj_tmp)
evas_object_show(obj_tmp);
}
EAPI 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.

Parameters
objThe given Evas object to retrieve color from.
rPointer to an integer in which to store the red component of the color.
gPointer to an integer in which to store the green component of the color.
bPointer to an integer in which to store the blue component of the color.
aPointer 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.

Note
All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
Use NULL pointers on the components you're not interested in: they'll be ignored by the function.

Example:

int alpha, r, g, b;
evas_object_color_get(d.clipper, &r, &g, &b, &alpha);
alpha -= 20;
if (alpha < 0)
alpha = 255;
evas_object_color_set(d.clipper, r, g, b, alpha);
fprintf(stdout, "Changing clipper's opacity: %d%%\n",
(int)((alpha / 255.0) * 100));
return;

See the full example.

EAPI 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.

Parameters
objThe given Evas object.
rThe red component of the given color.
gThe green component of the given color.
bThe blue component of the given color.
aThe alpha component of the given color.
See Also
evas_object_color_get() (for an example)
Note
These color values are expected to be premultiplied by a.

References EVAS_RENDER_BLEND.

EAPI void evas_object_del ( Evas_Object obj)

Marks the given Evas object for deletion (when Evas will free its memory).

Parameters
objThe 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.

See Also
evas_object_ref()
evas_object_unref()

References EVAS_CALLBACK_DEL, EVAS_CALLBACK_FOCUS_OUT, EVAS_CALLBACK_FREE, evas_object_clip_unset(), evas_object_hide(), evas_object_image_source_unset(), evas_object_map_set(), and evas_object_name_set().

Referenced by evas_object_box_remove_all(), evas_object_grid_clear(), evas_object_smart_add(), evas_object_table_clear(), and evas_object_unref().

EAPI Evas* evas_object_evas_get ( const Evas_Object obj)

Retrieves the Evas canvas that the given object lives on.

Parameters
objThe given Evas object.
Returns
A pointer to the canvas where the object is on.

This function is most useful at code contexts where you need to operate on the canvas but have only the object pointer.

Referenced by evas_object_box_add_to(), evas_object_grid_add_to(), evas_object_table_add_to(), and evas_textblock_cursor_visible_range_get().

EAPI Eina_Bool evas_object_focus_get ( const Evas_Object obj)

Retrieve whether an object has the focus.

Parameters
objThe object to retrieve focus information from.
Returns
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:

fprintf(stdout, "And again: %s\n", evas_object_focus_get(event_info) ?
"OK!" : "Oops, something is bad.");

See the full example here.

See Also
evas_object_focus_set
evas_focus_get
evas_object_key_grab
evas_object_key_ungrab
EAPI 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.

Parameters
objThe object to be focused or unfocused.
focusEINA_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:

evas_object_focus_set(d.bg, EINA_FALSE);

See the full example here.

See Also
evas_object_focus_get
evas_focus_get
evas_object_key_grab
evas_object_key_ungrab

References EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, EVAS_CALLBACK_FOCUS_IN, EVAS_CALLBACK_FOCUS_OUT, and evas_object_focus_set().

Referenced by evas_object_focus_set().

EAPI 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.

Parameters
objThe given Evas object.
xPointer to an integer in which to store the X coordinate of the object.
yPointer to an integer in which to store the Y coordinate of the object.
wPointer to an integer in which to store the width of the object.
hPointer 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.

Note
Use NULL pointers on the geometry components you're not interested in: they'll be ignored by the function.

Example:

int w, h, cw, ch;
evas_object_geometry_get(d.img, NULL, NULL, &w, &h);
ecore_evas_geometry_get(d.ee, NULL, NULL, &cw, &ch);
if (w < cw)
evas_object_resize(d.img, cw, ch);
else
evas_object_resize(d.img, cw / 2, ch / 2);
return EINA_TRUE; /* re-issue the timer */

See the full example.

References evas_output_framespace_get().

Referenced by evas_object_box_layout_flow_horizontal(), evas_object_box_layout_flow_vertical(), evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), evas_object_box_layout_horizontal(), evas_object_box_layout_stack(), evas_object_box_layout_vertical(), and evas_object_image_filled_set().

EAPI void evas_object_hide ( Evas_Object obj)

Makes the given Evas object invisible.

Parameters
objThe 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.

Note
All objects are created in the hidden state! If you want them shown, use evas_object_show() after their creation.
See Also
evas_object_show()
evas_object_visible_get()

Example:

if (evas_object_visible_get(d.clipper))
{
evas_object_hide(d.clipper);
fprintf(stdout, "hidden\n");
}
else
{
evas_object_show(d.clipper);
fprintf(stdout, "visible\n");
}
return;

See the full example.

References evas_event_feed_mouse_move().

Referenced by evas_object_del().

EAPI short evas_object_layer_get ( const Evas_Object obj)

Retrieves the layer of its canvas that the given object is part of.

Parameters
objThe given Evas object to query layer from
Returns
Number of its layer
See Also
evas_object_layer_set()
EAPI void evas_object_layer_set ( Evas_Object obj,
short  l 
)

Sets the layer of its canvas that the given object will be part of.

Parameters
objThe given Evas object.
lThe 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.

Warning
Be careful, it doesn't make sense to change the layer of smart objects' children. Smart objects have a layer of their own, which should contain all their children objects.
See Also
evas_object_layer_get()

References evas_event_feed_mouse_move(), and evas_object_raise().

EAPI void evas_object_lower ( Evas_Object obj)

Lower obj to the bottom of its layer.

Parameters
objthe object to lower

obj will, then, be the lowest one in the layer it belongs to. Objects on other layers won't get touched.

See Also
evas_object_stack_above()
evas_object_stack_below()
evas_object_raise()

References evas_event_feed_mouse_move().

Referenced by evas_object_stack_below().

EAPI 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.

Parameters
objThe given Evas object.
xX position to move the object to, in canvas units.
yY position to move the object to, in canvas units.

Besides being moved, the object's EVAS_CALLBACK_MOVE callback will be called.

Note
Naturally, newly created objects are placed at the canvas' origin: 0, 0.

Example:

evas_object_image_border_set(d.clipper_border, 3, 3, 3, 3);
d.clipper_border, EVAS_BORDER_FILL_NONE);
evas_object_move(d.clipper_border, (WIDTH / 4) - 3, (HEIGHT / 4) - 3);
d.clipper_border, (WIDTH / 2) + 6, (HEIGHT / 2) + 6);
evas_object_show(d.clipper_border);

See the full example.

References evas_event_feed_mouse_move(), and evas_output_framespace_get().

Referenced by evas_object_box_layout_flow_horizontal(), evas_object_box_layout_flow_vertical(), evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), evas_object_box_layout_horizontal(), evas_object_box_layout_stack(), evas_object_box_layout_vertical(), and evas_object_smart_move_children_relative().

EAPI const char* evas_object_name_get ( const Evas_Object obj)

Retrieves the name of the given Evas object.

Parameters
objThe given object.
Returns
The name of the object or NULL, if no name has been given to it.

Example:

fprintf(stdout, "An object got focused: %s\n",
evas_object_name_get(event_info));
fprintf(stdout, "Let's recheck it: %s\n",

See the full example.

EAPI void evas_object_name_set ( Evas_Object obj,
const char *  name 
)

Sets the name of the given Evas object to the given name.

Parameters
objThe given object.
nameThe given name.

There might be occasions where one would like to name his/her objects.

Example:

d.bg = evas_object_rectangle_add(d.canvas);
evas_object_name_set(d.bg, "our dear rectangle");

See the full example.

Referenced by evas_object_del().

EAPI void evas_object_raise ( Evas_Object obj)

Raise obj to the top of its layer.

Parameters
objthe object to raise

obj will, then, be the highest one in the layer it belongs to. Object on other layers won't get touched.

See Also
evas_object_stack_above()
evas_object_stack_below()
evas_object_lower()

References evas_event_feed_mouse_move().

Referenced by evas_object_layer_set(), and evas_object_stack_above().

EAPI void evas_object_ref ( Evas_Object obj)

Increments object reference count to defer its deletion.

Parameters
objThe 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.

See Also
evas_object_unref()
evas_object_del()
Note
This is a very simple reference counting mechanism! For instance, Evas is not ready to check for pending references on a canvas deletion, or things like that. This is useful on scenarios where, inside a code block, callbacks exist which would possibly delete an object we are operating on afterwards. Then, one would evas_object_ref() it on the beginning of the block and evas_object_unref() it on the end. It would then be deleted at this point, if it should be.

Example:

// action here...
evas_object_smart_callback_call(obj, SIG_SELECTED, NULL);
// more action here...
Since
1.1
EAPI int evas_object_ref_get ( const Evas_Object obj)

Get the object reference count.

Parameters
objThe 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.

See Also
evas_object_ref()
evas_object_unref()
evas_object_del()
Since
1.2
EAPI void evas_object_resize ( Evas_Object obj,
Evas_Coord  w,
Evas_Coord  h 
)

Changes the size of the given Evas object.

Parameters
objThe given Evas object.
wThe new width of the Evas object.
hThe new height of the Evas object.

Besides being resized, the object's EVAS_CALLBACK_RESIZE callback will be called.

Note
Newly created objects have zeroed dimensions. Then, you most probably want to use evas_object_resize() on them after they are created.
Be aware that resizing an object changes its drawing area, but that does imply the object is rescaled! For instance, images are filled inside their drawing area using the specifications of evas_object_image_fill_set(). Thus to scale the image to match exactly your drawing area, you need to change the evas_object_image_fill_set() as well.
This is more evident in images, but text, textblock, lines and polygons will behave similarly. Check their specific APIs to know how to achieve your desired behavior. Consider the following example:
// rescale image to fill exactly its area without tiling:
evas_object_resize(img, w, h);
evas_object_image_fill_set(img, 0, 0, w, h);

References evas_event_feed_mouse_move().

Referenced by evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), evas_object_box_layout_horizontal(), evas_object_box_layout_stack(), and evas_object_box_layout_vertical().

EAPI void evas_object_show ( Evas_Object obj)

Makes the given Evas object visible.

Parameters
objThe given Evas object.

Besides becoming visible, the object's EVAS_CALLBACK_SHOW callback will be called.

See Also
evas_object_hide() for more on object visibility.
evas_object_visible_get()

References evas_event_feed_mouse_move().

EAPI void evas_object_stack_above ( Evas_Object obj,
Evas_Object above 
)

Stack obj immediately above above.

Parameters
objthe object to stack
abovethe 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.

See Also
evas_object_layer_get()
evas_object_layer_set()
evas_object_stack_below()

References evas_event_feed_mouse_move(), and evas_object_raise().

Referenced by evas_object_box_layout_stack().

EAPI void evas_object_stack_below ( Evas_Object obj,
Evas_Object below 
)

Stack obj immediately below below.

Parameters
objthe object to stack
belowthe 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.

See Also
evas_object_layer_get()
evas_object_layer_set()
evas_object_stack_below()

References evas_event_feed_mouse_move(), and evas_object_lower().

EAPI const char* evas_object_type_get ( const Evas_Object obj)

Retrieves the type of the given Evas object.

Parameters
objThe given object.
Returns
The type of the 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:

d.img = evas_object_image_filled_add(d.canvas);
evas_object_image_file_set(d.img, img_path, NULL);
{
goto panic;
}
else
{
evas_object_move(d.img, 0, 0);
evas_object_resize(d.img, WIDTH, HEIGHT);
fprintf(stdout, "Image object added, type is: %s\n",
}
/* border on the image's clipper, here just to emphasize its position */

See the full example.

EAPI void evas_object_unref ( Evas_Object obj)

Decrements object reference count.

Parameters
objThe 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.

See Also
evas_object_ref() (for an example)
evas_object_del()
Since
1.1

References evas_object_del().

EAPI Eina_Bool evas_object_visible_get ( const Evas_Object obj)

Retrieves whether or not the given Evas object is visible.

Parameters
objThe given Evas object.
Returns
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().

Note
The value returned isn't, by any means, influenced by clippers covering obj, it being out of its canvas' viewport or stacked below other object.
See Also
evas_object_show()
evas_object_hide() (for an example)