Module zi::terminal

source · []
Expand description

An abstract specification of a lightweight terminal.

All components in Zi ultimately draw to a Canvas. Typically this is done via their child components and their descendants. At the bottom of the component hierarchy, low level components would draw directly on a canvas.

Structs

A lightweight abstract terminal. All components in Zi ultimately draw to a Canvas, typically via their child components or directly in the case of lower level components.

An RGB encoded colour, 1-byte per channel.

Wraps a Canvas and exposes a grid of square “pixels”. The size of the grid (2 * height, width) of the dimensions of the wrapped canvas. This is implemented using Unicode’s upper half block character.

Specifies how content should be styled. This represents a subset of the ANSI available styles which is widely supported by terminal emulators.

A “text element”, which consists of an extended grapheme cluster and associated styling.

Enums

Input event

Keyboard input. It aims to match what a terminal supports.

Type Definitions

Type alias for background colours.

Type alias for foreground colours.

An extended grapheme cluster represented as a SmallString.

A 2D position with usize coordinates. Re-exported from euclid.

A 2D rectangle with usize coordinates. Re-exported from euclid.

A 2D size with usize width and height. Re-exported from euclid.