Previous Book Contents Book Index Next

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


ISpElementList_ExtractByKind

You can use the ISpElementList_ExtractByKind function to extract and count elements of a specified kind in an element list.

OSStatus ISpElementList_ExtractByKind (
	ISpElementListReference inElementList,
	ISpElementKind theKind,
	UInt32 inBufferCount,
	UInt32 *outCount,
	ISpElementReference *buffer);
inElementList
A reference to the element list to extract elements from.
theKind
The kind of elements to extract and count.
inBufferCount
The number of element references in the array pointed to by the buffer parameter.
outCount
The number of element references of the specified kind on the element list.
buffer
A pointer to an array of element references.
function result
A result code.
DESCRIPTION
The ISpElementList_ExtractByKind function takes, in the buffer parameter, a pointer to an array of element references and, in the inBufferCount parameter, the number of element references in the array. The ISpElementList_ExtractByKind function copies element references of the kind specified by the theKind parameter from the list specified in the inElementList parameter into that array. If there are more elements of the specified kind in the list than there is space in the array, it copies only as many element references as fit. The function returns, in the outCount parameter, the total number of elements of the specified kin in the element list.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996