This supports now curly, double, dashed, and dotted underline styles
where trhe terminal supports it. This works well on Windows Terminal,
reasonably on iTerm2, Alacritty, Kitty, and probably others.
The wasm mode terminal includes support for this, dependent on the browser
capabilities.
The macOS Terminal just changes the background color. Legacy Windows
console does nothing.
We will try to provide a regular underscore as a fallback. A new style.go
demo is included to see some style combinations.
This centralizes much of the logic (hopefully reducing duplication)
for polling events and the queue. This will make it easier to make
further design changes to express a better, simpler, API to consumers.
While here addressed missing logic to handle Fini correctly on Windows.
A lot of functionality is duplicated across screen implementations,
and adding convenience methods is onerous because one needs to touch
each implementation with what is mostly copy-paste coding.
This represents the start of refactoring to eliminate redundant code
from each implemenation and provide for it in a common layer.
Extend the Screen interface with a new Tty method, which returns the
underlying tty when the screen is a terminal. This enables direct
drawing to the Tty.
Implement the interface for the three screen implementatinos included in
the library.
Extend the Screen interface with a new LockRegion method. This method
sets or unsets a lock on a region of cells. This will be used in
subsequent commits to enable direct drawing to the underlying TTY. The
locks are necessary in order to prevent cells from being drawn on top of
a directly drawn cell.
Implement this interface for the three screen implementations included
in the library.
Reverse video, not reverse text.
Provide an XTERM equivalent default palette.
Reset colors should go to silver on black.
Black color 0 should be rendered properly.