\&
.sp 1
.ce 3
\s+1\fBChapter 10\fP\s-1

\s+1\fBPHIGS Workstations\fP\s-1
.sp 2
.nr H1 10
.nr H2 0
.nr H3 0
.nr H4 0
.nr H5 0
.na
.LP
.XS
Chapter 10: PHIGS Workstations
.XE
.LP
.IN "PHIGS workstation"
.IN "workstation" "PHIGS"
The PHIGS workstation resource encapsulates the PEX functionality to support
the PHIGS abstraction of a "workstation". The PHIGS definition of a workstation
states that a workstation consists of zero or one display space.  In X, many
display spaces (windows) are possible in a single workstation display.  The
PHIGS workstation resource ties together a single X drawable, a set of lookup
tables, highlighting and invisibility name sets, and all of the state needed to
make it perform as a PHIGS user expects a workstation should perform.
.LP
Each PHIGS workstation resource contains the following attributes 
defined at the time it is created:  
.ID
target drawable
color approximation table
color table
depth cue table
edge bundle
interior bundle
marker bundle
light table
line bundle
pattern table
text bundle
text font table
highlight inclusion
highlight exclusion
invisibility inclusion
invisibility exclusion
.DE
.LP
These attributes can be inquired but not modified during the lifetime of the 
PHIGS workstation.  These attributes function in a manner identical to
their counterparts in a renderer resource.
Note that there is no view table as in the renderer.  The workstation has a
built-in view table that can only be accessed through the defined workstation
functions.  However, this view table is functionally the same as that used by
the renderer.
.LP
A workstation also contains the following attributes that can be
modified or inquired with various functions:        
.ID
posted structure networks
requested NPC subvolume
current NPC subvolume
requested viewport
current viewport
requested HLHSR mode
current HLHSR mode
defined views
display update mode
requested buffer mode
current buffer mode
.DE
.LP
The posted structure networks attribute maintains a list of
structure resource identifiers, together with a priority value for each.
The priority values are relative, and are specified at the time
the structure network is added to the list (posted).
Whenever a structure traversal is requested, each of the structure networks
in this list is traversed.
If multiple structures that would overlap on the screen are posted, the
structure network with the higher priority is guaranteed to be visible.
If two structures have the same priority and would overlap on the screen,
the structure posted later has the higher priority.
.LP
The
.PN PEXPostStructure
function is called to post structure networks to a
PHIGS workstation resource, and the
.PN PEXUnpostStructure
function is called
to unpost a structure network.  The
.PN PEXUnpostAllStructures
function is
called to reset the posted structure network list to the null list.  Finally,
given a structure resource id, the
.PN PEXGetWorkstationPostings
function returns a list
of all PHIGS workstations to which the structure has been posted.
.LP
The PHIGS workstation resource supports the concepts of
requested changes and current values.  
The user can change the viewport, NPC subvolume, HLHSR mode and buffer mode
attributes, but the changes are not actually applied until the
next structure traversal occurs or the user calls
the
.PN PEXExecuteDeferredActions
function.
Thus, there are pairs of attributes
for the NPC subvolume, viewport, HLHSR mode and buffer mode: the requested
value and the current value. 
.LP
The list of defined views is similar to a view table.  However,
a PHIGS workstation must also be able to separate requested
views from current views.  Views also have an input priority value associated
with them in PHIGS workstation resources.  Because of these differences
in semantics, the PHIGS workstation resource was designed to have a
built-in view table rather than an associated view lookup table.
.LP
When doing a picking or mapping
operation, it is necessary to map device coordinates through the inverse
of the viewing/projection transform to determine the primitive
that was selected.
The reason for the view priority is that several views can produce a
projection onto the same area of the screen.  Thus, specifying a device
coordinate point for the picking operation can be ambiguous.  If there
is more than one view that projects onto the specified device coordinate
point, it is not clear which set of viewing parameters to use to compute
the inverse transform.  Adding a priority to each of the views removes
the ambiguity.
.LP
View priorities are adjusted with the
.PN PEXSetWorkstationViewPriority
function.
The
.PN PEXMapDCToWC
function is provided as an aid for mapping
device coordinate points back into world coordinates.  The function
.PN PEXMapWCToDC
aids in mapping world coordinates to device coordinates.
Views are modified with the
.PN PEXSetWorkstationViewRep
function, but
are not actually applied until the
next structure traversal occurs or the user calls
the
.PN PEXExecuteDeferredActions
function.
.LP
The display update mode indicates how the PHIGS
workstation should attempt to visualize changes that occur.  The defined
types include
.PN PEXVisualizeEach ,
.PN PEXVisualizeEasy ,
.PN PEXVisualizeNone ,
.PN PEXVisualizeWhenever ,
and
.PN PEXSimulateSome .
A type of
.PN PEXVisualizeEach
means that each change is displayed as it occurs,
even doing a retraversal of the posted structure network list if
necessary.
A type of
.PN PEXVisualizeEasy
means that those changes which can be represented without doing a
retraversal, or even those that require a retraversal if traversal is very
fast, are displayed as they occur.
A type of
.PN PEXVisualizeNone
means that changes are applied to the structure, but
the structure is not traversed until the application program explicitly
requests it.
A type of
.PN PEXVisualizeWhenever
means that traversal of the structure is done
when it is convenient to do so.
A type of
.PN PEXSimulateSome
means that the easy or fast changes are immediately
displayed and others are simulated by such means as drawing a deleted
primitive in the background color.
.LP
A PHIGS workstation contains the following attributes to maintain
the state of the PHIGS workstation resource:
.ID
visual state
display surface
view update
workstation update
HLHSR update
buffer update
number of priorities
.DE
These attributes can be inquired., but are not
modifiable by users; they are modified as side effects of various requests.
.LP
The visual state attribute maintains a value that indicates
whether the image is correct, whether some parts of the image have
been changed but simulated on the display, or whether there are deferred
actions that have yet to be visualized.
.LP
The display surface
indicates whether the PHIGS workstation has rendered anything
on the associated drawable.
.LP
The view update, workstation update,
HLHSR update and buffer update attributes specify whether there are
any requested changes to the list of views, the NPC subvolume or viewport,
the HLHSR mode or the buffer mode respectively.
.LP
A PHIGS workstation's posted structure networks can be retraversed
explicitly by calling
.PN PEXRedrawAllStructures .
The
.PN PEXUpdateWorkstation
function can be called to perform a traversal if
the visual state is not correct.  The
.PN PEXGetWorkstationDynamics
function
is called to obtain information about how changes to various
attributes are visualized.
.LP
Structure traversal using a PHIGS workstation resource has side effects
beyond those of a renderer.  When a traversal is performed using a PHIGS
workstation, the drawable is cleared to the color stored in entry zero
of the associated color lookup table.  Furthermore, all pending changes
to the PHIGS workstation attributes are made current as a traversal begins.
Finally, the displayed image state is set to correct at the end of the
traversal.
.LP
Pick device descriptors are also a part of the workstation resource.  They
are defined in \fIChapter 11: PHIGS Workstation Picking\fP.
.LP
If the drawable associated with a workstation resource is destroyed, the
workstation resource is implicitly freed.  The next access to the workstation
will generate a
.PN BadPEXWorkstation
error.
.LP
Lookup tables and name set resource can be bound to a workstation resource and
then freed.  The contents of these resources will remain, since they are still
being referenced by the workstation.  However, when a workstation's attributes
are inquired, the value
.PN PEXAlreadyFreed
will be returned for those resources that have been freed and thus no longer
have a valid resource identifier by which they can be referenced.
.bp
.XS
Function Descriptions
.XE
.SH
PEXCreateWorkstation - Create Workstation
.XS
	PEXCreateWorkstation
