## virtual-terminal.api
#
# A simple virtual terminal built on top of the text widget;
# it supports an interface that is compatible with the file
# package in threadkit.
#
# Compare to:
#
src/lib/x-kit/widget/old/text/one-line-virtual-terminal.api#
#
# "The virtual terminal widget provides a simple
# way to support traditional IO stream-based
# applications. It is implemented on top of the
# text widget, adding a device driver for the
# keyboard and the instream/outstream interface.
# [...]
# "Writing on the outstream displays text in the
# window. User input is line-buffered; it is
# only available on the instream after the user
# has types a carriage return ("\m") or newline
# ("\n"). An input line can be edited, with
# backspace ("\h") and delete ("\x7f") erasing
# the previously input character. Tab characters
# are not handled correctly, nor does the
# [virtual_terminal] provide a visible cursor."
#
# -- p34, Gansner+Reppy's 1993 eXene widget manual,
# http://mythryl.org/pub/exene/1993-widgets.ps
# Compiled by:
#
src/lib/x-kit/widget/xkit-widget.sublib### "I mean, if 10 years from now, when you are
### doing something quick and dirty, you suddenly
### visualize that I am looking over your shoulders
### and say to yourself:
### ``Dijkstra would not have liked this'',
### well that would be enough immortality for me."
###
### -- E.J. Dijstra
# This api is implemented in:
#
#
src/lib/x-kit/widget/old/text/virtual-terminal.pkgstipulate
package fil = file; # file is from
src/lib/std/src/posix/file.pkg package wg = widget; # widget is from
src/lib/x-kit/widget/old/basic/widget.pkgherein
api Virtual_Terminal {
Virtual_Terminal;
as_widget: Virtual_Terminal -> wg::Widget;
make_virtual_terminal
:
wg::Root_Window
->
{ rows: Int,
cols: Int
}
->
Virtual_Terminal;
open_virtual_terminal
:
Virtual_Terminal
->
( fil::Input_Stream,
fil::Output_Stream
);
};
end;
## COPYRIGHT (c) 1991 by AT&T Bell Laboratories. See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.