.\" ##
.\" $XConsortium: p406,v 5.2 94/04/17 20:59:11 rws Exp $
.\" ##
.\" ## 
.\" ## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
.\" ## 
.\" ##                         All Rights Reserved
.\" ## 
.\" ## Permission to use, copy, modify, and distribute this software and its 
.\" ## documentation for any purpose and without fee is hereby granted, 
.\" ## provided that the above copyright notice appear in all copies and that
.\" ## both that copyright notice and this permission notice appear in 
.\" ## supporting documentation, and that the names of Sun Microsystems
.\" ## and the X Consortium not be used in advertising or publicity 
.\" ## pertaining to distribution of the software without specific, written 
.\" ## prior permission.  
.\" ## 
.\" ## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\" ## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\" ## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\" ## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\" ## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\" ## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" ## PERFORMANCE OF THIS SOFTWARE.
.TH "WORKSTATION TYPE SET" 3P "29 February 1991"
.SH NAME
WORKSTATION TYPE SET \- set workstation type attributes \(em
\s-2PEX-SI\s0 Extension
.IX "Cursors" "WORKSTATION TYPE SET"
.IX "Double Buffering" "WORKSTATION TYPE SET"
.IX "Implementation-Specific Functions" "WORKSTATION TYPE SET"
.IX "Nonstandard Functions" "WORKSTATION TYPE SET"
.IX "Workstation Types" "WORKSTATION TYPE SET"
.IX "X Window System" "WORKSTATION TYPE SET" "X Window System" "WORKSTATION TYPE SET"
.de WA	\" workstation attribute macro -- no FORTRAN
.IP "\fI\\$1\fP  (C)"
..
.\" new "WB" definition (JH, 6-26-89)
.de WB	\" second line workstation attribute macro -- no FORTRAN
.PD .1v
.LP
\fI\\$1\fP
'in +5n
\&  (C)
.in
.PD .4v
..
.\" new definition of "WD" macro (John Hevelin, 6-26-89):
.\" fixes bug that appears in nroff output when $1 is longer than OUTPUT line
.de WD	\" required data type and default macro -- no FORTRAN
.PD .2v
.RS
.LP
Data type:\ \&
'in +5n
\fI\\$1\fP  (\s-2C\s+2)
.in
.LP
Default:\ \&
'in +5n
\&\\$3
.in
.RE
.PD .4v
..
.\" New definitions of "CE" and "FE" --
.\" fixes bug of trying to treat "IP" tag as entire line
.\" (which causes IP macro to barf). -- John Hevelin (03-09-89)
.de CE	\" \s-2C\s+2 enumeration listing
.PD .2v
.RS
.LP
\s-2C\s+2 enumeration:\ \&
'in +5n
\fI\\$1\fP
.in
.RE
.PD .4v
..
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
caddr_t
phigs_ws_type_set ( wst, <attribute-value list> )
Pint	wst;	 \fIworkstation type\fP 
Phigs_ws_type_attr	attributes;	\fIattributes\fR
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2WORKSTATION TYPE SET\s+2 changes the specified attribute values in 
the workstation description table associated with the specified
workstation type.
.LP
The workstation description table associated with each workstation type
contains both \s-2PHIGS\s+2-defined fields and \s-2PEX-SI\s0-specific fields.
All of the \s-2PEX-SI\s0-specific fields and some of the 
\s-2PHIGS\s+2-specific fields can be changed with
\s-2WORKSTATION TYPE SET\s+2.
The fields that can be modified are listed below in the \fIWorkstation
Type Attributes\fP section.
.LP
\s-2WORKSTATION TYPE SET\s+2 operates only on workstation types
created by \s-2WORKSTATION TYPE CREATE\s+2.  
The predefined types cannot be modified, nor can types returned by
\s-2INQUIRE WORKSTATION CONNECTION AND TYPE\s+2.
See \s-2OPEN WORKSTATION\s+2 for a description of the predefined
workstation types.
.LP
This is a \s-2PEX-SI\s0 addition, and is not part of the 
\s-2PHIGS\s+2 standard.  
.SS C Input Parameters
.IP \fIwst\fP
The workstation type to modify.  
This cannot be a specific workstation type (one associated with an open
workstation) or one of the predefined types.  
.IP "\fI<attribute-value list>\fP"
A zero terminated list of workstation type attributes and corresponding
values.  The attributes are members of the Phigs_ws_type_attr enumeration
defined in phigs.h.  The data type of the values varies according to the
attribute.  The list of attributes below specifies the value type required
for each attribute.  The attribute fields of the workstation type are
modified according to the contents of this list.
.IP
Phigs_ws_type_attr is defined as follows:
.sp .4
.nf
.ta .5i
typedef enum {
.sp .2
	/* generic attributes start at 1 */
	PHG_BASE_NAME = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 5),
#define  PHIGS_BASE_NAME  (char *)PHG_BASE_NAME
.sp .2
	/* generic X attributes start at 25 */
	/* PHIGS_X_DISPLAY can only be set.  Only the name is remembered. */
	PHG_X_DISPLAY = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 25),
