Functions
Extra Object Manipulation

Miscellaneous functions that also apply to any object, but are less used or not implemented by all objects. More...

Functions

EOAPI void evas_obj_pointer_mode_set (Evas_Object_Pointer_Mode pointer_mode)
 Set pointer behavior. More...
 
EOAPI Evas_Object_Pointer_Mode evas_obj_pointer_mode_get (void)
 Determine how pointer will behave. More...
 
EOAPI void evas_obj_render_op_set (Evas_Render_Op render_op)
 Sets the render_op to be used for rendering the Evas object. More...
 
EOAPI Evas_Render_Op evas_obj_render_op_get (void)
 Retrieves the current value of the operation used for rendering the Evas object. More...
 
EOAPI void evas_obj_scale_set (double scale)
 Sets the scaling factor for an Evas object. More...
 
EOAPI double evas_obj_scale_get (void)
 Retrieves the scaling factor for the given Evas object. More...
 
EOAPI void evas_obj_static_clip_set (Eina_Bool is_static_clip)
 Set a hint flag on the given Evas object that it's used as a "static clipper". More...
 
EOAPI Eina_Bool evas_obj_static_clip_get (void)
 Get the "static clipper" hint flag for a given Evas object. More...
 
EOAPI void evas_obj_precise_is_inside_set (Eina_Bool precise)
 Set whether to use precise (usually expensive) point collision detection for a given Evas object. More...
 
EOAPI Eina_Bool evas_obj_precise_is_inside_get (void)
 Determine whether an object is set to use precise point collision detection. More...
 
EOAPI void evas_obj_anti_alias_set (Eina_Bool anti_alias)
 Sets whether or not the given Evas object is to be drawn anti-aliased. More...
 
EOAPI Eina_Bool evas_obj_anti_alias_get (void)
 Retrieves whether or not the given Evas object is to be drawn anti_aliased. More...
 
Evas_Object_Pointer_Mode evas::object::pointer_mode_get () const
 Determine how pointer will behave. More...
 
void evas::object::pointer_mode_set (Evas_Object_Pointer_Mode pointer_mode_) const
 Set pointer behavior. More...
 
Evas_Render_Op evas::object::render_op_get () const
 Retrieves the current value of the operation used for rendering the Evas object. More...
 
void evas::object::render_op_set (Evas_Render_Op render_op_) const
 Sets the render_op to be used for rendering the Evas object.
 
double evas::object::scale_get () const
 Retrieves the scaling factor for the given Evas object. More...
 
void evas::object::scale_set (double scale_) const
 Sets the scaling factor for an Evas object. More...
 
bool evas::object::static_clip_get () const
 Get the "static clipper" hint flag for a given Evas object. More...
 
void evas::object::static_clip_set (bool is_static_clip_) const
 Set a hint flag on the given Evas object that it's used as a "static clipper". More...
 
bool evas::object::precise_is_inside_get () const
 Determine whether an object is set to use precise point collision detection. More...
 
void evas::object::precise_is_inside_set (bool precise_) const
 Set whether to use precise (usually expensive) point collision detection for a given Evas object. More...
 
bool evas::object::anti_alias_get () const
 Retrieves whether or not the given Evas object is to be drawn anti_aliased. More...
 
void evas::object::anti_alias_set (bool anti_alias_) const
 Sets whether or not the given Evas object is to be drawn anti-aliased.
 
void evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode pointer_mode)
 Set pointer behavior. More...
 
Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Evas_Object *obj)
 Determine how pointer will behave. More...
 
void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op render_op)
 Sets the render_op to be used for rendering the Evas object. More...
 
Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj)
 Retrieves the current value of the operation used for rendering the Evas object. More...
 
void evas_object_scale_set (Evas_Object *obj, double scale)
 Sets the scaling factor for an Evas object. More...
 
double evas_object_scale_get (const Evas_Object *obj)
 Retrieves the scaling factor for the given Evas object. More...
 
