Jump to content

VioModeWait: Difference between revisions

From EDM2
Ak120 (talk | contribs)
m Ak120 moved page OS2 API:CPI:VioModeWait to VioModeWait
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
Notifies a graphics-mode application when it must restore its video mode, state, and modified display-adapter registers. The return from this call provides the notification.
Notifies a graphics-mode application when it must restore its video mode, state, and modified display-adapter registers. The return from this call provides the notification.


Line 12: Line 11:
APIRET    rc;          /*  Return code. */
APIRET    rc;          /*  Return code. */


rc = VioModeWait(RequestType, NotifyType,
rc = VioModeWait(RequestType, NotifyType, Reserved);
      Reserved);
 
</PRE>
</PRE>
==Parameters==
==Parameters==
;  RequestType (ULONG) - input :  Request type.
;  RequestType (ULONG) - input :  Request type.
Valid request types are:
:Valid request types are:
* Indicates the application wants to be notified at the end of a pop-up to restore its mode.  
:* Indicates the application wants to be notified at the end of a pop-up to restore its mode.  
 
; NotifyType (PULONG) - output : Notify type.
; NotifyType (PULONG) - output : Notify type.
Address of the of the operation to be performed by the application returning from VioModeWait. Valid notify types are:
:Address of the of the operation to be performed by the application returning from VioModeWait. Valid notify types are:
 
:* Restore mode.
* Restore mode.  
; Reserved (ULONG) - input : Reserved. Must be 0.


; Reserved (ULONG) - input : Reserved. Must be 0.
==Return Code==
==Return Code==
  rc (APIRET) - returns
  rc (APIRET) - returns
Line 39: Line 34:
* 428        ERROR_VIO_NO_SAVE_RESTORE_THD  
* 428        ERROR_VIO_NO_SAVE_RESTORE_THD  
* 430        ERROR_VIO_ILLEGAL_DURING_POPUP
* 430        ERROR_VIO_ILLEGAL_DURING_POPUP
==Remarks==
==Remarks==
At the completion of an application or hard-error pop-up (see VioPopUp), the OS/2 operating system notifies the session that was originally interrupted for the pop-up to restore its mode. The return from VioModeWait provides that notification. The thread that issued the call must perform the restore and then immediately reissue VioModeWait.
At the completion of an application or hard-error pop-up (see VioPopUp), the OS/2 operating system notifies the session that was originally interrupted for the pop-up to restore its mode. The return from VioModeWait provides that notification. The thread that issued the call must perform the restore and then immediately reissue VioModeWait.
Line 44: Line 40:
When an application's VioModeWait thread is notified, the thread must restore its video mode, state, and modified display-adapter registers. An application's VioModeWait thread does not restore the physical display buffer. The OS/2 operating system saves and/or restores the physical display buffer over a pop-up.
When an application's VioModeWait thread is notified, the thread must restore its video mode, state, and modified display-adapter registers. An application's VioModeWait thread does not restore the physical display buffer. The OS/2 operating system saves and/or restores the physical display buffer over a pop-up.


Only one process for a session can issue VioModeWait. The first process that issues VioModeWait becomes the owner of this function. (See VioModeUndo.)
Only one process for a session can issue VioModeWait. The first process that issues VioModeWait becomes the owner of this function. (See [[VioModeUndo]].)


An application must issue VioModeWait only if it writes directly to the registers on the display adapter. Otherwise, the application can allow the OS/2 operating system to perform the required restoration by not issuing VioModeWait.
An application must issue VioModeWait only if it writes directly to the registers on the display adapter. Otherwise, the application can allow the OS/2 operating system to perform the required restoration by not issuing VioModeWait.


When an application issues VioModeWait, it is also required to issue VioSavRedrawWait to be notified at screen switch time to perform a full save or restoration (see VioSavRedrawWait). Two application threads must be dedicated to performing these operations.  
When an application issues VioModeWait, it is also required to issue [[VioSavRedrawWait]] to be notified at screen switch time to perform a full save or restoration. Two application threads must be dedicated to performing these operations.
 
==Example Code==
<PRE>
 
</PRE>
==Related Functions==
* [[OS2 API:CPI:
 


[[Category:The OS/2 API Project]]
[[Category:Vio]]

Revision as of 10:49, 11 January 2017

Notifies a graphics-mode application when it must restore its video mode, state, and modified display-adapter registers. The return from this call provides the notification.

Syntax

#define INCL_VIO
#include <os2.h>

ULONG     RequestType;  /*  Request type. */
PULONG    NotifyType;   /*  Notify type. */
ULONG     Reserved;     /*  Reserved.  Must be 0. */
APIRET    rc;           /*  Return code. */

rc = VioModeWait(RequestType, NotifyType, Reserved);

Parameters

RequestType (ULONG) - input
Request type.
Valid request types are:
  • Indicates the application wants to be notified at the end of a pop-up to restore its mode.
NotifyType (PULONG) - output
Notify type.
Address of the of the operation to be performed by the application returning from VioModeWait. Valid notify types are:
  • Restore mode.
Reserved (ULONG) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns

VioModeWait returns one of the following values:

  • 0 NO_ERROR
  • 421 ERROR_VIO_INVALID_PARMS
  • 422 ERROR_VIO_FUNCTION_OWNED
  • 423 ERROR_VIO_RETURN
  • 424 ERROR_SCS_INVALID_FUNCTION
  • 428 ERROR_VIO_NO_SAVE_RESTORE_THD
  • 430 ERROR_VIO_ILLEGAL_DURING_POPUP

Remarks

At the completion of an application or hard-error pop-up (see VioPopUp), the OS/2 operating system notifies the session that was originally interrupted for the pop-up to restore its mode. The return from VioModeWait provides that notification. The thread that issued the call must perform the restore and then immediately reissue VioModeWait.

When an application's VioModeWait thread is notified, the thread must restore its video mode, state, and modified display-adapter registers. An application's VioModeWait thread does not restore the physical display buffer. The OS/2 operating system saves and/or restores the physical display buffer over a pop-up.

Only one process for a session can issue VioModeWait. The first process that issues VioModeWait becomes the owner of this function. (See VioModeUndo.)

An application must issue VioModeWait only if it writes directly to the registers on the display adapter. Otherwise, the application can allow the OS/2 operating system to perform the required restoration by not issuing VioModeWait.

When an application issues VioModeWait, it is also required to issue VioSavRedrawWait to be notified at screen switch time to perform a full save or restoration. Two application threads must be dedicated to performing these operations.