Supported Browsers Home   
PM_physAddr Previous   
PM_suspendAppFlagsType Next   
Type Definitions Up   

PM_suspendAppCodesType

Declaration

typedef enum {
    PM_SUSPEND_APP      = 0,
    PM_NO_SUSPEND_APP   = 1
    } PM_suspendAppCodesType

Prototype In

pmapi.h

Description

Defines the return codes that the application can return from the suspend application callback registered with the PM library. The default value to be returned is PM_SUSPEND_APP and this will cause the application execution to be suspended until the application is re-activated again by the user. During this time the application will exist on the task bar under Windows 9x and Windows NT/2000/XP in minimised form.

PM_NO_SUSPEND_APP can be used to tell the PM library to switch back to the Windows desktop, but not to suspend the applications execution. This must be used with care as the suspend application callback is then responsible for setting a flag in the application that will stop the application from doing any rendering directly to the framebuffer while the application is minimised on the task bar (since the application no lonter owns the screen!). This return value is most useful for networked games that need to maintain network connectivity while the user has temporarily switched back to the Windows desktop. Hence you can ensure that you main loop continues to run, including networking and AI code, but no drawing occurs to the screen.

Note:    The PM library ensures that your application will never be switched away from outside of a message processing loop. Hence as long as you do not process messages inside your drawing loops, you will never lose the active focus (and your surfaces) while drawing, but only during event processing. The exception to this is if the user hits Ctrl-Alt-Del under Windows NT/2000/XP which will always cause a switch away from the application immediately and force the surfaces to be lost.

Members

PM_SUSPEND_APP

Suspend application execution until restored

PM_NO_SUSPEND_APP

Don't suspend execution, but allow switch

 

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com