Previous Book Contents Book Index Next

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


ISpElement_GetNextEvent

You can use the ISpElement_GetNextEvent function to get event data for a single element.

OSStatus ISpElement_GetNextEvent (
	ElemenReference inElement,
	UInt32 bufSize,
	ISpElementEventPtr event,
	Boolean *wasEvent);
inElement
A reference to the element whose event data you want to get.
bufSize
The size of the buffer allocated to hold the 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 ISpElement_GetNextEvent function takes, in the inElement parameter, an element reference and, in the bufSize parameter, the buffer size of an element event structure. It gets the event data, if any, for the specified element 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. It 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 ISpElementList_GetNextEvent except that it operates on a single event.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996