![]() |
CMProfileAccessProcPtr |
||||
Header: | CMApplication.h | Carbon status: | Supported | |
Defines a pointer to a profile access callback function. Your profile access function provides procedure-based access to a profile.
typedef OSErr(* CMProfileAccessProcPtr) ( SInt32 command, SInt32 offset, SInt32 *size, void *data, void *refCon );
You would declare your function like this if you were to name it MyCMProfileAccessCallback:
OSErr MyCMProfileAccessCallback ( SInt32 command, SInt32 offset, SInt32 *size, void *data, void *refCon );
A command value indicating the operation to perform. Operation constants are described in
For read and write operations, the offset from the beginning of the profile at which to read or write data.
A pointer to a size value. On input, for the cmReadAccess and cmWriteAccess command constants, a pointer to a value indicating the number of bytes to read or write; for the cmOpenWriteAccess command, the total size of the profile. On return, after reading or writing, the actual number of bytes read or written.
A pointer to a buffer containing data to read or write. On return, for a read operation, contains the data that was read.
A reference constant pointer that can store private data for the CMProfileAccessCallback function.
A result code.
When your application calls the CMOpenProfile, CMNewProfile, CMCopyProfile, or CMNewLinkProfile functions, it may supply the ColorSync Manager with a profile location structure of type CMProfileLocation that specifies a procedure that provides access to a profile. In the structure, you provide a universal procedure pointer to a profile access procedure supplied by you and, optionally, a pointer to data your procedure can use. The ColorSync Manager calls your procedure when the profile is created, initialized, opened, read, updated, or closed.
When the ColorSync Manager calls your profile access procedure, it passes a constant indicating the operation to perform. The operations include creating a new profile, reading from the profile, writing the profile, and so on. Operation constants are described in
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)