Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 3 - InputSprocket / InputSprocket Reference
InputSprocket Functions / Obtaining Data From Elements


ISpElementList_GetNextEvent

You can use the ISpElementList_GetNextEvent function to get the most recent event from a list of elements.

OSStatus ISpElementList_GetNextEvent (
	ISpElementListReference inElementList,
	UInt32 bufSize,
	ISpElementEventPtr event,
	Boolean *wasEvent);
inElementList
A reference to the element list to get the event from.
bufSize
The size of the buffer allocated to hold the event data.
event
A pointer to an element event structure, which is a variable length structure.
wasEvent
On exit, this value is true if there was an event; otherwise, it is false.
function result
A result code.
DESCRIPTION
The ISpElementList_GetNextEvent function takes, in the inElementList parameter, a reference to an element list and, in the bufSize parameter, the buffer size of an element event structure. It gets the event data, if any, from the specified element list and stores the data in the location indicated by the event parameter. It sets the wasEvent parameter to true if there was an event; otherwise, it sets it to false. If there is not enough space to hold the entire event data structure, the event is removed from the event queue and ISpElement_GetNextEvent returns an error.

This function is the same as ISpElement_GetNextEvent except that it operates on an element list.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996