[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPIT - Set Input Device Trigger

GPIT (wsid, class, devnum, listid, tnum, triglist)

Purpose

Use GPIT to set the input device trigger for a given input device at the specified workstation. The specified trigger list replaces the current trigger list for the input device. Similar to other input device initialization subroutines, GPIT can only be called when the device is in Request mode, and takes effect the next time the device becomes active.

The primary trigger (trigger list identifier zero) always exists and causes the input to be returned to the application. Secondary triggers (trigger list identifiers beginning with 1) provide the user additional control of the device measure. For example, secondary trigger 3, for stroke device #2 on the 5080 workstation, causes a point to be added to the input buffer. The number of secondary triggers for a given input device can be determined programmatically using the Inquire Number of Secondary Triggers (GPQNST) subroutine.

Not all input devices let the trigger be programmed. This information, as well as the supported trigger types and qualifiers, can be determined using the Inquire Input Trigger Capabilities (GPQIT) subroutine.

Parameters

wsid -- specified by user, fullword integer

Workstation identifier.

class -- specified by user, fullword integer

Input device class (1=LOCATOR, 2=STROKE, 3=VALUATOR, 4=CHOICE, 5=PICK, 6=STRING )

devnum -- specified by user, fullword integer

Device number (>0)

listid -- specified by user, fullword integer

Trigger list identifier (>=0)

tnum -- specified by user, fullword integer

Number of entries in the trigger list which follows (>=0) The primary trigger list must always contain at least one entry. A secondary trigger may have an empty trigger list (zero entries), in which case the trigger is always inoperative.

triglist -- specified by user, array of fullword integers

List of trigger descriptor triplets. The list is an array of trigger descriptors in which each descriptor consists of 3 fullword integers designating the trigger type, low trigger qualifier, and high trigger qualifier. The trigger type field has the following meanings:

Type

Meaning

-1

Change of the measure of the corresponding physical input device.

This type is valid only for the primary (0) trigger list identifier.

The low qualifier specifies the granularity of movement which causes the trigger to fire. The granularity is specified as the amount that the physical device measure must change since the last trigger was fired in order for the trigger to be fired again. The high qualifier must be zero.

 0

Reserved for an implementation dependent trigger that is only valid as the default value. This value cannot be specified.

>0

Physical device number within the button category.

The trigger qualifiers for this trigger type are a range of choices on the indicated physical device. Trigger qualifiers less than 256 for keyboard trigger types are interpreted using the device's input character set. The parameter tnum identifies the number of triplets (trigger descriptors) in the trigger list.

Error Codes

25
SPECIFIED WORKSTATION DOES NOT EXIST
38
WORKSTATION HAS ONLY OUTPUT CAPABILITIES
140
DEVICE NUMBER < ONE OR DEVICE NOT AVAILABLE
141
INPUT DEVICE NOT IN CORRECT MODE
328
INPUT CLASS VALUE IS INVALID
565
WARNING, A TRIGGER QUALIFIER VALUE IS INVALID
567
A TRIGGER TYPE VALUE IS INVALID
568
A TRIGGER QUALIFIER VALUE IS INVALID
569
DEVICE DOES NOT SUPPORT PROGRAMMABLE TRIGGERS
570
SPECIFIED TRIGGER LIST IDENTIFIER DOES NOT EXIST
574
RANGE INVALID, LOW VALUE EXCEEDS HIGH VALUE
575
NUMBER OF ENTRIES IN TRIGGER LIST IS INVALID
576
PRIMARY TRIGGER LIST MUST HAVE AT LEAST ONE ENTRY
595
A TRIGGER TYPE IS INCOMPATIBLE WITH THE TRIGGER LIST IDENTIFIER

Related Subroutines

GPQDIT
Inquire Default Input Device Triggers
GPQIT
Inquire Input Trigger Capabilities
GPQNST
Inquire Number of Secondary Triggers

RCP code

201340417 (X'0C003601')


[ Previous | Next | Contents | Glossary | Home | Search ]