pinq_choice_st(3g) — Subroutines
Name
pinq_choice_st − Returns device state information.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void pinq_choice_st (
Pint wsid, /∗ (I) Workstation identifier. ∗/
Pint dev_num, /∗ (I) Choice device number. ∗/
Pstore store, /∗ (I) Handle to store the object. store
manages the memory referenced by
∗choice_data. ∗/
Pint ∗error_ind, /∗ (O) Error indicator. ∗/
Pop_mode ∗op_mode, /∗ (O) Operating mode. ∗/
Pecho_switch ∗echo, /∗ (O) Echo switch. ∗/
Pin_status ∗init_status, /∗ (O) Initial choice status. ∗/
Pint ∗init_choice, /∗ (O) Initial choice. ∗/
Pint ∗pet, /∗ (O) Prompt and echo type. ∗/
Plimit ∗echo_area, /∗ (O) Echo area, in device
coordinates. ∗/
Pchoice_data ∗∗choice_data /∗ (O) Data record. ∗/
)
Data Structures
typedef void ∗Pstore;
typedef enum {
POP_REQ, /∗ request mode ∗/
POP_SAMPLE, /∗ sample mode ∗/
POP_EVENT /∗ event mode ∗/
} Pop_mode;
typedef enum {
PSWITCH_NO_ECHO, /∗ echo disabled ∗/
PSWITCH_ECHO /∗ echo enabled ∗/
} Pecho_switch;
typedef enum {
PIN_STATUS_NONE, /∗ no input ∗/
PIN_STATUS_OK, /∗ an initial choice exists ∗/
PIN_STATUS_NO_IN /∗ an initial choice does not exist ∗/
} Pin_status;
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 { /∗ choice data record ∗/
union Pchoice_pets {
struct Pchoice_pet_u1 {
Pint num_strings; /∗ number of choice strings ∗/
char ∗∗strings; /∗ array of choice strings ∗/
char ∗title_string; /∗ title string for the device ∗/
} pet_u1;
struct Pchoice_pet_r1 {
Pint num_strings; /∗ number of choice strings ∗/
char ∗∗strings; /∗ array of choice strings ∗/
char ∗title_string; /∗ title string for the device ∗/
} pet_r1;
struct Pchoice_pet_r2 {
Pint num_prompts; /∗ number of alternatives ∗/
Ppr_switch ∗prompts; /∗ array of prompts ∗/
} pet_r2;
struct Pchoice_pet_r3 {
Pint num_strings; /∗ number of choice strings ∗/
char ∗∗strings; /∗ array of choice strings ∗/
char ∗title_string; /∗ title string for the device ∗/
} pet_r3;
struct Pchoice_pet_r4 {
Pint num_strings; /∗ number of choice strings ∗/
char ∗∗strings; /∗ array of choice strings ∗/
char ∗title_string; /∗ title string for the device ∗/
} pet_r4;
struct Pchoice_pet_r5 {
Pint struct_id; /∗ structure identifier ∗/
Pint num_pick_ids; /∗ number of alternatives ∗/
Pint ∗pick_ids; /∗ array of pick identifiers ∗/
} pet_r5;
} pets;
} Pchoice_data;
typedef enum {
PPR_OFF, /∗ prompt off ∗/
PPR_ON /∗ prompt on ∗/
} Ppr_switch;
Description
pinq_choice_st queries the workstation state list. The function returns an error indicator and values for the following:
•Operating mode
•Echo switch
•Initial choice status
•Prompt and echo type
•Echo area in device coordinates
•Choice data record
See Also
pcreate_store
pdel_store
pinit_choice
pinq_choice_st3
pset_choice_mode