CGDataProviderCallbacks

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

Declaration

struct CGDataProviderCallbacks {
   CGDataProviderGetBytesCallback getBytes;
   CGDataProviderSkipBytesCallback skipBytes;
   CGDataProviderRewindCallback rewind;
   CGDataProviderReleaseInfoCallback releaseProvider;
};
typedef struct CGDataProviderCallbacks CGDataProviderCallbacks;

Overview

The functions specified by the CGDataProviderCallbacks structure are responsible for sequentially copying data to a memory buffer for Core Graphics to use. The functions are also responsible for handling the data provider’s basic memory management. You supply a CGDataProviderCallbacks structure to the function CGDataProviderCreate to create a sequential-access data provider.

Topics

Fields

getBytes

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

skipBytes

A pointer to a function that Core Graphics calls to advance the stream of data supplied by the provider. For more information, see CGDataProviderSkipBytesCallback.

rewind

A pointer to a function Core Graphics calls to return the provider to the beginning of the data stream. For more information, see CGDataProviderRewindCallback.

releaseProvider

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