Previous Next Up Title Contents Index Functions Index Top Library

AWAIT EVENT

pawait_event


CALL SEQUENCE

void pawait_event (timeout, ws_id, class, input_dev)

INPUT PARAMETERS

Pfloat	timeout,

OUTPUT PARAMETERS

Pint	*ws_id,
Pin_class	*class,
Pint	*input_dev

ARGUMENTS

timeout,
Time-out (seconds)
ws_id,
workstation identifier
class,
Device class
input_dev
Logical input device number

TYPES

typedef enum {
	PIN_NONE, 
	PIN_LOC, 
	PIN_STROKE, 
	PIN_VAL, 
	PIN_CHOICE, 
	PIN_PICK, 
	PIN_STRING
} Pin_class;

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 timeout expires. If the time-out 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 input device logical number are returned and the associated values are made available for interrogation by a function of type GET <input class>.

Note:

Example:

/* Get next event into the PHIGS event queue ; return without waiting if queue is empty */
	Pfloat timeout;
	Pint ws_id,input_dev;
	Pin_class class;
	......
	timeout = 0.;
	pawait_event(timeout,&ws_id,&class,&input_dev);
	......

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