SunPHIGS 3.0 Extensions Reference Manual
  Search only this book
Download this book in PDF

NAME

INQUIRE DIRECT COLOUR MODEL FACILITIES - inquire for list of workstation direct colour facilities

SYNOPSIS

C Syntax

void
pinq_direct_colr_model_facs (type, length, start, error_ind, total_length, models )
Pwstype    type;            workstation type
Pint       length;          length of application list
Pint       start;           starting position
Pint       * error_ind;     OUT error indicator
Pint_list  * models;        OUT list of colour models
Pint       * total_length;  OUT length of list in PHIGS

FORTRAN Syntax

SUBROUTINE pqdcmf ( WKTYPE, ICM, ERRIND, NICM, CMI )
INTEGER      WKTYPE      workstation type
INTEGER      ICM         index into the colour model list
INTEGER      ERRIND      OUT error indicator
INTEGER      NICM        OUT number of colour models
INTEGER      CMI         ICM-th element of colour models

Required PHIGS Operating States

(PHOP, * ,* ,* )

DESCRIPTION

Purpose

INQUIRE DIRECT COLOUR MODEL FACILITIES inquires for a list of workstation direct colour facilities.
This is a SunPHIGS Extension function based on PHIGS PLUS and is not part of the PHIGS standard.

C Input Parameters

All of the following data types are predefined in phigs.h.
type
The workstation type.
length
The number of ints in the models output parameter for which the application has allocated memory. length is the number of list elements that the system can return in models.ints. If a value of 0 is used here, no data is returned in the models.ints list, but the total number of elements is returned in total_length.
start
Starting position of inquiry. The elements in the list, beginning with the item number specified by start, are copied sequentially into models.ints until models.ints is full or all the elements have been copied.

C Output Parameters

error_ind
A pointer to the location for storing the error number of any error detected by this function.
models A pointer to a Pint_list that returns the portion of the list of available colour
models from the workstation description table, starting with start. Pint_list is defined in phigs.h as:
typedef struct {
Pint
num_ints;
/* number of integers * /
Pint
* ints;
/* list of integers * /
} Pint_list;
Constants defined for colour model are:
1      PMODEL_RGB
2      PMODEL_CIELUV
3      PMODEL_HSV
4      PMODEL_HLS

The pointer to the list of integers must be initialized to an array of length Pint elements.
total_length
A pointer to an integer in which the system returns the total number of elements in the list. This is the value required for length if all elements in the list are to be returned.

FORTRAN Input Parameters

WKTYPE
The workstation type.
ICM
The index of the entry desired from the list of colour models.

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.
NICM
The number of colour models.
CMI
The requested entry from the list of colour types. The valid values are:
0   PINDIR   Indirect
1   PRGB     Red, Green, and Blue
2   PCIE     CIE Colour Model
3   PHSV     Hue, Saturation, and Value
4   PHLS     Hue, Lightness, and Saturation

Execution

If the inquired information is available; then the error indicator is returned as zero, and values are returned in the output parameters.
If the inquired information is not available; then the values returned in the output parameters are undefined, and the error indicator is set to one of the following error numbers to indicate the reason for nonavailability.
Since this is an inquiry function, ERROR HANDLING is not invoked when an error is detected by this function.

ERRORS

002
Ignoring function, function requires state (PHOP, * ,* ,* )
051
Ignoring function, this information unavailable for this workstation type
052
Ignoring function, workstation type not recognized by the implementation
062
Ignoring function, this information is not available for this MO workstation type

SEE ALSO

INQUIRE COLOUR MODEL FACILITIES (3P)
PHIGS WORKSTATION DESCRIPTION TABLE (7P)