package nottui

  1. Overview
  2. Docs
type t

The type of a renderer

type size = int * int

Size of a rendering surface, as a pair of width and height

val make : unit -> t

Create a new renderer.

It maintains state to update output image and to dispatch events.

val update : t -> size -> Ui.t -> unit

Update the contents to be rendered to the given UI at a specific size

val size : t -> size

Get the size of the last update

val image : t -> Notty.image

Render and return actual image

val dispatch_mouse : t -> Ui.mouse -> Ui.may_handle

Dispatch a mouse event

val dispatch_key : t -> Ui.key -> Ui.may_handle

Dispatch a keyboard event

val dispatch_event : t -> Ui.event -> Ui.may_handle

Dispatch an event

OCaml

Innovation. Community. Security.