.\"
.\" $XConsortium: p100,v 5.2 94/04/17 20:55:30 rws Exp $
.\"
.\" 
$XMCOPY
.\" 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 "INQUIRE COLOUR REPRESENTATION" 3P "29 February 1991"
.SH NAME
INQUIRE COLOUR REPRESENTATION \- inquire a colour representation
on a workstation
.IX "Attribute Representations" "INQUIRE COLOUR REPRESENTATION"
.IX "Colour" "INQUIRE COLOUR REPRESENTATION"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pinq_colr_rep ( ws, index, type, error_ind, rep )
Pint	ws;	\fIworkstation identifier\fP
Pint	index;	\fIcolour index\fP
Pinq_type	type;	\fItype of returned value\fP
Pint	*error_ind;	\fI\s-2OUT\s+2 error indicator\fP
Pcolr_rep	*rep;	\fI\s-2OUT\s+2 colour representation\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
Use
.SM INQUIRE COLOUR REPRESENTATION
to determine the current
representation in a specified colour table entry
from a specified workstation's state list.
.SS C Input Parameters
.IP \fIws\fP
The workstation identifier of the workstation whose state list is queried.
.IP \fIindex\fP
Entry to be returned from the workstation's colour table;
if this entry is not present in the table and the
\fItype of returned value\fR parameter is \s-2REALIZED\s+2,
the representation for colour index 1 is returned.
.IP \fItype\fP
An enumerated variable specifying whether the value desired is
the value specified by the application program or the available
value used by the workstation. Valid values are:
.br
.sp .3
.ta 1i
.in 2i
.ti -1i
Value	Meaning
.sp .2
.ti -1i
\s-2PINQ_SET\s+2	Return the values exactly as they are specified in the application program.
.sp .2
.ti -1i
\s-2PINQ_REALIZED\s+2	Return the values as they are used by the workstation when the values specified in the application program are mapped to values available on the workstation.
.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 \fIrep\fP
A pointer to a structure in which the system returns the colour representation
at entry \fIindex\fR. Pcolr_rep is defined in phigs.h as follows:
.ta .5i +1i +1i
.nf
.sp .2
typedef union {
.sp .2
	Prgb	rgb;	/* Red Green Blue colour specification */
	Pcieluv	cieluv;	/* CIE L*U*V* colour specification */
	Phls	hls;	/* Hue Lightness Saturation colour specification */
	Phsv	hsv;	/* Hue Saturation Value colour specification */
	Pdata	unsupp;	/* Colour in unsupported colour model */
.sp .2
} Pcolr_rep;
.fi
.IP
Prgb is defined in phigs.h as follows:
.nf
.ta .5i +1i +1i
.sp .2
typedef struct {
.sp .2
	Pfloat	red;	/* red, hue, etc */
	Pfloat	green;	/* green, saturation, lightness, etc */
	Pfloat	blue;	/* blue, value, saturation, etc */
.sp .2
} Prgb;
.fi
.IP
Pcieluv is defined in phigs.h as follows:
.nf
.ta .5i +1i +1i
.sp .2
typedef struct {
.sp .2
	Pfloat	cieluv_x;	/* x coefficient */
	Pfloat	cieluv_y;	/* y coefficient */
	Pfloat	cieluv_y_lum;	/* y luminance */
.sp .2
} Pcieluv;
.fi
.IP
Phsv is defined in phigs.h as follows:
.nf
.ta .5i +1i +1i
.sp .2
typedef struct {
.sp .2
	Pfloat	hue;	/* hue */
	Pfloat	satur;	/* saturation */
	Pfloat	value;	/* value */
.sp .2
} Phsv;
.fi
.IP
Phls is defined in phigs.h as follows:
.nf
.ta .5i +1i +1i
.sp .2
typedef struct {
.sp .2
	Pfloat	hue;	/* hue */
	Pfloat	lightness;	/* lightness */
	Pfloat	satur;	/* saturation */
.sp .2
} Phls;
.fi
.IP
Pdata is defined in phigs.h as follows:
.nf
.ta .5i +1i +1i
.sp .2
typedef struct {
.sp .2
	size_t	size;	/* size of data */
	char	*data	/* pointer to data */
.sp .2
} Pdata;
.fi
.SH ERRORS
.IP 003
Ignoring function, function requires state (\s-2PHOP, WSOP, *, *\s+2)
.IP 054
Ignoring function, the specified workstation is not open
.IP 059
Ignoring function, the specified workstation does not have output capability
(i.e., the workstation category is neither \s-2OUTPUT\s+2, \s-2OUTIN\s+2, nor \s-2MO\s+2)
.IP 113
Ignoring function, the colour index value is less than zero
.IP 101
Ignoring function, the specified representation has not been defined
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "INQUIRE COLOUR FACILITIES (3P)"
.SM "SET COLOUR REPRESENTATION (3P)"
.SM "INQUIRE PREDEFINED COLOUR REPRESENTATION (3P)"
.fi
