GnomeXkbInfo

GnomeXkbInfo

Synopsis

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);

Object Hierarchy

  GObject
   +----GnomeXkbInfo

Description

Details

struct GnomeXkbInfo

struct GnomeXkbInfo;


struct GnomeXkbInfoClass

struct GnomeXkbInfoClass {
  GObjectClass parent_class;
};


gnome_xkb_info_new ()

GnomeXkbInfo *      gnome_xkb_info_new                  (void);

Returns :

a new GnomeXkbInfo instance. [transfer full]

gnome_xkb_info_get_all_layouts ()

GList *             gnome_xkb_info_get_all_layouts      (GnomeXkbInfo *self);

Returns a list of all layout identifiers we know about.

self :

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


gnome_xkb_info_get_layouts_for_country ()

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.

self :

a GnomeXkbInfo

country_code :

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


gnome_xkb_info_get_layouts_for_language ()

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.

self :

a GnomeXkbInfo

language_code :

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


gnome_xkb_info_get_layout_info ()

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.

self :

a GnomeXkbInfo

id :

layout's identifier about which to retrieve the info

display_name :

location to store the layout's display name, or NULL. [out][allow-none][transfer none]

short_name :

location to store the layout's short name, or NULL. [out][allow-none][transfer none]

xkb_layout :

location to store the layout's XKB name, or NULL. [out][allow-none][transfer none]

xkb_variant :

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


gnome_xkb_info_get_all_option_groups ()

GList *             gnome_xkb_info_get_all_option_groups
                                                        (GnomeXkbInfo *self);

Returns a list of all option group identifiers we know about.

self :

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


gnome_xkb_info_description_for_group ()

const gchar *       gnome_xkb_info_description_for_group
                                                        (GnomeXkbInfo *self,
                                                         const gchar *group_id);

self :

a GnomeXkbInfo

group_id :

identifier for group

Returns :

the translated description for the group group_id.

Since 3.8


gnome_xkb_info_get_options_for_group ()

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.

self :

a GnomeXkbInfo

group_id :

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


gnome_xkb_info_description_for_option ()

const gchar *       gnome_xkb_info_description_for_option
                                                        (GnomeXkbInfo *self,
                                                         const gchar *group_id,
                                                         const gchar *id);

self :

a GnomeXkbInfo

group_id :

identifier for group containing the option

id :

option identifier

Returns :

the translated description for the option id.

Since 3.6


gnome_xkb_info_get_var_defs ()

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.

rules :

location to store the rules file path. Use g_free() when it's no longer needed. [out][transfer full]

var_defs :

location to store a XkbRF_VarDefsRec pointer. Use gnome_xkb_info_free_var_defs() to free it. [out][transfer full]

Since 3.6


gnome_xkb_info_free_var_defs ()

void                gnome_xkb_info_free_var_defs        (XkbRF_VarDefsRec *var_defs);

Frees an XkbRF_VarDefsRec instance allocated by gnome_xkb_info_get_var_defs().

var_defs :

XkbRF_VarDefsRec instance to free

Since 3.6