Tizen Native API  5.5
Generic Object Functions

Functions that manipulate generic Evas objects.

All Evas displaying units are Evas objects. One handles them all by means of the handle Evas_Object. Besides Evas treats their objects equally, they have types that define their specific behavior (and individual API).

Evas comes with a set of built-in object types:

These functions apply to any Evas object, whatever type they may have.

Note:
The built-in types that are most used are rectangles, text and images. In fact, with these one can create 2D interfaces of arbitrary complexity and EFL makes it easy.

Functions

Eina_Bool evas_object_pointer_mode_set (Efl_Canvas_Object *obj, Evas_Object_Pointer_Mode pointer_mode)
 Low-level pointer behaviour.
Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Efl_Canvas_Object *obj)
 Low-level pointer behaviour.
void evas_object_clip_set (Efl_Canvas_Object *obj, Efl_Canvas_Object *clip)
 Clip one object to another.
Efl_Canvas_Objectevas_object_clip_get (const Efl_Canvas_Object *obj)
 Get the object clipping obj (if any).
void evas_object_repeat_events_set (Efl_Canvas_Object *obj, Eina_Bool repeat)
 Set whether an Evas object is to repeat events.
Eina_Bool evas_object_repeat_events_get (const Efl_Canvas_Object *obj)
 Determine whether an object is set to repeat events.
void evas_object_focus_set (Efl_Canvas_Object *obj, Eina_Bool focus)
 Indicates that this object is the keyboard event receiver on its canvas.
Eina_Bool evas_object_focus_get (const Efl_Canvas_Object *obj)
 Indicates that this object is the keyboard event receiver on its canvas.
void evas_object_precise_is_inside_set (Efl_Canvas_Object *obj, Eina_Bool precise)
 Set whether to use precise (usually expensive) point collision detection for a given Evas object.
Eina_Bool evas_object_precise_is_inside_get (const Efl_Canvas_Object *obj)
 Determine whether an object is set to use precise point collision detection.
void evas_object_propagate_events_set (Efl_Canvas_Object *obj, Eina_Bool propagate)
 Set whether events on a smart object's member should be propagated up to its parent.
Eina_Bool evas_object_propagate_events_get (const Efl_Canvas_Object *obj)
 Retrieve whether an Evas object is set to propagate events.
void evas_object_pass_events_set (Efl_Canvas_Object *obj, Eina_Bool pass)
 Set whether an Evas object is to pass (ignore) events.
Eina_Bool evas_object_pass_events_get (const Efl_Canvas_Object *obj)
 Determine whether an object is set to pass (ignore) events.
void evas_object_anti_alias_set (Efl_Canvas_Object *obj, Eina_Bool anti_alias)
 Sets whether or not the given Evas object is to be drawn anti-aliased.
Eina_Bool evas_object_anti_alias_get (const Efl_Canvas_Object *obj)
 Retrieves whether or not the given Evas object is to be drawn anti_aliased.
Efl_Canvas_Objectevas_object_smart_parent_get (const Efl_Canvas_Object *obj)
 Gets the parent smart object of a given Evas object, if it has one.
void evas_object_paragraph_direction_set (Efl_Canvas_Object *obj, Evas_BiDi_Direction dir)
 This handles text paragraph direction of the given object. Even if the given object is not textblock or text, its smart child objects can inherit the paragraph direction from the given object. The default paragraph direction is inherit.
Evas_BiDi_Direction evas_object_paragraph_direction_get (const Efl_Canvas_Object *obj)
 This handles text paragraph direction of the given object. Even if the given object is not textblock or text, its smart child objects can inherit the paragraph direction from the given object. The default paragraph direction is inherit.
Eina_Bool evas_object_clipees_has (const Efl_Canvas_Object *obj)
 Test if any object is clipped by obj.
void evas_object_is_frame_object_set (Efl_Canvas_Object *obj, Eina_Bool is_frame)
 If true the object belongs to the window border decorations.
Eina_Bool evas_object_is_frame_object_get (const Efl_Canvas_Object *obj)
 If true the object belongs to the window border decorations.
void evas_object_freeze_events_set (Efl_Canvas_Object *obj, Eina_Bool freeze)
 Set whether an Evas object is to freeze (discard) events.
Eina_Bool evas_object_freeze_events_get (const Efl_Canvas_Object *obj)
 Determine whether an object is set to freeze (discard) events.

Typedefs

typedef Eo Efl_Canvas_Object
typedef Efl_Canvas_Object Evas_Object

Typedef Documentation

An Evas Object handle

See also:
Evas_Object

An Evas Object handle.


Function Documentation

Retrieves whether or not the given Evas object is to be drawn anti_aliased.

Parameters:
[in]objThe object.
Returns:
true if the object is to be anti_aliased, false otherwise.
Since :
2.3
void evas_object_anti_alias_set ( Efl_Canvas_Object obj,
Eina_Bool  anti_alias 
)

