textBufferSetCell method

void textBufferSetCell(
  1. Pointer<TextBufferHandle> textBuffer,
  2. int index,
  3. int charCode,
  4. Color fg,
  5. Color bg,
  6. int attributes,
)

Sets the cell at index in textBuffer to charCode with fg/bg colors and packed attributes. Throws FFIException on failure.

Implementation

void textBufferSetCell(
  Pointer<TextBufferHandle> textBuffer,
  int index,
  int charCode,
  Color fg,
  Color bg,
  int attributes,
) {
  _guardAlloc('Failed to set text buffer cell', (alloc) {
    _generated.textBufferSetCell(
      textBuffer.cast(),
      index,
      charCode,
      fg.toNative(alloc),
      bg.toNative(alloc),
      attributes,
    );
  });
}