Previous Next Up Title Contents Index Functions Index Top Library

AWAIT EVENT

PWAIT


CALL SEQUENCE

PWAIT (TOUT, WKID, ICL, IDNR)

INPUT PARAMETERS

REAL	TOUT

OUTPUT PARAMETERS

INTEGER	WKID
INTEGER	ICL
INTEGER	IDNR

ARGUMENTS

TOUT
Maximum time allowed (in seconds).
WKID
Workstation identifier.
ICL
Input device class
IDNR
Logical input device number.

PHIGS STATE

(PHOP, WSOP, *, *).

EFFECT

Waits for an event on the workstations that are in EVENT mode.

If the input queue is empty, GPHIGS waits until an event takes place or until the TOUT expires. If the timeout expires without an event taking place, a NONE value is returned to the input device class. If there is at least one report in the queue, the oldest is removed from the queue and transferred to the PHIGS state list in the current event report. The workstation identifier, the class of input device and logical input device number are returned and the associated values are made available for interrogation by a function of type GET <input class>.

Note:

1) Operation takes place even if the event queue is full (error 256).

2) A timeout value less than or equal to zero causes the queue to be immediately scanned and a NONE value is returned if the queue is empty.

3) Some systems do not provide an efficient timeout function; in this case, a non-zero timeout value can cause an infinite wait.

Example:

C Get next event into the PHIGS event queue ; return without waiting if queue is empty 
	REAL TOUT
	INTEGER WKID,ICL,IDNR
	......
	TOUT = 0.
	call PWAIT(TOUT,WKID,ICL,IDNR)
	......

ERRORS

3
Ignoring function, function requires state (PHOP, WSOP,*,*)
256
Warning, the input queue has overflowed

SEE ALSO

set locator mode, set stroke mode, set valuator mode, set choice mode, set pick mode, set string mode, get locator, get stroke, get valuator, get choice, get pick, get string , flush device events, inquire more simultaneous events.


Previous Next Up Title Contents Index Functions Index Top Library