Carbon


CMGetIndProfileElementInfo

Header: CMApplication.h Carbon status: Supported

Obtains the element tag and data size of an element by index from the specified profile.

CMError CMGetIndProfileElementInfo (
    CMProfileRef prof, 
    UInt32 index, 
    OSType *tag, 
    UInt32 *elementSize, 
    Boolean *refs
);
Parameter descriptions
prof

A profile reference of type CMProfileRef to the profile containing the element.

index

A one-based element index within the range returned by the elementCount parameter of the CMCountProfileElements function.

tag

A pointer to an element signature. On return, the tag signature of the element corresponding to the index.

elementSize

A pointer to an element size. On return, the size in bytes of the element data corresponding to the tag.

refs

A pointer to a reference count flag. On return, set to true if more than one tag in the profile refers to element data associated with the tag corresponding to the index.

DISCUSSION

The index order of elements is determined internally by the ColorSync Manager and is not publicly defined.

Before calling the CMGetIndProfileElementInfo function, you should call the function CMCountProfileElements, which returns the total number of elements in the profile in the elementCount parameter. The number you specify for the index parameter when calling CMGetIndProfileElementInfo should be in the range of 1 to elementCount; otherwise the function will return a result code of cmIndexRangeErr.

You might want to call this function, for example, to print out the contents of a profile.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when ColorSync 2.0 or later is present.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)