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

Appendix B. Event Data Formats


Event Summary

The following table summarizes all events supported by the graPHIGS APIscreen In this table, columns titled as "major" and "minor" show the contents of major and minor code parameters for various event related functions. When the column has "None", the corresponding parameter is not set by the graPHIGS APIscreen The last column shows a GET function to be used for retrieving the detail event data of each event. When it has "None", the event has no event data to be retrieved. In this case, a GET function will result in an error.

Class Meaning Major Minor Data
1 Locator Workstation ID Device number Locator
2 Stroke Workstation ID Device number Stroke
3 Valuator Workstation ID Device number Valuator
4 Choice Workstation ID Device number Choice
5 Pick Workstation ID Device number (Extended) Pick
6 String Workstation ID Device number String
11 Locator_Break Event Workstation ID Device Number None
12 Stroke_Break Event Workstation ID Device Number None
13 Valuator_Break Event Workstation ID Device Number None
14 Choice_Break Event Workstation ID Device Number None
15 Pick_Break Event Workstation ID Device Number None
16 String_Break Event Workstation ID Device Number None
101 Link switch out Workstation ID 0 None
102 Link switch in Workstation ID 0 None
103 Update completion Workstation ID Display status None
104 Input overflow events Workstation ID 0 None
105 Window Resize Notification Event Workstation ID 0 None
106 Window Exposure Notification Event Workstation ID 0 Exposure data
107 Window Deletion Notification Event Workstation ID 0 None
201 Broadcast message Sender supplied Sender supplied Message
202 Private message Sender supplied Sender supplied Message
301 Threshold Exceeded Structure Store ID Threshold value None
401 Error Event Error Number 0 None

Event Data Format

When the application specifies an event exit routine, the following event data and its length are also passed to the routine.

Locator Event (Event Class 1)

                    ---------------------
     WORD  1        |       view        |  Fullword integer
                    ---------------------
           2-4      |       position    |  3 short floating-point numbers
                    ---------------------
 

view
View index in which the locator position resides.
position
Locator 3-D position in world coordinates.

The length of this event data is always 16.

Stroke Event (Event Class 2)

                    ---------------------
     WORD  1        |       view        |  Fullword integer
                    ---------------------
           2        |       number      |  Fullword integer
                    ---------------------
           3-n      |       plist       |  Array of 3 short
                    /                   /  floating-point numbers
                    |                   |
                    ---------------------

view
View index in which the stroke points reside.
number
Number of points in the stroke point list.
plist
A list of 3-D points in world coordinates.

The length of this event data is n x 12 + 8.

Valuator Event (Event Class 3)

                    ---------------------
     WORD  1        |       value       |  Short floating-point number
                    ---------------------

value
Valuator value.

The length of this event data is always 4.

Choice Event (Event Class 4)

                    ---------------------
     WORD  1        |       status      |  Fullword integer
                    ---------------------
           2        |       choice      |  Fullword integer
                    ---------------------

status
Choice device status. This parameter takes one of the following values.
1 =
NO_CHOICE
2 =
OK
choice
Choice alternative. When the choice status is 2 = OK , this parameter includes one of the choice alternatives available on the choice device. Otherwise, this parameter may contain any number.

The length of this event data is always 8.

Pick Event (Event Class 5)

                    ---------------------
     WORD  1        |       status      |  Fullword integer
                    ---------------------
 
                    ---------------------
     WORD  1        |       status      |  Fullword integer
                    ---------------------
           2        |       depth       |  Fullword integer
                    ---------------------
           3-n      |       n-path      |  Array of 3 fullword integers
                    /                   /
                    |                   |
                    ---------------------
 
                    ---------------------
     WORD  1        |       status      |  Fullword integer
                    ---------------------
           2        |       view        |  Fullword integer
                    ---------------------
           3-18     |       modelx      |  16 short floating-point numbers
                    |                   |
                    ---------------------
          19-21     |       pos         |  3 short floating-point numbers
                    |                   |
                    ---------------------
          22        |       depth       |  Fullword integer
                    ---------------------
          23-n      |       x-path      |  Array of 4 fullword integers
                    /                   /
                    |                   |
                    ---------------------

status
Pick status. This parameter takes one of the following values and specifies which format is actually used.
0 =
NO_PICK
1 =
OK_NORMAL PICK
2 =
OK_EXTENDED PICK
When the pick status is 0 = NO PICK , the first format is used and so the length of the event data is 4. Otherwise, the event data is represented by the second or third format according to the pick device's type. If the device is the normal pick device, the second format is used. If the device is the extended pick device, the third format is used.
depth
Pick path depth.
n-path
Normal pick path. This parameter is a list of pick path triplets, -- a structure identifier, a pick identifier and an element number.
view
View index of a view in which the picked primitive resides.
modelx
Composite modeling transformation applied to the picked primitive. Elements of the transformation matrix are returned in the order M11 ,M12 ,M13 ,M14 ...
pos
3-D position in NPC where the center of pick aperture existed when the pick occurred.
x-path
Extended pick path. This parameter is a list of pick path quadruples, -- a structure identifier, a pick identifier, a label identifier and a structure element number.

String Event (Event Class 6)

                    ---------------------
     WORD  1        |       length      |  Fullword integer
                    ---------------------
           2-n      |       string      |  Character string
                    /                   /
                    |                   |
                    ---------------------

length
Length of the character string in bytes (does not include the length field itself).
string
Character string. When the length of this character string is not a multiple of 4, up to 3 padding bytes are supplied. Therefore, the length of this event data is ((length+7) /4)x4.

Window Exposure Event (Event Class 106)

                    ---------------------
     WORD  1        |   Exposure data   |  0-31 bits
                    ---------------------
     WORD  2        |   Exposure data   |  32-63 bits
                    ---------------------
 
 

exposure data
64 bits of data indicating which of the views in numerical order are affected by the exposure event. Bit 0 is the flag for view 0 and is the most significant bit. Each bit is set as follows:
0 =
NOT_AFFECTED_BY_EXPOSURE
1 =
IS_AFFECTED_BY_EXPOSURE

Application Message Event (Event Class 201 and 202)

                    ---------------------
     WORD  1        |       length      |  Fullword integer
                    ---------------------
           2-n      |  message data     |  Byte string
                    /                   /
                    |                   |
                    ---------------------

length
Length of the character string in bytes (does not include the length field itself).
message data
A byte string supplied by the sender. When the length of this data is not a multiple of 4, up to 3 padding bytes are supplied. Therefore, the length of this event data is ((length+7) /4)x4.


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