XApp.KbdLayoutController

g GObject.Object GObject.Object XApp.KbdLayoutController XApp.KbdLayoutController GObject.Object->XApp.KbdLayoutController

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

render_cairo_subscript (cr, x, y, width, height, subscript)

get_all_names ()

get_current_flag_id ()

get_current_group ()

get_current_icon_name ()

get_current_name ()

get_current_short_group_label ()

get_current_variant_label ()

get_enabled ()

get_flag_id_for_group (group)

get_icon_name_for_group (group)

get_short_group_label_for_group (group)

get_variant_label_for_group (group)

next_group ()

previous_group ()

set_current_group (group)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

enabled

bool

r

Whether we’re enabled (more than one keyboard layout is installed)

Signals

Inherited:

GObject.Object (1)

Name

Short Description

config-changed

layout-changed

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_object

GObject.Object

r

Class Details

class XApp.KbdLayoutController(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

XApp.KbdLayoutControllerClass

classmethod new()
Returns:

a new XApp.KbdLayoutController instance

Return type:

XApp.KbdLayoutController

Creates a new XApp.KbdLayoutController instance.

classmethod render_cairo_subscript(cr, x, y, width, height, subscript)
Parameters:
  • cr (cairo.Context) – a cairo.Context

  • x (float) – the x position of the drawing area

  • y (float) – the y position of the drawing area

  • width (float) – the width of the drawing area

  • height (float) – the height of the drawing area

  • subscript (int) – the number to render

Renders a subscript number in the given work area. This should be called from within a “draw” or “paint” widget/actor function, where a valid cairo.Context is provided to draw with.

get_all_names()
Returns:

array of names

Return type:

[str]

Returns an array of all full layout names

get_current_flag_id()
Returns:

the id

Return type:

int

Returns the duplicate id for the current layout

get_current_group()
Return type:

int

Selects the previous group in the group list.

get_current_icon_name()
Returns:

a new string with the icon name.

Return type:

str

Returns the icon file name (no path or extension) to use for the current layout

get_current_name()
Returns:

the newly created string or None if something went wrong.

Return type:

str

Returns the full name of the current keyboard layout.

get_current_short_group_label()
Returns:

a new string or None.

Return type:

str

Returns the short group label (and subscript, if any) of the current layout

get_current_variant_label()
Returns:

a new string or None.

Return type:

str

Returns the variant label (and subscript, if any) of the current layout

get_enabled()
Return type:

bool

Returns whether or not the layout controller is enabled

get_flag_id_for_group(group)
Parameters:

group (int) –

Return type:

int

get_icon_name_for_group(group)
Parameters:

group (int) – a group number

Returns:

a new string with the icon name.

Return type:

str

Returns the icon file name (no path or extension) to use for the specified layout.

get_short_group_label_for_group(group)
Parameters:

group (int) – a group number

Returns:

a new string or None.

Return type:

str

Returns the short group label and subscript of the specified layout.

get_variant_label_for_group(group)
Parameters:

group (int) – a group number

Returns:

a new string or None.

Return type:

str

Returns the variant label and subscript of the specified layout.

next_group()

Selects the next group in the group list.

previous_group()

Selects the previous group in the group list.

set_current_group(group)
Parameters:

group (int) – the group number to make active

Selects the given group number as active.

Signal Details

XApp.KbdLayoutController.signals.config_changed(kbd_layout_controller)
Signal Name:

config-changed

Flags:

RUN_LAST

Parameters:

kbd_layout_controller (XApp.KbdLayoutController) – The object which received the signal

XApp.KbdLayoutController.signals.layout_changed(kbd_layout_controller, object)
Signal Name:

layout-changed

Flags:

RUN_LAST

Parameters:

Property Details

XApp.KbdLayoutController.props.enabled
Name:

enabled

Type:

bool

Default Value:

False

Flags:

READABLE

Whether we’re enabled (more than one keyboard layout is installed)