void evas_object_static_clip_set (Evas_Object *obj, Eina_Bool is_static_clip)
 Set a hint flag on the given Evas object that it's used as a "static clipper". More...
 
Eina_Bool evas_object_static_clip_get (const Evas_Object *obj)
 Get the "static clipper" hint flag for a given Evas object. More...
 
void evas_object_precise_is_inside_set (Evas_Object *obj, Eina_Bool precise)
 Set whether to use precise (usually expensive) point collision detection for a given Evas object. More...
 
Eina_Bool evas_object_precise_is_inside_get (const Evas_Object *obj)
 Determine whether an object is set to use precise point collision detection. More...
 
void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool anti_alias)
 Sets whether or not the given Evas object is to be drawn anti-aliased. More...
 
Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj)
 Retrieves whether or not the given Evas object is to be drawn anti_aliased. More...
 
void evas_object_data_set (Evas_Object *obj, const char *key, const void *data)
 Set an attached data pointer to an object with a given string key. More...
 
void * evas_object_data_get (const Evas_Object *obj, const char *key)
 Return an attached data pointer on an Evas object by its given string key. More...
 
void * evas_object_data_del (Evas_Object *obj, const char *key)
 Delete an attached data pointer from an object. More...
 

Detailed Description

Miscellaneous functions that also apply to any object, but are less used or not implemented by all objects.

Examples on this group of functions can be found here and here.

Function Documentation

EOAPI void evas_obj_pointer_mode_set ( Evas_Object_Pointer_Mode  pointer_mode)

Set pointer behavior.

This function has direct effect on event callbacks related to mouse.

If setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse is down at this object, events will be restricted to it as source, mouse moves, for example, will be emitted even if outside this object area.

If setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will be emitted just when inside this object area.

The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB.

Parameters
[in]pointer_modedesired behavior.

Referenced by evas_object_pointer_mode_set().

EOAPI Evas_Object_Pointer_Mode evas_obj_pointer_mode_get ( void  )

Determine how pointer will behave.

Returns
pointer behavior.

Referenced by evas_object_pointer_mode_get().

EOAPI void evas_obj_render_op_set ( Evas_Render_Op  render_op)

Sets the render_op to be used for rendering the Evas object.

Parameters
[in]render_opone of the Evas_Render_Op values.

Referenced by evas_object_render_op_set().

EOAPI Evas_Render_Op evas_obj_render_op_get ( void  )

Retrieves the current value of the operation used for rendering the Evas object.

Returns
one of the enumerated values in Evas_Render_Op.

Referenced by evas_object_render_op_get().

EOAPI void evas_obj_scale_set ( double  scale)

Sets the scaling factor for an Evas object.

Does not affect all objects.

This will multiply the object's dimension by the given factor, thus altering its geometry (width and height). Useful when you want scalable UI elements, possibly at run time.

Note
Only text and textblock objects have scaling change handlers. Other objects won't change visually on this call.
See also
evas_object_scale_get()
Parameters
[in]scaleThe scaling factor. 1.0 means no scaling, default size.

Referenced by evas_object_scale_set().

EOAPI double evas_obj_scale_get ( void  )

Retrieves the scaling factor for the given Evas object.

Returns
The scaling factor.
See also
evas_object_scale_set()

Referenced by evas_object_scale_get().

EOAPI void evas_obj_static_clip_set ( Eina_Bool  is_static_clip)

Set a hint flag on the given Evas object that it's used as a "static clipper".

This is a hint to Evas that this object is used as a big static clipper and shouldn't be moved with children and otherwise considered specially. The default value for new objects is EINA_FALSE.

See also
evas_object_static_clip_get()
Parameters
[in]is_static_clipEINA_TRUE if it's to be used as a static clipper, EINA_FALSE otherwise.

Referenced by evas_object_static_clip_set().

EOAPI Eina_Bool evas_obj_static_clip_get ( void  )

