15.1 Basic Input Streams

CLIM provides a stream-oriented input layer that is implemented on top of the sheet input architecture. The basic CLIM input stream protocol is based on the character input stream protocol proposal submitted to the ANSI Common Lisp committee by David Gray. This proposal was not approved by the committee, but CLIM provides an implementation of the basic input stream facilities.


Summary: This class provides an implementation of the CLIM's basic input stream protocol based on CLIM's input kernel. It defines a handle-event method for keystroke events and queues the resulting characters in a per-stream input buffer. Members of this class are mutable.

stream-read-char [Generic Function]

Arguments: stream

Summary: Returns the next character available in the input stream stream , or :eof if the stream is at end-of-file. If no character is available, this function will wait until one becomes available.

stream-unread-char [Generic Function]

Arguments: stream character

Summary: Places the character character back into the input stream stream 's input buffer. The next call to read-char on stream will return the unread character. The character supplied must be the most recent character read from the stream.

stream-read-char-no-hang [Generic Function]

Arguments: stream

Summary: Like stream-read-char , except that if no character is available, the function returns nil .

stream-peek-char [Generic Function]

Arguments: stream

Summary: Returns the next character available in the input stream stream . The character is not removed from the input buffer, so the same character will be returned by a subsequent call to stream-read-char .

stream-listen [Generic Function]

Arguments: stream

Summary: Returns t if there is input available on the input stream stream , nil if not.

stream-read-line [Generic Function]

Arguments: stream

Summary: Reads and returns a string containing a line of text from the input stream stream , delimited by the #\Newline character.

stream-clear-input [Generic Function]

Arguments: stream

Summary: Clears any buffered input associated with the input stream stream and returns nil .

CommonLisp Interface Manager 2.0 User's Guide - 18 Mar 2005