Functions that deal with Text Classes. More...
Functions | |
Eina_Bool | edje_text_class_set (const char *text_class, const char *font, Evas_Font_Size size) |
Sets the Edje text class. More... | |
Eina_Bool | edje_text_class_get (const char *text_class, const char **font, Evas_Font_Size *size) |
Gets the font and the font size from Edje text class. More... | |
void | edje_text_class_del (const char *text_class) |
Deletes the text class. More... | |
Eina_List * | edje_text_class_list (void) |
Lists text classes. More... | |
Eina_Iterator * | edje_text_class_active_iterator_new (void) |
Iterate over all active classes of an application. More... | |
Eina_Iterator * | edje_mmap_text_class_iterator_new (Eina_File *f) |
Iterate over all text classes provided by an Edje file. More... | |
Eina_Bool | edje_object_text_class_set (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size) |
Sets Edje text class. More... | |
Eina_Bool | edje_object_text_class_get (const Evas_Object *obj, const char *text_class, const char **font, Evas_Font_Size *size) |
Gets font and font size from edje text class. More... | |
void | edje_object_text_class_del (Evas_Object *obj, const char *text_class) |
Delete the object text class. More... | |
Eina_Bool | edje_file_text_class_set (const char *file, const char *text_class, const char *font, Evas_Font_Size size) |
Sets Edje text class for edje file (if loaded) More... | |
Eina_Bool | edje_file_text_class_del (const char *file, const char *text_class) |
Delete the file text class. More... | |
Eina_Bool | edje_file_text_class_get (const char *file, const char *text_class, const char **font, Evas_Font_Size *size) |
Gets font and font size from edje file if loaded. More... | |
Functions that deal with Text Classes.
Sometimes we want to change the text of two or more parts equally and that's when we use text classes.
If one or more parts are assigned with a text class, when we set font attributes to this class will update all these parts with the new font attributes. Setting values to a text class at a process level will affect all parts with that text class, while at object level will affect only the parts inside an specified object.
Eina_Bool edje_text_class_set | ( | const char * | text_class, |
const char * | font, | ||
Evas_Font_Size | size | ||
) |
Sets the Edje text class.
text_class | The text class name |
font | The font name |
size | The font size |
EINA_TRUE
on success, or EINA_FALSE
on errorThis function updates all Edje members at the process level which belong to this text class with the new font attributes. If the size
is 0 then the font size will be kept with the previous size. If the size
is less then 0 then the font size will be calculated in the percentage. For example, if the size
is -50, then the font size will be scaled to half of the original size and if the size
is -10 then the font size will be scaled as much as 0.1x.
Eina_Bool edje_text_class_get | ( | const char * | text_class, |
const char ** | font, | ||
Evas_Font_Size * | size | ||
) |
Gets the font and the font size from Edje text class.
text_class | The text class name |
font | The font name |
size | The font size |
EINA_TRUE
on success, or EINA_FALSE
on errorThis function gets the font and the font name from the specified Edje text class. The font string will only be valid until the text class is changed or edje is shut down.
void edje_text_class_del | ( | const char * | text_class | ) |
Deletes the text class.
text_class | The text class name string |
This function deletes any values at the process level for the specified text class.
Eina_List * edje_text_class_list | ( | void | ) |
Lists text classes.
This function lists all text classes known about by the current process.
References eina_hash_foreach().
Eina_Iterator * edje_text_class_active_iterator_new | ( | void | ) |
Iterate over all active classes of an application.
This function only iterates over the Edje_Text_Class in use by an application.
References EINA_MAGIC_SET.
Eina_Iterator * edje_mmap_text_class_iterator_new | ( | Eina_File * | f | ) |
Iterate over all text classes provided by an Edje file.
f | The mapped edje file. |
References eina_hash_iterator_tuple_new(), and EINA_MAGIC_SET.
Eina_Bool edje_object_text_class_set | ( | Evas_Object * | obj, |
const char * | text_class, | ||
const char * | font, | ||
Evas_Font_Size | size | ||
) |
Sets Edje text class.
This function sets the text class for the Edje.
[in] | text_class | The text class name |
[in] | font | Font name |
[in] | size | Font Size |
true
, on success or false
, on error Eina_Bool edje_object_text_class_get | ( | const Evas_Object * | obj, |
const char * | text_class, | ||
const char ** | font, | ||
Evas_Font_Size * | size | ||
) |
Gets font and font size from edje text class.
This function gets the font and the font size from the object text class. The font string will only be valid until the text class is changed or the edje object is deleted.
[in] | text_class | The text class name |
[out] | font | Font name |
[out] | size | Font Size |
true
, on success or false
, on error void edje_object_text_class_del | ( | Evas_Object * | obj, |
const char * | text_class | ||
) |
Delete the object text class.
This function deletes any values at the object level for the specified object and text class.
Deleting the text class will revert it to the values defined by edje_text_class_set() or the text class defined in the theme file.
[in] | text_class | The color class to be deleted. |
Eina_Bool edje_file_text_class_set | ( | const char * | file, |
const char * | text_class, | ||
const char * | font, | ||
Evas_Font_Size | size | ||
) |
Sets Edje text class for edje file (if loaded)
This function sets the text class for All Edje Objects created from Edje file. (if edje file loaded before)
[in] | file | edje file path |
[in] | text_class | The text class name |
[in] | font | Font name |
[in] | size | Font Size |
true
, on success or false
, on error References EINA_FALSE, eina_hash_direct_add(), eina_hash_find(), eina_hash_string_small_new(), eina_stringshare_add(), eina_stringshare_replace(), and EINA_TRUE.
Eina_Bool edje_file_text_class_del | ( | const char * | file, |
const char * | text_class | ||
) |
Delete the file text class.
This function deletes any values at the file level for the specified file and text class.
[in] | text_class | The text class to be deleted. |
References EINA_FALSE, eina_hash_del(), eina_hash_find(), eina_stringshare_del(), and EINA_TRUE.
Eina_Bool edje_file_text_class_get | ( | const char * | file, |
const char * | text_class, | ||
const char ** | font, | ||
Evas_Font_Size * | size | ||
) |
Gets font and font size from edje file if loaded.
This function gets the font and the font size from the file text class.
[in] | text_class | The text class name |
[out] | font | Font name |
[out] | size | Font Size |
true
, on success or false
, on error References EINA_FALSE, eina_hash_find(), and EINA_TRUE.