A lightweight reactive document library.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
602 B

  1. open Notty
  2. open Nottui
  3. type event = [
  4. | `Key of Unescape.key
  5. | `Mouse of Unescape.mouse
  6. | `Paste of Unescape.paste
  7. | `Resize of int * int
  8. ]
  9. (** FIXME: Refactor to use [Nottui.Ui.event]? *)
  10. val render : ?quit:unit Lwt.t -> size:int * int -> event Lwt_stream.t -> ui Lwd.t -> image Lwt_stream.t
  11. (** Turn a stream of events into a stream of images. *)
  12. val run : (*?term:Term.t ->*) ?quit:unit Lwt.t -> ui Lwd.t -> unit Lwt.t
  13. (** Run mainloop in [Lwt], until the [quit] promise is fulfilled.
  14. The ui is a normal [Lwd.t] value, but events are free to spawn asynchronous
  15. [Lwt] threads.
  16. *)