Plan B User's Manual


Name

term ­ Terminal boxes.

Synopsis

/b/term
/b/term/*/text
/b/term/*/evs
/b/term/*/mouse
/b/term/*/draw

Description

The box /b/term is used to contain boxes that represent text I/O boxes, also termed terminals. On hosted implementations, they represent terminal devices—whatever that may be for the host environment.

Other implementations may correspond to short text messages in GSM, keyboards attached to the network, and other text I/O devices.

The box owner may create new boxes into /b/term on hosted environments to allocate new terminal devices.

The implementation for computer terminals collects characters from the device until a newline is typed. A copy from either the terminal box or its inner box named text would return a line at a time. Some characters are special: The backspace character erases previous characters, the delete key raises an interrupt error, and the control-D key causes an end of file (zero bytes copied).

The evs box is used to determine where to send interrupt events. Such events are sent to the process linked to this box.

The mosue box can be used to copy mouse/refresh events from it. The format of the data obtained is that used on Plan 9.

The draw box is an interface to the graphics device associated with the terminal. It contains inner boxes that follow mostly the conventions of the Plan 9 draw device. Unlike draw in Plan 9, there is no connection to the device in Plan B.

Announces

/b/term as /term

Source

/src/b/*/termbox.c

Bugs

Lines should be collected by using inner boxes.

The draw device should be documented here, not just by giving a pointer to Plan 9.



Plan B User's Manual. First edition.