Sets whether or not the given Evas object is to be drawn anti-aliased.

Parameters:
[in]objThe object.
[in]anti_aliastrue if the object is to be anti_aliased, false otherwise.
Since :
2.3

Get the object clipping obj (if any).

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.

Parameters:
[in]objThe object.
Returns:
The object to clip obj by.
Since :
2.3
Examples:
evas-object-manipulation.c.

Clip one object to another.

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 Efl::Gfx::Entity::visible), 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.

If clip is null, this call will disable clipping for the object i.e. its visibility and color get detached from the previous clipper. If it wasn't, this has no effect.

Note:
Only rectangle and image (masks) objects can be used as clippers. Anything else will result in undefined behaviour.
Parameters:
[in]objThe object.
[in]clipThe object to clip obj by.
Since :
2.3
Examples:
evas-object-manipulation.c.

Test if any object is clipped by obj.

Parameters:
[in]objThe object.
Returns:
true if any object is clipped by obj, false otherwise
Since (EFL) :
1.8
Since :
3.0f(2.3.1)

Indicates that this object is the keyboard event receiver on its canvas.

Changing focus only affects where (key) input events go. There can be only one object focused at any time. If focus is 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. See also Efl::Canvas::Object::seat_focus_check, Efl::Canvas::Object::seat_focus_add, Efl::Canvas::Object::seat_focus_del.

Parameters:
[in]objThe object.
Returns:
true when set as focused or false otherwise.
Since :
2.3
Examples:
ecore_imf_example.c, and evas-events.c.
void evas_object_focus_set ( Efl_Canvas_Object obj,
Eina_Bool  focus 
)

Indicates that this object is the keyboard event receiver on its canvas.

Changing focus only affects where (key) input events go. There can be only one object focused at any time. If focus is 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. See also Efl::Canvas::Object::seat_focus_check, Efl::Canvas::Object::seat_focus_add, Efl::Canvas::Object::seat_focus_del.

Parameters:
[in]objThe object.
[in]focustrue when set as focused or false otherwise.
Since :
2.3
Examples:
ecore_evas_window_sizes_example.c, ecore_imf_example.c, edje-basic.c, edje-box.c, edje-box2.c, edje-drag.c, edje-perspective.c, edje-signals-messages.c, evas-aspect-hints.c, evas-box.c, evas-events.c, evas-hints.c, evas-images.c, evas-images2.c, evas-map-utils.c, evas-object-manipulation.c, evas-smart-interface.c, evas-smart-object.c, evas-stacking.c, and evas-text.c.

Determine whether an object is set to freeze (discard) events.

Parameters:
[in]objThe object.
Returns:
Pass when obj is to freeze events ($true) or not ($false).
Since (EFL) :
1.1
Since :
2.3

Set whether an Evas object is to freeze (discard) events.

If freeze is true, it will force events on obj to be discarded. Unlike evas_object_pass_events_set, events will not be passed to next lower object. This API can be used for blocking events while obj is in transition.

If freeze is false, events will be processed on that object as normal.

Warning:
If you block only key/mouse up events with this API, you can't be sure of the state of any objects that have only key/mouse down events.
Parameters:
[in]objThe object.
[in]freezePass when obj is to freeze events ($true) or not ($false).
Since (EFL) :
1.1
Since :
2.3

If true the object belongs to the window border decorations.

This will be false by default, and should be false for all objects created by the application, unless swallowed in some very specific parts of the window.

It is very unlikely that an application needs to call this manually, as the window will handle this feature automatically.

Parameters:
[in]objThe object.
Returns:
true if the object is a frame, false otherwise
Since (EFL) :
1.2
Since :
3.0f(2.3.1)

If true the object belongs to the window border decorations.

This will be false by default, and should be false for all objects created by the application, unless swallowed in some very specific parts of the window.

It is very unlikely that an application needs to call this manually, as the window will handle this feature automatically.

Parameters:
[in]objThe object.
[in]is_frametrue if the object is a frame, false otherwise
Since (EFL) :
1.2
Since :
3.0f(2.3.1)
Evas_BiDi_Direction evas_object_paragraph_direction_get ( const Efl_Canvas_Object obj)

This handles text paragraph direction of the given object. Even if the given object is not textblock or text, its smart child objects can inherit the paragraph direction from the given object. The default paragraph direction is inherit.

Parameters:
[in]objThe object.
Returns:
Paragraph direction for the given object.
Since :
3.0f(2.3.1)
void evas_object_paragraph_direction_set ( Efl_Canvas_Object obj,
Evas_BiDi_Direction  dir 
)

This handles text paragraph direction of the given object. Even if the given object is not textblock or text, its smart child objects can inherit the paragraph direction from the given object. The default paragraph direction is inherit.

Parameters:
[in]objThe object.
[in]dirParagraph direction for the given object.
Since :
3.0f(2.3.1)

Determine whether an object is set to pass (ignore) events.

