Revert "elm_multibuttonentry_item_filter_del -> elm_multibuttonentry_item_filter_remove"
[framework/uifw/elementary.git] / src / lib / elm_fonts.h
1 /**
2  * @defgroup Fonts Elementary Fonts
3  *
4  * These are functions dealing with font rendering, selection and the
5  * like for Elementary applications. One might fetch which system
6  * fonts are there to use and set custom fonts for individual classes
7  * of UI items containing text (text classes).
8  *
9  * @{
10  */
11
12 typedef struct _Elm_Font_Properties
13 {
14    const char *name;
15    Eina_List  *styles;
16 } Elm_Font_Properties;
17
18 /**
19  * Translate a font (family) name string in fontconfig's font names
20  * syntax into an @c Elm_Font_Properties struct.
21  *
22  * @param font The font name and styles string
23  * @return the font properties struct
24  *
25  * @ingroup Fonts
26  *
27  * @note The reverse translation can be achieved with
28  * elm_font_fontconfig_name_get(), for one style only (single font
29  * instance, not family).
30  */
31 EAPI Elm_Font_Properties *elm_font_properties_get(const char *font);
32
33 /**
34  * Free font properties return by elm_font_properties_get().
35  *
36  * @param efp the font properties struct
37  *
38  * @ingroup Fonts
39  */
40 EAPI void             elm_font_properties_free(Elm_Font_Properties *efp);
41
42 /**
43  * Translate a font name, bound to a style, into fontconfig's font names
44  * syntax.
45  *
46  * @param name The font (family) name
47  * @param style The given style (may be @c NULL)
48  *
49  * @return the font name and style string
50  *
51  * @ingroup Fonts
52  *
53  * @note The reverse translation can be achieved with
54  * elm_font_properties_get(), for one style only (single font
55  * instance, not family).
56  */
57 EAPI char      *elm_font_fontconfig_name_get(const char *name, const char *style);
58
59 /**
60  * Free the font string return by elm_font_fontconfig_name_get().
61  *
62  * @param name the font properties struct
63  *
64  * @ingroup Fonts
65  */
66 EAPI void             elm_font_fontconfig_name_free(char *name);
67
68 /**
69  * Create a font hash table of available system fonts.
70  *
71  * One must call it with @p list being the return value of
72  * evas_font_available_list(). The hash will be indexed by font
73  * (family) names, being its values @c Elm_Font_Properties blobs.
74  *
75  * @param list The list of available system fonts, as returned by
76  * evas_font_available_list().
77  * @return the font hash.
78  *
79  * @ingroup Fonts
80  *
81  * @note The user is supposed to get it populated at least with 3
82  * default font families (Sans, Serif, Monospace), which should be
83  * present on most systems.
84  */
85 EAPI Eina_Hash       *elm_font_available_hash_add(Eina_List *list);
86
87 /**
88  * Free the hash returned by elm_font_available_hash_add().
89  *
90  * @param hash the hash to be freed.
91  *
92  * @ingroup Fonts
93  */
94 EAPI void             elm_font_available_hash_del(Eina_Hash *hash);
95
96 /**
97  * @}
98  */