DIRECTORY BasicTime, Rope; Idle: CEDAR DEFINITIONS = BEGIN StartIdleProcesses: PROC []; Sleep: PROC [proc: ImageProc ¬ DefaultImageProc, powerOff: BasicTime.GMT ¬ BasicTime.nullGMT]; ImageProc: TYPE = PROC [w, h: CARDINAL] RETURNS [Rope.ROPE]; DefaultImageProc: ImageProc; IsIdle: PROC RETURNS [BOOL]; RegisterIdleHandler: PROC [handler: IdleHandler, data: REF ¬ NIL] RETURNS [IdleRegistration]; UnregisterIdleHandler: PROC [registration: IdleRegistration]; IdleHandler: TYPE = PROC [data: REF, reason: IdleReason]; IdleReason: TYPE = {becomingIdle, becomingBusy}; IdleRegistration: TYPE = REF; END. ž Idle.mesa Copyright Σ 1985, 1986, 1991 by Xerox Corporation. All rights reserved. Levin on December 12, 1983 3:09 pm Russ Atkinson (RRA) February 5, 1985 3:55:26 pm PST Bier, December 1, 1988 1:47:15 am PST ... puts the user interface into an idle state. The normal display screen is replaced by a black one with a roving, client-selected image. Control-shift-shift (to change virtual terminals) and key combinations that invoke a debugger are disabled. When a key is pressed, the black screen disappears and the user is asked to log in. If the login fails, the terminal reverts to the quiescent state; if the login succeeds, Sleep returns to its caller after restoring the terminal to its state at the time of invocation. `proc' provides the roving image. It is invoked every time Sleep chooses to change the coordinate position, which varies randomly between 0.25 and 2.0 seconds. The 'powerOff' parameter, unless defaulted, specifies the time at which the processor is to be powered off. ... returns TRUE iff the machine has entered the idle state. ... registers an idle handler to be called when the terminal is either about to become idle or about to become busy after being idle. The callback data will be passed on to the handler. The user should not rely on the order of handlers called. ... unregisters the idle handler. The registration given must have resulted from RegisterIdleHandler. If the given registration is no longer valid, this procedure call will be ignored. The type of the handler. The data is as given to RegisterIdleHandler, and the reason is explained below. If the reason is becomingIdle, then the machine is not yet idle when the procedure is called. If the reason is becomingBusy, then the machine is still idle when the procedure is called. becomingIdle => the terminal is about to be made idle. The swat watcher has NOT been turned off yet, but is about to be made so. becomingBusy => the terminal is about to be made not idle. The swat watcher has been turned on again. Also, the user has logged in, and if there are procedures to be run when the profile changes then they have been run. Really this is just a unique key to identify registrants. ΚΎ–(cedarcode) style•NewlineDelimiter ™codešœ ™ Kšœ Οeœ=™HKšœ"™"K™3K™%—K˜šΟk ˜ Kšœ˜—K˜KšΟnœžœž œž˜K˜KšŸœžœ˜K˜šŸœžœ:žœ˜^Kšœ‡™‡Kšœ ™ K™k—K˜Kš œ žœžœžœžœžœ˜