-
-
Notifications
You must be signed in to change notification settings - Fork 83
Kathara.foundation.manager.terminal.core.IConsoleAdapter
Tommaso Caiazzi edited this page Mar 19, 2026
·
1 revision
Interface for a platform console adapter. Implementations provide the glue between a manager event loop and the underlying platform's console/terminal IO mechanisms.
enter_raw() → NonePut the terminal into raw mode.
Returns: None
exit_raw() → NoneRestore the terminal to its previous mode (reverts "enter_raw").
Returns: None
install_input_reader(
loop: 'Any',
on_bytes: 'Callable[[bytes], None]',
on_close: 'Callable[[], None]'
) → NoneStart reading from stdin and route incoming bytes to callbacks (connected to the manager handler).
Args:
-
loop(Any): The asyncio event loop instance used to register readers/tasks. -
on_bytes(Callable[[bytes], None]): Callback to handle received input bytes. -
on_close(Callable[[], None]): Callback to handle stdin closing or errors.
Returns: None
remove_input_reader(loop: 'Any') → NoneStop reading stdin previously configured by "install_input_reader".
Args:
-
loop(Any): The asyncio event loop instance used to deregister.
Returns: None
unwatch_resize(loop: 'Any') → NoneStop monitoring terminal resize events.
Args:
-
loop(Any): The asyncio event loop instance used to deregister signal handlers or callbacks.
Returns: None
watch_resize(loop: 'Any', cb: 'Callable[[int, int], None]') → NoneStart monitoring terminal resize events.
Args:
-
loop(Any): The asyncio event loop instance used to register signal handlers or callbacks. -
cb(Callable[[int, int], None]): Callback to handle the resize.
Returns: None
write_stdout(data: 'bytes') → NoneWrite bytes to stdout.
Args:
-
data(bytes): Bytes to write to stdout.
Returns: None
This file was automatically generated via lazydocs.
Website: kathara.org
Contact us: contact@kathara.org