#define PHIGS_X_DISPLAY (char *)PHG_X_DISPLAY
	PHG_X_DISPLAY_NAME = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 26),
#define PHIGS_X_DISPLAY_NAME (char *)PHG_X_DISPLAY_NAME
	PHG_X_DISPLAY_WINDOW = PHIGS_ATTR( PHG_ATTR_INT_PAIR, PHIGS_FIRST_ATTR + 27),
#define PHIGS_X_DISPLAY_WINDOW (char *)PHG_X_DISPLAY_WINDOW
	/* PHIGS_X_RMDB can only be set. */
	PHG_X_RMDB = PHIGS_ATTR( PHG_ATTR_INT_TRIPLE, PHIGS_FIRST_ATTR + 28),
#define PHIGS_X_RMDB (char *)PHG_X_RMDB
	PHG_X_BUF_MODE = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 29),
#define PHIGS_X_BUF_MODE (char *)PHG_X_BUF_MODE
	PHG_X_HANDLE_EXPOSE = PHIGS_ATTR( PHG_ATTR_BOOLEAN, PHIGS_FIRST_ATTR + 31),
#define PHIGS_X_HANDLE_EXPOSE (char *)PHG_X_HANDLE_EXPOSE
	PHG_X_HANDLE_DESTROY = PHIGS_ATTR( PHG_ATTR_BOOLEAN, PHIGS_FIRST_ATTR + 32),
#define PHIGS_X_HANDLE_DESTROY (char *)PHG_X_HANDLE_DESTROY
	PHG_DC_MODEL = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 33),
#define PHIGS_DC_MODEL  (char *)PHG_DC_MODEL
	PHG_X_CMAP_PROP_ATOM = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 34),
#define PHIGS_X_CMAP_PROP_ATOM (char *)PHG_X_CMAP_PROP_ATOM
.sp .2
	/* tool attributes start at 50 */
	PHG_TOOL_WIDTH = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 50),
#define PHIGS_TOOL_WIDTH (char *)PHG_TOOL_WIDTH
	PHG_TOOL_HEIGHT = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 51),
#define PHIGS_TOOL_HEIGHT (char *)PHG_TOOL_HEIGHT
	PHG_TOOL_X = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 52),
#define PHIGS_TOOL_X (char *)PHG_TOOL_X
	PHG_TOOL_Y = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 53),
#define PHIGS_TOOL_Y (char *)PHG_TOOL_Y
	PHG_TOOL_LABEL = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 54),
#define PHIGS_TOOL_LABEL (char *)PHG_TOOL_LABEL
	PHG_TOOL_ICON_NAME = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 55),
#define PHIGS_TOOL_ICON_NAME (char *)PHG_TOOL_ICON_NAME
	PHG_TOOL_BORDER_WIDTH = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 56),
#define PHIGS_TOOL_BORDER_WIDTH (char *)PHG_TOOL_BORDER_WIDTH
.sp .2
	/* Phigs attributes start at 150 */
	PHG_WS_CATEGORY = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 150),
#define PHIGS_WS_CATEGORY (char *)PHG_WS_CATEGORY
.sp .2
} Phigs_ws_type_attr;
.fi
.IP
The following is an example of an attribute list:
.sp .4
.nf
.ta .5i +.75i +1i
	Pint	wst;
