xkbcommon 1.14.0-beta2
Reference library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state
Loading...
Searching...
No Matches
Public Member Functions
xkb_events Struct Reference

#include <xkbcommon.h>

Public Member Functions

XKB_EXPORT struct xkb_events * xkb_events_new (struct xkb_context *context, const struct xkb_events_config *config, enum xkb_status *status)
 
XKB_EXPORT void xkb_events_destroy (struct xkb_events *events)
 
XKB_EXPORT const struct xkb_event * xkb_events_next (struct xkb_events *events)
 

Detailed Description

Opaque keyboard event collection object.

An xkb_events batch collects keyboard events produced atomically by a single call to a process_* function such as xkb_machine::xkb_machine_process_key(). Events are consumed sequentially via xkb_events_next(). The collection is reset on each process_* call.

Ownership:

_Exclusive_ ownership. Heap-allocated by xkb_events_new() and freed exclusively by calling exactly once xkb_events_destroy().

Owns a reference to the xkb_context passed during initialization, kept for the entire lifetime of the xkb_events instance and released when calling xkb_events_destroy().

Invariant
The referenced xkb_context remains valid for the entire lifetime of an xkb_events instance thanks to reference counting on xkb_context. You may release your own reference as soon as the xkb_events is created.
See also
xkb_events_new()
xkb_events_next()
xkb_events_destroy()
xkb_machine::xkb_machine_process_key()
xkb_machine::xkb_machine_process_synthetic()
Since
1.14.0

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