.\"##
.\" $XConsortium: p153,v 5.2 94/04/17 20:56:12 rws Exp $
.\"##
.\"## 
$XMCOPY
.\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. 
.\"## 
.\"##                         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 name of Sun Microsystems,
.\"## 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.
.ds f \s-2INQUIRE LIST OF AVAILABLE WORKSTATION TYPES\s+2
.TH "INQUIRE LIST OF AVAILABLE WORKSTATION TYPES" 3P "29 February 1991"
.SH NAME
INQUIRE LIST OF AVAILABLE WORKSTATION TYPES\- inquire the current list of workstation types defined in the PHIGS description table
.IX "Workstation Types" "INQUIRE LIST OF AVAILABLE WORKSTATION TYPES"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pinq_list_avail_ws_types ( length, start, error_ind, types, length_list)
Pint	length;	\fIlength of application list\fP
Pint	start;	\fIstarting position\fP
Pint	*error_ind;	\fIOUT error indicator\fP
Pint_list	*types;	\fIOUT list of ws types\fP
Pint	*length_list;	\fIOUT length of list in PHIGS\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, *, *)
.SH DESCRIPTION
.SS Purpose
Use \*f to obtain a list
of the currently available workstation types stored in the \s-2PHIGS\s+2
description table.  This list contains the predefined workstation types
described in \s-2OPEN WORKSTATION\s+2 and user-created workstation types
created with \s-2WORKSTATION TYPE CREATE\s+2.  User-created types are
removed from this list by \s-2WORKSTATION TYPE DESTROY\s+2.  
.SS C Input Parameters
.IP \fIlength\fP
The number of \fIints\fR in the \fItypes\fR output parameter for which the 
application has allocated memory. \fIlength\fR is the number of list elements
that the system can return in \fItypes\(->ints\fR.
If a value of 0 is used here, no data will be returned in the \fItypes\(->ints\fR
list, but the total number of elements will be returned in \fIlength_list\fR.
.IP \fIstart\fP
Starting position of inquiry.  The elements in the list, beginning
with the item number specified by \fIstart\fR, are copied sequentially into 
\fItypes\(->ints\fR until \fItypes\(->ints\fR is full
or all the elements have been copied.
.SS C Output Parameters
.IP \fIerror_ind\fP
A pointer to the location for storing the error number of any error detected by this
function.  See the \fIErrors\fP section below for possible return values.  
.IP \fItypes\fP
A pointer to a Pint_list structure in which to return the number and list
of available workstation types.
Pint_list is defined in phigs.h as follows:
.sp
.ta .5i +\w'Pint	'u +\w'num_ints;	'u
.nf
typedef struct {
.sp .2
	Pint	num_ints;	/* number of Pints in list */
	Pint	*ints;	/* list of Pints */
.sp .2
} Pint_list;
.fi
.IP
The \fInum_ints\fR component specifies the number of elements in the list.
The \fIints\fR component is a pointer to a list \fInum_ints\fR long.
.IP
The application must allocate memory for \fIlength\fR elements in the
list of \fIints\fR.
.IP \fIlength_list\fP
A pointer to an integer in which the system returns the total number of elements
in the list.  This is the value required for \fIlength\fR if all elements in the
list are to be returned.
.SS Execution
\*f returns the list of available workstation types stored in the \s-2PHIGS\s+2
description table.
See \s-2OPEN WORKSTATION\s+2 and \s-2WORKSTATION TYPE CREATE\s+2 for a
description of the available workstation types and information on how to 
create new ones.
.LP
If this function detects an error, then the \fIerror indicator\fP 
indicates the error number of the detected error and no other output data
is  returned, except in the cases mentioned in the \s-2C\s+2 Parameters 
section above.  
If the function detects no error, then the \fIerror indicator\fP is set to zero 
and the inquired information is available in the output
parameters.  Since this is an inquiry function, \s-2ERROR HANDLING\s+2 is not
invoked when this function detects an error.  
.SH ERRORS
.IP 002
Ignoring function, function requires state 
(\s-2PHOP\s+2, \s-2*\s+2, \s-2*\s+2, \s-2*\s+2)
.IP 2200
Buffer overflow in input or inquiry function
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "OPEN WORKSTATION (3P)"
.SM "PHIGS WORKSTATION DESCRIPTION TABLE (7P)"
.SM "WORKSTATION TYPE CREATE (3P)"
.SM "WORKSTATION TYPE DESTROY (3P)"
.SM "WORKSTATION TYPE SET (3P)"
.fi
