module Touch:sig
..end
Touch events are only reported whenever they occur
in the application surface (FIXME is that true ?).
Coordinates are in surface normalized
coordinates with (0,0)
corresponding to the bottom left corner
and (1,1)
to the top right corner.
type
t
val id : t -> int
id t
is a unique identifier for the touch
(FIXME across device identifiers ?)val did : t -> int
did t
is a device identifier for the touch.val pos : t -> Gg.p2 React.signal
pos t
is the current touch position of t
.val dpos : t -> Gg.v2 React.event
dpos t
occurs when the touch moves with the current touch position
minus the previous one.val pressure : t -> float React.signal
pressure t
is the pressure normalized from 0.
to 1.
(if
available).val over : t -> [ `Cancel | `Up ] React.event
over t
occurs once whenever the touch ends either because
the pressure stops (`Up
) or because the touch is canceled (`Cancel
,
for example if the touch is captured by something else).val start : t list React.event
start
occurs whenever touches do.