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 withDSpFindBestContext
or let the user select one by callingDSpUserSelectContext
.
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 thedisplayID
parameter, the ID of a display and returns, in theoutContext
parameter, a reference to its first context. You cannot use this context with any function other thanDSpContext_GetAttributes, DSpContext_GetFlattendSize
,DSpContext_Flatten
, andDSpContext_GetDisplayID
until you reserve it withDSpContext_Reserve
.CALLING RESTRICTIONS
Do not call this function during an interrupt.