GPR_$ENABLE_INPUT GPR Calls GPR_$ENABLE_INPUT
NAME
gpr_$enable_input - enables an event type and a selected set of keys.
FORMAT
gpr_$enable_input (event_type, key_set, status)
DESCRIPTION
This routine enables an event type and a selected set of keys. This rou-
tine specifies the type of event and event input for which
gpr_$event_wait or gpr_$cond_event_wait is to wait.
This routine applies to the current bitmap. enables an event type and a
selected set of keys. However, enabled input events are stored in attri-
bute blocks (not with bitmaps) in much the same way as attributes are.
When a program changes attribute blocks for a bitmap during a graphics
session, the input events you enabled are lost unless you enable those
events for the new attribute block.
Programs must call this routine separately for each event type to be
enabled.
No event types are enabled by default.
The keyset must correspond to the specified event type. For example, use
['#'..'~'] (in Pascal) to enable all normal printing graphics. Use
[chr(0)..chr(127)] to enable the entire ASCII character set. Except in
borrow-display mode, it is a good idea to leave at least the CMD and
NEXT_WINDOW keys out of the keyset so that the user can access other
Display Manager windows.
The insert files /sys/ins/kbd.ins.pas, /sys/ins/kbd.ins.ftn and
/usr/apollo/include/kbd.h contain definitions for the non-ASCII keyboard
keys in the range 128 - 255.
A group of calls is available for manipulating large sets in FORTRAN or
C. The calls are:
⊕ lib_$init_set
⊕ lib_$add_to_set
⊕ lib_$clr_from_set
⊕ lib_$member_of_set.
These calls are fully described in Programming with General System Calls.
Events and keyset data not enabled with this routine will be handled by
the Display Manager in frame or direct mode and discarded in borrow-
display mode.
Input Parameters
event_type
The type of event to be enabled, in gpr_$event_t format. The types
of events are:
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 dial box
gpr_$pfk Input from LPFK box
gpr_$no_event No event has occurred
key_set
The set of specifically enabled characters when the event class is
enabled, in gpr_$keyset_t format. This parameter is specified for
event types of gpr_$keystroke and gpr_$buttons. In Pascal, this is
a set of characters. In FORTRAN and C this can be implemented as an
eight element array of 4-byte integers.
Output Parameters
status
Completion status, in status_$t format.
SEE ALSO
gpr_$set_cursor_active.
NOTES
When locator events are disabled, the GPR software will display the arrow
cursor and will set the keyboard cursor position when locator data is
received. For an exact cursor path use gpr_$locator with
gpr_$set_cursor_position. Most applications can use gpr_$locator_update.
With this value, GPR automatically tracks the most recent cursor location
and gpr_$set_cursor_position is not needed.
gpr_$locator_update eliminates multiple locator events between
gpr_$event_wait calls. Only one locator event will be delivered at a
time, and the reported position will be the most recent one.
Regardless of the type(s) of events you enable, the only way to see the
cursor is to call the gpr_$set_cursor_active routine.