XlAsciiInput.mesa
Copyright Ó 1988, 1990, 1991 by Xerox Corporation. All rights reserved.
Christian Jacobi, August 15, 1988 4:47:32 pm PDT
Christian Jacobi, March 7, 1991 5:51 pm PST
XlAsciiInput: CEDAR DEFINITIONS
~ BEGIN
Handle: TYPE = REF;
WindowDestroyed:
ERROR;
May be raised if input from a destroyed window or dead connection is attempted.
However, this might not be noticed unless event really is enabled.
EnableAsciiInput:
PROC [c:
Xl.Connection, w:
Xl.Window]
RETURNS [handle: Handle];
Enables ascii input from window.
CharAvailable:
PROC [handle: Handle, wait:
BOOL ¬
FALSE]
RETURNS [
INT];
Returns characters available fast for GetChar.
May raise WindowDestroyed.
GetChar:
PROC [handle: Handle, wait:
BOOL ¬
TRUE]
RETURNS [ch:
CHAR];
Returns character which has been typed.
If wait is FALSE and no character has yet been typed, returns 0c.
May raise WindowDestroyed.
[No GetRope procedure available to discourage applications without echo.]
TypeIn:
PROC [handle: Handle, chars:
REF];
Simulate user typein.
chars: REF CHAR or Rope.ROPE.
If multiple chars, sequence is atomic towards interactive input.
ResetBuffer:
PROC [handle: Handle];
Discards characters typed in so far.
END.