Logo FS-Skia-UI

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

init ()

Full Usage: init ()

Parameters:
    () : unit

Returns: PointerState

Initial coordination state with the default 4.0 px click-vs-drag threshold (FR-006). Override per coordinator with `{ Pointer.init () with DragThreshold = … }`.

() : unit
Returns: PointerState

origin

Full Usage: origin

Returns: PointerOrigin

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).

Returns: PointerOrigin

replay policy layout messages initial

Full Usage: replay policy layout messages initial

Parameters:
Returns: PointerState * PointerInteraction list

Replay a recorded message sequence to a final state + accumulated effects; identical input yields identical output (SC-005).

policy : PixelSnapPolicy
layout : LayoutResult
messages : PointerMsg list
initial : PointerState
Returns: PointerState * PointerInteraction list

toMsg sample

Full Usage: toMsg sample

Parameters:
Returns: PointerMsg option

Map a neutral sample to a transition message (None when not actionable).

sample : PointerSample
Returns: PointerMsg option

update policy layout msg state

Full Usage: update policy layout msg state

Parameters:
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.

policy : PixelSnapPolicy
layout : LayoutResult
msg : PointerMsg
state : PointerState
Returns: PointerState * PointerInteraction list * ControlRuntimeMsg list

Type something to start searching.