IdleBackdoor.mesa
Copyright Ó 1986, 1991, 1992 by Xerox Corporation. All rights reserved.
Russ Atkinson (RRA) May 12, 1986 8:10:48 pm PDT
Last tweaked by Mike Spreitzer on May 26, 1987 5:17:11 pm PDT
Bier, December 1, 1988 1:53:43 pm PST
Christian Jacobi, March 3, 1992 12:21 pm PST
DIRECTORY
KeyTypes, ViewersWorldRefType;
IdleBackdoor:
CEDAR
DEFINITIONS = {
Activity: TYPE ~ {idle, loggingIn, unidle};
FullIdleHandler: TYPE ~ PROC [data: REF ANY, old, new: Activity];
IdleRegistration: TYPE = REF;
RegisterFullIdleHandler: PROC [handler: FullIdleHandler, data: REF ¬ NIL] RETURNS [IdleRegistration];
UnregisterFullIdleHandler: PROC [registration: IdleRegistration];
DoASleep:
PROC;
= TestAndSet[{RETURN [idle, loggingIn=>wait, unidle=>idle]}]
WaitForIdle:
PROC [idle:
BOOL];
Wait for given idleness.
Animator: TYPE ~ REF AnimatorPrivate;
AnimatorPrivate:
TYPE ~
RECORD [
Animate: PROC [world: ViewersWorldRefType.Ref, ShouldReturn: PROC [watch: KeyFilter] RETURNS [BOOL], data: REF ANY ¬ NIL],
data: REF ANY ¬ NIL
];
defaultAnimator: READONLY Animator;
GetAnimator: PROC RETURNS [Animator];
SetAnimator:
PROC [a: Animator];
The animator can only change when not animating; this procedure waits until that's true.
PushAnimator: PROC [a: Animator];
PopAnimator: PROC;
KeyCode: TYPE = KeyTypes.KeyCode;
KeyFilter:
TYPE =
RECORD [
first, last: KeyTypes.KeyCode,
pass:
PACKED
ARRAY KeyTypes.KeyCode
OF
BOOL
elts outside [first .. last] always considered FALSE
];
defaultKeyFilter: READONLY KeyFilter;
}.