ICellImpactAwarePresentationAdapter
Namespace: Hex1b
Assembly: Hex1b.dll
Extended presentation adapter interface that receives cell impact information instead of raw ANSI bytes.
public interface ICellImpactAwarePresentationAdapter : IHex1bTerminalPresentationAdapter, IAsyncDisposableMethods
WriteOutputWithImpactsAsync(IReadOnlyList<AppliedToken>, CancellationToken)
Called when output is being sent to the presentation layer, with cell impact information.
Parameters:
appliedTokens(IReadOnlyList<AppliedToken>): The applied tokens with their cell impacts.ct(CancellationToken): Cancellation token.
Returns: ValueTask
A task that completes when the output has been processed.
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.