.\"##
.\" $XConsortium: p134,v 5.3 94/04/17 20:56:00 hersh 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.
.TH "INQUIRE ELEMENT TYPE AND SIZE" 3P "29 February 1991"
.SH NAME
INQUIRE ELEMENT TYPE AND SIZE \- inquire the type and size of a specified element
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 2.75i
.nf
void
pinq_elem_type_size ( struct_id, element, error_ind, type, size )
Pint	struct_id;	\fIstructure identifier\fP
Pint	element;	\fIelement number\fP
Pint	*error_ind;	\fI\s-2OUT\s+2 error indicator\fP
Pelem_type	*type;	\fI\s-2OUT\s+2 element type\fP
size_t	*size;	\fI\s-2OUT\s+2 element size\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2INQUIRE ELEMENT TYPE AND SIZE\s+2
returns the type and size of the
specified element in the specified structure.
.SS C Input Parameters
.IP \fIstruct_id\fP
Identifier of the structure 
containing the element for which to return a type and size.
.IP \fIelement\fP
Sequence number in the specified structure of the element 
for which to return a type and size.
.SS C Output Parameters
.IP \fIerror_ind\fP
A pointer to the location to store the error number of any error
detected by this function.
.IP \fItype\fP
Returns element type.
For example, a polyline primitive element would be returned as 
\s-2PELEM_POLYLINE\s+2, a character height attribute as 
\s-2PEL_CHARACTER_HEIGHT\s+2,
a modelling transformation as \s-2PEL_LOCAL_MODELLING_TRANSFORMATION3\s+2, 
and so forth.
The Pelem_type enumerated type is defined in phigs.h as follows:
.nf
.ta .5i
.sp .4
typedef enum {
.sp .2
	PELEM_ALL,
	PELEM_NIL,
	PELEM_POLYLINE3,
	PELEM_POLYLINE,
	PELEM_POLYMARKER3,
	PELEM_POLYMARKER,
	PELEM_TEXT3,
	PELEM_TEXT,
	PELEM_ANNO_TEXT_REL3,
	PELEM_ANNO_TEXT_REL,
	PELEM_FILL_AREA3,
	PELEM_FILL_AREA,
	PELEM_FILL_AREA_SET3,
	PELEM_FILL_AREA_SET,
	PELEM_CELL_ARRAY3,
	PELEM_CELL_ARRAY,
	PELEM_GDP3,
	PELEM_GDP,
	PELEM_LINE_IND,
	PELEM_MARKER_IND,
	PELEM_TEXT_IND,
	PELEM_INT_IND,
	PELEM_EDGE_IND,
	PELEM_LINETYPE,
	PELEM_LINEWIDTH,
	PELEM_LINE_COLR_IND,
	PELEM_MARKER_TYPE,
	PELEM_MARKER_SIZE,
	PELEM_MARKER_COLR_IND,
	PELEM_TEXT_FONT,
	PELEM_TEXT_PREC,
	PELEM_CHAR_EXPAN,
	PELEM_CHAR_SPACE,
	PELEM_TEXT_COLR_IND,
	PELEM_CHAR_HT,
	PELEM_CHAR_UP_VEC,
	PELEM_TEXT_PATH,
	PELEM_TEXT_ALIGN,
	PELEM_ANNO_CHAR_HT,
	PELEM_ANNO_CHAR_UP_VEC,
	PELEM_ANNO_PATH,
	PELEM_ANNO_ALIGN,
	PELEM_ANNO_STYLE,
	PELEM_INT_STYLE,
	PELEM_INT_STYLE_IND,
	PELEM_INT_COLR_IND,
	PELEM_EDGE_FLAG,
	PELEM_EDGETYPE,
	PELEM_EDGEWIDTH,
	PELEM_EDGE_COLR_IND,
	PELEM_PAT_SIZE,
	PELEM_PAT_REF_POINT_VECS,
	PELEM_PAT_REF_POINT,
	PELEM_ADD_NAMES_SET,
	PELEM_REMOVE_NAMES_SET,
	PELEM_INDIV_ASF,
	PELEM_HLHSR_ID,
	PELEM_LOCAL_MODEL_TRAN3,
	PELEM_LOCAL_MODEL_TRAN,
	PELEM_GLOBAL_MODEL_TRAN3,
	PELEM_GLOBAL_MODEL_TRAN,
	PELEM_MODEL_CLIP_VOL3,
	PELEM_MODEL_CLIP_VOL,
	PELEM_MODEL_CLIP_IND,
	PELEM_RESTORE_MODEL_CLIP_VOL,
	PELEM_VIEW_IND,
	PELEM_EXEC_STRUCT,
	PELEM_LABEL,
	PELEM_APPL_DATA,
	PELEM_GSE,
	PELEM_PICK_ID,
	PELEM_POLYLINE_SET3_DATA,
	PELEM_FILL_AREA_SET3_DATA,
	PELEM_TRI_STRIP3_DATA,
	PELEM_QUAD_MESH3_DATA,
	PELEM_SET_OF_FILL_AREA_SET3_DATA,
	PELEM_NUNI_BSP_CURVE,
	PELEM_NUNI_BSP_SURF,
	PELEM_CELL_ARRAY3_PLUS,
	PELEM_TEXT_COLR,
	PELEM_MARKER_COLR,
	PELEM_EDGE_COLR,
	PELEM_LINE_COLR,
	PELEM_CURVE_APPROX_CRIT,
	PELEM_LINE_SHAD_METH,
	PELEM_INT_COLR,
	PELEM_BACK_INT_COLR,
	PELEM_BACK_INT_STYLE,
	PELEM_BACK_INT_STYLE_IND,
	PELEM_REFL_PROPS,
	PELEM_BACK_REFL_PROPS,
	PELEM_INT_SHAD_METH,
	PELEM_BACK_INT_SHAD_METH,
	PELEM_INT_REFL_EQN,
	PELEM_BACK_INT_REFL_EQN,
	PELEM_SURF_APPROX_CRIT,
	PELEM_PARA_SURF_CHARACS,
	PELEM_FACE_DISTING_MODE,
	PELEM_FACE_CULL_MODE,
	PELEM_LIGHT_SRC_STATE,
	PELEM_DCUE_IND,
	PELEM_COLR_MAP_IND,
	PELEM_RENDERING_COLR_MODEL,
	PELEM_NUM_EL_TYPES
.sp .2
} Pelem_type;
.fi
.IP \fIsize\fP
Returns the size, in bytes, that the application will have to allocate
in order to call \s-2INQUIRE ELEMENT CONTENT\s+2
to retrieve the contents of the specified element from the specified structure.
If the element type is such that it is not necessary to allocate any
dynamic memory to retrieve its contents, a value of zero is returned.
.SH ERRORS
.IP 002
Ignoring function, function requires state (\s-2PHOP, *, *, *\s+2)
.IP 201
Ignoring function, the specified structure does not exist
.IP 202
Ignoring function, the specified element does not exist
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "INQUIRE ELEMENT POINTER (3P)"
.SM "INQUIRE ELEMENT CONTENT (3P)"
.SM "ELEMENT SEARCH (3P)"
.fi
