Functions that deal with Color Classes. More...
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) |
Set Edje color class. More... | |
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) |
Get Edje color class. More... | |
void | edje_color_class_del (const char *color_class) |
Delete edje color class. More... | |
Eina_List * | edje_color_class_list (void) |
Lists color classes. More... | |
#define | edje_obj_color_class_set(color_class, r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_COLOR_CLASS_SET), EO_TYPECHECK(const char *, color_class), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a), EO_TYPECHECK(int, r2), EO_TYPECHECK(int, g2), EO_TYPECHECK(int, b2), EO_TYPECHECK(int, a2), EO_TYPECHECK(int, r3), EO_TYPECHECK(int, g3), EO_TYPECHECK(int, b3), EO_TYPECHECK(int, a3), EO_TYPECHECK(Eina_Bool *, ret) |
Sets the object color class. More... | |
#define | edje_obj_color_class_get(color_class, r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_COLOR_CLASS_GET), EO_TYPECHECK(const char *, color_class), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a), EO_TYPECHECK(int *, r2), EO_TYPECHECK(int *, g2), EO_TYPECHECK(int *, b2), EO_TYPECHECK(int *, a2), EO_TYPECHECK(int *, r3), EO_TYPECHECK(int *, g3), EO_TYPECHECK(int *, b3), EO_TYPECHECK(int *, a3), EO_TYPECHECK(Eina_Bool *, ret) |
Gets the object color class. More... | |
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. More... | |
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. More... | |
void | edje_object_color_class_del (Evas_Object *obj, const char *color_class) |
Delete the object color class. More... | |
Functions that deal with Color Classes.
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 will cause all these parts to have their colors multiplied by the values. Setting values to a color class at a process level will affect all parts with that color class, while at a object level will affect only the parts inside an specified object.
#define edje_obj_color_class_set | ( | color_class, | |
r, | |||
g, | |||
b, | |||
a, | |||
r2, | |||
g2, | |||
b2, | |||
a2, | |||
r3, | |||
g3, | |||
b3, | |||
a3, | |||
ret | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_COLOR_CLASS_SET), EO_TYPECHECK(const char *, color_class), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a), EO_TYPECHECK(int, r2), EO_TYPECHECK(int, g2), EO_TYPECHECK(int, b2), EO_TYPECHECK(int, a2), EO_TYPECHECK(int, r3), EO_TYPECHECK(int, g3), EO_TYPECHECK(int, b3), EO_TYPECHECK(int, a3), EO_TYPECHECK(Eina_Bool *, ret) |
Sets the object color class.
[in] | color_class | |
[in] | r | |
[in] | g | |
[in] | b | |
[in] | a | |
[in] | r2 | |
[in] | g2 | |
[in] | b2 | |
[in] | a2 | |
[in] | r3 | |
[in] | g3 | |
[in] | b3 | |
[in] | a3 | |
[out] | ret |
Referenced by edje_object_color_class_set().
#define edje_obj_color_class_get | ( | color_class, | |
r, | |||
g, | |||
b, | |||
a, | |||
r2, | |||
g2, | |||
b2, | |||
a2, | |||
r3, | |||
g3, | |||
b3, | |||
a3, | |||
ret | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_COLOR_CLASS_GET), EO_TYPECHECK(const char *, color_class), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a), EO_TYPECHECK(int *, r2), EO_TYPECHECK(int *, g2), EO_TYPECHECK(int *, b2), EO_TYPECHECK(int *, a2), EO_TYPECHECK(int *, r3), EO_TYPECHECK(int *, g3), EO_TYPECHECK(int *, b3), EO_TYPECHECK(int *, a3), EO_TYPECHECK(Eina_Bool *, ret) |
Gets the object color class.
[in] | color_class | |
[out] | r | |
[out] | g | |
[out] | b | |
[out] | a | |
[out] | r2 | |
[out] | g2 | |
[out] | b2 | |
[out] | a2 | |
[out] | r3 | |
[out] | g3 | |
[out] | b3 | |
[out] | a3 | |
[out] | ret |
Referenced by edje_object_color_class_get().
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 | ||
) |
Set Edje color class.
color_class | |
r | Object Red value |
g | Object Green value |
b | Object Blue value |
a | Object Alpha value |
r2 | Outline Red value |
g2 | Outline Green value |
b2 | Outline Blue value |
a2 | Outline Alpha value |
r3 | Shadow Red value |
g3 | Shadow Green value |
b3 | Shadow Blue value |
a3 | Shadow Alpha value |
This function sets the color values for a process level color class. This will cause all 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() will override the values set by this function).
The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts).
Setting color emits a signal "color_class,set" with source being the given color class in all objects.
References EAPI, EINA_FALSE, eina_hash_add(), eina_hash_find(), eina_hash_string_superfast_new(), eina_list_data_get(), eina_list_next(), eina_stringshare_add(), and EINA_TRUE.
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 | ||
) |
Get Edje color class.
color_class | |
r | Object Red value |
g | Object Green value |
b | Object Blue value |
a | Object Alpha value |
r2 | Outline Red value |
g2 | Outline Green value |
b2 | Outline Blue value |
a2 | Outline Alpha value |
r3 | Shadow Red value |
g3 | Shadow Green value |
b3 | Shadow Blue value |
a3 | Shadow Alpha value |
This function gets the color values for a process level color class. This value is the globally set and not per-object, that is, the value that would be used by objects if they did not override with edje_object_color_class_set().
The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts).
References EINA_FALSE, eina_hash_find(), and EINA_TRUE.
void edje_color_class_del | ( | const char * | color_class | ) |
Delete edje color class.
color_class | This function deletes any values at the process level for the specified color class. |
Deleting the color class will emit the signal "color_class,del" to all the Edje objects in the running program.
References eina_hash_del(), eina_hash_find(), eina_list_data_get(), eina_list_next(), eina_stringshare_del(), and EINA_TRUE.
Eina_List* edje_color_class_list | ( | void | ) |
Lists color classes.
This function lists all color classes known about by the current process.
References EAPI, eina_hash_foreach(), eina_list_append(), and EINA_TRUE.
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.
obj | A valid Evas_Object handle |
color_class | |
r | Object Red value |
g | Object Green value |
b | Object Blue value |
a | Object Alpha value |
r2 | Outline Red value |
g2 | Outline Green value |
b2 | Outline Blue value |
a2 | Outline Alpha value |
r3 | Shadow Red value |
g3 | Shadow Green value |
b3 | Shadow Blue value |
a3 | Shadow Alpha value |
This function sets the color values for an object level color class. This will cause all edje parts in the specified object that have the specified color class to have their colors multiplied by these values.
The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts).
Setting color emits a signal "color_class,set" with source being the given color.
References EAPI, edje_obj_color_class_set, EINA_FALSE, eina_hash_direct_add(), eina_hash_find(), eina_stringshare_add(), eina_stringshare_del(), and EINA_TRUE.
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.
o | A valid Evas_Object handle |
color_class | |
r | Object Red value |
g | Object Green value |
b | Object Blue value |
a | Object Alpha value |
r2 | Outline Red value |
g2 | Outline Green value |
b2 | Outline Blue value |
a2 | Outline Alpha value |
r3 | Shadow Red value |
g3 | Shadow Green value |
b3 | Shadow Blue value |
a3 | Shadow Alpha value |
This function gets the color values for an object level color class. If no explicit object color is set, then global values will be used.
The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts).
References edje_obj_color_class_get, EINA_FALSE, and EINA_TRUE.
void edje_object_color_class_del | ( | Evas_Object * | obj, |
const char * | color_class | ||
) |
Delete the object color class.
obj | The edje object's reference. |
color_class | The color class to be deleted. |
This function deletes any values at the object level for the specified object and color class.
Deleting the color class will emit the signal "color_class,del" for the given Edje object.
References EAPI, eina_hash_del(), and EINA_TRUE.