| GNOME Desktop Library Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct GnomeXkbInfo; struct GnomeXkbInfoClass; GnomeXkbInfo * gnome_xkb_info_new (void); GList * gnome_xkb_info_get_all_layouts (GnomeXkbInfo *self); GList * gnome_xkb_info_get_layouts_for_country (GnomeXkbInfo *self,const gchar *country_code); GList * gnome_xkb_info_get_layouts_for_language (GnomeXkbInfo *self,const gchar *language_code); gboolean gnome_xkb_info_get_layout_info (GnomeXkbInfo *self,const gchar *id,const gchar **display_name,const gchar **short_name,const gchar **xkb_layout,const gchar **xkb_variant); GList * gnome_xkb_info_get_all_option_groups (GnomeXkbInfo *self); const gchar * gnome_xkb_info_description_for_group (GnomeXkbInfo *self,const gchar *group_id); GList * gnome_xkb_info_get_options_for_group (GnomeXkbInfo *self,const gchar *group_id); const gchar * gnome_xkb_info_description_for_option (GnomeXkbInfo *self,const gchar *group_id,const gchar *id); void gnome_xkb_info_get_var_defs (gchar **rules,XkbRF_VarDefsRec **var_defs); void gnome_xkb_info_free_var_defs (XkbRF_VarDefsRec *var_defs);
GnomeXkbInfo * gnome_xkb_info_new (void);
Returns : |
a new GnomeXkbInfo instance. [transfer full] |
GList * gnome_xkb_info_get_all_layouts (GnomeXkbInfo *self);
Returns a list of all layout identifiers we know about.
|
a GnomeXkbInfo |
Returns : |
the list of layout names. The caller takes ownership of the GList but not of the strings themselves, those are internally allocated and must not be modified. [transfer container][element-type utf8] |
Since 3.6
GList * gnome_xkb_info_get_layouts_for_country (GnomeXkbInfo *self,const gchar *country_code);
Returns a list of all layout identifiers we know about for
country_code.
|
a GnomeXkbInfo |
|
an ISO 3166 code string |
Returns : |
the list of layout ids. The caller takes ownership of the GList but not of the strings themselves, those are internally allocated and must not be modified. [transfer container][element-type utf8] |
Since 3.8
GList * gnome_xkb_info_get_layouts_for_language (GnomeXkbInfo *self,const gchar *language_code);
Returns a list of all layout identifiers we know about for
language_code.
|
a GnomeXkbInfo |
|
an ISO 639 code string |
Returns : |
the list of layout ids. The caller takes ownership of the GList but not of the strings themselves, those are internally allocated and must not be modified. [transfer container][element-type utf8] |
Since 3.8
gboolean gnome_xkb_info_get_layout_info (GnomeXkbInfo *self,const gchar *id,const gchar **display_name,const gchar **short_name,const gchar **xkb_layout,const gchar **xkb_variant);
Retrieves information about a layout. Both display_name and
short_name are suitable to show in UIs and might be localized if
translations are available.
Some layouts don't provide a short name (2 or 3 letters) or don't
specify a XKB variant, in those cases short_name or xkb_variant
are empty strings, i.e. "".
If the given layout doesn't exist the return value is FALSE and
all the (out) parameters are set to NULL.
|
a GnomeXkbInfo |
|
layout's identifier about which to retrieve the info |
|
location to store
the layout's display name, or NULL. [out][allow-none][transfer none]
|
|
location to store
the layout's short name, or NULL. [out][allow-none][transfer none]
|
|
location to store
the layout's XKB name, or NULL. [out][allow-none][transfer none]
|
|
location to store
the layout's XKB variant, or NULL. [out][allow-none][transfer none]
|
Returns : |
TRUE if the layout exists or FALSE otherwise. |
Since 3.6
GList * gnome_xkb_info_get_all_option_groups
(GnomeXkbInfo *self);
Returns a list of all option group identifiers we know about.
|
a GnomeXkbInfo |
Returns : |
the list of option group ids. The caller takes ownership of the GList but not of the strings themselves, those are internally allocated and must not be modified. [transfer container][element-type utf8] |
Since 3.6
const gchar * gnome_xkb_info_description_for_group (GnomeXkbInfo *self,const gchar *group_id);
|
a GnomeXkbInfo |
|
identifier for group |
Returns : |
the translated description for the group group_id. |
Since 3.8
GList * gnome_xkb_info_get_options_for_group (GnomeXkbInfo *self,const gchar *group_id);
Returns a list of all option identifiers we know about for group
group_id.
|
a GnomeXkbInfo |
|
group's identifier about which to retrieve the options |
Returns : |
the list of option ids. The caller takes ownership of the GList but not of the strings themselves, those are internally allocated and must not be modified. [transfer container][element-type utf8] |
Since 3.6
const gchar * gnome_xkb_info_description_for_option (GnomeXkbInfo *self,const gchar *group_id,const gchar *id);
|
a GnomeXkbInfo |
|
identifier for group containing the option |
|
option identifier |
Returns : |
the translated description for the option id. |
Since 3.6
void gnome_xkb_info_get_var_defs (gchar **rules,XkbRF_VarDefsRec **var_defs);
Gets both the XKB rules file path and the current XKB parameters in use by the X server.
|
location to store the rules file
path. Use g_free() when it's no longer needed. [out][transfer full]
|
|
location to store a
XkbRF_VarDefsRec pointer. Use gnome_xkb_info_free_var_defs() to
free it. [out][transfer full]
|
Since 3.6
void gnome_xkb_info_free_var_defs (XkbRF_VarDefsRec *var_defs);
Frees an XkbRF_VarDefsRec instance allocated by
gnome_xkb_info_get_var_defs().
|
XkbRF_VarDefsRec instance to free |
Since 3.6