Skip to content

TerminalCapabilities

Namespace: Hex1b

Assembly: Hex1b.dll

Capabilities that inform how Hex1bTerminal optimizes output and what features are available.

csharp
public record TerminalCapabilities : IEquatable<TerminalCapabilities>

Inheritance

ObjectTerminalCapabilities

Implements

Properties

ActualCellPixelWidth

Actual (possibly fractional) width of a terminal cell in pixels.

Returns: Double

csharp
public double ActualCellPixelWidth { get; init; }

CellPixelHeight

Height of a terminal character cell in pixels. Used for Sixel graphics scaling. Default is 20 pixels.

Returns: Int32

csharp
public int CellPixelHeight { get; init; }

CellPixelWidth

Width of a terminal character cell in pixels. Used for Sixel graphics scaling. Default is 10 pixels.

Returns: Int32

csharp
public int CellPixelWidth { get; init; }

DefaultBackground

Default background color as RGB (0xRRGGBB). Used when responding to OSC 11 color queries.

Returns: Int32

csharp
public int DefaultBackground { get; init; }

DefaultForeground

Default foreground color as RGB (0xRRGGBB). Used when responding to OSC 10 color queries.

Returns: Int32

csharp
public int DefaultForeground { get; init; }

EffectiveCellPixelWidth

Gets the actual cell pixel width, using integer width as fallback.

Returns: Double

csharp
public double EffectiveCellPixelWidth { get; }

HandlesAlternateScreenNatively

Whether the presentation adapter handles alternate screen buffer save/restore natively.

Returns: Boolean

csharp
public bool HandlesAlternateScreenNatively { get; init; }

Minimal

Minimal capabilities (dumb terminal).

Returns: TerminalCapabilities

csharp
public static TerminalCapabilities Minimal { get; }

Modern

Default capabilities for a modern terminal.

Returns: TerminalCapabilities

csharp
public static TerminalCapabilities Modern { get; }

Supports256Colors

Presentation supports 256 colors.

Returns: Boolean

csharp
public bool Supports256Colors { get; init; }

SupportsAlternateScreen

Presentation supports alternate screen buffer.

Returns: Boolean

csharp
public bool SupportsAlternateScreen { get; init; }

SupportsBracketedPaste

Presentation supports bracketed paste mode.

Returns: Boolean

csharp
public bool SupportsBracketedPaste { get; init; }

SupportsDeltaProtocol

Presentation understands Hex1b delta protocol (not raw ANSI). Enables significant bandwidth optimization.

Returns: Boolean

csharp
public bool SupportsDeltaProtocol { get; init; }

SupportsKgp

Presentation supports Kitty Graphics Protocol (KGP) for inline image display.

Returns: Boolean

csharp
public bool SupportsKgp { get; init; }

SupportsMouse

Presentation supports mouse tracking.

Returns: Boolean

csharp
public bool SupportsMouse { get; init; }

SupportsRetroactiveVariationSelectors

Whether the terminal supports retroactive variation selector width changes.

Returns: Boolean

csharp
public bool SupportsRetroactiveVariationSelectors { get; init; }

SupportsSixel

Presentation supports Sixel graphics.

Returns: Boolean

csharp
public bool SupportsSixel { get; init; }

SupportsStyledUnderlines

Presentation supports styled underlines (SGR 4:x — curly, dotted, dashed). Modern terminals like kitty, WezTerm, iTerm2 support this. When false, curly/dotted/dashed underlines fall back to single underline.

Returns: Boolean

csharp
public bool SupportsStyledUnderlines { get; init; }

SupportsTrueColor

Presentation supports true color (24-bit RGB).

Returns: Boolean

csharp
public bool SupportsTrueColor { get; init; }

SupportsUnderlineColor

Presentation supports colored underlines (SGR 58). When false, underlines use the foreground color.

Returns: Boolean

csharp
public bool SupportsUnderlineColor { get; init; }

Released under the MIT License.