Defines pointers to client-defined callback functions that manage the sending of data for a direct-access data provider.


struct CGDataProviderDirectAccessCallbacks {
   CGDataProviderGetBytePointerCallback getBytePointer;
   CGDataProviderReleaseBytePointerCallback releaseBytePointer;
   CGDataProviderGetBytesAtOffsetCallback getBytes;
   CGDataProviderReleaseInfoCallback releaseProvider;
typedef struct CGDataProviderDirectAccessCallbacks  CGDataProviderDirectAccessCallbacks;


You supply a CGDataProviderDirectAccessCallbacks structure to the function CGDataProviderCreateDirectAccess to create a data provider for direct access. The functions specified by the CGDataProviderDirectAccessCallbacks structure are responsible for copying data a block at a time to a memory buffer for Core Graphics to use. The functions are also responsible for handling the data provider’s basic memory management. For the callback to work, one of the getBytePointer and getBytes parameters must be non-NULL. If both are non-NULL, then getBytePointer is used to access the data.




A pointer to a function that returns a pointer to the provider’s data. For more information, see CGDataProviderGetBytePointerCallback.


A pointer to a function that Core Graphics calls to release a pointer to the provider’s data. For more information, see CGDataProviderReleaseBytePointerCallback.


A pointer to a function that copies data from the provider. For more information, see CGDataProviderGetBytesAtOffsetCallback.


A pointer to a function that handles clean-up for the data provider, or NULL. For more information, see CGDataProviderReleaseInfoCallback.