TerminalProbe class
Namespace: Arlecchino.Rendering.Terminals · Assembly: Arlecchino.Core
Asks the terminal what it can do, once, before the application starts reading keys. The questions end with the one every terminal answers, so its reply is the signal that no other reply is coming.
public static class TerminalProbe
Methods
| Member | Summary |
|---|---|
Ask(IArlecchinoTerminal, TimeSpan) | Asks, waits no longer than it is told, and installs what came back into TerminalCapabilities and Glyphs, leaving unanswered questions alone. Call it before the mouse and paste modes go on. |
Methods in detail
Ask(IArlecchinoTerminal, TimeSpan)
public static bool Ask(IArlecchinoTerminal terminal, TimeSpan timeout);
Asks, waits no longer than it is told, and installs what came back into TerminalCapabilities and Glyphs, leaving unanswered questions alone. Call it before the mouse and paste modes go on.
Parameters
| Name | Type | Description |
|---|---|---|
terminal | IArlecchinoTerminal | The terminal to ask. |
timeout | TimeSpan | How long to wait for the last answer before giving up. |
Returns bool — true when the terminal said anything at all. What it said is in TerminalCapabilities.Sixel, TerminalCapabilities.Kitty and Glyphs.CellWidth; a false here is how you tell a terminal that cannot draw pictures from one that never replied.