Pointer Module
Public contract module exposed by this FS.Skia.UI package: the pointer coordination front door (pure, host-independent, replayable). FR-001/FR-009.
Functions and values
| Function or value |
Description
|
|
Initial coordination state with the default 4.0 px click-vs-drag threshold (FR-006). Override per coordinator with `{ Pointer.init () with DragThreshold = … }`.
|
|
The single pointer origin tag, used to distinguish pointer-originated interactions from keyboard/text/focus ones when consumers flatten them into one message stream (FR-011).
|
Full Usage:
replay policy layout messages initial
Parameters:
PixelSnapPolicy
layout : LayoutResult
messages : PointerMsg list
initial : PointerState
Returns: PointerState * PointerInteraction list
|
Replay a recorded message sequence to a final state + accumulated effects; identical input yields identical output (SC-005).
|
|
Map a neutral sample to a transition message (None when not actionable).
|
Full Usage:
update policy layout msg state
Parameters:
PixelSnapPolicy
layout : LayoutResult
msg : PointerMsg
state : PointerState
Returns: PointerState * PointerInteraction list * ControlRuntimeMsg list
|
Pure reducer. Hit-tests via Layout.hitTestComputed against the supplied LayoutResult (an input, never fetched inside update — keeps update pure and deterministic/replayable, FR-009/SC-005). Emits ordered interactions plus the ControlRuntimeMsg list to keep ControlRuntime's hover/press/drag/focus state consistent.
|