package brr

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

Module Ev.MouseSource

Mouse events.

Sourcetype t

The type for MouseEvent objects.

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

Position

Sourceval offset_x : t -> float

offset_x m is the horizontal coordinate in target space.

Sourceval offset_y : t -> float

offset_y m is the vertical coordinate in target space.

Sourceval client_x : t -> float

client_x m is the horizontal coordinate in window viewport space.

Sourceval client_y : t -> float

client_y m is the vertical coordinate in window viewport space.

Sourceval page_x : t -> float

page_x m is the horizontal coordinate in document space.

Sourceval page_y : t -> float

page_y m is the vertical coordinate in document space.

Sourceval screen_x : t -> float

screen_x m is the horizontal coordinate in screen space.

Sourceval screen_y : t -> float

screen_y m is the vertical coordinate in screen space.

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

Sourceval 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

Sourceval button : t -> int

button m indicates the button for mouse button events.

Sourceval buttons : t -> int

buttons m indicates the current mouse buttons state.

Keyboard

Sourceval alt_key : t -> bool

alt_key m is true if Alt modifier is active.

Sourceval ctrl_key : t -> bool

ctrl_key m is true if Control modifier is active.

Sourceval shift_key : t -> bool

shift_key m is true if Shift modifier is active.

Sourceval meta_key : t -> bool

meta_key m is true if Meta modifier is active.

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

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