PEXGetPickDevice(3) — Subroutines
Name
PEXGetPickDevice - Get Pick Device Attributes
Synopsis
PEXPDAttributes ∗PEXGetPickDevice(Display ∗display, PEXWorkstation workstation, int pick_device_type, unsigned long value_mask)
Arguments
displayA pointer to a display structure returned by a successful XOpenDisplay call.
workstationThe resource identifier of the workstation.
pick_device_type
The pick device type (PEXPickDeviceDCHitBox or PEXPickDeviceNPCHitVolume).
value_maskA mask indicating which attributes to return.
Returns
A pointer to the pick device attribute values; a null pointer if unsuccessful.
Description
This function returns the attribute values of a pick descriptor for the PHIGS workstation resource specified. The descriptor returned will be the currently-defined descriptor for the pick device of the type specified. Supported pick device types are inquirable via PEXGetEnumTypeInfo. The value mask indicates which attributes are to be returned. The value mask is constructed by or’ing together the following constants:
PEXPDPickStatus
PEXPDPickPath
PEXPDPickPathOrder
PEXPDPickIncl
PEXPDPickExcl
PEXPDPickDataRec
PEXPDPromptEchoType
PEXPDEchoVolume
PEXPDEchoSwitch
PEXlib allocates memory for the return value. PEXFreePDAttributes should be called to deallocate the memory.
Data Structures
typedef XID PEXWorkstation;
typedef struct {
unsigned short status;
PEXPickPath path;
int path_order;
PEXNameSet inclusion;
PEXNameSet exclusion;
PEXPickRecord pick_record;
PEXEnumTypeIndex prompt_echo_type;
PEXViewport echo_volume;
int echo_switch;
} PEXPDAttributes;
typedef struct {
unsigned long count;
PEXPickElementRef ∗elements;
} PEXPickPath;
typedef struct {
PEXStructure sid;
unsigned long offset;
unsigned long pick_id;
} PEXPickElementRef;
typedef XID PEXStructure;
typedef XID PEXNameSet;
typedef union {
PEXPDNPCHitVolume volume;
PEXPDDCHitBox box;
PEXPickDataRecord data;
} PEXPickRecord;
typedef PEXNPCSubVolume PEXPDNPCHitVolume;
typedef struct {
PEXCoord min;
PEXCoord max;
} PEXNPCSubVolume;
typedef struct {
float x;
float y;
float z;
} PEXCoord;
typedef struct {
PEXDeviceCoord2D position;
float distance;
} PEXPDDCHitBox;
typedef struct {
short x;
short y;
} PEXDeviceCoord2D;
typedef struct {
unsigned short length;
char ∗record;
} PEXPickDataRecord;
typedef short PEXEnumTypeIndex;
typedef struct {
PEXDeviceCoord min;
PEXDeviceCoord max;
PEXSwitch use_drawable;
unsigned char reserved[3];
} PEXViewport;
typedef struct {
short x;
short y;
float z;
} PEXDeviceCoord;
typedef unsigned char PEXSwitch;
Errors
BadPEXWorkstation
The specified workstation resource identifier is invalid.
BadValueThe specified pick device type is invalid, or an invalid bit set in the value mask.
See Also
PEXChangePickDevice, PEXGetEnumTypeInfo