.XE
.IN "PEXCreateWorkstation" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
PEXWorkstation PEXCreateWorkstation\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXLookupTable \fIline_bundle\fP\^, PEXLookupTable \fImarker_bundle\fP\^, PEXLookupTable \fItext_bundle\fP\^, PEXLookupTable \fIinterior_bundle\fP\^, PEXLookupTable \fIedge_bundle\fP\^,
PEXLookupTable \fIcolor_table\fP\^, PEXLookupTable \fIpattern_table\fP\^, PEXLookupTable \fIfont_table\fP\^, PEXLookupTable \fIdepth_cue_table\fP\^, PEXLookupTable \fIlight_table\fP\^, PEXLookupTable \fIcolor_approx_table\fP\^, PEXNameSet \fIhighlight_incl\fP\^, PEXNameSet \fIhighlight_excl\fP\^, PEXNameSet \fIinvisibility_incl\fP\^, PEXNameSet \fIinvisibility_excl\fP\^, int \fIbuffer_mode\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIdrawable\fP 1i
The resource identifier of a drawable.
.IP \fIline_bundle\fP 1i
The resource identifier of the line bundle lookup table.
.IP \fImarker_bundle\fP 1i
The resource identifier of the marker bundle lookup table.
.IP \fItext_bundle\fP 1i
The resource identifier of the text bundle lookup table.
.IP \fIinterior_bundle\fP 1i
The resource identifier of the interior bundle lookup table.
.IP \fIedge_bundle\fP 1i
The resource identifier of the edge bundle lookup table.
.IP \fIcolor_table\fP 1i
The resource identifier of the color lookup table.
.IP \fIpattern_table\fP 1i
The resource identifier of the pattern lookup table.
.IP \fIfont_table\fP 1i
The resource identifier of the text font lookup table.
.IP \fIdepth_cue_table\fP 1i
The resource identifier of the depth cue lookup table.
.IP \fIlight_table\fP 1i
The resource identifier of the light lookup table.
.IP \fIcolor_approx_table\fP 1i
The resource identifier of the color approximation lookup table.
.IP \fIhighlight_incl\fP 1i
The name set used as the highlight inclusion set.
.IP \fIhighlight_excl\fP 1i
The name set used as the highlight exclusion set.
.IP \fIinvisibility_incl\fP 1i
The name set used as the invisibility inclusion set.
.IP \fIinvisibility_excl\fP 1i
The name set used as the invisibility exclusion set.
.IP \fIbuffer_mode\fP 1i
The workstation buffering mode
.Pn ( PEXSingleBuffer
or
.PN PEXDoubleBuffer ).
.RE
.SH
Returns
.RS
.LP
The resource identifier of the newly-created workstation.
.RE
.SH
Description
.RS
.LP
This function creates a PHIGS workstation resource and returns its
resource identifier.  The drawable specified
is associated with the newly-created workstation resource.  The named
tables and name sets are also bound to the workstation resource for
use during rendering.  A view table that supports current and requested
view table entries is allocated for the workstation automatically at
creation time.  The requests
.PN PEXSetWorkstationViewRep
and
.PN PEXGetWorkstationViewRep
is used to modify and inquire the PHIGS workstation view table.
.LP
If the workstation is to operate in double-buffered mode and double-buffering
is supported (see
.PN PEXGetImpDepConstants ),
an additional
image buffer will be created for the drawable in an implementation-dependent
fashion.  If the specified drawable is a pixmap, no double-buffering will be
performed.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
typedef XID             PEXLookupTable;
typedef XID             PEXNameSet;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadAlloc\fP 1i
The server failed to allocate the resource, or the server failed to allocate
resources needed for double-buffering.
.IP \fIBadDrawable\fP 1i
The specified drawable resource identifier is invalid.
.IP \fIBadMatch\fP 1i
The specified drawable is unsupported, or a specified lookup table resource
was not created with a compatible drawable.
.IP \fIBadPEXLookupTable\fP 1i
The specified lookup table resource identifier is invalid.
.IP \fIBadPEXNameSet\fP 1i
The specified name set resource identifier is invalid.
.IP \fIBadValue\fP 1i
The specified buffer mode is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXFreeWorkstation ,
.PN PEXGetImpDepConstants
.RE
.bp
.SH
PEXExecuteDeferredActions - Execute Deferred Workstation Actions
.XS
	PEXExecuteDeferredActions
