TtyScreen

Undocumented in source.

Constructors

this
this(TtyImpl tt, const(Termcap)* tc)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

beep
void beep()
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
colors
int colors()
Undocumented in source. Be warned that the author may not have intended to support it.
enableMouse
void enableMouse(MouseEnable en)
Undocumented in source. Be warned that the author may not have intended to support it.
enablePaste
void enablePaste(bool b)
Undocumented in source. Be warned that the author may not have intended to support it.
fill
void fill(string s, Style style)
Undocumented in source. Be warned that the author may not have intended to support it.
fill
void fill(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
hasKey
bool hasKey(Key k)
Undocumented in source. Be warned that the author may not have intended to support it.
hasMouse
bool hasMouse()
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
Cell opIndex(size_t x, size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(Cell c, size_t x, size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
receiveEvent
Event receiveEvent(Duration dur)
Undocumented in source. Be warned that the author may not have intended to support it.
receiveEvent
Event receiveEvent()

This variant of receiveEvent blocks forever until an event is available.

resize
void resize()
Undocumented in source. Be warned that the author may not have intended to support it.
setSize
void setSize(Coord size)
Undocumented in source. Be warned that the author may not have intended to support it.
setStyle
void setStyle(Style style)
Undocumented in source. Be warned that the author may not have intended to support it.
show
void show()
Undocumented in source. Be warned that the author may not have intended to support it.
showCursor
void showCursor(Coord pos, Cursor cur)
Undocumented in source. Be warned that the author may not have intended to support it.
showCursor
void showCursor(Cursor cur)
Undocumented in source. Be warned that the author may not have intended to support it.
size
Coord size()
Undocumented in source. Be warned that the author may not have intended to support it.
start
void start(Tid tid)
Undocumented in source. Be warned that the author may not have intended to support it.
start
void start()
Undocumented in source. Be warned that the author may not have intended to support it.
stop
void stop()
Undocumented in source. Be warned that the author may not have intended to support it.
sync
void sync()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Screen

clear
void clear()

Clears the screen. This doesn't take effect until the show function is called.

opIndex
Cell opIndex(size_t x, size_t y)

Retrive 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.

opIndex
Cell opIndex(Coord pos)

Convenience for indexing

opIndexAssign
void opIndexAssign(Cell , size_t x, size_t y)

Set the content for for a given location. This won't necessarily take effect until the show function is called.

opIndexAssign
void opIndexAssign(Cell c, Coord pos)

Convenience for indexing.

opDollar
size_t opDollar()

Support $ operation in indices.

showCursor
void showCursor(Cursor )

Show the cursor at its current location.

showCursor
void showCursor(Coord pos, Cursor cur)

Move the cursor to the given location, and show it using the appropriate style.

hasKey
bool hasKey(Key )

It would be nice to know if a given key is supported by a terminal. Note that this is best-effort, and some terminals may present the ability to support a key, without actually having such a physical key and some combinations may be suppressed by the emulator or the environment the emulator runs in.

size
Coord size()

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.

receiveEvent
Event receiveEvent(Duration dur)

If start was called without a Tid to send to, then events are delivered into a queue that can be polled via this API. This function is thread safe.

receiveEvent
Event receiveEvent()

Receive events, withotu a timeout. This only works if start was called without a tid.

enablePaste
void enablePaste(bool b)

Enable backeted paste mode mode. Bracketed paste mode will pasted content in a single event, and is therefore distinguishable from individually typed characters.

hasMouse
bool hasMouse()

Do we have a mouse? This may be overly optimitistic for some terminals, but it is a good first guess.

enableMouse
void enableMouse(MouseEnable en)

Enable mouse mode. This can cause terminals/emulators to behave differently -- for example affecting the ability to scroll or use copy/paste.

enableMouse
void enableMouse()

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.

disableMouse
void disableMouse()

Disable all mouse handling/capture.

colors
int colors()

If the terminal supports color, this returns the the number of colors.

show
void show()

Show content on the screen, doing so efficiently.

sync
void sync()

Update the screen, writing every cell. This should be done to repair screen damage, for example.

beep
void beep()

Emit a beep or bell. This is done immediately.

setSize
void setSize(Coord )

Attempt to resize the terminal. YMMV.

setStyle
void setStyle(Style )

Set the default style used when clearning the screen, etc.

fill
void fill(string s, Style style)

Fill the entire screen with the given content and style. Content is not drawn until the show() or sync() functions are called.

fill
void fill(string s)

Fill the entire screen with the given content, but preserve the style.

resize
void resize()

Applications should call this in response to receiving a resize event. (This can't be done automatically to avoid thread safety issues.)

start
void start()

Start should be called to start processing. Once this begins, events (see event.d) will be delivered to the caller via std.concurrency.send(). Additioanlly, this may change terminal settings to put the input stream into raw mode, etc.

start
void start(Tid )
Undocumented in source.
stop
void stop()

Stop is called to stop processing on teh screen. The terminal settings will be restored, and the screen may be cleared. Input events will no longer be delivered. This should be called when the program is exited, or if suspending (to run a subshell process interactively for example).

Meta