Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 3 - InputSprocket / InputSprocket Reference
InputSprocket Functions / Managing Element Lists


ISpElementList_New

You can use the ISpElementList_New function to create a new element list.

OSStatus ISpElementList_New ( UInt32 inCount, ISpElementReference *inElements, ISpElementListReference *outElementList UInt32 flags);
inCount
The number of element references in the list pointed to by the inElements parameter.
inElements
A pointer to a list of elements to put in the list.
outElementList
A pointer to a reference to the new element list.
flags
Set the kISpElementListFlag_UseTempMem bit to tell InputSprocket to allocate the element list in temporary memory. See "Element List Flag" (page 3-23).
function result
A result code.
DESCRIPTION
The ISpElementList_New function creates a new element list. You pass in the element references to put on the list in the inElements parameter and the number of those references in the inCount parameter. If you pass in 0 in the inCount parameter, ISpElementList_New creates an empty list. If you want the list allocated in temporary memory, pass in kISpElementListFlag_UseTempMem in the flags parameter.

The ISpElementList_New function returns a reference to the new element list in the outElementList parameter. If it fails to create a new list because it was out of memory, it returns 0 in the outElementList parameter.

CALLING RESTRICTIONS
Do not call ISpElementList_New at interrupt time because it allocates memory.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996