See also evas_object_repeat_events_get, evas_object_propagate_events_get.

Parameters:
[in]objThe object.
Returns:
Whether obj is to pass events ($true) or not ($false).
Since :
2.3
Examples:
evas-stacking.c.

Set whether an Evas object is to pass (ignore) events.

If pass is true, it will make events on obj to be ignored. They will be triggered on the next lower object (that is not set to pass events), instead (see Efl::Gfx::Stack::below).

If pass is false events will be processed on that object as normal.

See also evas_object_repeat_events_set, evas_object_propagate_events_set

Parameters:
[in]objThe object.
[in]passWhether obj is to pass events ($true) or not ($false).
Since :
2.3
Examples:
ecore_imf_example.c, and evas-stacking.c.

Low-level pointer behaviour.

This function has a direct effect on event callbacks related to pointers (mouse, ...).

If the value is EVAS_OBJECT_POINTER_MODE_AUTO_GRAB (default), then when mouse is pressed down over this object, events will be restricted to it as source, mouse moves, for example, will be emitted even when the pointer goes outside this objects geometry.

If the value is EVAS_OBJECT_POINTER_MODE_NO_GRAB, then events will be emitted just when inside this object area.

The default value is EVAS_OBJECT_POINTER_MODE_AUTO_GRAB. See also: Efl::Canvas::Object::pointer_mode_by_device::get and Efl::Canvas::Object::pointer_mode_by_device::set Note: This function will only set/get the mode for the default pointer.

Parameters:
[in]objThe object.
Returns:
Input pointer mode
Since :
2.3

Low-level pointer behaviour.

This function has a direct effect on event callbacks related to pointers (mouse, ...).

If the value is EVAS_OBJECT_POINTER_MODE_AUTO_GRAB (default), then when mouse is pressed down over this object, events will be restricted to it as source, mouse moves, for example, will be emitted even when the pointer goes outside this objects geometry.

If the value is EVAS_OBJECT_POINTER_MODE_NO_GRAB, then events will be emitted just when inside this object area.

The default value is EVAS_OBJECT_POINTER_MODE_AUTO_GRAB. See also: Efl::Canvas::Object::pointer_mode_by_device::get and Efl::Canvas::Object::pointer_mode_by_device::set Note: This function will only set/get the mode for the default pointer.

Parameters:
[in]objThe object.
[in]pointer_modeInput pointer mode
Returns:
true if pointer behaviour was set, false otherwise
Since :
2.3

Determine whether an object is set to use precise point collision detection.

Parameters:
[in]objThe object.
Returns:
Whether to use precise point collision detection or not. The default value is false.
Since :
2.3
Examples:
evas-events.c.

Set whether to use precise (usually expensive) point collision detection for a given Evas object.

Use this function to make Evas treat objects' transparent areas as not belonging to it with regard to mouse pointer events. By default, all of the object's boundary rectangle will be taken in account for them.

Warning:
By using precise point collision detection you'll be making Evas more resource intensive.
Parameters:
[in]objThe object.
[in]preciseWhether to use precise point collision detection or not. The default value is false.
Since :
2.3
Examples:
evas-events.c.

Retrieve whether an Evas object is set to propagate events.

See also evas_object_repeat_events_get, evas_object_pass_events_get.

Parameters:
[in]objThe object.
Returns:
Whether to propagate events ($true) or not ($false).
Since :
2.3

Set whether events on a smart object's member should be propagated up to its parent.

This function has no effect if obj is not a member of a smart object.

If prop is true, events occurring on this object will be propagated on to the smart object of which obj is a member. If prop is false, events occurring on this object will not be propagated on to the smart object of which obj is a member. The default value is true.

See also evas_object_repeat_events_set, evas_object_pass_events_set.

Parameters:
[in]objThe object.
[in]propagateWhether to propagate events ($true) or not ($false).
Since :
2.3
Examples:
gengrid_example.c.

Determine whether an object is set to repeat events.

Parameters:
[in]objThe object.
Returns:
Whether obj is to repeat events ($true) or not ($false).
Since :
2.3
Examples:
evas-stacking.c.

Set whether an Evas object is to repeat events.

If repeat is true, it will make events on obj to also be repeated for the next lower object in the objects' stack (see see Efl::Gfx::Stack::below).

If repeat is false, events occurring on obj will be processed only on it.

Parameters:
[in]objThe object.
[in]repeatWhether obj is to repeat events ($true) or not ($false).
Since :
2.3
Examples:
edje-signals-messages.c, and evas-stacking.c.

Gets the parent smart object of a given Evas object, if it has one.

This can be different from Efl::Object::parent because this one is used internally for rendering and the normal parent is what the user expects to be the parent.

Parameters:
[in]objThe object.
Returns:
The parent smart object of obj or null.
Since (EFL) :
1.18
Since :
2.3
Examples:
evas-smart-interface.c, and evas-smart-object.c.