Re-exports

pub use crate::image::ImageData;
pub use crate::image::TextureCoordinate;

Structs

Keeps track of a run of changes and allows reasoning about the cursor position and the extent of the screen that the sequence will affect. This is useful for example when implementing something like a LineEditor where you don’t want to take control over the entire surface but do want to be able to emit a dynamically sized output relative to the cursor position at the time that the editor is invoked.

The Image Change needs to support adding an image that spans multiple rows and columns, as well as model the content for just one of those cells. For instance, if some of the cells inside an image are replaced by textual content, and the screen is scrolled, computing the diff change stream needs to be able to express that a single cell holds a slice from a larger image. The Image struct expresses its dimensions in cells and references a region in the shared source image data using texture coordinates. A 4x3 cell image would set width=3, height=3, top_left=(0,0), bottom_right=(1,1). The top left cell from that image, if it were to be included in a diff, would be recorded as width=1, height=1, top_left=(0,0), bottom_right=(1/4,1/3).

Enums

Change describes an update operation to be applied to a Surface. Changes to the active attributes (color, style), moving the cursor and outputting text are examples of some of the values.