GnomeDesktop.XkbInfo

g GObject.Object GObject.Object GnomeDesktop.XkbInfo GnomeDesktop.XkbInfo GObject.Object->GnomeDesktop.XkbInfo

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

description_for_group (group_id)

description_for_option (group_id, id)

get_all_layouts ()

get_all_option_groups ()

get_languages_for_layout (layout_id)

get_layout_info (id)

get_layouts_for_country (country_code)

get_layouts_for_language (language_code)

get_options_for_group (group_id)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

layouts-changed

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_object

GObject.Object

r

Class Details

class GnomeDesktop.XkbInfo(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GnomeDesktop.XkbInfoClass

classmethod new()
Returns:

a new GnomeDesktop.XkbInfo instance.

Return type:

GnomeDesktop.XkbInfo

description_for_group(group_id)
Parameters:

group_id (str) – identifier for group

Returns:

the translated description for the group group_id.

Return type:

str

New in version 3.8.

description_for_option(group_id, id)
Parameters:
  • group_id (str) – identifier for group containing the option

  • id (str) – option identifier

Returns:

the translated description for the option id.

Return type:

str

New in version 3.6.

get_all_layouts()
Returns:

the list of layout names. The caller takes ownership of the GLib.List but not of the strings themselves, those are internally allocated and must not be modified.

Return type:

[str]

Returns a list of all layout identifiers we know about.

New in version 3.6.

get_all_option_groups()
Returns:

the list of option group ids. The caller takes ownership of the GLib.List but not of the strings themselves, those are internally allocated and must not be modified.

Return type:

[str]

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

New in version 3.6.

get_languages_for_layout(layout_id)
Parameters:

layout_id (str) – a layout identifier

Returns:

the list of ISO 639 code strings. The caller takes ownership of the GLib.List but not of the strings themselves, those are internally allocated and must not be modified.

Return type:

[str]

Returns a list of all languages supported by a layout, given by layout_id.

New in version 3.18.

get_layout_info(id)
Parameters:

id (str) – layout’s identifier about which to retrieve the info

Returns:

True if the layout exists or False otherwise.

display_name:

location to store the layout’s display name, or None

short_name:

location to store the layout’s short name, or None

xkb_layout:

location to store the layout’s XKB name, or None

xkb_variant:

location to store the layout’s XKB variant, or None

Return type:

(bool, display_name: str or None, short_name: str or None, xkb_layout: str or None, xkb_variant: str or None)

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 None.

New in version 3.6.

get_layouts_for_country(country_code)
Parameters:

country_code (str) – an ISO 3166 code string

Returns:

the list of layout ids. The caller takes ownership of the GLib.List but not of the strings themselves, those are internally allocated and must not be modified.

Return type:

[str]

Returns a list of all layout identifiers we know about for country_code.

New in version 3.8.

get_layouts_for_language(language_code)
Parameters:

language_code (str) – an ISO 639 code string

Returns:

the list of layout ids. The caller takes ownership of the GLib.List but not of the strings themselves, those are internally allocated and must not be modified.

Return type:

[str]

Returns a list of all layout identifiers we know about for language_code.

New in version 3.8.

get_options_for_group(group_id)
Parameters:

group_id (str) – group’s identifier about which to retrieve the options

Returns:

the list of option ids. The caller takes ownership of the GLib.List but not of the strings themselves, those are internally allocated and must not be modified.

Return type:

[str]

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

New in version 3.6.

Signal Details

GnomeDesktop.XkbInfo.signals.layouts_changed(xkb_info)
Signal Name:

layouts-changed

Flags:

RUN_FIRST

Parameters:

xkb_info (GnomeDesktop.XkbInfo) – The object which received the signal