Top | ![]() |
![]() |
![]() |
![]() |
ezfc_config_t * | ezfc_config_new () |
ezfc_config_t * | ezfc_config_ref () |
void | ezfc_config_unref () |
void | ezfc_config_set_priority () |
gint | ezfc_config_get_priority () |
void | ezfc_config_set_name () |
const gchar * | ezfc_config_get_name () |
gboolean | ezfc_config_add_alias () |
gboolean | ezfc_config_remove_alias () |
gboolean | ezfc_config_remove_aliases () |
gboolean | ezfc_config_add_font () |
gboolean | ezfc_config_remove_font () |
gboolean | ezfc_config_remove_fonts () |
gboolean | ezfc_config_add_subst () |
gboolean | ezfc_config_remove_subst () |
gboolean | ezfc_config_remove_substs () |
GList * | ezfc_config_get_language_list () |
const GList * | ezfc_config_get_aliases () |
GList * | ezfc_config_get_fonts () |
GList * | ezfc_config_get_subst_family () |
const GList * | ezfc_config_get_substs () |
gboolean | ezfc_config_load () |
gboolean | ezfc_config_save () |
GString * | ezfc_config_save_to_buffer () |
void | ezfc_config_dump () |
void | ezfc_config_set_migration () |
This class provides an easy access to assign an instance of ezfc_alias_t to a language and to read/write the configuration file.
ezfc_config_t *
ezfc_config_new (void
);
Create a new instance of a ezfc_config_t.
ezfc_config_t *
ezfc_config_ref (ezfc_config_t *config
);
Increases the refernce count of config
.
void
ezfc_config_unref (ezfc_config_t *config
);
Decreases the reference count of config
. when its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
void ezfc_config_set_priority (ezfc_config_t *config
,guint priority
);
Set priority
to config
instance.
gint
ezfc_config_get_priority (ezfc_config_t *config
);
Obtains the priority number in config
.
void ezfc_config_set_name (ezfc_config_t *config
,const gchar *name
);
Set name
as the additional configuration name. this is an optional to
make the change in the filename for output.
const gchar *
ezfc_config_get_name (ezfc_config_t *config
);
Obtains the configuration name that is set by ezfc_config_set_name()
.
gboolean ezfc_config_add_alias (ezfc_config_t *config
,const gchar *language
,ezfc_alias_t *alias
);
Add a alias
font for language
language. if giving NULL
to language
,
alias
takes effect for any languages.
config |
||
language |
a language name to add |
[allow-none] |
alias |
a ezfc_alias_t. |
gboolean ezfc_config_remove_alias (ezfc_config_t *config
,const gchar *language
,const gchar *alias_name
);
Removes alias_name
assigned for language
language from config
.
gboolean ezfc_config_remove_aliases (ezfc_config_t *config
,const gchar *language
);
Removes all of aliases assigned for language
language from config
.
gboolean ezfc_config_add_font (ezfc_config_t *config
,ezfc_font_t *font
);
Add a font font to generate non-language-specific, non-alias-specific rules.
gboolean ezfc_config_remove_font (ezfc_config_t *config
,const gchar *family
);
Remove a ezfc_font_t instance corresponding to family
.
gboolean
ezfc_config_remove_fonts (ezfc_config_t *config
);
Remove all of fonts from config
, which added by ezfc_config_add_font()
.
gboolean ezfc_config_add_subst (ezfc_config_t *config
,const gchar *family_name
,ezfc_font_t *subst
);
Add a subst font as a substitute font for family_name
.
config |
||
family_name |
a family name to be substituted. |
|
subst |
a ezfc_font_t for substitute font |
Since: 0.11
gboolean ezfc_config_remove_subst (ezfc_config_t *config
,const gchar *family_name
,const gchar *subst_name
);
Remove subst_name
from the substitute font list of family_name
.
Since: 0.11
gboolean ezfc_config_remove_substs (ezfc_config_t *config
,const gchar *family_name
);
Remove all of substitute font list of family_name
.
Since: 0.11
GList *
ezfc_config_get_language_list (ezfc_config_t *config
);
Obtains the list of languages registered by ezfc_config_add_alias()
in config
.
const GList * ezfc_config_get_aliases (ezfc_config_t *config
,const gchar *language
);
Obtains the list of ezfc_alias_t in ezfc_config_t instance.
GList *
ezfc_config_get_fonts (ezfc_config_t *config
);
Obtains the list of ezfc_font_t in config
.
GList *
ezfc_config_get_subst_family (ezfc_config_t *config
);
Obtains the list of the family name being substituted
Since: 0.11
const GList * ezfc_config_get_substs (ezfc_config_t *config
,const gchar *family_name
);
Obtains the list of ezfc_font_t to be substituted for family_name
.
Since: 0.11
gboolean ezfc_config_load (ezfc_config_t *config
,GError **error
);
Read the configuration file and rebuild the object.
You have to invoke ezfc_config_set_priority()
and ezfc_config_set_name()
first to read the appropriate configuration file.
gboolean ezfc_config_save (ezfc_config_t *config
,GError **error
);
Write the data to the configuration file. you may want to invoke
ezfc_config_set_priority()
and ezfc_config_set_name()
first to
write it to the appropriate configuration file.
GString * ezfc_config_save_to_buffer (ezfc_config_t *config
,GError **error
);
Write the data to the buffer.
void
ezfc_config_dump (ezfc_config_t *config
);
Output the object data to the standard output.
void ezfc_config_set_migration (ezfc_config_t *config
,gboolean flag
);
Set a flag to migrate the configuration file on the older place to
the new one where XDG Base Directory Specification defines.
If flag
is TRUE
, ezfc_config_load()
will tries to read the config
file from the old path prior to new place and the old file will be
removed during ezfc_config_save()
.
This feature is enabled by default.
Since: 0.8
typedef struct _ezfc_config_t ezfc_config_t;
All the fields in the ezfc_config_t structure are private to the ezfc_config_t implementation.