Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 2 - DrawSprocket / DrawSprocket Reference
DrawSprocket Functions / Processing System Events


DSpProcessEvent

Use the DSpProcessEvent function to pass system events through to DrawSprocket so that it can correctly handle events it must know about.

OSStatus DSpProcessEvent (
		EventRecord *inEvent,
		Boolean *outEventWasProcessed);
inEvent
A pointer to the event to be passed to DrawSprocket.
outEventWasProcessed
On exit, true if DrawSprocket processed the event; false if the event was not processed.
function result
A result code.
DESCRIPTION
You pass the DSpProcessEvent function a pointer to the event to be handled in the inEvent parameter. The function returns true in the outEventWasProcessed parameter if the event was processed. Your game must pass system events through DrawSprocket so that it can correctly handle events. In particular, whenever your game receives a suspend or resume event, it must call the DSpProcessEvent function so that DrawSprocket can correctly set the system state for the process switch.

When DrawSprocket is suspended, it returns the display to the resolution mode it was in before your context's play state first became active. When DrawSprocket resumes, it restores the display to the resolution mode used by your context. However, it is your responsibility to update the contents of the display at this time.

CALLING RESTRICTIONS
Do not call this function during an interrupt.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996