## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Virtual and Nonvirtual Operation

For optimal performance and compatibility, the virtual video device drivers support full-screen operation. In this mode, there is no visual difference between DOS and DOS session operation. For convenience, an option appears on the DOS session system menu to convert the DOS session from windowed mode to full-screen mode and back. Virtual video device drivers support full-screen operation by performing the following operations:

Registering foreground and background VIDEO_SWITCH_NOTIFICATION hooks with the DOS session Manager
Allocating a save and restore video buffer
Installing I/O hooks to shadow key video port accesses
Mapping physical video memory into the appropriate video address space
Compelling text-mode fonts to match the currently selected code page
Providing pointer drawing services to the virtual mouse device driver to define, draw, and erase pointer images

When a DOS session does not own the physical display (that is, when it is background), the virtual video device drivers:

Install I/O hooks to track and emulate all video port accesses.
Map appropriate system memory to the active portions of the video address space.
Report video events to the DOS session Window Manager (assuming the Presentation Manager is active and the DOS session is an unminimized window ). This includes changes to:

-Mode
-Palette
-Cursor
-Video memory
-Input events
-Scroll or string events
-Paste continue or terminate (through the virtual keyboard device driver)
-Session title change
-Screen-switch or video memory allocation errors

At any time, the DOS session Window Manager (or other processes that have access to a DOS session's process ID) can update a DOS session's window state:

Windowed or nonwindowed
Focus or nonfocus
Minimized or unminimized
Lock or unlocked

as well as query any aspect of a DOS session's video state:

Mode
Palette
Cursor
Video memory
Wait for video events
Cancel wait for video event