Xkl.ConfigRec

g GObject.Object GObject.Object Xkl.ConfigRec Xkl.ConfigRec GObject.Object->Xkl.ConfigRec

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

write_to_file (engine, file_name, data, binary)

activate (engine)

equals (data2)

get_from_backup (engine)

get_from_root_window_property (rules_atom_name, rules_file_out, engine)

get_from_server (engine)

reset ()

set_layouts (new_layouts)

set_model (new_model)

set_options (new_options)

set_to_root_window_property (rules_atom_name, rules_file, engine)

set_variants (new_variants)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

layouts

[str]

r

model

str

r

options

[str]

r

parent

GObject.Object

r

variants

[str]

r

Class Details

class Xkl.ConfigRec(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Xkl.ConfigRecClass

classmethod new()
Returns:

new instance

Return type:

Xkl.ConfigRec

Create new Xkl.ConfigRec

classmethod write_to_file(engine, file_name, data, binary)
Parameters:
  • engine (Xkl.Engine) – the engine

  • file_name (str) – name of the file to create

  • data (Xkl.ConfigRec) – valid XKB configuration description. Can be None

  • binary (bool) – flag indicating whether the output file should be binary

Returns:

True on success

Return type:

bool

Writes some XKB configuration into XKM/XKB/… file

activate(engine)
Parameters:

engine (Xkl.Engine) – the engine

Returns:

True on success

Return type:

bool

Activates some XKB configuration description. Can be None

equals(data2)
Parameters:

data2 (Xkl.ConfigRec) – another record

Returns:

True if records are same

Return type:

bool

Compares two records

get_from_backup(engine)
Parameters:

engine (Xkl.Engine) – the engine

Returns:

True on success

Return type:

bool

Loads the current XKB configuration (from backup)

get_from_root_window_property(rules_atom_name, rules_file_out, engine)
Parameters:
  • rules_atom_name (int) – atom name of the root window property to read

  • rules_file_out (str) – pointer to hold the file name

  • engine (Xkl.Engine) – the engine

Returns:

True on success

Return type:

bool

Gets the XKB configuration from any root window property

get_from_server(engine)
Parameters:

engine (Xkl.Engine) – the engine

Returns:

True on success

Return type:

bool

Loads the current XKB configuration (from X server)

reset()

Resets the record (equal to Destroy and Init)

set_layouts(new_layouts)
Parameters:

new_layouts ([str]) – zero terminated list of new layout names.

Sets a new layout list.

Frees the previous layout list. This is primarily useful for bindings, in C you can manipulate the layouts record member directly.

set_model(new_model)
Parameters:

new_model (str) – new keyboard name.

Sets a new model.

Frees the previous model. This is primarily useful for bindings, in C you can manipulate the model record member directly.

set_options(new_options)
Parameters:

new_options ([str]) – zero terminated list of new option names.

Sets a new option list.

Frees the previous option list. This is primarily useful for bindings, in C you can manipulate the options record member directly.

set_to_root_window_property(rules_atom_name, rules_file, engine)
Parameters:
  • rules_atom_name (int) – atom name of the root window property to write

  • rules_file (str) – rules file name

  • engine (Xkl.Engine) – the engine

Returns:

True on success

Return type:

bool

Saves the XKB configuration into any root window property

set_variants(new_variants)
Parameters:

new_variants ([str]) – zero terminated list of new variant names.

Sets a new variant list.

Frees the previous variant list. This is primarily useful for bindings, in C you can manipulate the variants record member directly.