Terminal

interface Terminal

An interface for abstracting input and output for various terminal implementations.

Inheritors

NativeTerminal
SystemTerminal
VirtualTerminal

Properties

Link copied to clipboard
abstract val height: Int

The height of the terminal.

Link copied to clipboard
abstract val width: Int

The width of the terminal.

Functions

Link copied to clipboard
abstract fun clear()

Clear the current terminal, removing all text written there so far.

Link copied to clipboard
abstract fun close()

Shut down this terminal, releasing any resources.

Link copied to clipboard
abstract fun read(): SharedFlow<Int>

Return a hot SharedFlow which will get triggered with characters read in by the underlying terminal, often input typed in by a user.

Link copied to clipboard
abstract fun write(text: String)

Write some text to the underlying terminal.