Xkl.ConfigRegistry¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Xkl.ConfigRegistry(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- 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:
Create new XklConfig
- find_layout(item)¶
- Parameters:
item (
Xkl.ConfigItem) – pointer to aXkl.ConfigItemcontaining the name of the keyboard layout. On successfull return, the descriptions are filled.- Returns:
Trueif appropriate element was found and loaded- Return type:
Loads a keyboard layout information from the XML configuration registry.
- find_model(item)¶
- Parameters:
item (
Xkl.ConfigItem) – pointer to aXkl.ConfigItemcontaining the name of the keyboard model. On successfull return, the descriptions are filled.- Returns:
Trueif appropriate element was found and loaded- Return type:
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 groupitem (
Xkl.ConfigItem) – pointer to aXkl.ConfigItemcontaining the name of the keyboard option. On successfull return, the descriptions are filled.
- Returns:
Trueif appropriate element was found and loaded- Return type:
Loads a keyboard option information from the XML configuration registry.
- find_option_group(item)¶
- Parameters:
item (
Xkl.ConfigItem) – pointer to aXkl.ConfigItemcontaining the name of the keyboard option group. On successfull return, the descriptions are filled.- Returns:
Trueif appropriate element was found and loaded- Return type:
Loads a keyboard option group information from the XML configuration registry.
- find_variant(layout_name, item)¶
- Parameters:
layout_name (
str) – name of the parent layoutitem (
Xkl.ConfigItem) – pointer to aXkl.ConfigItemcontaining the name of the keyboard layout variant. On successfull return, the descriptions are filled.
- Returns:
Trueif appropriate element was found and loaded- Return type:
Loads a keyboard layout variant information from the XML configuration registry.
- foreach_country(func, *data)¶
- Parameters:
func (
Xkl.ConfigItemProcessFunc) – callback to call for every ISO 3166 country codedata (
objectorNone) – anything which can be stored into the pointer
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 listedfunc (
Xkl.TwoConfigItemsProcessFunc) – callback to call for every country variantdata (
objectorNone) – 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:
func (
Xkl.ConfigItemProcessFunc) – callback to call for every ISO 639-2 country codedata (
objectorNone) – anything which can be stored into the pointer
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 listedfunc (
Xkl.TwoConfigItemsProcessFunc) – callback to call for every country variantdata (
objectorNone) – 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:
func (
Xkl.ConfigItemProcessFunc) – callback to call for every layoutdata (
objectorNone) – anything which can be stored into the pointer
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 listedfunc (
Xkl.ConfigItemProcessFunc) – callback to call for every layout variantdata (
objectorNone) – anything which can be stored into the pointer
Enumerates keyboard layout variants from the XML configuration registry
- foreach_model(func, *data)¶
- Parameters:
func (
Xkl.ConfigItemProcessFunc) – callback to call for every modeldata (
objectorNone) – anything which can be stored into the pointer
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 listedfunc (
Xkl.ConfigItemProcessFunc) – callback to call for every optiondata (
objectorNone) – anything which can be stored into the pointer
Enumerates keyboard options from the XML configuration registry
- foreach_option_group(func, *data)¶
- Parameters:
func (
Xkl.ConfigItemProcessFunc) – callback to call for every option groupdata (
objectorNone) – anything which can be stored into the pointer
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:
Trueon success- Return type:
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:
func (
Xkl.TwoConfigItemsProcessFunc) – callback to call for every matching layout/variantdata (
objectorNone) – anything which can be stored into the pointer
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:
- Default Value:
- Flags: