Skip to content

ICellImpactAwarePresentationAdapter

Namespace: Hex1b

Assembly: Hex1b.dll

Extended presentation adapter interface that receives cell impact information instead of raw ANSI bytes.

csharp
public interface ICellImpactAwarePresentationAdapter : IHex1bTerminalPresentationAdapter, IAsyncDisposable

Methods

WriteOutputWithImpactsAsync(IReadOnlyList<AppliedToken>, CancellationToken)

Called when output is being sent to the presentation layer, with cell impact information.

Parameters:

Returns: ValueTask

A task that completes when the output has been processed.

csharp
ValueTask WriteOutputWithImpactsAsync(IReadOnlyList<AppliedToken> appliedTokens, CancellationToken ct = default)

Remarks

When a presentation adapter implements this interface, the terminal will call instead of , providing pre-parsed tokens with their cell impacts.

This is useful for presentation adapters that need to maintain a screen buffer (like ) without duplicating ANSI parsing logic. The cell impacts provide exactly which cells changed and their new state.

This acts as a "built-in filter" that is guaranteed to be at the end of the presentation filter chain, receiving the fully processed token stream.

Released under the MIT License.