INQUIRE DEFAULT STROKE DEVICE DATA(3P) — Kubota Pacfic Computer Inc. (16 August 1991)
NAME
INQUIRE DEFAULT STROKE DEVICE DATA − inquire the predefined stroke data
SYNOPSIS
C Syntax
void
pinq_def_stroke_data ( type, device, store, error_ind, max_buf_size, pets,
echo_area, 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
Plimit∗echo_area;OUT default echo volume
Pstroke_data∗∗stroke_data;OUT pointer to default data record
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use INQUIRE DEFAULT STROKE DEVICE DATA 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 area • 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, PHIGS 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 returned in 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 for a description of the available devices.
storeThe memory buffer PHIGS is to use for storing the information returned for the Pstroke_data 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 a list of the available prompt/echo type. 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_area
A pointer to an object of type Plimit that contains the echo area of the device. Plimit is defined in phigs.h as follows:
typedef struct {
Pfloatx_min;/∗ x min ∗/
Pfloatx_max;/∗ x max ∗/
Pfloaty_min;/∗ y min ∗/
Pfloaty_max;/∗ y max ∗/
} Plimit;
stroke_data
A pointer to a Pstroke_data pointer. PHIGS will assign this pointer to the location in the Pstore structure that contains the device’s data record contents. Pstroke_data is defined in phigs.h as follows:
typedef struct {
Pintbuffer_size;/∗ input buffer size ∗/
Pintinit_pos;/∗ initial editing position ∗/
Pfloatx_interval;/∗ x motion interval ∗/
Pfloaty_interval;/∗ y motion 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_data;
Execution
INQUIRE DEFAULT STROKE DEVICE DATA 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 for a description of the prompt/echo types, echo area, and data record contents, and how to set these values.
In the event of an error, the error indicator indicates the error number of the error detected, and no other output data is returned. If no error is detected, the error indicator is 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 (3P)
INQUIRE DEFAULT STROKE DEVICE DATA 3 (3P)
CREATE STORE (3P)
DELETE STORE (3P)
September 02, 1992