Make input blocking or non-blocking. Blocking input will cause reads against the terminal to block forever until at least one character is returned. Otherwise it will return in at most
Flush output.
Make the terminal suitable for raw mode input. In this mode the terminal is not suitable for typical interactive shell use, but is good if absolute control over input is needed. After this, reads will block until one character is presented. (Same effect as 'blocking(true)'.
Read input. May return an empty slice if no data is present and blocking is disabled.
Resized returns true if the window was resized since last checked. Normally resize will force the window into non-blocking mode so that the caller can see the resize in a timely fashion.
Restore tty settings saved with save().
Save current tty settings. These can be subsequently restored using restore.
Start termio. This will open the device.
Stop input scanning. This may close the tty device.
Get window size.
Write output.
TtyImpl is the interface that implementations should override or supply to support terminal I/O ioctls or equivalent functionality. It is provided in this form, as some implementations may not be based on actual tty devices.