GDDM-GKS V1R1 Programming Guide and Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


GINSK

GDDM-GKS V1R1 Programming Guide and Reference
SC33-0334-00



Purpose



  GINSK
                                    
                                    
 (wkid, skdnr, tnr, n, ipx, ipy,
 pet, xmin, xmax, ymin, ymax,
 buflen, ldr, datrec)
   
 APL code  1494
 GKS RCP code  X'38004600' (939542016)
   


Function: To initialize stroke.

Input function. Initializes a stroke input device at a workstation.

Parameters


wkid (specified by user) (fullword integer)
The workstation identifier.

skdnr (specified by user) (fullword integer)
The stroke device number. GDDM-GKS provides only one stroke device at a workstation. The stroke device number is always 1.

tnr (specified by user) (fullword integer)
The initial normalization transformation number.

n (specified by user) (fullword integer)
The number of points in the initial stroke. This must be less than or equal to the length of the stroke input buffer buflen.

ipx (specified by user) (array of short floating-point numbers)

ipy (specified by user) (array of short floating-point numbers)
The initial stroke in world coordinates.

pet (specified by user) (fullword integer)
The prompt and echo type.


GDDM-GKS provides prompt and echo types 1, 3, and 4.

xmin (specified by user) (short floating point)

xmax (specified by user) (short floating point)

ymin (specified by user) (short floating point)

ymax (specified by user) (short floating point)
The echo area in device coordinates. The echo area is not used for any of the available prompt and echo types.

buflen (specified by user) (fullword integer)
The length of the stroke input buffer. If this is greater than the maximum input buffer size for the device (held in the workstation description table), the maximum input buffer size is used.

ldr (specified by user) (fullword integer)
The dimension of the data record array datrec. If the value specified is 0, a workstation-dependent default data record is used.

datrec (specified by user) (array of 80-byte character tokens)
The data record, containing additional information according to the prompt and echo type.


Data records are defined for all the stroke prompt and echo types. The Pack data record (GPRECS) function can be used to create the input data records.

Operating states


WSOP, WSAC, SGOP

Related functions


Request stroke (GRQSK), Set stroke mode (GSSKM), Inquire default stroke device data (GQDSK), Inquire stroke device state (GQSKS)

Description


This function initializes the stroke device by defining the initial stroke, normalization transformation number, prompt and echo type, echo area, and stroke data record.

The initial stroke must lie within the window of the normalization transformation specified by tnr. The transformation tnr is used to transform the initial stroke to NDC. The transformed stroke must lie within the workstation window and outside the viewport of any normalization transformation with higher priority than tnr. The stroke is considered to lie within a window or viewport only if all of the points in the stroke are inside. Error 152 is reported if these conditions are not met.

The initial stroke device position is at the first point of the initial stroke.

The prompt and echo types provided by GDDM-GKS are:

pet=1
Display a line joining successive points of the current stroke. The echo area is not used. The data record is used only at 3270-PC/G and /GX ranges, and IBM 5080 workstations; it contains elements for the x,y interval and time interval. If these elements are all zero or the data record is not used, points in the stroke are generated when the operator moves the cursor and activates the device by pressing a mouse or tablet button, or the Enter key. If the data record is used and any of x,y interval or time interval are not zero, points are generated automatically as the cursor is moved, tracing an outline of the cursor path.

The data record can be created by calling Pack data record (GPRECS) with the following parameters:


          il   = 0
          ia   = ()
          rl   = 3
          ra   = (x-interval,
                 y-interval,
                 time interval in seconds)
          sl   = 0
          lstr = ()
          str  = ()

pet=3
Display a marker at each point of the current stroke.

The echo area is not used. The data record contents indicate whether the current polymarker attributes, or attributes specified in the data record, should be used to draw the markers.

If the current attributes are to be used, the parameters of the Pack data record (GPRECS) function are:


          il   = 1
          ia   = (attribute control flag=GCURNT)
          rl   = 3
          ra   = (x-interval,
                 y-interval,
                 time interval in seconds)
          sl   = 0
          lstr = ()
          str  = ()

If attributes are to be specified in the data record, the parameters of the Pack data record (GPRECS) function are:


          il   = 7
          ia   = (attribute control flag=GSPEC,
                 marker type aspect source flag (ASF),
                 marker size scale factor ASF,
                 polymarker color index ASF,
                 polymarker index,
                 marker type,
                 polymarker color index)
          rl   = 4
          ra   = (x-interval,
                 y-interval,
                 time interval in seconds,
                 marker size scale factor)
          sl   = 0
          lstr = ()
          str  = ()

The data record is not honored at 3270-PC/G and /GX ranges, and IBM 5080 workstations. The x,y interval and time interval elements are not used at any workstation.

pet=4
Display a line joining successive points of the current stroke.

The echo area is not used. The data record contents indicate whether the current polyline attributes, or attributes specified in the data record, should be used to draw the connecting lines.

If the current attributes are to be used, the parameters of the Pack data record (GPRECS) function are:


          il   = 1
          ia   = (attribute control flag=GCURNT)
          rl   = 3
          ra   = (x-interval,
                 y-interval,
                 time interval in seconds)
          sl   = 0
          lstr = ()
          str  = ()

If attributes are to be specified in the data record, the parameters of the Pack data record (GPRECS) function are:


          il   = 7
          ia   = (attribute control flag=GSPEC),
                  linetype ASF,
                  linewidth scale factor ASF,
                  polyline color index ASF,
                  polyline index,
                  linetype,
                  polyline color index)
          rl   = 4
          ra   = (x-interval,
                 y-interval,
                 time interval in seconds,
                 linewidth scale factor)
          sl   = 0
          lstr = ()
          str  = ()

The attribute information in the data record is not honored on 3270-PC/G and /GX ranges, and IBM 5080 workstations. For these workstations, the x,y interval and time interval elements are processed as described for pet=1. The elements are not used at other workstations.

Principal errors


7
GKS not in proper state: GKS shall be in one of the states WSOP, WSAC, or SGOP
20
Specified workstation identifier is invalid
25
Specified workstation is not open
38
Specified workstation is neither of category INPUT nor of category OUTIN
51
Rectangle definition is invalid
60
Polyline index is invalid
63
Linetype is equal to zero
65
Linewidth scale factor is less than zero
66
Polymarker index is invalid
67
A representation for the specified polymarker index has not been defined on this workstation
69
Marker type is equal to zero
92
Color index is less than zero
140
Specified input device is not present on workstation
141
Input device is not in REQUEST mode
144
Specified prompt and echo type is not supported on this workstation
145
Echo area is outside display space
146
Contents of input data record are invalid
152
Initial value is invalid
153
Number of points in the initial stroke is greater than the buffer size
2000
Enumeration type out of range

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012