Get the "static clipper" hint flag for a given Evas object.

Returns
EINA_TRUE if it's set as a static clipper, EINA_FALSE otherwise.
See also
evas_object_static_clip_set() for more details

Referenced by evas_object_static_clip_get().

EOAPI void evas_obj_precise_is_inside_set ( Eina_Bool  precise)

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.

Example code follows.

1  if (strcmp(ev->key, "p") == 0) /* toggle precise point
2  * collision detection */
3  {
4  Eina_Bool precise = evas_object_precise_is_inside_get(d.img);
5 
6  fprintf(stdout, "Toggling precise point collision detection %s on"
7  " Enlightenment logo\n", precise ? "off" : "on");
8  evas_object_precise_is_inside_set(d.img, !precise);
9 
10  return;
11  }

See the full example here.

See also
evas_object_precise_is_inside_get()
Parameters
[in]preciseWhether to use precise point collision detection or not. The default value is false.

Referenced by evas_object_precise_is_inside_set().

EOAPI Eina_Bool evas_obj_precise_is_inside_get ( void  )

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

Returns
whether obj is set to use precise point collision detection or not The default value is false.
See also
evas_object_precise_is_inside_set() for an example

Referenced by evas_object_precise_is_inside_get().

EOAPI void evas_obj_anti_alias_set ( Eina_Bool  anti_alias)

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

Parameters
[in]anti_alias(EINA_TRUE) if the object is to be anti_aliased, (EINA_FALSE) otherwise.

Referenced by evas_object_anti_alias_set().

EOAPI Eina_Bool evas_obj_anti_alias_get ( void  )

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

Returns
(EINA_TRUE) if the object is to be anti_aliased. (EINA_FALSE) otherwise.

Referenced by evas_object_anti_alias_get().

Evas_Object_Pointer_Mode evas::object::pointer_mode_get ( ) const

Determine how pointer will behave.

Returns
pointer behavior.
void evas::object::pointer_mode_set ( Evas_Object_Pointer_Mode  pointer_mode_) const

Set pointer behavior.

This function has direct effect on event callbacks related to mouse.

If setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse is down at this object, events will be restricted to it as source, mouse moves, for example, will be emitted even if outside this object area.

If setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will be emitted just when inside this object area.

The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB.

Evas_Render_Op evas::object::render_op_get ( ) const

Retrieves the current value of the operation used for rendering the Evas object.

Returns
one of the enumerated values in Evas_Render_Op.
double evas::object::scale_get ( ) const

Retrieves the scaling factor for the given Evas object.

Returns
The scaling factor.
See also
evas_object_scale_set()
void evas::object::scale_set ( double  scale_) const

Sets the scaling factor for an Evas object.

Does not affect all objects.

This will multiply the object's dimension by the given factor, thus altering its geometry (width and height). Useful when you want scalable UI elements, possibly at run time.

Note
Only text and textblock objects have scaling change handlers. Other objects won't change visually on this call.
See also
evas_object_scale_get()
bool evas::object::static_clip_get ( ) const

Get the "static clipper" hint flag for a given Evas object.

Returns
EINA_TRUE if it's set as a static clipper, EINA_FALSE otherwise.
See also
evas_object_static_clip_set() for more details
void evas::object::static_clip_set ( bool  is_static_clip_) const

Set a hint flag on the given Evas object that it's used as a "static clipper".

This is a hint to Evas that this object is used as a big static clipper and shouldn't be moved with children and otherwise considered specially. The default value for new objects is EINA_FALSE.

See also
evas_object_static_clip_get()
bool evas::object::precise_is_inside_get ( ) const

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

Returns
whether obj is set to use precise point collision detection or not The default value is false.
See also
evas_object_precise_is_inside_set() for an example
void evas::object::precise_is_inside_set ( bool  precise_) const

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.

Example code follows.

if (strcmp(ev->key, "p") == 0) /* toggle precise point
* collision detection */
{
fprintf(stdout, "Toggling precise point collision detection %s on"
" Enlightenment logo\n", precise ? "off" : "on");
return;
}

