package brr

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

Mouse events.

type t

The type for MouseEvent objects.

related_target e is the target the pointer is entering (if any).

Position

val offset_x : t -> float

offset_x m is the horizontal coordinate in target space.

val offset_y : t -> float

offset_y m is the vertical coordinate in target space.

val client_x : t -> float

client_x m is the horizontal coordinate in window viewport space.

val client_y : t -> float

client_y m is the vertical coordinate in window viewport space.

val page_x : t -> float

page_x m is the horizontal coordinate in document space.

val page_y : t -> float

page_y m is the vertical coordinate in document space.

val screen_x : t -> float

screen_x m is the horizontal coordinate in screen space.

val screen_y : t -> float

screen_y m is the vertical coordinate in screen space.

val movement_x : t -> float

movement_x m is the horizontal coordinate movement in screen space. This is screen_x minus the previous event's one.

val movement_y : t -> float

movement_x m is the vertical coordinate movement in screen space. This is screen_y minus the previous event's one.

Buttons

val button : t -> int

button m indicates the button for mouse button events.

val buttons : t -> int

buttons m indicates the current mouse buttons state.

Keyboard

val alt_key : t -> bool

alt_key m is true if Alt modifier is active.

val ctrl_key : t -> bool

ctrl_key m is true if Control modifier is active.

val shift_key : t -> bool

shift_key m is true if Shift modifier is active.

val meta_key : t -> bool

meta_key m is true if Meta modifier is active.

val get_modifier_state : t -> Jstr.t -> bool

get_modifier_state m key is true if key is active. See here for key values.