|Updates the screen, suspends the program, and allows the user to have a look at the screen while it waits for a button to be pushed. More...|
Updates the screen, suspends the program, and allows the user to have a look at the screen while it waits for a button to be pushed.
Pause is a utility routine that combines a common sequence of input routines. The sequence has the effect of making sure that the screen display is up-to-date, suspending program execution, and waiting for the user to push any button, either on the mouse or the keyboard. When the user does push a button, the button push is put back on the queue of pending events, and Pause's caller can retrieve it if necessary.
In pseudo- C, Pause corresponds approximately to;
Enable_Location_Events ("?locater", "?Picture", "v") Enable_Button_Events ("?Keyboard", "anything") Await_Event (&junk) Requeue_Event () Disable_Button_Events ("?Keyboard", "anything") Disable_Location_Events ("?Locater", "?Picture", "v")
In addition to these actions, Pause discards any "^", "O", or "*" events, damps out the error messages that would be caused by a missing locater or keyboard device, and discards any event that had been requeued by the previous call to Pause.
Pause implicitly makes the display accurate, courtesy of Await_Event() .
If there are no possible events–neither a locater nor a keyboard is available, and no wakeup has been left running–Pause returns immediately.
Pause only knows about "?Picture" as a possible display device. If "?Picture" is dead or undefined, or if you have other display segments alive, Pause won't understand the situation. In these cases you should build your own detailed "pause" routine.