See the full example here.

See also
evas_object_precise_is_inside_get()
bool evas::object::anti_alias_get ( ) const

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

Returns
(EINA_TRUE) if the object is to be anti_aliased. (EINA_FALSE) otherwise.
void evas_object_pointer_mode_set ( Evas_Object obj,
Evas_Object_Pointer_Mode  pointer_mode 
)

Set pointer behavior.

This function has direct effect on event callbacks related to mouse.

If setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse is down at this object, events will be restricted to it as source, mouse moves, for example, will be emitted even if outside this object area.

If setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will be emitted just when inside this object area.

The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB.

Parameters
[in]pointer_modedesired behavior.

References evas_obj_pointer_mode_set().

Referenced by edje_edit_part_clip_to_set().

Evas_Object_Pointer_Mode evas_object_pointer_mode_get ( const Evas_Object obj)

Determine how pointer will behave.

Returns
pointer behavior.

References evas_obj_pointer_mode_get().

void evas_object_render_op_set ( Evas_Object obj,
Evas_Render_Op  render_op 
)

Sets the render_op to be used for rendering the Evas object.

Parameters
[in]render_opone of the Evas_Render_Op values.

References evas_obj_render_op_set().

Evas_Render_Op evas_object_render_op_get ( const Evas_Object obj)

Retrieves the current value of the operation used for rendering the Evas object.

Returns
one of the enumerated values in Evas_Render_Op.

References evas_obj_render_op_get().

void evas_object_scale_set ( Evas_Object obj,
double  scale 
)

Sets the scaling factor for an Evas object.

Does not affect all objects.

This will multiply the object's dimension by the given factor, thus altering its geometry (width and height). Useful when you want scalable UI elements, possibly at run time.

Note
Only text and textblock objects have scaling change handlers. Other objects won't change visually on this call.
See also
evas_object_scale_get()
Parameters
[in]scaleThe scaling factor. 1.0 means no scaling, default size.

References evas_obj_scale_set().

double evas_object_scale_get ( const Evas_Object obj)

Retrieves the scaling factor for the given Evas object.

Returns
The scaling factor.
See also
evas_object_scale_set()

References evas_obj_scale_get().

void evas_object_static_clip_set ( Evas_Object obj,
Eina_Bool  is_static_clip 
)

Set a hint flag on the given Evas object that it's used as a "static clipper".

This is a hint to Evas that this object is used as a big static clipper and shouldn't be moved with children and otherwise considered specially. The default value for new objects is EINA_FALSE.

See also
evas_object_static_clip_get()
Parameters
[in]is_static_clipEINA_TRUE if it's to be used as a static clipper, EINA_FALSE otherwise.

References evas_obj_static_clip_set().

Eina_Bool evas_object_static_clip_get ( const Evas_Object obj)

Get the "static clipper" hint flag for a given Evas object.

Returns
EINA_TRUE if it's set as a static clipper, EINA_FALSE otherwise.
See also
evas_object_static_clip_set() for more details

References evas_obj_static_clip_get().

void evas_object_precise_is_inside_set ( Evas_Object obj,
Eina_Bool  precise 
)

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.

Example code follows.

1  if (strcmp(ev->key, "p") == 0) /* toggle precise point
2  * collision detection */
3  {
4  Eina_Bool precise = evas_object_precise_is_inside_get(d.img);
5 
6  fprintf(stdout, "Toggling precise point collision detection %s on"
7  " Enlightenment logo\n", precise ? "off" : "on");
8  evas_object_precise_is_inside_set(d.img, !precise);
9 
10  return;
11  }

See the full example here.

See also
evas_object_precise_is_inside_get()
Parameters
[in]preciseWhether to use precise point collision detection or not. The default value is false.

References evas_obj_precise_is_inside_set().

