loom & weft
Made for Swift.

Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.

LOOM Unreleased (PR #2) / RENDERING, VIEWPORTS, AND COMPOSITION

CellDiffPolicy

Controls whether a glyph participates in terminal presentation.

Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.

Example

var buffer = Buffer(width: 8, height: 1)
buffer.put("ab", width: 3, at: Point(x: 0, y: 0), diffPolicy: .forcedWidth(3))
buffer.setDiffPolicy(.alwaysUpdate, in: Rect(x: 0, y: 0, width: 3, height: 1))
Members on this page

Feature guides and release status

CellDiffPolicy

Enumeration
enum CellDiffPolicy

Conforms to: Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.

Controls whether a glyph participates in terminal presentation.

Source · Cell.swift:4

automatic

Case
case automatic

Repaint when the cell changes.

Source · Cell.swift:6

skip

Case
case skip

Preserve the existing terminal contents, for example beneath an external image.

Source · Cell.swift:8

alwaysUpdate

Case
case alwaysUpdate

Repaint every frame, including when the cell is unchanged.

Source · Cell.swift:10

forcedWidth(_:)

Case
case forcedWidth(Int)

Explicit terminal span for a safe symbol payload containing one or more graphemes. Use Buffer.put with the same positive width. This never permits terminal controls.

Source · Cell.swift:13