Skip to main content

Module pointers

Module pointers 

Source
Expand description

Fixed-capacity multi-pointer table with W3C Pointer Events capture semantics.

One PointerSlot per active pointer (a pressed mouse button, a pen or touch contact), keyed by (kind, id) so ids of different device kinds never collide. The table is a plain array of MAX_ACTIVE_POINTERS slots: lookups scan at most 10 keys, nothing allocates, and a contact beyond capacity is refused instead of spilling to the heap.

Capture follows W3C: PointerTable::set_capture / PointerTable::release_capture write a pending target that PointerTable::process_pending_capture applies before the pointer’s next event (returning the lost / got targets); ending a pointer releases only its own capture.

Structs§

CaptureTransition
Capture targets that changed when a pending capture was processed (NULL = none).
PointerCaptureRequest
An app’s W3C setPointerCapture (capture) / releasePointerCapture call, collected during dispatch and applied by the runtime as the pointer’s pending capture.
PointerKey
Identity of one pointer: its device kind plus the host’s pointer id.
PointerOverflow
The table is full: the contact was refused.
PointerSlot
One active pointer.
PointerTable
Fixed-capacity active pointer table (see the module docs).

Enums§

CaptureError
Why a capture request was refused (W3C setPointerCapture exceptions).
PointerType
W3C pointerType (NV_POINTER_TYPE_*; try_from_u8 rejects unknown codes).

Constants§

MAX_ACTIVE_POINTERS
Capacity of the core PointerTable (simultaneously tracked active pointers).