Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 2 - DrawSprocket / DrawSprocket Reference
DrawSprocket Functions / Choosing a Context and Saving Preferences


DSpGetFirstContext

You can use the DSpGetFirstContext function to get the first context in the list of contexts available for a specified display. This call is provided so that you may iterate over the list and choose one that best suits your needs, should you decide not to let DrawSprocket find one for you with DSpFindBestContext or let the user select one by calling DSpUserSelectContext.

OSStatus DSpGetFirstContext (
DisplayIDType displayID,
DSpContextReference *outContext);
displayID
The ID of the display for which you want to get the context. You can obtain the ID by using the Display Manager.
outContext
On exit, a reference to the first context in the list of available contexts for the specified display.
function result
A result code.
DESCRIPTION
The DSpGetFirstContext function takes, in the displayID parameter, the ID of a display and returns, in the outContext parameter, a reference to its first context. You cannot use this context with any function other than DSpContext_GetAttributes, DSpContext_GetFlattendSize, DSpContext_Flatten, and DSpContext_GetDisplayID until you reserve it with DSpContext_Reserve.

CALLING RESTRICTIONS
Do not call this function during an interrupt.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help