Play State
You set the play state of a context by calling theDSpContext_SetState
function (page 2-43) and passing it one of the following values:
enum DSpContextState { kDSpContextState_Active = 0L, kDSpContextState_Paused = 1L, kDSpContextState_Inactive= 2L }; typedef enum DSpContextState DSpContextState;Constant descriptions
- kDSpContextState_Active
- The display is completely controlled by your program. The display is configured as specified in its context attributes structure. All system adornments, such as the menu bar, floating windows, and the desktop, are hidden (removed or covered by the blanking window). In this state you cannot make system calls to managers, such as the Window Manager and Dialog Manger, that expect the display to be in a normal state.
- kDSpContextState_Paused
- The menu bar and other system adornments are restored, although the resolution mode is still that specified in the context attributes structure for the display. The desktop is still not visible; the blanking window covers it. In this state you can make normal system calls. Page flipping and double buffering are inactive in this state; the display page is set to page 0 if page flipping has been enabled.
- In this state it is safe for your program to call Macintosh Toolbox and system software functions. The paused state gives the user access to the process menu; if your game is suspended because the user switches to another application, you must call the
DSpProcessEvent
function (page 2-72).- kDSpContextState_Inactive
- The display is in exactly the state the user has specified from the Monitors control panel. The blanking window is hidden and the resolution mode specified in the context attributes structure for this display is not in effect.
- The user's configuration is restored only if there are no other currently active or paused contexts. As long as there is at least one active or paused context, all displays are covered by the blanking window, and the resolution mode for each is that of the context, which may not be what the user has selected in the Monitors control panel.