Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 2 - DrawSprocket / DrawSprocket Reference
DrawSprocket Functions / Choosing a Context and Saving Preferences


DSpContext_Flatten

You can use the DSpContext_Flatten function to convert a context into a format suitable for saving to disk--for example, to save user preferences.

OSStatus DSpContext_Flatten (
DSpContextReference inContext,
void *outFlatContext);
inContext
A reference to the context to be flattened.
outFlatContext
On exit, the flattened context.
function result
A result code.
DESCRIPTION
The DSpContext_Flatten function takes, in the inContext parameter, a reference to a context to be converted into a format that can be saved to disk. You also pass, in the outFlatContext parameter, a pointer to a buffer to hold the flattened context. The buffer must be large enough to hold the flattened context. You can find out the correct size by calling DSpContext_GetFlattenedSize. The function returns, in the outFlatContext parameter, the flattened context.

CALLING RESTRICTIONS
Do not call this function during an interrupt.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996