TerminalEngineClient class
Coalesces PTY output per frame and feeds it to the engine off the UI thread,
then applies the returned damage to the grid. A single advance is ever in
flight (_advancing), giving natural backpressure under heavy output.
Constructors
- TerminalEngineClient({required EngineBinding binding, required MirrorGrid grid, void schedule(void ())?, void onRasterPresent(RasterPresentFrame frame)?})
Properties
- binding → EngineBinding
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- onPtyResize ↔ void Function(int columns, int rows)?
-
Fired only from
_flushPendingResize, after the engine reflow and mirror snapshot complete. Host wires this toPtyBackend.resize.getter/setter pair - onRasterPresent ↔ void Function(RasterPresentFrame frame)?
-
When set, hot-path advances/scrolls use Rust-raster present (no full
LineUpdate mirror). Selection/search still call refreshView.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useRasterPresent ↔ bool
-
When true, use raster present APIs and chrome-only mirror applies.
getter/setter pair
Methods
-
clearHistory(
) → void -
dispose(
) → void -
drainForTest(
) → Future< void> -
Runs any pending PTY ingest immediately. For unit/widget tests that do not
pump frames (the default
scheduleuses post-frame callbacks). -
feed(
Uint8List bytes) → void -
markInteractive(
[DateTime? now]) → void - Opens (or extends) the interactive drain window so PTY output following user input is scheduled via microtask rather than post-frame idle.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pumpEventsNow(
) → void - Drain terminal→host events synchronously (e.g. OSC 52 paste reply).
-
refreshView(
) → void -
Re-applies the current viewport. Uses EngineBinding.searchIsActive to
pick
fullSnapshotSearchedvsfullSnapshotso search highlights stay in sync with the engine without a stale Dart-side search flag. -
resize(
int columns, int rows) → void -
resolveHyperlink(
int id) → String? -
scrollLines(
int delta) → Future< void> -
scrollPixels(
double deltaPx) → Future< void> -
scrollToBottom(
) → Future< void> -
scrollToOffset(
double offsetLines) → Future< void> -
scrollToTop(
) → Future< void> -
searchClear(
) → void -
searchNext(
) → bool -
searchPrev(
) → bool -
searchSet(
String pattern, {TerminalSearchOptions options = const TerminalSearchOptions()}) → bool -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- interactiveWindow → const Duration
- After user interaction (keys / program writes), drain ASAP via microtask for this window instead of waiting for the idle post-frame scheduler.