Pause

Functions

void Pause (void)
 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...
 

Detailed Description

Function Documentation

◆ Pause()

void Pause ( void  )

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.

DETAILS

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.

NOTES

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.

RESTRICTIONS

See also
Get_Selection, Await_Event, Enable_Location_Events, Show_Location, Show_Location_Source, Requeue_Event.