forked from enlightenment/efl
add missing edit method: edje_edit_font_path_get()
SVN revision: 54836
This commit is contained in:
parent
1c9b6a174b
commit
999737f657
|
@ -2316,6 +2316,18 @@ EAPI Eina_Bool edje_edit_font_add(Evas_Object *obj, const char *path, const char
|
|||
*/
|
||||
EAPI Eina_Bool edje_edit_font_del(Evas_Object *obj, const char* alias);
|
||||
|
||||
/** Get font path for a given font alias.
|
||||
*
|
||||
* Remember to free the string with edje_edit_string_free()
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
* @param alias The font alias.
|
||||
*
|
||||
* @return The path of the given font alias.
|
||||
*/
|
||||
EAPI const char *edje_edit_font_path_get(Evas_Object *obj, const char *alias);
|
||||
|
||||
|
||||
/** Get font name for a given part state.
|
||||
*
|
||||
* Remember to free the returned string using edje_edit_string_free().
|
||||
|
|
|
@ -4317,6 +4317,34 @@ edje_edit_font_del(Evas_Object *obj, const char* alias)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
edje_edit_font_path_get(Evas_Object *obj, const char *alias)
|
||||
{
|
||||
Eina_Iterator *it;
|
||||
Edje_Font_Directory_Entry *f;
|
||||
const char *str = NULL;
|
||||
|
||||
eina_error_set(0);
|
||||
|
||||
if (!alias) return NULL;
|
||||
GET_ED_OR_RETURN(NULL);
|
||||
|
||||
if (!ed->file || !ed->file->fonts) return NULL;
|
||||
|
||||
it = eina_hash_iterator_data_new(ed->file->fonts);
|
||||
if (!it) return NULL;
|
||||
|
||||
EINA_ITERATOR_FOREACH(it, f)
|
||||
if (!strcmp(f->entry, alias))
|
||||
{
|
||||
str = f->file;
|
||||
break;
|
||||
}
|
||||
|
||||
eina_iterator_free(it);
|
||||
return eina_stringshare_add(str);
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
edje_edit_state_font_get(Evas_Object *obj, const char *part, const char *state, double value)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue