VioModeWait (OS/2 1.x)

From EDM2
Jump to: navigation, search

This call allows a graphics mode application to be notified when it must restore its video mode, state, and modified display adapter registers. The return from this function call provides the notification.

Syntax

VioModeWait (RequestType, NotifyType, Reserved) 

Parameters

RequestType (USHORT) - input 
Application request event. RequestType = 0 indicates the application wants to be notified at the end of a pop-up to restore its mode. RequestType = 0 is the only event supported by VioModeWait.
NotifyType (PUSHORT) - output 
Address of the operation to be performed by the application returning from VioModeWait. NotifyType = 0, indicating restore mode, is the only type of notification returned.
Reserved (USHORT) - input 
Reserved word of 0s.

Return Code

rc (USHORT) - return
Return code descriptions are:
  • 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
  • 465 ERROR_VIO_DETACHED
  • 494 ERROR_VIO_EXTENDED_SG

Remarks

At the completion of an application or hard error pop-up (reference VioPopUp), OS/2 notifies the session that was originally interrupted for the pop-up to restore its mode. The return from this function call provides that notification. The thread that issued the call must perform the restore and then immediately re-issue 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. OS/2 saves/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. (Refer to VioModeUndo.)

An application must issue VioModeWait only if it writes directly to the registers on the display adapter. Otherwise, the application can allow OS/2 to perform the required restore 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 restore (reference VioSavRedrawWait. Two application threads must be dedicated to performing these operations.

Bindings

C

#define INCL_VIO

USHORT  rc = VioModeWait(RequestType, NotifyType, Reserved);

USHORT  RequestType;   /* Request type */
PUSHORT NotifyType;    /* Notify type (returned) */
USHORT  Reserved;      /* Reserved (must be zero) */

USHORT  rc;            /* return code */

MASM

EXTRN  VioModeWait:FAR
INCL_VIO            EQU 1

PUSH   WORD    RequestType   ;Request type
PUSH@  WORD    NotifyType    ;Notify type (returned)
PUSH   WORD    Reserved      ;Reserved (must be zero)
CALL   VioModeWait

Returns WORD