.XE
.IN "PEXExecuteDeferredActions" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXExecuteDeferredActions\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function causes all deferred actions on the specified workstation to
be executed.  This will cause all requested attributes to be made current
and the corresponding update attributes to be set to
.PN PEXNotPending .
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXRedrawAllStructures
.RE
.bp
.SH
PEXFreeWorkstation - Free Workstation
.XS
	PEXFreeWorkstation
.XE
.IN "PEXFreeWorkstation" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXFreeWorkstation\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function deletes the PHIGS workstation resource and frees
memory associated with it.
.RE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXCreateWorkstation
.RE
.bp
.SH
PEXFreeWorkstationAttributes - Free Storage Returned by PEXGetWorkstationAttributes
.XS
	PEXFreeWorkstationAttributes
.XE
.IN "PEXFreeWorkstationAttributes" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXFreeWorkstationAttributes\^(\^PEXWorkstationAttributes *\fIvalues\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIvalues\fP 1i
A pointer to the workstation attribute values.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function deallocates memory returned by
.PN PEXGetWorkstationAttributes .
.RE
.SH
Errors
.RS
.IP None 1i
.RE
.SH
See Also
.RS
.LP
.PN PEXGetWorkstationAttributes
.RE
.bp
.SH
PEXGetWorkstationDynamics - Get Workstation Attribute Modification Dynamics
.XS
	PEXGetWorkstationDynamics
.XE
.IN "PEXGetWorkstationDynamics" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
Status PEXGetWorkstationDynamics\^(\^Display *\fIdisplay\fP\^, Drawable \fIdrawable\fP\^, PEXWorkstationDynamics *\fIdynamics_return\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIdrawable\fP 1i
The resource identifier of a drawable.
.IP \fIdynamics_return\fP 1i
Returns the dynamics of the specified workstation.
.RE
.SH
Returns
.RS
.LP
Zero if unsuccessful, non-zero otherwise.
.RE
.SH
Description
.RS
.LP
This function returns the dynamics of the specified PHIGS workstation resource.
Each entry in the returned list has one of the following values:
.PN PEXIMM ,
.PN PEXCBS
or
.PN PEXIRG .
.PN PEXIMM
means that modification of the corresponding attribute will result in the
correct image displayed immediately without regeneration.
.PN PEXCBS
means that modification of the corresponding attribute will result in a
simulation displayed immediately if the display update mode is
.PN PEXSimulateSome.
.PN PEXIRG
means that a regeneration is required for the change to be visible.
.RE
.SH
Data Structures
.ID
.Co
typedef struct {
    unsigned char       view_rep;
    unsigned char       marker_bundle;
    unsigned char       text_bundle;
    unsigned char       line_bundle;
    unsigned char       interior_bundle;
    unsigned char       edge_bundle;
    unsigned char       color_table;
    unsigned char       pattern_table;
    unsigned char       wks_transform;
    unsigned char       highlight_filter;
    unsigned char       invisibility_filter;
    unsigned char       hlhsr_mode;
    unsigned char       structure_modify;
    unsigned char       post_structure;
    unsigned char       unpost_structure;
    unsigned char       delete_structure;
    unsigned char       reference_modify;
    unsigned char       buffer_modify;
    unsigned char       light_table;
    unsigned char       depth_cue_table;
    unsigned char       color_approx_table;
} PEXWorkstationDynamics;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadDrawable\fP 1i
The specified drawable resource identifier is invalid.
.IP \fIBadMatch\fP 1i
The specified drawable is unsupported.
.RE
.SH
See Also
.RS
.LP
.PN PEXGetWorkstationAttributes
.RE
.bp
.SH
PEXGetWorkstationAttributes - Get Workstation Attribute Values
.XS
	PEXGetWorkstationAttributes
.XE
.IN "PEXGetWorkstationAttributes" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
PEXWorkstationAttributes *PEXGetWorkstationAttributes\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned long *\fIvalue_mask\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIvalue_mask\fP 1i
A mask indicating which workstation attribute values to return.
.RE
.SH
Returns
.RS
.LP
A pointer to the workstation attribute values; a null pointer if unsuccessful.
.RE
.SH
Description
.RS
.LP
This function returns the specified workstation's attributes.
The value mask indicates which attributes are to be returned.
.PN PEXSetPWAttributeMask
or
.PN PEXSetPWAttributeMaskAll
should be used to setup the value mask.
.LP
PEXlib allocates memory for the returned workstation attribute values.
.PN PEXFreeWorkstationAttributes
should be called to deallocate the memory.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.sp
typedef struct {
    short               drawable_update;
    int                 visual_state;
    int                 drawable_surface;
    int                 view_update;
    PEXListOfView       defined_views;
    int                 wks_update;
    PEXNPCSubVolume     req_npc_subvolume;
    PEXNPCSubVolume     cur_npc_subvolume;
    PEXViewport         req_workstation_viewport;
    PEXViewport         cur_workstation_viewport;
    int                 hlhsr_update;
    PEXEnumTypeIndex    req_hlhsr_mode;
    PEXEnumTypeIndex    cur_hlhsr_mode;
    Drawable            drawable;
    PEXLookupTable      marker_bundle;
    PEXLookupTable      text_bundle;
    PEXLookupTable      line_bundle;
    PEXLookupTable      interior_bundle;
    PEXLookupTable      edge_bundle;
    PEXLookupTable      color_table;
    PEXLookupTable      depth_cue_table;
    PEXLookupTable      light_table;
    PEXLookupTable      color_approx_table;
    PEXLookupTable      pattern_table;
    PEXLookupTable      text_font_table;
    PEXNameSet          highlight_incl;
    PEXNameSet          highlight_excl;
    PEXNameSet          invisibility_incl;
    PEXNameSet          invisibility_excl;
    PEXListOfPostedStructure posted_structures;
    unsigned long       count_priorities;
    int                 buffer_update;
    int                 req_buffer_mode;
    int                 cur_buffer_mode;
} PEXWorkstationAttributes;
.sp
typedef struct {
    unsigned short      count;                  /* number of views */
    PEXTableIndex       *views;
} PEXListOfView;
.sp
typedef unsigned short  PEXTableIndex;
.sp
typedef struct {
    PEXCoord            min;
    PEXCoord            max;
} PEXNPCSubVolume;
.sp
typedef struct {
    float               x;
    float               y;
    float               z;
} PEXCoord;
.sp
typedef struct {
    PEXDeviceCoord      min;
    PEXDeviceCoord      max;
    PEXSwitch           use_drawable;
    unsigned char       reserved[3];
} PEXViewport;
.sp
typedef struct {
    short               x;
    short               y;
    float               z;
} PEXDeviceCoord;
.sp
typedef unsigned char   PEXSwitch;
.sp
typedef short           PEXEnumTypeIndex;
typedef XID             PEXLookupTable;
typedef XID             PEXNameSet;
.sp
typedef struct {
    unsigned long       count;                  /* number of posted structures*/
    PEXPostedStructure  *structures;
} PEXListOfPostedStructure;
.sp
typedef struct {
    PEXStructure        sid;
    float               priority;
} PEXPostedStructure;
.sp
typedef XID             PEXStructure;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.IP \fIBadValue\fP 1i
An invalid bit is set in the value mask.
.RE
.SH
See Also
.RS
.LP
.PN PEXGetWorkstationDynamics ,
.PN PEXSetPWAttributeMask ,
.PN PEXSetPWAttributeMaskAll
.RE
.bp
.SH
PEXGetWorkstationPostings - Get Workstation Postings
.XS
	PEXGetWorkstationPostings
.XE
.IN "PEXGetWorkstationPostings" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
Status PEXGetWorkstationPostings\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, unsigned long *\fIcount_return\fP\^, PEXWorkstation **\fIpostings_return\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIstructure\fP 1i
The resource identifier of the structure.
.IP \fIcount_return\fP 1i
Returns the number of workstation identifiers.
.IP \fIpostings_return\fP 1i
Returns an array of workstation resource identifiers.
.RE
.SH
Returns
.RS
.LP
Zero if unsuccessful, non-zero otherwise.
.RE
.SH
Description
.RS
.LP
This function returns a list of workstation resources to which the specified
structure has been posted.
.LP
PEXlib allocates memory for the return value.
.PN XFree
should be called to deallocate the memory.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXStructure;
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXStructure\fP 1i
The specified structure resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXPostStructure ,
.PN PEXUnpostStructure ,
.PN PEXUnpostAllStructures
.RE
.bp
.SH
PEXGetWorkstationViewRep - Get Workstation View Representation
.XS
	PEXGetWorkstationViewRep
.XE
.IN "PEXGetWorkstationViewRep" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
Status PEXGetWorkstationViewRep\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned int \fIindex\fP\^, int *\fIupdate_return\fP\^, PEXViewRep *\fIreq_view_return\fP\^, PEXViewRep *\fIcur_view_return\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIindex\fP 1i
The view table index.
.IP \fIupdate_return\fP 1i
Returns the update status of the view table index.
.IP \fIreq_view_return\fP 1i
Returns the requested value of the view table index.
.IP \fIcur_view_return\fP 1i
Returns the current value of the view table index.
.RE
.SH
Returns
.RS
.LP
Zero if unsuccessful, non-zero otherwise.
.RE
.SH
Description
.RS
.LP
The function returns the update state, and the requested and current
values for the specified view index of the specified workstation.
The update will be
.PN PEXPending
if a view change has been requested but not established; otherwise it will be
.PN PEXNotPending .
If the specified
view index is not defined, an error will be generated and the contents of the
reply parameters will be undefined.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.sp
typedef struct {
    PEXTableIndex       index;
    unsigned short      reserved;
    PEXViewEntry        view;
} PEXViewRep;
.sp
typedef unsigned short  PEXTableIndex;
.sp
typedef struct { 
    unsigned short      clip_flags;
    unsigned short      reserved;
    PEXNPCSubVolume     clip_limits;
    PEXMatrix           orientation;
    PEXMatrix           mapping;
} PEXViewEntry;
.sp
typedef struct {
    PEXCoord            min;
    PEXCoord            max;
} PEXNPCSubVolume;
.sp
typedef struct {
    float               x;
    float               y;
    float               z;
} PEXCoord;
.sp
typedef float           PEXMatrix[4][4];
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.IP \fIBadValue\fP 1i
The specified view table entry is not defined.
.RE
.SH
See Also
.RS
.LP
.PN PEXSetWorkstationViewRep
.RE
.bp
.SH
PEXMapDCToWC - Map Device Coordinate Points to World Coordinate Points
.XS
	PEXMapDCToWC
.XE
.IN "PEXMapDCToWC" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
Status PEXMapDCToWC\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned long \fIdc_count\fP\^, PEXDeviceCoord *\fIdc_points\fP\^, unsigned int *\fIview_index_return\fP\^, unsigned long *\fIwc_count_return\fP\^, PEXCoord **\fIwc_points_return\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIdc_count\fP 1i
The number of device coordinate points.
.IP \fIdc_points\fP 1i
An array of device coordinates.
.IP \fIview_index_return\fP 1i
Returns the view index of the view containing most or all of the points.
.IP \fIwc_count_return\fP 1i
Returns the number of world coordinate points.
.IP \fIwc_points_return\fP 1i
Returns an array of world coordinate points.
.RE
.SH
Returns
.RS
.LP
Zero if unsuccessful, non-zero otherwise.
.RE
.SH
Description
.RS
.LP
This function maps the device coordinate points to world coordinate points
using the specified workstation.  Each view in the workstation's current
view table, which has an inverse, is checked to see if it contains all the
specified device coordinate points.
(If the view transform has no inverse, it is not considered.)
The index of the view with the highest view transformation input
priority that contains all of the points is returned.  If no view contains all
the points, the index of the view containing the most points is returned.  The
points are transformed to world coordinates by passing them through the inverse
of the view transform associated with the view index.
Points that are clipped
(outside the viewport) will not be transformed and returned, so the number
of points returned may be less than the number sent.
.LP
PEXlib allocates memory for the return value.
.PN XFree
should be called to deallocate the memory.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.sp
typedef struct {
    short               x;
    short               y;
    float               z;
} PEXDeviceCoord;
.sp
typedef struct {
    float               x;
    float               y;
    float               z;
} PEXCoord;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXMapWCToDC ,
.PN PEXSetWorkstationViewPriority
.RE
.bp
.SH
PEXMapWCToDC - Map World Coordinate Points to Device Coordinate Points
.XS
	PEXMapWCToDC
.XE
.IN "PEXMapWCToDC" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
Status PEXMapWCToDC\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned long \fIwc_count\fP\^, PEXCoord *\fIwc_points\fP\^, unsigned int \fIview_index\fP\^, unsigned long *\fIdc_count_return\fP\^, PEXDeviceCoord **\fIdc_points_return\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIwc_count\fP 1i
The number of world coordinate points.
.IP \fIwc_points\fP 1i
An array of world coordinate points.
.IP \fIview_index\fP 1i
The view index to use in transforming the world coordinate points.
.IP \fIdc_count_return\fP 1i
Returns the number of device coordinate points.
.IP \fIdc_points_return\fP 1i
Returns an array of device coordinate points.
.RE
.SH
Returns
.RS
.LP
Zero if unsuccessful, non-zero otherwise.
.RE
.SH
Description
.RS
.LP
This function maps the world coordinate points to device coordinate points
using the specified workstation and view index.  The points are transformed
to device coordinates by passing them through the view transform associated
with the view index.  Points that are clipped will not be returned, so the
number of points returned may be less than the number sent.
.LP
PEXlib allocates memory for the return value.
.PN XFree
should be called to deallocate the memory.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.sp
typedef struct {
    short               x;
    short               y;
    float               z;
} PEXDeviceCoord;
.sp
typedef struct {
    float               x;
    float               y;
    float               z;
} PEXCoord;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXMapDCToWC ,
.PN PEXSetWorkstationViewPriority
.RE
.bp
.SH
PEXPostStructure - Post Structure to a Workstation
.XS
	PEXPostStructure
.XE
.IN "PEXPostStructure" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXPostStructure\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, PEXStructure \fIstructure\fP\^, double \fIpriority\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIstructure\fP 1i
The resource identifier of the structure.
.IP \fIpriority\fP 1i
The priority of the newly-posted structure.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function adds the specified structure to the list of posted structures
in the specified workstation.  The priority is used to indicate the priority
of the new posted structure relative to the structures already posted.  If
multiple structures are posted for display to the same display space location,
the higher priority structure will be displayed.  If two structures have the
same priority, the last posted structure is considered of higher priority.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXStructure;
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXStructure\fP 1i
The specified structure resource identifier is invalid.
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXUnpostStructure ,
.PN PEXUnpostAllStructures
.RE
.bp
.SH
PEXRedrawAllStructures - Redraw All Posted Structures
.XS
	PEXRedrawAllStructures
.XE
.IN "PEXRedrawAllStructures" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXRedrawAllStructures\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function redraws all of the posted structures for the workstation.
First, if the workstation's display surface is
.PN PEXNotEmpty ,
its drawable is cleared to the color stored in entry zero of the color table.
Then, if any of its view, workstation, HLHSR or buffer update attributes is
set to
.PN PEXPending ,
the requested values are made current and the update attributes are set to
.PN PEXNotPending .
After this, all the posted structures are traversed and rendered
(in priority order).  Finally, the workstation's visual state is set to 
.PN PEXCorrect .
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXUpdateWorkstation ,
.PN PEXExecuteDeferredActions
.RE
.bp
.SH
PEXRedrawClipRegion - Redraw Posted Structures Clipped to Clip Region
.XS
	PEXRedrawClipRegion
.XE
.IN "PEXRedrawClipRegion" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXRedrawClipRegion\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned long \fIcount\fP\^, PEXDeviceRect *\fIclip_rectangles\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIcount\fP 1i
The number of clip rectangles.
.IP \fIclip_rectangles\fP 1i
An array of device clip rectangles.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function performs actions similar to
.PN PEXRedrawAllStructures
except that the workstation state attributes are not modified or updated by
this function and rendering will occur only in the region defined by
the specified clip list.  The color stored in entry zero of the color table
is used to clear the region defined by the clip list.  The clip list must
consist of non-overlapping rectangles or the result will be undefined.  If
a z-buffering HLHSR algorithm is used, only the z-values corresponding to
pixels in the clip region will be affected.  All of the posted structures
for the workstation are redrawn, but clipped to the clip list.  Pending
changes are not made current, nor is the visual state modified.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.sp
typedef struct {
    short               xmin;
    short               ymin;
    short               xmax;
    short               ymax;
} PEXDeviceRect;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXRedrawAllStructures ,
.PN PEXExecuteDeferredActions
.RE
.bp
.SH
PEXSetWorkstationBufferMode - Set Workstation Buffer Mode
.XS
	PEXSetWorkstationBufferMode
.XE
.IN "PEXSetWorkstationBufferMode" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXSetWorkstationBufferMode\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIbuffer_mode\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIbuffer_mode\fP 1i
The workstation buffering mode
.Pn ( PEXSingleBuffer
or
.PN PEXDoubleBuffer ).
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function sets the requested buffer mode of the specified workstation.
If the workstation's display surface attribute is
.PN PEXEmpty ,
or if the dynamic modification for buffer mode is
.PN PEXIMM ,
the current buffer mode is set to the specified buffer mode and the buffer
update is set to
.PN PEXNotPending ;
otherwise, the buffer update is set to
.PN PEXPending
and the current buffer mode is not changed.
.LP
Buffer mode may be one of the following values:
.PN PEXSingleBuffer
or 
.PN PEXDoubleBuffer .
An error will be generated if the buffer mode is
.PN PEXDoubleBuffer
and the server cannot allocated the second image buffer.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadAlloc\fP 1i
The server failed to allocate resources needed for double-buffering.
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.IP \fIBadValue\fP 1i
The specified buffer mode is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXSetWorkstationDisplayUpdateMode ,
.PN PEXGetImpDepConstants
.RE
.bp
.SH
PEXSetWorkstationDisplayUpdateMode - Set Workstation Display Update Mode
.XS
	PEXSetWorkstationDisplayUpdateMode
.XE
.IN "PEXSetWorkstationDisplayUpdateMode" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXSetWorkstationDisplayUpdateMode\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIupdate_mode\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIupdate_mode\fP 1i
The workstation display update mode
.Pn ( PEXVisualizeEach ,
.PN PEXVisualizeEasy ,
.PN PEXVisualizeNone ,
.PN PEXSimulateSome ,
.PN PEXVisualizeWhenever ).
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function sets the display update attribute of the specified workstation.
This attribute defines how changes to the display surface will be visualized.
The supported values for display update mode are inquirable via
.PN PEXGetEnumTypeInfo .
.LP
If double-buffering is enabled, the display update mode affects which buffer
is rendered into during traversal.  If the display update mode is
.PN PEXVisualizeEach ,
.PN PEXVisualizeWhenever
or
.PN PEXVisualizeNone ,
output primitives are rendered into the back (undisplayed) buffer while the
structure network is being traversed.
When the traversal is complete, the front and back buffers are swapped, so the
rendered image is displayed.  If the display update mode is
.PN PEXVisualizeEasy
or
.PN PEXSimulateSome ,
output primitives are always rendered into the front (displayed) buffer.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.IP \fIBadValue\fP 1i
The specified display update mode is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXSetWorkstationBufferMode ,
.PN PEXGetEnumTypeInfo
.RE
.bp
.SH
PEXSetWorkstationHLHSRMode - Set Workstation HLHSR Mode
.XS
	PEXSetWorkstationHLHSRMode
.XE
.IN "PEXSetWorkstationHLHSRMode" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXSetWorkstationHLHSRMode\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, int \fIhlhsr_mode\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIhlhsr_mode\fP 1i
The workstation HLHSR mode
.Pn ( PEXHLHSROff ,
.PN PEXHLHSRZBuffer ,
.PN PEXHLHSRPainters ,
.PN PEXHLHSRScanline ,
.PN PEXHLHSRHiddenLineOnly ,
.PN PEXHLHSRZBufferID ).
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function sets the requested HLHSR mode of the specified workstation.
If the workstation's display surface attribute is
.PN PEXEmpty ,
or if the dynamic modification for HLHSR mode is
.PN PEXIMM ,
the current HLHSR mode is set to the specified HLHSR mode and the HLHSR update
is set to
.PN PEXNotPending ;
otherwise, the HLHSR update is set to
.PN PEXPending
and the current HLHSR mode is not changed.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadAlloc\fP 1i
The server failed to allocate resources needed for HLHSR.
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.IP \fIBadValue\fP 1i
The specified HLHSR mode is invalid.
.RE
.SH
See Also
.RS
.LP
.RE
.bp
.SH
PEXSetWorkstationViewport - Set Workstation Viewport
.XS
	PEXSetWorkstationViewport
.XE
.IN "PEXSetWorkstationViewport" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXSetWorkstationViewport\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, PEXViewport *\fIviewport\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIviewport\fP 1i
The workstation viewport.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function sets the requested workstation viewport of the specified
workstation.
If the dynamic modification for workstation viewport is
.PN PEXIMM ,
the current workstation viewport is set to the specified viewport and the
workstation update is set to
.PN PEXNotPending ;
otherwise, the workstation update is set to
.PN PEXPending
and the current workstation viewport is not changed.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.sp
typedef struct {
    PEXDeviceCoord      min;
    PEXDeviceCoord      max;
    PEXSwitch           use_drawable;
    unsigned char       reserved[3];
} PEXViewport;
.sp
typedef struct {
    short               x;
    short               y;
    float               z;
} PEXDeviceCoord;
.sp
typedef unsigned char   PEXSwitch;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.IP \fIBadValue\fP 1i
The specified value for use_drawable is invalid.
.RE
.SH
See Also
.RS
.LP
.RE
.bp
.SH
PEXSetWorkstationViewPriority - Set Workstation View Priority
.XS
	PEXSetWorkstationViewPriority
.XE
.IN "PEXSetWorkstationViewPriority" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXSetWorkstationViewPriority\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned int \fIindex1\fP\^, unsigned int \fIindex2\fP\^, int \fIpriority\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIindex1\fP 1i
The first view table entry index.
.IP \fIindex2\fP 1i
The second view table entry index.
.IP \fIpriority\fP 1i
A relative priority of index 1 with respect to index 2
.Pn ( PEXHigher
or
.PN PEXLower ).
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function sets the relative priorities of entries in the workstation's
current view table.  The priority of the first view table entry with respect
to the second view table entry is set to the next higher or lower priority
as indicated by the specified priority.  These priorities are used to determine
the order in which view table entries are tested when selecting the
inverse viewing transformation to use for transforming from device coordinates
to world coordinates.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.IP \fIBadValue\fP 1i
The specified value for priority is invalid, or the specified table entry is
not defined.
.RE
.SH
See Also
.RS
.LP
.RE
.bp
.SH
PEXSetWorkstationViewRep - Set Workstation View Representation
.XS
	PEXSetWorkstationViewRep
.XE
.IN "PEXSetWorkstationViewRep" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXSetWorkstationViewRep\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, unsigned int \fIview_index\fP\^, PEXViewEntry *\fIvalues\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIview_index\fP 1i
The view index.
.IP \fIvalues\fP 1i
A pointer to the view representation values.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function sets the specified view table entry of the requested view table
in the specified workstation.
If the dynamic modification for the view table is
.PN PEXIMM ,
the current view table entry is set to the specified view representation and
the view update is set to
.PN PEXNotPending ;
otherwise, the view update is set to
.PN PEXPending
and the current view table is not changed.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.sp
typedef struct { 
    unsigned short      clip_flags;
    unsigned short      reserved;
    PEXNPCSubVolume     clip_limits;
    PEXMatrix           orientation;
    PEXMatrix           mapping;
} PEXViewEntry;
.sp
typedef struct {
    PEXCoord            min;
    PEXCoord            max;
} PEXNPCSubVolume;
.sp
typedef struct {
    float               x;
    float               y;
    float               z;
} PEXCoord;
.sp
typedef float           PEXMatrix[4][4];
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadAlloc\fP 1i
The view table is full.
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.RE
.bp
.SH
PEXSetWorkstationWindow - Set Workstation Window
.XS
	PEXSetWorkstationWindow
.XE
.IN "PEXSetWorkstationWindow" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXSetWorkstationWindow\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, PEXNPCSubVolume *\fIworkstation_window\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIworkstation_window\fP 1i
The workstation window.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function set the requested NPC subvolume of the specified workstation.
If the dynamic modification for the workstation window is
.PN PEXIMM ,
the current workstation window is set to the specified NPC subvolume and
the workstation update is set to
.PN PEXNotPending ;
otherwise, the workstation update is set to
.PN PEXPending
and the current workstation window is not changed.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.sp
typedef struct {
    PEXCoord            min;
    PEXCoord            max;
} PEXNPCSubVolume;
.sp
typedef struct {
    float               x;
    float               y;
    float               z;
} PEXCoord;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.RE
.bp
.SH
PEXUnpostAllStructures - Unpost All Structures from Workstation
.XS
	PEXUnpostAllStructures
.XE
.IN "PEXUnpostAllStructures" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXUnpostAllStructures\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function removes all structures from the specified workstation's posted
structure list.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXUnpostStructure
.RE
.bp
.SH
PEXUnpostStructure - Unpost Structure from Workstation
.XS
	PEXUnpostStructure
.XE
.IN "PEXUnpostStructure" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXUnpostStructure\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^, PEXStructure \fIstructure\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.IP \fIstructure\fP 1i
The resource identifier of the structure.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function removes the specified structure from the workstation's posted
structure list.  If the structure is not found in the list, 
an error is generated.
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
typedef XID             PEXStructure;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXStructure\fP 1i
The specified structure resource identifier is invalid.
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXUnpostAllStructures
.RE
.bp
.SH
PEXUpdateWorkstation - Update Workstation
.XS
	PEXUpdateWorkstation
.XE
.IN "PEXUpdateWorkstation" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
void PEXUpdateWorkstation\^(\^Display *\fIdisplay\fP\^, PEXWorkstation \fIworkstation\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fIdisplay\fP 1i
A pointer to a display structure returned by a successful \fBXOpenDisplay\fP call.
.IP \fIworkstation\fP 1i
The resource identifier of the workstation.
.RE
.SH
Returns
.RS
.LP
None
.RE
.SH
Description
.RS
.LP
This function will perform actions identical to
.PN PEXRedrawAllStructures
on the specified workstation if the workstation's visual state is currently
set to
.PN PEXDeferred
or 
.PN PEXSimulated .
.RE
.SH
Data Structures
.ID
.Co
typedef XID             PEXWorkstation;
.ft P
.DE
.SH
Errors
.RS
.IP \fIBadPEXWorkstation\fP 1i
The specified workstation resource identifier is invalid.
.RE
.SH
See Also
.RS
.LP
.PN PEXRedrawAllStructures
.RE
.bp
.SH
PEXSetPWAttributeMask - Macro to Setup Workstation Attributes Value Mask
.XS
	PEXSetPWAttributeMask
.XE
.IN "PEXSetPWAttributeMask" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
PEXSetPWAttributeMask(\^\fImask\fP\^, \fIattr\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fImask\fP 1i
The address of the value mask - an array of two unsigned long.
.IP \fIattr\fP 1i
A single workstation attribute bitmask constant.
.RE
.SH
Description
.RS
.LP
This is a utility macro
to aid in setting up the bitmask for the workstation
attributes.
.LP
The following constants must be used:
.ID
.PN PEXPWDisplayUpdate
.PN PEXPWVisualState
.PN PEXPWDisplaySurface
.PN PEXPWViewUpdate
.PN PEXPWDefinedViews
.PN PEXPWWorkstationUpdate
.PN PEXPWReqNPCSubVolume
.PN PEXPWCurNPCSubVolume
.PN PEXPWReqViewport
.PN PEXPWCurViewport
.PN PEXPWHLHSRUpdate
.PN PEXPWReqHLHSRMode
.PN PEXPWCurHLHSRMode
.PN PEXPWDrawable
.PN PEXPWMarkerBundle
.PN PEXPWTextBundle
.PN PEXPWLineBundle
.PN PEXPWInteriorBundle
.PN PEXPWEdgeBundle
.PN PEXPWColorTable
.PN PEXPWDepthCueTable
.PN PEXPWLightTable
.PN PEXPWColorApproxTable
.PN PEXPWPatternTable
.PN PEXPWTextFontTable
.PN PEXPWHighlightIncl
.PN PEXPWHighlightExcl
.PN PEXPWInvisibilityIncl
.PN PEXPWInvisibilityExcl
.PN PEXPWPostedStructures
.PN PEXPWNumPriorities
.PN PEXPWBufferUpdate
.PN PEXPWReqBufferMode
.PN PEXPWCurBufferMode
.DE
Note that this macro does multiple evaluations of the value for attr.
.RE
.SH
Errors
.RS
.IP None 1i
.RE
.SH
See Also
.RS
.LP
.PN PEXGetWorkstationAttributes
.RE
.bp
.SH
PEXSetPWAttributeMaskAll - Macro to Set All Workstation Attributes in Value Mask
.XS
	PEXSetPWAttributeMaskAll
.XE
.IN "PEXSetPWAttributeMaskAll" "" "@DEF@"
.SH
Synopsis
.RS
.FD 0
PEXSetPWAttributeMaskAll(\^\fImask\fP\^)
.FN
.RE
.SH
Arguments
.RS
.IP \fImask\fP 1i
The address of the value mask - an array of two unsigned long.
.RE
.SH
Description
.RS
.LP
This is a utility macro
to aid in setting up the bitmask for the workstation
attributes.  This macro will set all valid bits in the mask.
.RE
.SH
Errors
.RS
.IP None 1i
.RE
.SH
See Also
.RS
.LP
.PN PEXGetWorkstationAttributes
.RE
.bp
