Tizen Native API
|
This group discusses functions that deal with Color Classes.
- Remarks:
- Sometimes we want to change the color of two or more parts equally and that's when we use color classes.
- If one or more parts are assigned with a color class, when we set color values to this class it causes all these parts to have their colors multiplied by the values. Setting values to a color class at a process level affects all parts within that color class, while at an object level it only affects the parts inside a specified object.
Functions | |
Eina_Bool | edje_color_class_set (const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3) |
Sets the Edje color class. | |
Eina_Bool | edje_color_class_get (const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3) |
Gets the Edje color class. | |
void | edje_color_class_del (const char *color_class) |
Deletes the Edje color class. | |
Eina_List * | edje_color_class_list (void) |
Lists the color classes. | |
Eina_Bool | edje_object_color_class_set (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3) |
Sets the object color class. | |
Eina_Bool | edje_object_color_class_get (const Evas_Object *o, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3) |
Gets the object color class. | |
void | edje_object_color_class_del (Evas_Object *obj, const char *color_class) |
Deletes the object color class. |
Function Documentation
void edje_color_class_del | ( | const char * | color_class | ) |
Deletes the Edje color class.
This function deletes any values at the process level for the specified color class.
- Since :
- 2.3.1
- Remarks:
- Deleting the color class reverts it to the values defined in the theme file. Deleting the color class emits the signal "color_class,del" to all the edje objects in the running program.
- Parameters:
-
[in] color_class The color class name
Eina_Bool edje_color_class_get | ( | const char * | color_class, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a, | ||
int * | r2, | ||
int * | g2, | ||
int * | b2, | ||
int * | a2, | ||
int * | r3, | ||
int * | g3, | ||
int * | b3, | ||
int * | a3 | ||
) |
Gets the Edje color class.
This function gets the color values for a process level color class. This value is globally set and not per-object, that is, the value that would be used by objects if they do not override using edje_object_color_class_set().
- Since :
- 2.3.1
- Remarks:
- The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second and third only apply to text parts).
- Unlike Evas, edje colors are not pre-multiplied. That is, half-transparent white is 255 255 255 128.
- Parameters:
-
[in] color_class The color class name [out] r The object Red value [out] g The object Green value [out] b The object Blue value [out] a The object Alpha value [out] r2 The outline Red value [out] g2 The outline Green value [out] b2 The outline Blue value [out] a2 The outline Alpha value [out] r3 The shadow Red value [out] g3 The shadow Green value [out] b3 The shadow Blue value [out] a3 The shadow Alpha value
- Returns:
- EINA_TRUE if found, otherwise EINA_FALSE if not found and all values are zeroed
- See also:
- edje_color_class_set()
Eina_List* edje_color_class_list | ( | void | ) |
Lists the color classes.
This function lists all the color classes known by the current process.
- Since :
- 2.3.1
- Returns:
- A list of color class names (strings)
These strings and the list must be freed by the caller using free().
Eina_Bool edje_color_class_set | ( | const char * | color_class, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
int | a2, | ||
int | r3, | ||
int | g3, | ||
int | b3, | ||
int | a3 | ||
) |
Sets the Edje color class.
This function sets the color values for a process level color class. This causes all the edje parts in the current process that have the specified color class to have their colors multiplied by these values. (Object level color classes set by edje_object_color_class_set() override the values set by this function).
- Since :
- 2.3.1
- Remarks:
- The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second and third only apply to text parts).
- Setting color emits a signal "color_class,set" with source being the given color class in all objects.
- Unlike Evas, Edje colors are not pre-multiplied. That is, half-transparent white is 255 255 255 128.
- Parameters:
-
[in] color_class The color class name [in] r The object Red value [in] g The object Green value [in] b The object Blue value [in] a The object Alpha value [in] r2 The outline Red value [in] g2 The outline Green value [in] b2 The outline Blue value [in] a2 The outline Alpha value [in] r3 The shadow Red value [in] g3 The shadow Green value [in] b3 The shadow Blue value [in] a3 The shadow Alpha value
- Returns:
- EINA_TRUE if succeed, otherwise EINA_FALSE
- See also:
- edje_color_class_set()
void edje_object_color_class_del | ( | Evas_Object * | obj, |
const char * | color_class | ||
) |
Deletes the object color class.
This function deletes any values at the object level for the specified object and color class.
- Since :
- 2.3.1
- Remarks:
- Deleting the color class reverts it to the values defined by edje_color_class_set() or the color class defined in the theme file. Deleting the color class emits the signal "color_class,del" for the given edje object.
- Parameters:
-
[in] obj The edje object reference [in] color_class The color class to be deleted
Eina_Bool edje_object_color_class_get | ( | const Evas_Object * | o, |
const char * | color_class, | ||
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a, | ||
int * | r2, | ||
int * | g2, | ||
int * | b2, | ||
int * | a2, | ||
int * | r3, | ||
int * | g3, | ||
int * | b3, | ||
int * | a3 | ||
) |
Gets the object color class.
This function gets the color values for an object level color class. If no explicit object color is set, then global values are used.
- Since :
- 2.3.1
- Remarks:
- The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second and third only apply to text parts).
- Unlike Evas, edje colors are not pre-multiplied. That is, half-transparent white is 255 255 255 128.
- Parameters:
-
[in] o A valid Evas_Object handle [in] color_class The color class name [out] r The object Red value [out] g The object Green value [out] b The object Blue value [out] a The object Alpha value [out] r2 The outline Red value [out] g2 The outline Green value [out] b2 The outline Blue value [out] a2 The outline Alpha value [out] r3 The shadow Red value [out] g3 The shadow Green value [out] b3 The shadow Blue value [out] a3 The shadow Alpha value
- Returns:
- EINA_TRUE if found, otherwise EINA_FALSE if not found and all values are zeroed
Eina_Bool edje_object_color_class_set | ( | Evas_Object * | obj, |
const char * | color_class, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
int | a2, | ||
int | r3, | ||
int | g3, | ||
int | b3, | ||
int | a3 | ||
) |
Sets the object color class.
This function sets the color values for an object level color class. This causes all edje parts in the specified object that have the specified color class to have their colors multiplied by these values.
- Since :
- 2.3.1
- Remarks:
- The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second and third only apply to text parts).
- Setting color emits a signal "color_class,set" with source being the given color.
- Unlike Evas, edje colors are not pre-multiplied. That is, half-transparent white is 255 255 255 128.
- Parameters:
-
[in] obj A valid Evas_Object handle [in] color_class The color class name [in] r The object Red value [in] g The object Green value [in] b The object Blue value [in] a The object Alpha value [in] r2 The outline Red value [in] g2 The outline Green value [in] b2 The outline Blue value [in] a2 The outline Alpha value [in] r3 The shadow Red value [in] g3 The shadow Green value [in] b3 The shadow Blue value [in] a3 The shadow Alpha value
- Returns:
- EINA_TRUE if succeed, otherwise EINA_FALSE