package nottui-lwt

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

Nottui_lwt exposes an Lwt-driven mainloop.

UI execution is done in an Lwt thread and UI events can spawn and synchronize threads.

type event = [
  1. | `Key of Notty.Unescape.key
  2. | `Mouse of Notty.Unescape.mouse
  3. | `Paste of Notty.Unescape.paste
  4. | `Resize of int * int
]

FIXME: Refactor to use Nottui.Ui.event?

val render : ?quit:unit Lwt.t -> size:(int * int) -> event Lwt_stream.t -> Nottui.ui Lwd.t -> Notty.image Lwt_stream.t

Turn a stream of events into a stream of images.

val run : ?quit:unit Lwt.t -> Nottui.ui Lwd.t -> unit Lwt.t

Run mainloop in Lwt, until the quit promise is fulfilled.

The ui is a normal Lwd.t value, but events are free to spawn asynchronous Lwt threads.