Synthesizes :click events from raw press/release pairs.
The runtime threads the pressed-button state through track/2 for every
mouse event it delivers: a :press records {button, target}, and a
:release on the same target completes the click — a
%Tuix.Event.Mouse{kind: :click} delivered after the release event
itself. Releasing over a different target cancels the click; drags in
between do not (terminal cells are coarse, and this matches the browser
model).
X10-encoded releases do not report which button went up (button: nil);
they complete the click for whatever button is tracked, and the
synthesized event carries the pressed button.
Summary
Functions
Threads a mouse event through the click tracker.
Types
@type pressed() :: {Tuix.Event.Mouse.button(), term() | nil} | nil
The tracked press: {button, target}, or nil when no button is down.
Functions
@spec track(pressed(), Tuix.Event.Mouse.t()) :: {pressed(), Tuix.Event.Mouse.t() | nil}
Threads a mouse event through the click tracker.
Returns {pressed, click} — the updated tracking state and the
synthesized :click event (or nil).