package matrix

Build not yet checked
  1. Overview
  2. Docs
Fast, modern terminal toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.3.0.tbz
sha256=a92cbbcbe016fb19fb0a749222da0e459a9567aef3f4c7340d9bd6b71c53ed6f
sha512=6a7ab054605538bb31a2b73a1a6d093981a2704c9f0af5852221c05735290d74aca7c7282298c4d0f91e86a800e2ccd94b4918af883cd963449c758eb6b272b3

doc/matrix.test/Matrix_test/Terminal/index.html

Module Matrix_test.TerminalSource

Terminals, emulators playing a profile.

Sourcetype t

The type for terminals.

Sourceval create : ?profile:Profile.t -> cols:int -> rows:int -> unit -> t

create ~cols ~rows () is a terminal at power-up playing profile (default Profile.vte), cols wide and rows high.

Sourceval profile : t -> Profile.t

profile t is the profile t plays.

The user's side

Each of these is the bytes the terminal sends for what its user does, in the encoding the program has set, and "" for a report the program has not asked for. color_scheme also changes the terminal's scheme. A session (input) or a child (Child.send) delivers them.

key t k is the bytes of k pressed with mods (default none). A Char types its character unless the modifiers make a chord.

Raises Invalid_argument as Matrix.Input.Keystroke.encode does.

Sourceval keystroke : t -> Matrix.Input.Keystroke.t -> string

keystroke t k is the bytes of the keystroke k, with its text, keypad, base layout key and repeat.

Raises Invalid_argument as Matrix.Input.Keystroke.encode does.

Sourceval release : t -> Matrix.Input.Keystroke.release -> string

release t r is the bytes of the key release r, "" unless the program asked the kitty keyboard protocol for event types.

Raises Invalid_argument as Matrix.Input.Keystroke.encode does.

Sourceval text : t -> string -> string

text t s is the bytes of typing each character of s as a key.

Raises Invalid_argument if s is not UTF-8 or holds a control character.

Sourceval paste : t -> string -> string

paste t s is the bytes of pasting s, between the paste markers when the program has set bracketed paste.

Sourceval mouse : t -> Matrix.Input.Mouse_report.t -> string

mouse t m is the report of m, when the program's mouse tracking reports it.

Raises Invalid_argument as Matrix.Input.Mouse_report.encode does.

Sourceval focus : t -> bool -> string

focus t focused is the report of the window gaining focus (true) or losing it, when the program has set focus reports.

Sourceval color_scheme : t -> [ `Dark | `Light ] -> string

color_scheme t c changes t's color scheme to c, and is its report when the scheme changed and the program has set color scheme reports.

Sourceval set_palette : t -> Matrix.Ansi.Palette.t -> string

set_palette t p changes the palette t's user configured to p, as when they pick another theme (Vte.set_palette), and is the report of the change, the color scheme's, when the program has set color scheme reports.

Reading

Sourceval screen : t -> Screen.t

screen t is what t shows now.

Sourceval scrollback : t -> string list

scrollback t is the text of the lines scrolled off the primary screen's top, oldest first.

Sourceval title : t -> string

title t is the window title the program last set.

Sourceval modes : t -> Vte.modes

modes t is t's modes.

Sourceval raw : t -> bool

raw t is true while a session's run has t's input in raw mode.

Sourceval requests : t -> Vte.request list

requests t is what the program has asked of t's host, oldest first (Vte.requests).

Sourceval output : t -> string

output t is every byte the program has written to t.

Sourceval vte : t -> Vte.t

vte t is t's emulator, which a test must only read.