package claudius

  1. Overview
  2. Docs

Module Claudius.EventSource

Sourcetype t =
  1. | KeyDown of Key.t
    (*

    A keyboard key was pressed down. Key.t identifies which key.

    *)
  2. | KeyUp of Key.t
    (*

    A keyboard key was released. Key.t identifies which key.

    *)
  3. | MouseButtonDown of Mouse.button * int * int
    (*

    A mouse button was pressed. (button, (x,y)) where button is the mouse button, and (x,y) are the coordinates at the time of press.

    *)
  4. | MouseButtonUp of Mouse.button * int * int
    (*

    A mouse button was released. (button, (x,y)) where button is the mouse button, and (x,y) are the coordinates at the time of release.

    *)
  5. | MouseMotion of int * int
    (*

    The mouse pointer moved. (x,y) are the new coordinates of the cursor.

    *)
  6. | MouseWheel of int
    (*

    The mouse wheel was scrolled. int is the scroll amount (positive for up, negative for down).

    *)
  7. | MouseDrag of Mouse.button * int * int
    (*

    A drag event with a mouse button held. (button, (x,y)) where button is the button being dragged, and (x,y) are the current cursor coordinates.

    *)
  8. | DropFile of string
    (*

    A file drop event containing the dropped file path.

    *)

High-level representation of input events.

OCaml

Innovation. Community. Security.