textBufferSetSelection method

void textBufferSetSelection(
  1. Pointer<TextBufferHandle> textBuffer,
  2. int start,
  3. int end,
  4. Color bgColor,
  5. Color fgColor,
)

Highlights cells start..end in textBuffer using bgColor/fgColor. Throws FFIException on failure.

Implementation

void textBufferSetSelection(
  Pointer<TextBufferHandle> textBuffer,
  int start,
  int end,
  Color bgColor,
  Color fgColor,
) {
  _guardAlloc('TextBuffer selection failed', (alloc) {
    _generated.textBufferSetSelection(
      textBuffer.cast(),
      start,
      end,
      bgColor.toNative(alloc),
      fgColor.toNative(alloc),
    );
  });
}