Tizen Native API
|
This group provides functions for extra object manipulation.
Miscellaneous functions that also apply to any object, but are less used or not implemented by all objects.
Functions | |
void | evas_object_data_set (Evas_Object *obj, const char *key, const void *data) |
Sets an attached data pointer to an object with a given string key. | |
void * | evas_object_data_get (const Evas_Object *obj, const char *key) |
Gets an attached data pointer on an Evas object by its given string key. | |
void * | evas_object_data_del (Evas_Object *obj, const char *key) |
Deletes an attached data pointer from an object. | |
void | evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode setting) |
Sets the pointer behavior. | |
Evas_Object_Pointer_Mode | evas_object_pointer_mode_get (const Evas_Object *obj) |
Gets how the pointer behaves. | |
void | evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool antialias) |
Sets whether the given Evas object is to be drawn anti-aliased. | |
Eina_Bool | evas_object_anti_alias_get (const Evas_Object *obj) |
Checks whether the given Evas object is to be drawn anti-aliased. | |
void | evas_object_scale_set (Evas_Object *obj, double scale) |
Sets the scaling factor for an Evas object. Does not affect all objects. | |
double | evas_object_scale_get (const Evas_Object *obj) |
Gets the scaling factor for the given Evas object. | |
void | evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op op) |
Sets the render_op to be used for rendering the Evas object. | |
Evas_Render_Op | evas_object_render_op_get (const Evas_Object *obj) |
Gets the current value of the operation used for rendering the Evas object. | |
void | evas_object_precise_is_inside_set (Evas_Object *obj, Eina_Bool precise) |
Sets whether to use precise (usually expensive) point collision detection for a given Evas object. | |
Eina_Bool | evas_object_precise_is_inside_get (const Evas_Object *obj) |
Checks whether an object is set to use precise point collision detection. | |
void | evas_object_static_clip_set (Evas_Object *obj, Eina_Bool is_static_clip) |
Sets a hint flag on the given Evas object that it is used as a "static clipper". | |
Eina_Bool | evas_object_static_clip_get (const Evas_Object *obj) |
Gets the "static clipper" hint flag for a given Evas object. | |
Typedefs | |
typedef enum _Evas_Render_Op | Evas_Render_Op |
Enumeration for modes of object rendering to output. | |
typedef enum _Evas_Object_Pointer_Mode | Evas_Object_Pointer_Mode |
Enumeration for handling mouse pointer. |
Typedef Documentation
typedef enum _Evas_Object_Pointer_Mode Evas_Object_Pointer_Mode |
Enumeration for handling mouse pointer.
- Remarks:
- In the mode EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button is pressed down over an object and held, with the mouse pointer being moved outside of it, the pointer still behaves as being bound to that object, albeit out of its drawing region. When the button is released, the event is fed to the object, that may check if the final position is over it or not and do something about it.
- In the mode EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer is always bound to the object right below it. How the mouse pointer should be handled by Evas
typedef enum _Evas_Render_Op Evas_Render_Op |
Enumeration for modes of object rendering to output.
How the object should be rendered to output
Enumeration Type Documentation
Enumeration for handling mouse pointer.
- Remarks:
- In the mode EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button is pressed down over an object and held, with the mouse pointer being moved outside of it, the pointer still behaves as being bound to that object, albeit out of its drawing region. When the button is released, the event is fed to the object, that may check if the final position is over it or not and do something about it.
- In the mode EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer is always bound to the object right below it.
- Enumerator:
enum _Evas_Render_Op |
Enumeration for modes of object rendering to output.
- Enumerator:
Function Documentation
Eina_Bool evas_object_anti_alias_get | ( | const Evas_Object * | obj | ) |
Checks whether the given Evas object is to be drawn anti-aliased.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The given Evas object
- Returns:
- EINA_TRUE if the object is to be anti-aliased, otherwise EINA_FALSE if it is not to be anti-aliased
void evas_object_anti_alias_set | ( | Evas_Object * | obj, |
Eina_Bool | antialias | ||
) |
Sets whether the given Evas object is to be drawn anti-aliased.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The given Evas object [in] antialias Set EINA_TRUE for the object to be anti-aliased,
otherwise EINA_FALSE for it not to be anti-aliased
void* evas_object_data_del | ( | Evas_Object * | obj, |
const char * | key | ||
) |
Deletes an attached data pointer from an object.
- Since :
- 2.3.1
- Remarks:
- This removes the stored data pointer from obj stored under key and return this same pointer, if actually there is data there, or
NULL
, if nothing is stored under that key. - The following is an example:
int *my_data; extern Evas_Object *obj; my_data = evas_object_data_del(obj, "name_of_my_data");
- Parameters:
-
[in] obj The object to delete the data pointer from [in] key The string key the data is stored under
- Returns:
- The original data pointer stored at key on obj
void* evas_object_data_get | ( | const Evas_Object * | obj, |
const char * | key | ||
) |
Gets an attached data pointer on an Evas object by its given string key.
This function returns the data pointer attached to the object obj, stored using the string key key. If the object is valid and a data pointer is stored under the given key, that pointer is returned. If this is not the case, NULL
is returned, signifying an invalid object or a non-existent key. It is possible that a NULL
pointer is stored given that key, but this situation is not probable and thus can be considered an error as well. NULL
pointers are never stored as this is the return value if an error occurs.
- Since :
- 2.3.1
- Remarks:
- The following is an example:
int *my_data; extern Evas_Object *obj; my_data = evas_object_data_get(obj, "name_of_my_data"); if (my_data) printf("Data stored is %p\n", my_data); else printf("No data is stored on the object\n");
- Parameters:
-
[in] obj The object to which the data is attached [in] key The string key the data is stored under
- Returns:
- The data pointer stored, otherwise
NULL
if none are stored
void evas_object_data_set | ( | Evas_Object * | obj, |
const char * | key, | ||
const void * | data | ||
) |
Sets an attached data pointer to an object with a given string key.
- Since :
- 2.3.1
- Remarks:
- This attaches the pointer data to the object obj, given the access string key. This pointer stays "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 is not 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 is removed but no new value is stored. This is synonymous with calling evas_object_data_del() with obj and key. - This function is very handy when you have data associated specifically to an Evas object, being of use only when dealing with it. You do not have the burden to a pointer to it elsewhere, using this family of functions.
- The following is an example:
int *my_data; extern Evas_Object *obj; my_data = malloc(500); evas_object_data_set(obj, "name_of_data", my_data); printf("The data that is attached is %p\n", evas_object_data_get(obj, "name_of_data"));
- Parameters:
-
[in] obj The object to attach the data pointer to [in] key The string key for the data to access it [in] data The pointer to the data to be attached
Evas_Object_Pointer_Mode evas_object_pointer_mode_get | ( | const Evas_Object * | obj | ) |
Gets how the pointer behaves.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The pointer
- Returns:
- The pointer behavior
void evas_object_pointer_mode_set | ( | Evas_Object * | obj, |
Evas_Object_Pointer_Mode | setting | ||
) |
Sets the pointer behavior.
- Since :
- 2.3.1
- Remarks:
- 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 are restricted to it as source, mouse moves, for example, are emitted even if outside this object area. -
If setting is
EVAS_OBJECT_POINTER_MODE_NOGRAB
, then events are emitted just when inside this object area. -
The default value is
EVAS_OBJECT_POINTER_MODE_AUTOGRAB
.
- Parameters:
-
[in] obj The pointer for which behavior is set [in] setting The desired behavior
Eina_Bool evas_object_precise_is_inside_get | ( | const Evas_Object * | obj | ) |
Checks whether an object is set to use precise point collision detection.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The given object
- Returns:
- EINA_TRUE if obj is set to use precise point collision detection,
otherwise EINA_FALSE if it is not set to use
The default value is EINA_FALSE.
- See also:
- evas_object_precise_is_inside_set() for an example
void evas_object_precise_is_inside_set | ( | Evas_Object * | obj, |
Eina_Bool | precise | ||
) |
Sets whether to use precise (usually expensive) point collision detection for a given Evas object.
- Since :
- 2.3.1
- Remarks:
- 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 is taken into account for them.
- By using precise point collision detection you are making Evas more resource intensive.
- Parameters:
-
[in] obj The given object [in] precise Set EINA_TRUE to use precise point collision detection,
otherwise set EINA_FALSE to not use it
The default value is EINA_FALSE.
- See also:
- evas_object_precise_is_inside_get()
Evas_Render_Op evas_object_render_op_get | ( | const Evas_Object * | obj | ) |
Gets the current value of the operation used for rendering the Evas object.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The given Evas object
- Returns:
- An enumerated value in Evas_Render_Op
void evas_object_render_op_set | ( | Evas_Object * | obj, |
Evas_Render_Op | op | ||
) |
Sets the render_op to be used for rendering the Evas object.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The given Evas object [in] op An Evas_Render_Op value
double evas_object_scale_get | ( | const Evas_Object * | obj | ) |
Gets the scaling factor for the given Evas object.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The given Evas object
- Returns:
- The scaling factor
- See also:
- evas_object_scale_set()
void evas_object_scale_set | ( | Evas_Object * | obj, |
double | scale | ||
) |
Sets the scaling factor for an Evas object.
Does not affect all objects.
- Since :
- 2.3.1
- Remarks:
- This multiplies the object's dimension by the given factor, thus altering its geometry (width and height). This is useful when you want scalable UI elements, possibly at run time.
- Only text and textblock objects have scaling change handlers. Other objects do not change visually on this call.
- Parameters:
-
[in] obj The given Evas object [in] scale The scaling factor
1.0
means no scaling, default size.
- See also:
- evas_object_scale_get()
Eina_Bool evas_object_static_clip_get | ( | const Evas_Object * | obj | ) |
Gets the "static clipper" hint flag for a given Evas object.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The given object
- Returns:
- EINA_TRUE if it is set as a static clipper,
otheriwse EINA_FALSE
- See also:
- evas_object_static_clip_set() for more details
void evas_object_static_clip_set | ( | Evas_Object * | obj, |
Eina_Bool | is_static_clip | ||
) |
Sets a hint flag on the given Evas object that it is used as a "static clipper".
- Since :
- 2.3.1
- Remarks:
- This is a hint to Evas that this object is used as a big static clipper and should not be moved with children and otherwise considered specially. The default value for new objects is EINA_FALSE.
- Parameters:
-
[in] obj The given object [in] is_static_clip Set EINA_TRUE if it is to be used as a static clipper,
otherwise set EINA_FALSE
- See also:
- evas_object_static_clip_get()