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

#include <xkbcommon.h>

Collaboration diagram for xkb_state_update:
[legend]

Data Fields

uint32_t size
 
const struct xkb_state_components_updatecomponents
 
const struct xkb_layout_policy_updatelayout_policy
 

Private Attributes

uint32_t reserved0
 

Detailed Description

Request to process an out-of-band atomic update through an xkb_machine or xkb_state.

Used with xkb_state::xkb_state_update_synthetic() and xkb_machine::xkb_machine_process_synthetic() to atomically apply any combination of:

A NULL pointer means “not set / no change”.

Note
This struct uses a size-based versioning scheme to allow forward and backward 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:
struct xkb_state_update update;
memset(&update, 0, sizeof(update));
update.size = sizeof(update);
update.components = …;
Request to process an out-of-band atomic update through an xkb_machine or xkb_state.
Definition xkbcommon.h:3778
Invariant
size MUST be explicitly set to sizeof(struct xkb_state_update).
All bytes of the struct, including padding, MUST remain zero except for explicitly assigned fields.
See also
xkb_state::xkb_state_update_synthetic()
xkb_machine::xkb_machine_process_synthetic()
xkb_state_components_update
xkb_layout_policy_update
Since
1.14.0

Field Documentation

◆ size

uint32_t xkb_state_update::size

Size of this structure in bytes.

See also
Extensible structure ABI contract
Since
1.14.0

◆ reserved0

uint32_t xkb_state_update::reserved0
private

Reserved for future extensions.

Precondition
Must be set to 0 by the caller.

◆ components

const struct xkb_state_components_update* xkb_state_update::components

Components updates, or NULL for no change.

See also
xkb_state_component
Since
1.14.0

◆ layout_policy

const struct xkb_layout_policy_update* xkb_state_update::layout_policy

Out-of-range layout policy update, or NULL for no change.

See also
xkb_layout_out_of_range_policy
Since
1.14.0

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