Module Luv.TTY

Consoles.

See uv_tty_t — TTY handle in libuv.

type t = [ `TTY ] Stream.t

Binds http://docs.libuv.org/en/v1.x/tty.html#c.uv_tty_t.

Note that values of this type can also be used with functions in:

In particular, see Luv.Handle.close, Luv.Stream.read_start, and Luv.Stream.write.

val init : ?⁠loop:Loop.t -> File.t -> (tError.t) Result.result

Allocates and initializes a TTY handle.

Binds uv_tty_init.

module Mode : sig ... end

Binds uv_tty_mode_t.

val set_mode : t -> Mode.t -> (unit, Error.t) Result.result

Sets the TTY's mode.

Binds uv_tty_set_mode.

val reset_mode : unit -> (unit, Error.t) Result.result

Resets the TTY's mode.

Binds uv_tty_reset_mode.

val get_winsize : t -> (int * int, Error.t) Result.result

Retrieves the current window size.

Binds uv_tty_get_winsize.

module Vterm_state : sig ... end

Binds uv_tty_vtermstate_t.

val set_vterm_state : Vterm_state.t -> unit

Binds uv_tty_set_vterm_state.

val get_vterm_state : unit -> (Vterm_state.tError.t) Result.result

Binds uv_tty_get_vterm_state.