pinit_val(3g) — Subroutines
Name
pinit_val − Sets the valuator device to application-specific values.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void pinit_val (
Pint wsid, /∗ (I) Workstation identifier ∗/
Pint dev_num, /∗ (I) Valuator device number ∗/
Pfloat init, /∗ (I) Initial value ∗/
Pint pet, /∗ (I) Prompt and echo type ∗/
const Plimit ∗echo_area, /∗ (I) Echo area, in device coordinates ∗/
const Pval_data ∗record /∗ (I) Data record ∗/
)
Data Structures
typedef struct {
Pfloat x_min; /∗ x minimum ∗/
Pfloat x_max; /∗ x maximum ∗/
Pfloat y_min; /∗ y minimum ∗/
Pfloat y_max; /∗ y maximum ∗/
} Plimit;
typedef struct { /∗ valuator data record ∗/
Pfloat low_value; /∗ low value of valuator range ∗/
Pfloat high_value; /∗ high value of valuator range ∗/
union Pval_pets {
struct Pval_pet_r1 {
char ∗title_string; /∗ title string for the device ∗/
} pet_r1;
struct Pval_pet_r2 {
char ∗title_string; /∗ title string for the device ∗/
} pet_r2;
struct Pval_pet_r3 {
char ∗title_string; /∗ title string for the device ∗/
} pet_r3;
struct Pval_pet_u1 {
char ∗title_string; /∗ title string for the device ∗/
} pet_u1;
struct Pval_pet_u2 {
char ∗title_string; /∗ title string for the device ∗/
} pet_u2;
struct Pval_pet_u3 {
char ∗title_string; /∗ title string for the device ∗/
} pet_u3;
struct Pval_pet_u4 {
char ∗title_string; /∗ title string ∗/
Pint threshold; /∗ threshold value for the hardware
valuator ∗/
Pint smoothing; /∗ smoothing value for the hardware
valuator ∗/
Pfloat num_turns; /∗ number of turns ∗/
} pet_u4;
struct Pval_pet_u100 {
char ∗title_string; /∗ title string for the device ∗/
Pfloat change_filter; /∗ change filter ∗/
Pfloat time_filter; /∗ time filter in seconds ∗/
Pval_flag limit_flag; /∗ wrap/limit flag ∗/
Pfloat num_turns; /∗ number of dial rotations ∗/
} pet_u100;
struct Pval_pet_u102 {
char ∗title_string; /∗ title string for the device ∗/
Pfloat change_filter; /∗ change filter ∗/
Pfloat time_filter; /∗ time filter in seconds ∗/
Pval_flag limit_flag; /∗ wrap/limit flag ∗/
Pfloat num_turns; /∗ number of dial rotations ∗/
} pet_u102;
struct Pval_pet_u103 {
char ∗title_string; /∗ title string for the device ∗/
Pfloat change_filter; /∗ change filter ∗/
Pfloat time_filter; /∗ time filter in seconds ∗/
Pval_flag limit_flag; /∗ wrap/limit flag ∗/
Pfloat num_turns; /∗ number of dial rotations ∗/
} pet_u103;
} pets;
} Pval_data;
typedef enum {
PWRAP,
PLIMIT
} Pval_flag;
Description
pinit_val sets the valuator device to application-specific values. This function accepts the echo area in a 4-component list of x- and y-coordinates, in device coordinates. The order of the list components is XMIN < XMAX, YMIN < YMAX. The z-components of a previously specified echo volume remain unchanged.
When an application calls pinit_val, the workstation surface cannot contain the valuator device’s prompt. To remove an existing prompt from the surface, call the pset_val_mode function and place the device in request mode.
The size and contents of the data record depend on the prompt and echo type you specify. If the size or contents of the data record does not match the requirements of your chosen prompt and echo type, Digital PHIGS generates an error.
See Valuator-Class PETs for information on valuator-class prompt and echo types.
See Also
pget_val
pinit_val3
pinq_def_val_data
pinq_val_st
preq_val
psample_val
pset_val_mode