int kcolor_get_attributes(
kobject object,
kvalist)
The variable argument list takes the form:
ATTRIBUTE_NAME1, &value1 [, &value2, ...],
ATTRIBUTE_NAME2, &value1,[, &value2, ...],
..., NULL
The number of value arguments in the variable argument list for each attribute depends on the attribute. The NULL at the end of the variable argument list serves as a flag indicating the end of the list.
Be careful not to forget the NULL at the end of the list. This is a common programming error which unfortunately will not generate any compiler warnings.
This color service function should be used in conjunction with other application services such as polymorphic data services and geometry data services. This function will work on data objects opened or created with either of those services.
Attributes are retrieved by passing in the address of a variable by which the attribute can be returned. Note that any array attributes, such as strings, which are retrieved should not be altered or freed. The pointer returned points to the actual internal storage array. A copy should be made if the values need to be changed.
The following example illustrates the use of a single get attributes call to retrieve two different color attributes.
char **autocolor_list;
int num;
int colorspace;
kcolor_get_attributes(object,
KCOLOR_AUTOCOLOR_LIST, &list, &num,
KCOLOR_COLORSPACE, &colorspace,
NULL);
A complete list of color attributes can be found in Chapter 4 of Programming Services Volume II.
none
none
$DATASERV/objects/library/kappserv/src/color.c