UvTerminalRenderer class final
Low-level terminal renderer for the Ultraviolet engine.
This renderer is responsible for efficiently updating the terminal screen by diffing buffers and sending minimal ANSI escape sequences.
- Inheritance
-
- Object
- TerminalRenderer
- UvTerminalRenderer
Constructors
-
UvTerminalRenderer(StringSink _writer, {List<
String> ? env, bool? isTty, bool isWindows = false}) -
Creates a terminal renderer writing to
_writer.
Properties
- capabilities → int
-
The detected terminal capabilities as a bitmask.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFullscreenEnabled → bool
-
Whether fullscreen mode is active.
no setter
- isRelativeCursorEnabled → bool
-
Whether relative cursor positioning mode is active.
no setter
- lastFlushedOutput → String
-
The exact ANSI/content string emitted by the most recent flush.
no setteroverride
- metrics → RenderMetrics
-
Render performance metrics (FPS, frame times, render durations).
final
- profile → Profile
-
The current color profile used for output.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buffered(
) → int - Returns the number of bytes currently buffered for output.
-
disableBracketedPaste(
) → void -
Disables bracketed paste mode.
override
-
disableFocusReporting(
) → void -
Disables focus event reporting.
override
-
disableMouseAllEvents(
) → void -
Disables mouse event reporting.
override
-
enableBracketedPaste(
) → void -
Enables bracketed paste mode.
override
-
enableFocusReporting(
) → void -
Enables focus event reporting.
override
-
enableMouseAllEvents(
) → void -
Enables mouse event reporting for all events (motion, buttons, scroll).
override
-
enterAltScreen(
) → void -
Enters the alternate screen buffer.
override
-
erase(
) → void -
Marks the screen as needing a full erase on the next render.
override
-
exitAltScreen(
) → void -
Exits the alternate screen buffer.
override
-
flush(
) → void -
Flushes buffered output to the terminal sink.
override
-
fullscreen(
) → bool - Whether fullscreen mode is enabled.
-
height(
) → int -
Returns the current terminal height in rows.
override
-
hideCursor(
) → void -
Hides the cursor.
override
-
moveTo(
int x, int y) → void -
Moves the cursor to column
x, rowy.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
popKeyboardEnhancements(
) → void -
Pops keyboard enhancements (Kitty Keyboard Protocol).
override
-
position(
) → ({int x, int y}) -
Returns the current cursor position as
(x, y). -
prependString(
Buffer newbuf, String str) → void -
Prepends raw escape sequences to the output buffer.
override
-
pushKeyboardEnhancements(
int flags) → void -
Pushes keyboard enhancements (Kitty Keyboard Protocol).
override
-
queryBackgroundColor(
) → void -
Queries the terminal background color.
override
-
queryColorPalette(
int index) → void - Queries a color from the terminal palette.
-
queryColorScheme(
) → void -
Queries the terminal light/dark color-scheme preference.
override
-
queryCursorColor(
) → void -
Queries the terminal cursor color.
override
-
queryForegroundColor(
) → void -
Queries the terminal foreground color.
override
-
queryKeyboardEnhancements(
) → void -
Queries keyboard enhancements (Kitty Keyboard Protocol).
override
-
queryKittyGraphics(
) → void -
Queries Kitty Graphics support.
override
-
queryPrimaryDeviceAttributes(
) → void -
Queries primary device attributes.
override
-
querySecondaryDeviceAttributes(
) → void -
Queries secondary device attributes.
override
-
queryTerminalVersion(
) → void -
Queries the terminal version string.
override
-
queryTertiaryDeviceAttributes(
) → void -
Queries tertiary device attributes.
override
-
redraw(
Buffer newbuf) → void -
Forces a complete screen redraw by erasing and re-rendering
newbuf. -
render(
Buffer newbuf) → void -
Renders the screen buffer to the terminal.
override
-
resize(
int width, int height) → void -
Updates the terminal dimensions.
override
-
restoreCursor(
) → void - Restores the previously saved cursor position.
-
saveCursor(
) → void - Saves the current cursor position.
-
setBackspace(
bool v) → void -
Configures whether backspace can be used for cursor movement.
override
-
setColorProfile(
Profile profile) → void -
Sets the color profile for output.
override
-
setFullscreen(
bool v) → void -
Enables or disables fullscreen (alternate screen) mode.
override
-
setHasTab(
bool v) → void -
Configures whether horizontal tab can be used for cursor movement.
override
-
setLogger(
void logger(String message)?) → void -
Sets the debug logger callback.
override
-
setMapNewline(
bool v) → void - Enables or disables LF to CR+LF newline mapping.
-
setPosition(
int x, int y) → void -
Sets the cursor position to (
x,y). -
setRelativeCursor(
bool v) → void -
Enables or disables relative cursor positioning.
override
-
setScrollOptim(
bool v) → void -
Enables or disables scroll region optimization.
override
-
setSynchronizedOutput(
bool v) → void -
Enables or disables synchronized terminal updates (DECSET 2026).
override
-
setTabStops(
int width) → void -
Sets tab stop positions based on the given terminal
width.override -
showCursor(
) → void -
Shows the cursor.
override
-
synchronizedOutput(
) → bool - Whether synchronized frame output is enabled.
-
toString(
) → String -
A string representation of this object.
inherited
-
touched(
Buffer buf) → int -
Returns the number of touched (dirty) lines in
buf. -
width(
) → int -
Returns the current terminal width in columns.
override
-
write(
List< int> bytes) → int - Writes raw bytes to the output buffer and returns the byte count.
-
writeString(
String s) → int -
Writes a raw string to the output buffer and returns its length.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- capBs → const int
- Capability bit for Backspace (BS).
- capCbt → const int
- Capability bit for Cursor Backward Tab (CBT).
- capCha → const int
- Capability bit for Cursor Horizontal Absolute (CHA).
- capCht → const int
- Capability bit for Cursor Horizontal Tab (CHT).
- capEch → const int
- Capability bit for Erase Character (ECH).
- capHpa → const int
- Capability bit for Horizontal Position Absolute (HPA).
- capHt → const int
- Capability bit for Horizontal Tab (HT).
- capIch → const int
- Capability bit for Insert Character (ICH).
- capRep → const int
- Capability bit for Repeat Character (REP).
- capSd → const int
- Capability bit for Scroll Down (SD).
- capSu → const int
- Capability bit for Scroll Up (SU).
- capVpa → const int
- Capability bit for Vertical Position Absolute (VPA).