GPR_$EVENT_WAIT GPR Calls GPR_$EVENT_WAIT
NAME
gpr_$event_wait - waits for an event.
FORMAT
unobscured := gpr_$event_wait (event_type, event_data, position, status)
DESCRIPTION
This routine waits for an event. This routine suspends process execution
until the occurrence of an event type enabled with gpr_$enable_input. If
the event type is keystroke or button, this routine reports only charac-
ters in the enabled keyset. Input routines report button events as ASCII
characters.
Return
unobscured
A Boolean value that indicates whether or not the window is
obscured; a false value means that the window is obscured. This
value is always true unless the program has called
gpr_$set_obscured_opt and specified an option of either
gpr_$ok_if_obs or gpr_$input_ok_if_obs.
Output Parameters
event_type
The type of event that occurred, in gpr_$event_t format. This is a
2-byte integer. One of the following predefined values is returned:
gpr_$coded_keys Coded key input from a keyboard
gpr_$function_keys Function key input from a keyboard
gpr_$physical_keys Physical key input from a keyboard
gpr_$keystroke Keystroke key input from a keyboard
gpr_$buttons Input from mouse or bitpad puck buttons
gpr_$locator Input from a touchpad or mouse
gpr_$locator_update Most recent input from a touchpad or mouse
gpr_$entered_window Cursor has entered window
gpr_$left_window Cursor has left window
gpr_$kbd_entered_window Keyboard focus has entered window
gpr_$kbd_left_window Keyboard focus has left window
gpr_$locator_stop Input from a locator has stopped
gpr_$dial Input from a dial box
gpr_$pfk Input from LPFK box
gpr_$no_event No event has occurred
event_data
The keystroke or button character associated with the event, or the
character that identifies the window associated with an entered win-
dow event. This parameter is not modified for other events.
position
The position on the screen or within the window at which graphics
input occurred, in gpr_$position_t format. This data type is 4
bytes long.
status
Completion status, in status_$t format.
SEE ALSO
gpr_$enable_input, gpr_$set_cursor_position, gpr_$set_obscured_opt.
NOTES
In direct mode, time-out values do not apply to calls to gpr_$event_wait;
that is, gpr_$event_wait waits indefinitely.
The input routines report button events as ASCII characters. "Down"
transitions range from "a" to "d"; "up" transitions range from "A" to
"D". The three mouse keys start with (a/A) on the left side. As with
keystroke events, button events can be selectively enabled by specifying
a button keyset.
Unless locator data has been processed since the last event was reported,
"position" will be the last position given to gpr_$set_cursor_position.
If locator data is received during this call, and gpr_$locator events are
not enabled, the GPR software will display the arrow cursor and will set
the keyboard cursor position.
The display does not need to be acquired to call gpr_$event_wait. If the
display is acquired, gpr_$event_wait will implicitly release the display
when the current process is waiting for an event to occur, or when an
event that has not been enabled occurs and that event must be handled by
the Display Manager.
Any key that is used as a modifier, for example, shift or control, is not
delivered to the application as a separate event except for the case of
physical key events.