Eina_Bool evas_object_precise_is_inside_get ( const Evas_Object obj)

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

Returns
whether obj is set to use precise point collision detection or not The default value is false.
See also
evas_object_precise_is_inside_set() for an example

References evas_obj_precise_is_inside_get().

void evas_object_anti_alias_set ( Evas_Object obj,
Eina_Bool  anti_alias 
)

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

Parameters
[in]anti_alias(EINA_TRUE) if the object is to be anti_aliased, (EINA_FALSE) otherwise.

References evas_obj_anti_alias_set().

Referenced by edje_edit_part_anti_alias_set().

Eina_Bool evas_object_anti_alias_get ( const Evas_Object obj)

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

Returns
(EINA_TRUE) if the object is to be anti_aliased. (EINA_FALSE) otherwise.

References evas_obj_anti_alias_get().

void evas_object_data_set ( Evas_Object obj,
const char *  key,
const void *  data 
)

Set an attached data pointer to an object with a given string key.

Parameters
objThe object to attach the data pointer to
keyThe string key for the data to access it
dataThe pointer to the data to be attached

This attaches the pointer data to the object obj, given the access string key. This pointer will stay "hooked" to the object until a new pointer with the same string key is attached with evas_object_data_set() or it is deleted with evas_object_data_del(). On deletion of the object obj, the pointers will not be accessible from the object anymore.

You can find the pointer attached under a string key using evas_object_data_get(). It is the job of the calling application to free any data pointed to by data when it is no longer required.

If data is NULL, the old value stored at key will be removed but no new value will be stored. This is synonymous with calling evas_object_data_del() with obj and key.

Note
This function is very handy when you have data associated specifically to an Evas object, being of use only when dealing with it. Than you don't have the burden to a pointer to it elsewhere, using this family of functions.

Example:

1 int *my_data;
2 extern Evas_Object *obj;
3 
4 my_data = malloc(500);
5 evas_object_data_set(obj, "name_of_data", my_data);
6 printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data"));

Referenced by ecore_evas_ews_new(), ecore_evas_object_image_new(), and edje_perspective_new().

void* evas_object_data_get ( const Evas_Object obj,
const char *  key 
)

Return an attached data pointer on an Evas object by its given string key.

Parameters
objThe object to which the data was attached
keyThe string key the data was stored under
Returns
The data pointer stored, or NULL if none was stored

This function will return the data pointer attached to the object obj, stored using the string key key. If the object is valid and a data pointer was stored under the given key, that pointer will be returned. If this is not the case, NULL will be returned, signifying an invalid object or a non-existent key. It is possible that a NULL pointer was stored given that key, but this situation is non-sensical and thus can be considered an error as well. NULL pointers are never stored as this is the return value if an error occurs.

Example:

1 int *my_data;
2 extern Evas_Object *obj;
3 
4 my_data = evas_object_data_get(obj, "name_of_my_data");
5 if (my_data) printf("Data stored was %p\n", my_data);
6 else printf("No data was stored on the object\n");
Examples:
ecore_imf_example.c, ephysics_logo.c, evas-smart-interface.c, evas-smart-object.c, test_camera.c, test_camera_track.c, test_delete.c, and test_rotating_forever.c.

Referenced by ecore_evas_buffer_ecore_evas_parent_get(), ecore_evas_object_ecore_evas_get(), ecore_evas_object_evas_get(), edje_evas_global_perspective_get(), and edje_object_part_object_name_get().

void* evas_object_data_del ( Evas_Object obj,
const char *  key 
)

Delete an attached data pointer from an object.

Parameters
objThe object to delete the data pointer from
keyThe string key the data was stored under
Returns
The original data pointer stored at key on obj

This will remove the stored data pointer from obj stored under key and return this same pointer, if actually there was data there, or NULL, if nothing was stored under that key.

Example:

1 int *my_data;
2 extern Evas_Object *obj;
3 
4 my_data = evas_object_data_del(obj, "name_of_my_data");