.sp .4
	phigs_ws_type_set( wst,
		PHIGS_TOOL_X, (char*)700,
		PHIGS_TOOL_Y, (char*)100,
		PHIGS_TOOL_WIDTH, (char*)200,
		PHIGS_TOOL_HEIGHT, (char*)200,
		PHIGS_TOOL_LABEL, "views",
		(char*)0 );
.fi
.SS Execution
.LP
\s-2WORKSTATION TYPE SET\s+2 modifies the fields of the 
workstation description table associated
with the specified workstation type.  The modifiable fields are listed
below.  The changes are specified with \fIattribute-value\fP pairs.  The
\fIattribute\fP specifies the field to change, the \fIvalue\fP is the
value to assign to the field.  
The \s-2PEX-SI\s0-specific fields are different for
different workstation types, so the attributes are listed according to 
the workstation type to which they apply.
.SS Workstation Type Attributes
.LP
The workstation description table attributes are described here.  
The C constants are listed along with 
a description of each
attribute, the data type required, and the default value.  The C
constants are members of the Phigs_ws_type_attr
enumerated type defined in phigs.h.
.LP
.SS Common x_tool and x_drawable Attributes
.WA PHIGS_BASE_NAME  PHIGSBASENAME
This argument to \s-2WORKSTATION TYPE GET\s+2
retrieves the base type of the workstation
type.
It can not be specified as an argument to
\s-2WORKSTATION TYPE SET\s+2 or \s-2WORKSTATION TYPE CREATE\s+2.
.CE "\s-2PHIGS_X_TOOL, PHIGS_X_DRAWABLE\s+2"
.WA PHIGS_WS_CATEGORY PHIGSWSCATEGORY
The category of the workstation.  This attribute can be used to change the
workstation category from \s-2OUTIN\s+2 (output and input) to
\s-2OUTPUT\s+2 (output only).
.WD "Pwscat (\s-2PCAT_OUT\s+2 or \s-2PCAT_OUTIN\s+2 only)"  \s-2INTEGER\s+2 \s-2OUTIN\s+2
.CE "\s-2PCAT_OUT, PCAT_IN, PCAT_OUTIN, PCAT_MO, PCAT_MI\s+2"
.fE "\s-2POUTPT,   PCAT_IN,   PCAT_OUTIN,   PCAT_MO,   PCAT_MI\s+2"
.WA PHIGS_X_BUF_MODE  PHIGSDBLBUFFER
Specifies the method of double buffering to use.
.WD Phigs_dbl_buff \s-2INTEGER\s+2 \s-2PHIGS_BUF_SINGLE\s+2
.CE "\s-2PHIGS_BUF_SINGLE, PHIGS_BUF_DOUBLE\s+2"
.fE "\s-2PHIGSDBLNONE,   PHIGSDBLCMAP,   PHIGSDBLHW\s+2"
.WA PHIGS_X_DISPLAY  PHIGS
Modify the workstation type to reflect the capabilities of the
specified display.
The display is specified by a display pointer.
Some of the workstation type attributes and workstation description table
values are dependent on the capabilities of the \s-2PEX\s+2 extension in
the \s-2X\s+2 server.
This attribute causes such values to be modified to reflect those
capabilities.
This attribute can only be specified to
\s-2WORKSTATION TYPE SET\s+2 or \s-2WORKSTATION TYPE CREATE\s+2.
It cannot be specified to \s-2WORKSTATION TYPE GET\s+2.
.WD Display* "" \s-2NULL\s+2
.WA PHIGS_X_DISPLAY_NAME  PHIGS
Modify the workstation type to reflect the capabilities of the
specified display.
The display is specified by a display name string.
Some of the workstation type attributes and workstation description table
values are dependent on the capabilities of the \s-2PEX\s+2 extension in
the \s-2X\s+2 server.
This attribute causes such values to be modified to reflect those
capabilities.
.WD char* "" \s-2NULL\s+2
.WA PHIGS_X_DISPLAY_WINDOW  PHIGS
Modify the workstation type to reflect the capabilities of the
specified window.
Some of the workstation type attributes and workstation description table
values are dependent on the capabilities of the \s-2X\s+2 window and 
\s-2PEX\s+2 extension the \s-2PHIGS\s+2 workstation will use.
This attribute causes such values to be modified to reflect those
capabilities.
This attribute can only be specified to
\s-2WORKSTATION TYPE SET\s+2 of \s-2WORKSTATION TYPE CREATE\s+2.
It cannot be specified to \s-2WORKSTATION TYPE GET\s+2.
.WD "Display*, Window" "" "\s-2NULL\s+2, 0"
.WA PHIGS_HANDLE_EXPOSE  PHIGS
Enable or disable \s-2PEX-SI\s+2 handling of window exposures.
A non-zero value specifies that \s-2PHIGS\s+2 will redraw the PHIGS
output when the window or portions of the window are exposed.
A zero value specifies that PHIGS will not redraw when the window or
portions of the window are exposed.
.WD "Pint" "" "1"
.WA PHIGS_HANDLE_DESTROY  PHIGS
Enable or disable handling of DestroyNotify events from the workstation
window.
A non-zero value specifies that the \s-2PEX-SI API\s+2 will exit when a
DestroyNotify event is received on the window of an open workstation.
A zero value specifies that the \s-2PEX-SI API\s+2 will do nothing
when a DestroyNotify event is received on the window of an open workstation.
.WD "Pint" "" "1"
.WA PHIGS_DC_MODEL  PHIGS
Set the effect of window resizing on the workstation's DC limits.
Valid values are defined in phigs.h:
.nf
.ta .5i
.sp .2
typedef enum {
.sp .2
	\s-2PHIGS_DC_LIMITS_FIXED,\s+2
	\s-2PHIGS_DC_LIMITS_ADJUST_TO_WINDOW,\s+2
.sp .2
} Phigs_DC_model;
.fi
\s-2DC_LIMITS_FIXED\s+2 causes the \s-2DC\s+2 limits to be left
as they are, even though the new window size is possibly smaller or larger
than the limits.
.br
\s-2DC_LIMITS_ADJUST_TO_WINDOW\s+2, the default, causes the \s-2DC\s+2 limits to be adjusted
to the new window size.
.WD "Phigs_DC_model" "" "\s-2PHIGS_DC_LIMITS_FIXED\s+2"
.SS x_tool Attributes
.WA PHIGS_TOOL_WIDTH  PHIGSTOOLWIDTH
.WB PHIGS_TOOL_HEIGHT  PHIGSTOOLHEIGHT
The initial size of the graphics window in screen coordinates.
.WD Pint \s-2INTEGER\s+2 "600, 600"
.WA PHIGS_TOOL_X  PHIGSTOOLX
.WB PHIGS_TOOL_Y  PHIGSTOOLY
The initial position of the workstation in screen coordinates.
.WD Pint \s-2INTEGER\s+2 "50, 50"
.WA PHIGS_TOOL_LABEL PHIGSTOOLLABEL
The label to put in the workstation frame banner.
.WD char* \s-2CHARACTER(*)\s+2 "\s-2PHIGS\s+2 Workstation"
.WA PHIGS_TOOL_ICON_LABEL  PHIGSTOOLICONFL
The label for the icon when the workstation window is closed (iconified).
.WD char* \s-2NULL\s+2
.WA PHIGS_TOOL_BORDER_WIDTH  PHIGS
The border width of the window.
.WD Pint \s-2INTEGER\s+2 "0"
.SH ERRORS
.IP 
No Error
.\" Remove "fE" macro to avoid potential conflicts. -- JH (05-19-89)
.rm fE
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "WORKSTATION TYPE CREATE (3P)"
.SM "WORKSTATION TYPE DESTROY (3P)"
.SM "WORKSTATION TYPE GET (3P)"
.SM "OPEN WORKSTATION (3P)"
.SM "INQUIRE LIST OF AVAILABLE WORKSTATION TYPES (3P)"
.SM "INQUIRE WORKSTATION CONNECTION AND TYPE (3P)"
.SM "ESCAPE -3 (3P)"
.SM "PHIGS WORKSTATION DESCRIPTION TABLE (7P)"
.fi


