package brr

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Pointer events

type t

The type for PointerEvent objects.

val id : t -> int

id p is the identifier of the pointer causing the event (ids can get recycled but they are unique among active pointers).

val width : t -> float

width p is the width in CSS pixels of the contact geometry of the pointer.

val height : t -> float

height p is the height in CSS pixels of the contact geometry of the pointer.

val pressure : t -> float

pressure p is the normalized pressure of the pointer in the range 0. to 1.. For things like mices this is 0.5 when buttons are depressed and 0. otherwise. All pointerup events have that to 0..

val tangential_pressure : t -> float

tanganital_pressure p is the normalized tangential pressure of the pointer in the range -1. to 1. with 0. the neutral position of the control. If the hardware has no support this must be 0..

val tilt_x : t -> int

tilt_x p is the plane angle in degree in the range -90 to 90 between the Y-Z plane and the plane containing the transducer axis and the Y axis. Positive tilt is to the right and 0 if unsupported.

val tilt_y : t -> int

tilt_y p is the plane angle in degree in the range -90 to 90 between the X-Z plane and the plane containing the transducer axis and the X axis. Positive tilt is towards the user and 0 if unsupported.

val twist : t -> int

twist p is the rotation in degree in the range 0;359 of the transducer around its own major axis. If unsupported this must be 0.

val altitude_angle : t -> float

altitude_angle p is the altitude in radians of the transducer in the range 0. to π/2 where 0 is parallel to the surface X-Y plane and π/2 is perpendicular to the surface. If unsupported this must be π/2.

val azimuth_angle : t -> float

azimuth_angle p is the azimuth angle in radians in the range 0. to where 0 represents a transducer whose cap is pointing in the direction of increasing X values on the XY-plane. If unsupported must be 0.

val type' : t -> Jstr.t

type' p is the pointer type.

val is_primary : t -> bool

is_primary p is true if the pointer represents the primary pointer.

val get_coalesced_events : t -> t event list

get_coalesced_events p is the list of events that were coalesced into p.

val get_predicted_events : t -> t event list

get_predicted_events p is the list of predicted events for p.

OCaml

Innovation. Community. Security.