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

#include <xkbcommon.h>

Collaboration diagram for xkb_state_update:
[legend]

Data Fields

size_t size
 
const struct xkb_state_components_updatecomponents
 
const struct xkb_layout_policy_updatelayout_policy
 

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:3681
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

size_t xkb_state_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

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: