INQUIRE DEFAULT STROKE DEVICE DATA 3(3P+) — Kubota Pacfic Computer Inc. (16 August 1991)
NAME
INQUIRE DEFAULT STROKE DEVICE DATA 3 − inquire the predefined stroke data
SYNOPSIS
C Syntax
void
pinq_def_stroke_data3 ( type, device, store, error_ind, max_buf_size, pets,
echo_volume, stroke_data )
Pinttype;workstation type
Pintdevice;logical input device number
Pstorestore;handle to Store object
Pint∗error_ind;OUT error indicator
Pint∗max_buf_size;OUT max. input buffer size
Pint_list∗∗pets;OUT list of prompt and echo types
Plimit3∗echo_volume;OUT default echo volume
Pstroke_data3∗∗stroke_data;OUT default data record
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use INQUIRE DEFAULT STROKE DEVICE DATA 3 to determine the following information for a STROKE input device associated with a given workstation type:
• Number and list of available prompt/echo types • Default echo volume • Default input data record • Maximum stroke buffer size
Since the default prompt/echo type for all input devices is 1, the default input data record is for that prompt/echo type. There are no default input data records for prompt/echo types other than 1.
C Input Parameters
Applications using the C binding must create a buffer to be used by this function as memory space for storing portions of the device data. This buffer is passed as the store argument.
The store buffer is a data area managed by PHIGS. While the application is responsible for creating the initial buffer through a call to CREATE STORE, the implementation manages this area such that there is sufficient memory for the specific inquiry. The stroke device data record within the store buffer is accessed via the pointer pointed to by stroke_data.
typeThe workstation type with which the device is associated.
deviceThe device number of the stroke device. See the Available Devices section of INITIALIZE STROKE 3 for a description of the available devices.
storeThe memory buffer PHIGS is to use for storing the information returned for the Pstroke_data3 structure. This memory is not used for the data returned in the Pint_list structure. This buffer must exist prior to calling this function (see CREATE STORE (3P)).
C Output Parameters
error_ind
The error indicator. See the Execution section below for a description of its use. See the Errors section below for the possible values it may return.
max_buf_size
Maximum buffer size.
petsA pointer to the default prompt/echo types. Pint_list is defined in phigs.h as follows:
typedef struct {
Pintnum_ints;/∗ number of Pints in list ∗/
Pint∗ints;/∗ list of integers ∗/
} Pint_list;
The num_ints component specifies the number of elements in the list. The ints component is a pointer to a list num_ints long.
The application must allocate memory for len elements in the list of ints.
echo_volume
A pointer to a Plimit3 structure defining the x, y, and z components of the echo volume, in Device Coordinates. Plimit3 is defined in phigs.h as follows:
typedef struct {
Pfloatx_min;/∗ minimum x coordinate value ∗/
Pfloatx_max;/∗ maximum x coordinate value ∗/
Pfloaty_min;/∗ minimum y coordinate value ∗/
Pfloaty_max;/∗ maximum y coordinate value ∗/
Pfloatz_min;/∗ minimum z coordinate value ∗/
Pfloatz_max;/∗ maximum z coordinate value ∗/
} Plimit3;
stroke_data
A pointer to a pointer to a Pstroke_data3 structure. Pstroke_data3 is defined in phigs.h as follows:
typedef struct {
Pintbuffer_size;/∗ input buffer size ∗/
Pintinit_pos;/∗ initial editing position ∗/
Pfloatx_interval;/∗ x interval ∗/
Pfloaty_interval;/∗ y interval ∗/
Pfloatz_interval;/∗ z interval ∗/
Pfloattime_interval;/∗ time interval ∗/
union {
struct {
Pintunused;
} pet_r1;
struct {
Pintunused;
} pet_r2;
struct {
Pmarker_attrsmarker_attrs; /∗ marker attributes ∗/
} pet_r3;
struct {
Pline_attrsline_attrs;/∗ line attributes ∗/
} pet_r4;
} pets;
} Pstroke_data3;
Execution
INQUIRE DEFAULT STROKE DEVICE DATA 3 returns the default data of the specified stroke device. This data is stored in the workstation description table associated with the workstation type. See INITIALIZE STROKE 3 for a description of the prompt/echo types, echo volume and data record contents and how to set these values.
In the event of an error, the error indicator will indicate the error number of the error detected and no other output data will be returned. If no error is detected, the error indicator will be set to zero and the inquired information will be available in the output parameters. Since this is an inquiry function, ERROR HANDLING is not invoked when an error is detected by this function.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
052Ignoring function, workstation type not recognized by the implementation
051Ignoring function, this information is not yet available for this workstation type; open a workstation of this type and use the specific workstation type
061Ignoring function, specified workstation is neither of category INPUT nor of category OUTIN
250Ignoring function, the specified device is not available on the specified workstation
SEE ALSO
INITIALIZE STROKE 3 (3P)
INQUIRE DEFAULT STROKE DEVICE DATA (3P)
CREATE STORE (3P)
DELETE STORE (3P)
September 02, 1992