libxkbcommon 1.13.0
Library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state
Loading...
Searching...
No Matches
Data Fields | Private Attributes
xkb_state_components_update Struct Reference

#include <xkbcommon.h>

Data Fields

size_t size
 
uint32_t components
 
xkb_mod_mask_t affect_latched_mods
 
xkb_mod_mask_t latched_mods
 
xkb_mod_mask_t affect_locked_mods
 
xkb_mod_mask_t locked_mods
 
int32_t latched_layout
 
int32_t locked_layout
 
uint32_t affect_controls
 
uint32_t controls
 

Private Attributes

uint32_t reserved
 

Detailed Description

Latched and locked state components for an out-of-band state update.

Carries the modifier, layout and boolean controls assignments for xkb_state_update. Used to update latched and locked modifiers and layouts atomically via xkb_machine::xkb_machine_process_synthetic().

Which fields are considered is determined by components:

Note
This struct uses a size-based versioning scheme to allow forward and compatibility between callers and the library:
Older callers (smaller struct)
Trailing fields unknown to the caller default to zero in the library.
Newer callers (larger struct)
Accepted only if all trailing bytes unknown to the library are zero.
Precondition
The struct MUST be initialized with memset() before setting any fields:
memset(&update, 0, sizeof(update));
update.size = sizeof(update);
update.components = …;
Latched and locked state components for an out-of-band state update.
Definition xkbcommon.h:3401
Invariant
size MUST be explicitly set to sizeof(struct xkb_state_components_update).
All bytes of the struct, including padding, MUST remain zero except for explicitly assigned fields.
Since
1.14.0
See also
xkb_state_update

Field Documentation

◆ size

size_t xkb_state_components_update::size

Size of this structure, for forward-compatibility.

See also
XKB_ERROR_ABI_INVALID_STRUCT_SIZE
XKB_ERROR_ABI_BACKWARD_COMPAT
XKB_ERROR_ABI_FORWARD_COMPAT
Since
1.14.0

◆ components

uint32_t xkb_state_components_update::components

Mask of state components to update.

The following components are meaningful:

Other components are ignored.

See also
xkb_state_component
Since
1.14.0

◆ affect_latched_mods

xkb_mod_mask_t xkb_state_components_update::affect_latched_mods

Mask of latched modifiers to affect.

Only modifiers present in this mask are considered when updating latched_mods. Only considered if XKB_STATE_MODS_LATCHED is set in components.

Since
1.14.0

◆ latched_mods

xkb_mod_mask_t xkb_state_components_update::latched_mods

Modifiers to set as latched or unlatched.

Only modifiers in affect_latched_mods are considered. Only considered if XKB_STATE_MODS_LATCHED is set in components.

Since
1.14.0

◆ affect_locked_mods

xkb_mod_mask_t xkb_state_components_update::affect_locked_mods

Mask of locked modifiers to affect.

Only modifiers present in this mask are considered when updating locked_mods. Only considered if XKB_STATE_MODS_LOCKED is set in components.

Since
1.14.0

◆ locked_mods

xkb_mod_mask_t xkb_state_components_update::locked_mods

Modifiers to set as locked or unlocked.

Only modifiers in affect_locked_mods are considered. Only considered if XKB_STATE_MODS_LOCKED is set in components.

Since
1.14.0

◆ latched_layout

int32_t xkb_state_components_update::latched_layout

Layout to latch.

May be out of range (including negative); the layout is brought into range according to the current out-of-range layout policy. Only considered if XKB_STATE_LAYOUT_LATCHED is set in components.

See also
xkb_layout_index_t
Since
1.14.0

◆ locked_layout

int32_t xkb_state_components_update::locked_layout

Layout to lock.

May be out of range (including negative); the layout is brought into range according to the current out-of-range layout policy. Only considered if XKB_STATE_LAYOUT_LOCKED is set in components.

See also
xkb_layout_index_t
Since
1.14.0

◆ affect_controls

uint32_t xkb_state_components_update::affect_controls

Mask of boolean keyboard controls to affect.

Only controls present in this mask are considered when updating controls. Only considered if XKB_STATE_CONTROLS is set in components.

See also
xkb_keyboard_control_flags
Since
1.14.0

◆ controls

uint32_t xkb_state_components_update::controls

Mask of boolean keyboard controls to enable or disable.

Only controls in affect_controls are considered. Only considered if XKB_STATE_CONTROLS is set in components.

See also
xkb_keyboard_control_flags
Since
1.14.0

◆ reserved

uint32_t xkb_state_components_update::reserved
private

Reserved for future extensions.

Precondition
Must be set to 0 by the caller.

The documentation for this struct was generated from the following file: