Emit a beep or bell. This is done immediately.
Clears the screen. This doesn't take effect until the show function is called.
If the terminal supports color, this returns the the number of colors.
Disable all mouse handling/capture.
Enable or disable the alternate screen. This must be called before start(). Note that this is best effort -- not every terminal actually supports this. This is on by default. It can be disabled by setting DCELL_ALTSCREEN=disable in the environment.
Enable mouse mode. This can cause terminals/emulators to behave differently -- for example affecting the ability to scroll or use copy/paste.
Enable typical mouse features. This enables tracking, but leaves drag events disabled. Enabling mouse drag will impair use of copy-paste at the OS level, which many users tend to find frustrating.
Enable bracketed paste mode mode. Bracketed paste mode will pasted content in a single event, and is therefore distinguishable from individually typed characters.
Obtain the list of events. The returned value is both an input range of Event, (for receiving events), and an output range of Event.
Fill the entire screen with the given content and style. Content is not drawn until the show() or sync() functions are called.
Fill the entire screen with the given content, but preserve the style.
Request the clipboard contents. It may be ignored.
Support $ operation in indices.
Retrieve the contents for a given address. This is taken from the backing draw buffer, and won't necessarily reflect what is displayed to the user until show is called.
Convenience for indexing
Set the content for for a given location. This won't necessarily take effect until the show function is called.
Convenience for indexing.
Applications should call this in response to receiving a resize event. (This can't be done automatically to avoid thread safety issues.)
Post arbitrary data to the system clipboard. It's up to the recipient to decode the data meaningfully. Terminals may prevent this for security reasons.
Attempt to resize the terminal. YMMV.
Set the title of the window. This only works for emulators running in a windowing environment, and is not universally supported. Setting an empty string as the title may let the emulator set a specific default, but it may also leave it empty - it depends on the specific terminal implementation.
Show content on the screen, doing so efficiently.
Show the cursor at its current location.
Move the cursor to the given location, and show it using the appropriate style.
Obtain the terminal window size. The x, y represent the number of columns and rows. The highest valid address will be coord.x-1, coord.y-1.
Start sets up the terminal. This changes terminal settings to put the input stream into raw mode, etc.
Stop is called to stop processing on the screen. The terminal settings will be restored, and the screen may be cleared.
Update the screen, writing every cell. This should be done to repair screen damage, for example.
Wait for at least one event to be posted, for up to the given time.
Wait for at least one event to be posted. This simpler version can be used when the caller is in a simple poll/handle loop (typical for some simple applications.)
Write content to the screen. The content will be displayed using the position and the style currently set. It will wrap at the edge of the display if it is too long.
The position property is used when writing content to the screen when using the simpler write() API. The position will advance as content is written.
The style property is used when writing content to the screen using the simpler write() API.
Screen is implemented by different platforms to provide a common interface for building text best full-screen user interfaces.