Class Driver
Holds global driver settings and cross-driver utility methods.
public sealed class Driver
- Inheritance
-
Driver
- Inherited Members
Constructors
Properties
- Force16Colors
Determines if driver instances should use 16 colors instead of the default TrueColors.
- SizeDetection
Controls how the ANSI driver detects the terminal's window size. Defaults to Polling, which uses a synchronous native query (
ioctlon Unix, Console API on Windows). Set to AnsiQuery for transports that require an ANSICSI 18tquery instead.
Methods
- IsAttachedToTerminal(out bool, out bool)
Determines whether the process has a controlling terminal usable for TUI rendering and input. Returns true when either:
- stdin/stdout are connected to a console device, or
-
stdin/stdout are redirected (e.g. via a shell pipeline such as
result=$(myapp)ormyapp | jq) but a controlling terminal is available via/dev/ttyon Unix orCONIN$/CONOUT$on Windows.
Set the environment variable
DisableRealDriverIO=1to skip real terminal detection and force this method to return false, which is required for running in test harnesses that do not have a real terminal attached.
Events
- Force16ColorsChanged
Raised when Force16Colors changes.