GINO Graphics Suite - GINO v9.0    

gWaitForEvent

Syntax

[C/C++:]
void gWaitForEvent(int *intype);
[F90:]
subroutine gWaitForEvent(intype)
integer, intent(out) :: intype

Arguments

intype
The event type being returned

= GNULL, Null event type
= GKEYPRESS, Key or mouse button press
= GSEGMENT, Picture segment number
= GSEGMENTANDKEY, Picture segment number and key/mouse button
= GLOCATOR, Screen position and key/mouse button press
= GSTRING, Text string
= GREALS, String of real values
= GINTEGERS, String of integer values
= GMOVEMENT, Pointer, mouse or tablet movement
= GKEYRELEASE, Key or mouse button release
= GRESIZE, Window resize event
= GPOINTERLEAVING, Pointer leaving window
= GPOINTERENTERING, Pointer entering window
= GMOUSEWHEEL, Mouse wheel movement

Description

The routine gWaitForEvent() reads the next discrete event on the event queue and passes back its event type in intype. If the Null event has been enabled (gAddEventType(GNULL)), gWaitForEvent() will return immediately, even if no event has occurred, otherwise the routine will wait for a requested event to be placed on the event queue by the device and then returns to the application.

If events are not available on the current output device GINO will attempt to emulate the first 5 events through the following means. Only the last event enabled with gAddEventType() will be emulated in this way and intype will return one of the following values. Events are emulated as follows:

GKEYPRESS - Single key or cursor input

GSEGMENT - Cursor followed by gEnqSegHit()

GSEGMENTANDKEY - Cursor input followed by gEnqSegHit()

GLOCATOR - Cursor input

GSTRING - Input record

All other information returned by gWaitForEvent() is obtained by calling the routine gGetEventRecord().

If gWaitForEvent() is called before calling routine gAddEventType() or no event of the types requested have occurred, intype will be set to 0.

See Also

gWaitForEvent Usage
gGetEventRecord
gAddEventType