KetraTerm
API · DevelopmentAll versions

TerminalInspector

Allocating inspection contract for the terminal buffer.

Intended for tests and debugging. These convenience methods may allocate; renderers consume io.github.ketraterm.render.api.TerminalRenderFrame copies instead of performing allocating inspection in a hot rendering path.

Inheritors

Functions

Link copied to clipboard
abstract fun getAllAsString(): String

Returns scrollback history followed by the visible screen as a newline-joined string, oldest line first.

Link copied to clipboard
abstract fun getAttrAt(col: Int, row: Int): CellAttributes?

Returns the attributes at a screen position as an unpacked CellAttributes object.

Link copied to clipboard
abstract fun getLineAsString(row: Int): String

Returns the content of a visible row as a string, trimming trailing blank cells while preserving intentional space characters.

Link copied to clipboard
abstract fun getScreenAsString(): String

Returns the visible screen as a newline-joined string, top to bottom.