Xkl.Engine¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Backend name |
||
r |
Default group |
||
r/w/co |
X |
||
r |
Backend features |
||
r |
Whether engine should handle indicators |
||
r |
Max number of groups |
||
r |
Current number of groups |
||
r |
Secondary groups mask |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Xkl.Engine(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod INT__LONG_LONG(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)¶
- Parameters:
closure (
GObject.Closure
) –return_value (
GObject.Value
) –n_param_values (
int
) –param_values (
GObject.Value
) –
- classmethod VOID__ENUM_INT_BOOLEAN(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)¶
- Parameters:
closure (
GObject.Closure
) –return_value (
GObject.Value
) –n_param_values (
int
) –param_values (
GObject.Value
) –
- classmethod get_instance(display)¶
- Parameters:
display (
xlib.Display
) – the X display used by the application- Returns:
the singleton instance
- Return type:
Get the instance of the
Xkl.Engine
. Within a process, there is always once instance.
- allow_one_switch_to_secondary_group()¶
Allows to switch (once) to the secondary group
- backup_names_prop()¶
-
Backups current XKB configuration into some property - if this property is not defined yet.
- delete_state(win)¶
- Parameters:
win (
int
) – target window
Drops the state of a given window (of its “App window”).
- filter_events(evt)¶
- Parameters:
evt (
xlib.XEvent
) – delivered X event- Returns:
0 if the event it processed - 1 otherwise
- Return type:
Processes X events. Should be included into the main event cycle of an application. One of the most important functions.
- get_backend_name()¶
- Returns:
some string id of the backend
- Return type:
What kind of backend is used
- get_current_state()¶
- Returns:
current state of the keyboard. Returned value is a statically allocated buffer, should not be freed.
- Return type:
- get_default_group()¶
- Returns:
the default group
- Return type:
Returns the default group set on window creation If -1, no default group is used
- get_features()¶
- Returns:
ORed XKLF_* constants
- Return type:
Provides information regarding available backend features (combination of XKLF_* constants)
- get_groups_names()¶
- Returns:
the array of group names for the current XKB configuration (keyboard). This array is static, should not be freed
- Return type:
[
str
]
- get_indicators_handling()¶
- Returns:
the value of the parameter: perform indicator handling
- Return type:
- get_indicators_names()¶
- Returns:
the array of indicator names for the current XKB configuration (keyboard). This array is static, should not be freed
- Return type:
[
str
]
- get_max_num_groups()¶
- Returns:
maximum number of the groups in configuration, 0 if no restrictions.
- Return type:
Provides the information on maximum number of simultaneously supported groups (layouts)
- get_next_group()¶
- Returns:
next group id
- Return type:
Calculates next group id. Does not change the state of anything.
- get_num_groups()¶
- Returns:
the total number of groups in the current configuration (keyboard)
- Return type:
- get_prev_group()¶
- Returns:
prev group id
- Return type:
Calculates prev group id. Does not change the state of anything.
- get_state(win, state_out)¶
- Parameters:
- Returns:
True
on success, otherwiseFalse
(the error message can be obtained using xkl_GetLastError).- Return type:
Finds the state for a given window (for its “App window”).
- get_window_title(win)¶
- is_group_per_toplevel_window()¶
- Returns:
the value of the parameter: group per application
- Return type:
- is_window_from_same_toplevel_window(win1, win2)¶
- Parameters:
- Returns:
True
is windows are in the same application- Return type:
Checks whether 2 windows have the same topmost window
- is_window_transparent(win)¶
- lock_group(group)¶
- Parameters:
group (
int
) – group number for locking
Locks the group. Can be used after xkl_GetXXXGroup functions
- save_state(win, state)¶
-
Stores ths state for a given window
- set_default_group(group)¶
- Parameters:
group (
int
) – default group
Configures the default group set on window creation. If -1, no default group is used
- set_group_per_toplevel_window(is_global)¶
- Parameters:
is_global (
bool
) – new parameter value
Sets the configuration parameter: group per application
- set_indicators_handling(whether_handle)¶
- Parameters:
whether_handle (
bool
) – new parameter value
Sets the configuration parameter: perform indicators handling
- set_secondary_groups_mask(mask)¶
- Parameters:
mask (
int
) – new group mask
Sets the secondary groups (one bit per group). Secondary groups require explicit “allowance” for switching
- set_window_transparent(win, transparent)¶
- Parameters:
Sets the “transparent” flag. It means focus switching onto this window will never change the state.
- start_listen(flags)¶
-
Starts listening for XKB-related events
- stop_listen(flags)¶
-
Stops listening for XKB-related events
- do_config_notify() virtual¶
- do_new_device_notify() virtual¶
- do_state_notify(change_type, group, restore) virtual¶
- Parameters:
change_type (
Xkl.EngineStateChange
) –group (
int
) –restore (
bool
) –
Signal Details¶
- Xkl.Engine.signals.X_config_changed(engine)¶
- Signal Name:
X-config-changed
- Flags:
- Parameters:
engine (
Xkl.Engine
) – The object which received the signal
- Xkl.Engine.signals.X_new_device(engine)¶
- Signal Name:
X-new-device
- Flags:
- Parameters:
engine (
Xkl.Engine
) – The object which received the signal
- Xkl.Engine.signals.X_state_changed(engine, object, p0, p1)¶
- Signal Name:
X-state-changed
- Flags:
- Parameters:
engine (
Xkl.Engine
) – The object which received the signalobject (
Xkl.EngineStateChange
) –p0 (
int
) –p1 (
bool
) –
Property Details¶
- Xkl.Engine.props.backendName¶
-
Backend name
- Xkl.Engine.props.default_group¶
-
Default group
- Xkl.Engine.props.display¶
- Name:
display
- Type:
- Default Value:
- Flags:
X
xlib.Display
pointer
- Xkl.Engine.props.features¶
- Name:
features
- Type:
- Default Value:
0
- Flags:
Backend features
- Xkl.Engine.props.indicators_handling¶
-
Whether engine should handle indicators
- Xkl.Engine.props.max_num_groups¶
-
Max number of groups
- Xkl.Engine.props.num_groups¶
-
Current number of groups