package nottui

  1. Overview
  2. Docs

Module Nottui.RendererSource

Sourcetype t

The type of a renderer

Sourcetype size = int * int

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

Sourceval make : unit -> t

Create a new renderer.

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

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

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

Sourceval size : t -> size

Get the size of the last update

Sourceval image : t -> Notty.image

Render and return actual image

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

Dispatch a mouse event

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

Dispatch a keyboard event

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

Dispatch an event

OCaml

Innovation. Community. Security.