import { BufferLocation, BufferSize, Char, Color } from "./base.ts"; /** * Display protocol, to allow the UI to draw things on "screen" */ export interface Display { /** * Get the displayable grid size */ getSize(): Promise; /** * Setup the palette for color display * * If the display supports the whole RGB range, it may return the array as-is. * If the display only supports a limited palette, it may return only supported colors. * * From this call forward, colors will be received by numbered index in the returned array. */ setupPalette(colors: readonly Color[]): Promise; /** * Clear the whole screen */ clear(): Promise; /** * Draw a single character on screen */ setChar(at: BufferLocation, char: Char): Promise; }