Xkl.ConfigRegistry

g GObject.Object GObject.Object Xkl.ConfigRegistry Xkl.ConfigRegistry GObject.Object->Xkl.ConfigRegistry

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_instance (engine)

find_layout (item)

find_model (item)

find_option (option_group_name, item)

find_option_group (item)

find_variant (layout_name, item)

foreach_country (func, *data)

foreach_country_variant (country_code, func, *data)

foreach_language (func, *data)

foreach_language_variant (language_code, func, *data)

foreach_layout (func, *data)

foreach_layout_variant (layout_name, func, *data)

foreach_model (func, *data)

foreach_option (option_group_name, func, *data)

foreach_option_group (func, *data)

load (if_extras_needed)

search_by_pattern (pattern, func, *data)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

engine

Xkl.Engine

r/w/co

Xkl.Engine

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Xkl.ConfigRegistry(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Xkl.ConfigRegistryClass

classmethod get_instance(engine)
Parameters:

engine (Xkl.Engine) – the engine to use for accessing X in all the operations (like accessing root window properties etc)

Returns:

new instance

Return type:

Xkl.ConfigRegistry

Create new XklConfig

find_layout(item)
Parameters:

item (Xkl.ConfigItem) – pointer to a Xkl.ConfigItem containing the name of the keyboard layout. On successfull return, the descriptions are filled.

Returns:

True if appropriate element was found and loaded

Return type:

bool

Loads a keyboard layout information from the XML configuration registry.

find_model(item)
Parameters:

item (Xkl.ConfigItem) – pointer to a Xkl.ConfigItem containing the name of the keyboard model. On successfull return, the descriptions are filled.

Returns:

True if appropriate element was found and loaded

Return type:

bool

Loads a keyboard model information from the XML configuration registry.

find_option(option_group_name, item)
Parameters:
  • option_group_name (str) – name of the option group

  • item (Xkl.ConfigItem) – pointer to a Xkl.ConfigItem containing the name of the keyboard option. On successfull return, the descriptions are filled.

Returns:

True if appropriate element was found and loaded

Return type:

bool

Loads a keyboard option information from the XML configuration registry.

find_option_group(item)
Parameters:

item (Xkl.ConfigItem) – pointer to a Xkl.ConfigItem containing the name of the keyboard option group. On successfull return, the descriptions are filled.

Returns:

True if appropriate element was found and loaded

Return type:

bool

Loads a keyboard option group information from the XML configuration registry.

find_variant(layout_name, item)
Parameters:
  • layout_name (str) – name of the parent layout

  • item (Xkl.ConfigItem) – pointer to a Xkl.ConfigItem containing the name of the keyboard layout variant. On successfull return, the descriptions are filled.

Returns:

True if appropriate element was found and loaded

Return type:

bool

Loads a keyboard layout variant information from the XML configuration registry.

foreach_country(func, *data)
Parameters:

Enumerates countries for which layouts are available, from the XML configuration registry

foreach_country_variant(country_code, func, *data)
Parameters:
  • country_code (str) – country ISO code for which variants will be listed

  • func (Xkl.TwoConfigItemsProcessFunc) – callback to call for every country variant

  • data (object or None) – anything which can be stored into the pointer

Enumerates keyboard layout variants for the country, from the XML configuration registry

foreach_language(func, *data)
Parameters:

Enumerates languages for which layouts are available, from the XML configuration registry

foreach_language_variant(language_code, func, *data)
Parameters:
  • language_code (str) – language ISO code for which variants will be listed

  • func (Xkl.TwoConfigItemsProcessFunc) – callback to call for every country variant

  • data (object or None) – anything which can be stored into the pointer

Enumerates keyboard layout variants for the language, from the XML configuration registry

foreach_layout(func, *data)
Parameters:

Enumerates keyboard layouts from the XML configuration registry

foreach_layout_variant(layout_name, func, *data)
Parameters:
  • layout_name (str) – layout name for which variants will be listed

  • func (Xkl.ConfigItemProcessFunc) – callback to call for every layout variant

  • data (object or None) – anything which can be stored into the pointer

Enumerates keyboard layout variants from the XML configuration registry

foreach_model(func, *data)
Parameters:

Enumerates keyboard models from the XML configuration registry

foreach_option(option_group_name, func, *data)
Parameters:
  • option_group_name (str) – option group name for which variants will be listed

  • func (Xkl.ConfigItemProcessFunc) – callback to call for every option

  • data (object or None) – anything which can be stored into the pointer

Enumerates keyboard options from the XML configuration registry

foreach_option_group(func, *data)
Parameters:

Enumerates keyboard option groups from the XML configuration registry

load(if_extras_needed)
Parameters:

if_extras_needed (bool) – whether exotic materials (layouts, options) should be loaded as well

Returns:

True on success

Return type:

bool

Loads XML configuration registry. The name is taken from X server (for XKB/libxkbfile, from the root window property)

search_by_pattern(pattern, func, *data)
Parameters:

Enumerates keyboard layout/variants that match the pattern. The layout/variant is considered as matching if one of the following is true:

Country description (from the country list or name) contains pattern as substring

Language description (from the language list or name) contains pattern as substring

Property Details

Xkl.ConfigRegistry.props.engine
Name:

engine

Type:

Xkl.Engine

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Xkl.Engine