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... | |
Eina_Iterator * | edje_color_class_active_iterator_new (void) |
Iterate over all the active class of an application. More... | |
Eina_Iterator * | edje_mmap_color_class_iterator_new (Eina_File *f) |
Iterate over all the color class provided by an Edje file. 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.
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 EINA_FALSE, and eina_hash_string_superfast_new().
Referenced by elm_color_class_editor_add().
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_hash_find().
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_hash_iterator_data_new(), EINA_ITERATOR_FOREACH, eina_iterator_free(), 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 _Eina_Hash_Tuple::data, EINA_FALSE, eina_hash_find(), eina_hash_foreach(), eina_hash_iterator_data_new(), eina_iterator_free(), eina_iterator_next(), EINA_MAGIC_SET, EINA_TRUE, and _Eina_Hash_Tuple::key.
Eina_Iterator* edje_color_class_active_iterator_new | ( | void | ) |
Iterate over all the active class of an application.
This function only iterate over the Edje_Color_Class in use by an application.
References eina_hash_iterator_tuple_new(), eina_list_append(), EINA_MAGIC_SET, and EINA_TRUE.
Referenced by elm_color_class_editor_add().
Eina_Iterator* edje_mmap_color_class_iterator_new | ( | Eina_File * | f | ) |
Iterate over all the color class provided by an Edje file.
References eina_hash_iterator_tuple_new(), and EINA_MAGIC_SET.