View Source API Reference garnish v0.2.1

Modules

Implements the :ssh_server_channel behaviour on behalf of the app.

Defines the Garnish.App behaviour. It provides the structure for architecting both large and small terminal applications, over SSH.

Represents a cell, a character at a position, along with the cell's background and foreground colors.

Defines constants from the termbox library. These can be used e.g. to set a formatting attributes or to identify keys passed in an event.

Represents a position on the screen by encoding a pair of cartesian coordinates. The origin is the top-left-most character on the screen (0, 0), while x and y increase from left to right and top to bottom, respectively.

Logic to render a view tree.

Functions for working with element attributes

Primitives for rendering borders

This defines the internal representation of a rectangular region---a box---for rendering, as well as logic for transforming these boxes.

A canvas represents a terminal window, a subvision of it for rendering, and a sparse mapping of positions to cells.

Functions for working with canvas cells.

Represents a renderable element.

Primitives for rendering lines

Primitives for rendering text

A behaviour for defining the terminfo sequences a 'terminal' module should support.

In Garnish, a view is simply a tree of elements. Each element in the tree holds an attributes map and a list of zero or more child nodes. Visually, it looks like something this