Video Manager: Difference between revisions
mNo edit summary |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{GRADDRef}} | |||
{{IBM-Reprint}} | |||
This chapter describes the functions, called by the Video Manager (VMAN), that are designated by the prefix VMI_CMD_. Refer to [[Graphics Adapter Device Drivers]] for descriptions of the Graphics Hardware Interface functions and to [[Graphics Adapter Device Drivers#Enhanced Direct Interface Video Extension (EnDIVE) Functions|Enhanced Direct Interface Video Extension (EnDIVE) Functions]] for descriptions of the EnDIVE functions. | This chapter describes the functions, called by the Video Manager (VMAN), that are designated by the prefix VMI_CMD_. Refer to [[Graphics Adapter Device Drivers]] for descriptions of the Graphics Hardware Interface functions and to [[Graphics Adapter Device Drivers#Enhanced Direct Interface Video Extension (EnDIVE) Functions|Enhanced Direct Interface Video Extension (EnDIVE) Functions]] for descriptions of the EnDIVE functions. | ||
Line 76: | Line 79: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
ULONG cBytes; /* | ULONG cBytes; /* Number of bytes of memory requested. */ | ||
PVOID pMem; /* | PVOID pMem; /* Returned address of allocated memory, or NULL. */ | ||
pMem = VHAllocMem(cBytes);</pre> | pMem = VHAllocMem(cBytes);</pre> | ||
Line 98: | Line 101: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
PVOID pMem; /* | PVOID pMem; /* Pointer to previous memory allocation. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VHFreeMem(pMem);</pre> | rc = VHFreeMem(pMem);</pre> | ||
Line 117: | Line 120: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
PVOID pAddress; /* | PVOID pAddress; /* Address within the first page of code or data. */ | ||
ULONG ulLength; /* | ULONG ulLength; /* Size of code or data segment. */ | ||
BOOL fData; /* | BOOL fData; /* FALSE indicates code segment; TRUE indicates data segment. */ | ||
ULONG rc; /* | ULONG rc; /* Return value. */ | ||
rc = VHLockMem(pAddress, ulLength, fData);</pre> | rc = VHLockMem(pAddress, ulLength, fData);</pre> | ||
Line 161: | Line 164: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
PVOID pAddress; /* | PVOID pAddress; /* Address within the first page of code or data. */ | ||
ULONG ulLength; /* | ULONG ulLength; /* Size of code or data segment. */ | ||
ULONG rc; /* | ULONG rc; /* Return value. */ | ||
rc = VHMap(pAddress, ulLength);</pre> | rc = VHMap(pAddress, ulLength);</pre> | ||
Line 181: | Line 184: | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
ULONG ulPhysAddr; /* | ULONG ulPhysAddr; /* Physical address of the start of the VRAM aperture. */ | ||
ULONG ulLength; /* | ULONG ulLength; /* Length of VRAM aperture. */ | ||
PBYTE *pVRAM; /* | PBYTE *pVRAM; /* Returned process virtual linear aperture pointer. */ | ||
PBYTE *pVRAMRing0; /* | PBYTE *pVRAMRing0; /* Returned ring 0 virtual linear aperture pointer. */ | ||
ULONG rc; /* | ULONG rc; /* Return value. */ | ||
rc = VHMapVRAM(ulPhysAddr, ulLength, pVRAM, pVRAMRing0);</pre> | rc = VHMapVRAM(ulPhysAddr, ulLength, pVRAM, pVRAMRing0);</pre> | ||
Line 194: | Line 197: | ||
:'''pVRAM'''(PBYTE *) - output Returned process virtual linear aperture pointer. | :'''pVRAM'''(PBYTE *) - output Returned process virtual linear aperture pointer. | ||
:'''pVRAMRing0'''(PBYTE *) - output Returned ring 0 virtual linear aperture pointer. | :'''pVRAMRing0'''(PBYTE *) - output Returned ring 0 virtual linear aperture pointer. | ||
'''rc'''(ULONG) - returns Return value. | |||
:RC_SUCCESS or RC_ERROR. | |||
;Remarks | ;Remarks | ||
Line 213: | Line 217: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set to appropriate VMI_CMD_ function. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to applicable data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* Pointer to applicable data structure. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | ||
Line 239: | Line 243: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_BANK. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to a HWBANKIN data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* Pointer to HWBANKOUT data structure. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 263: | Line 267: | ||
''VMI_CMD_BITBLT'' is called to blit a rectangle or series of rectangles to or from the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller. | ''VMI_CMD_BITBLT'' is called to blit a rectangle or series of rectangles to or from the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller. | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_BITBLT. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to a BITBLTINFO data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* Null; no output structure needed. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 279: | Line 282: | ||
:'''pIn'''(PVOID) - input Pointer to a [[#BITBLTINFO]] data structure. | :'''pIn'''(PVOID) - input Pointer to a [[#BITBLTINFO]] data structure. | ||
:'''pOut'''(PVOID) - output Null; no output structure needed. | :'''pOut'''(PVOID) - output Null; no output structure needed. | ||
'''rc'''(ULONG) - returns Return codes. | |||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_EVENT==== | ====VMI_CMD_EVENT==== | ||
Line 291: | Line 295: | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_EVENT. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to an HWEVENTIN data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* NULL; no output structure needed. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 315: | Line 319: | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_EXTENSION. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to an HWEXTENSION data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* Pointer to an extension-specific output structure. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 328: | Line 332: | ||
:'''pIn'''(PVOID) - input Pointer to an [[#HWEXTENSION]] data structure. | :'''pIn'''(PVOID) - input Pointer to an [[#HWEXTENSION]] data structure. | ||
:'''pOut'''(PVOID) - output Pointer to an extension-specific output structure. | :'''pOut'''(PVOID) - output Pointer to an extension-specific output structure. | ||
RC_UNSUPPORTED | '''rc'''(ULONG) - returns Return codes. | ||
:RC_UNSUPPORTED | |||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_INIT==== | ====VMI_CMD_INIT==== | ||
Line 340: | Line 346: | ||
During the first initialization, VMAN loads SOFTDRAW and all of the GRADDs specified by the environment variables. | During the first initialization, VMAN loads SOFTDRAW and all of the GRADDs specified by the environment variables. | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* NULL. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_INIT. */ | ||
PVOID pIn; /* | PVOID pIn; /* NULL. */ | ||
PVOID pOut; /* | PVOID pOut; /* NULL. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | ||
Line 356: | Line 361: | ||
:'''pIn'''(PVOID) - input NULL. | :'''pIn'''(PVOID) - input NULL. | ||
:'''pOut'''(PVOID) - output NULL. | :'''pOut'''(PVOID) - output NULL. | ||
RC_SUCCESS | '''rc'''(ULONG) - returns Return codes. | ||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_INITPROC==== | ====VMI_CMD_INITPROC==== | ||
Line 369: | Line 375: | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* NULL. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_INITPROC. */ | ||
PVOID pIn; /* | PVOID pIn; /* NULL. */ | ||
PVOID pOut; /* | PVOID pOut; /* Pointer to an INITPROCOUT data structure. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | ||
Line 393: | Line 399: | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_LINE. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to a LINEINFO or LINEINFO2 data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* NULL; no output structure is needed. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 406: | Line 412: | ||
:'''pIn'''(PVOID) - input Pointer to a [[#LINEINFO]] or [[#LINEINFO2]] data structure. | :'''pIn'''(PVOID) - input Pointer to a [[#LINEINFO]] or [[#LINEINFO2]] data structure. | ||
:'''pOut'''(PVOID) - output NULL; no output structure is needed. | :'''pOut'''(PVOID) - output NULL; no output structure is needed. | ||
'''rc'''(ULONG) - returns Return codes. | |||
:RC_SUCCESS | |||
:RC_ERROR | |||
;Remarks | ;Remarks | ||
The [[#LINEINFO]] structure can describe a sequence of line segments where each line segment may be clipped. The [[#LINEINFO2]] structure describes a sequence of line segments where only the start of the first segment and the end of the last segment may be clipped. For many cases, the simpler LINEINFO2 data can be generated more efficiently than for the more general LINEINFO data. | The [[#LINEINFO]] structure can describe a sequence of line segments where each line segment may be clipped. The [[#LINEINFO2]] structure describes a sequence of line segments where only the start of the first segment and the end of the last segment may be clipped. For many cases, the simpler LINEINFO2 data can be generated more efficiently than for the more general LINEINFO data. | ||
Line 425: | Line 431: | ||
#include <GRADD.h>; | #include <GRADD.h>; | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_MOVEPTR. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to an HWMOVEPTRIN data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* NULL; no output structure is needed. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 438: | Line 444: | ||
:'''pIn'''(PVOID) - input Pointer to an [[#HWMOVEPTRIN]] data structure. | :'''pIn'''(PVOID) - input Pointer to an [[#HWMOVEPTRIN]] data structure. | ||
:'''pOut'''(PVOID) - output NULL; no output structure is needed. | :'''pOut'''(PVOID) - output NULL; no output structure is needed. | ||
RC_SUCCESS | '''rc'''(ULONG) - returns Return codes. | ||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_PALETTE==== | ====VMI_CMD_PALETTE==== | ||
Line 449: | Line 456: | ||
The GRADD is expected to respond by describing the palette in a given array or by using the palette given in the array. The GRADD is always given an [[#HWPALETTEINFO]] structure with either the PALETTE_GET or PALETTE_SET flag to specifiy the operation to perform. | The GRADD is expected to respond by describing the palette in a given array or by using the palette given in the array. The GRADD is always given an [[#HWPALETTEINFO]] structure with either the PALETTE_GET or PALETTE_SET flag to specifiy the operation to perform. | ||
<pre> | |||
#include <GRADD.h> | |||
GID gid; /* ID of the GRADD. */ | |||
ULONG ulFunction; /* Set equal to VMI_CMD_PALETTE. */ | |||
GID gid; /* | PVOID pIn; /* Pointer to an HWPALETTEINFO data structure. */ | ||
ULONG ulFunction; /* | PVOID pOut; /* NULL; no output structure is needed. */ | ||
PVOID pIn; /* | ULONG rc; /* Return codes. */ | ||
PVOID pOut; /* | |||
ULONG rc; /* | |||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 468: | Line 475: | ||
'''rc'''(ULONG) - returns Return codes. | '''rc'''(ULONG) - returns Return codes. | ||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_QUERYCAPS==== | ====VMI_CMD_QUERYCAPS==== | ||
Line 505: | Line 512: | ||
Each GRADDINFO structure contains information, such as capabilities and mode information, for a single GRADD. The [[#CHAININFO]] structure contains a pointer to a linked list of GRADDINFO structures. If multiple GRADD chains are in use, the head CHAININFO structure contains a pointer to the next CHAININFO structure. | Each GRADDINFO structure contains information, such as capabilities and mode information, for a single GRADD. The [[#CHAININFO]] structure contains a pointer to a linked list of GRADDINFO structures. If multiple GRADD chains are in use, the head CHAININFO structure contains a pointer to the next CHAININFO structure. | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* NULL. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_QUERYCHAININFO. */ | ||
PVOID pIn; /* | PVOID pIn; /* NULL. */ | ||
PVOID pOut; /* | PVOID pOut; /* Pointer to a VMIQCI data structure. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | ||
Line 523: | Line 529: | ||
'''rc'''(ULONG) - returns Return codes. | '''rc'''(ULONG) - returns Return codes. | ||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_QUERYMODES==== | ====VMI_CMD_QUERYMODES==== | ||
Line 533: | Line 539: | ||
VMI_CMD_QUERYMODES is not typically used by translation layers because the [[#VMI_CMD_QUERYCHAININFO]] function returns the supported modes of '''all''' GRADDs, as opposed to just one. VMI_CMD_QUERYCHAININFO is the recommended way of querying the available modes of all GRADDs in the system. | VMI_CMD_QUERYMODES is not typically used by translation layers because the [[#VMI_CMD_QUERYCHAININFO]] function returns the supported modes of '''all''' GRADDs, as opposed to just one. VMI_CMD_QUERYCHAININFO is the recommended way of querying the available modes of all GRADDs in the system. | ||
<pre>#include <GRADD.h> | |||
GID gid; /* ID of the GRADD. */ | |||
ULONG ulFunction; /* Set equal to VMI_CMD_QUERYMODES. */ | |||
GID gid; /* | PVOID pIn; /* Pointer that identifies a QUERYMODE operation. */ | ||
ULONG ulFunction; /* | PVOID pOut; /* Pointer to the pIn operation. */ | ||
PVOID pIn; /* | ULONG rc; /* Return codes. */ | ||
PVOID pOut; /* | |||
ULONG rc; /* | |||
rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | rc = VMIEntry(gid, ulFunction, pIn, pOut);</pre> | ||
Line 565: | Line 570: | ||
''VMI_CMD_REQUESTHW'' is called to request access to the video hardware. VMAN processes this command and sends a GHI_CMD_REQUESTHW call to the GRADD chain identified by the GRADD ID provided by the caller. | ''VMI_CMD_REQUESTHW'' is called to request access to the video hardware. VMAN processes this command and sends a GHI_CMD_REQUESTHW call to the GRADD chain identified by the GRADD ID provided by the caller. | ||
<pre>#include <GRADD.h> | |||
GID gid; /* ID of the GRADD. */ | |||
ULONG ulFunction; /* Set equal to VMI_CMD_REQUESTHW. */ | |||
GID gid; /* | PVOID pIn; /* Pointer to an HWREQIN data structure. */ | ||
ULONG ulFunction; /* | PVOID pOut; /* NULL; no output structure is needed. */ | ||
PVOID pIn; /* | ULONG rc; /* Return codes. */ | ||
PVOID pOut; /* | |||
ULONG rc; /* | |||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 583: | Line 587: | ||
'''rc'''(ULONG) - returns Return codes. | '''rc'''(ULONG) - returns Return codes. | ||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_SETMODE==== | ====VMI_CMD_SETMODE==== | ||
Line 619: | Line 623: | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_SETPTR. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to an HWSETPTRIN data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* Pointer to an HWSETPTROUT data structure. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 632: | Line 636: | ||
:'''pIn'''(PVOID) - input Pointer to an [[#HWSETPTRIN]] data structure. | :'''pIn'''(PVOID) - input Pointer to an [[#HWSETPTRIN]] data structure. | ||
:'''pOut'''(PVOID) - output Pointer to an [[#HWSETPTROUT]] data structure. | :'''pOut'''(PVOID) - output Pointer to an [[#HWSETPTROUT]] data structure. | ||
RC_SUCCESS | '''rc'''(ULONG) - returns Return codes. | ||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_SHOWPTR==== | ====VMI_CMD_SHOWPTR==== | ||
Line 670: | Line 675: | ||
<pre>#include <GRADD.h> | <pre>#include <GRADD.h> | ||
GID gid; /* | GID gid; /* NULL; parameter ignored by VMAN. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_TERM. */ | ||
PVOID pIn; /* | PVOID pIn; /* NULL. */ | ||
PVOID pOut; /* | PVOID pOut; /* NULL. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 685: | Line 690: | ||
'''rc'''(ULONG) - returns Return codes. | '''rc'''(ULONG) - returns Return codes. | ||
:RC_SUCCESS | |||
:RC_ERROR | |||
====VMI_CMD_TERMPROC==== | ====VMI_CMD_TERMPROC==== | ||
Line 696: | Line 701: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_TERMPROC. */ | ||
PVOID pIn; /* | PVOID pIn; /* NULL. */ | ||
PVOID pOut; /* | PVOID pOut; /* NULL. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 722: | Line 727: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_TEXT. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to a TEXTBLTINFO data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* Null; no output structure needed. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | ||
Line 790: | Line 795: | ||
#include <GRADD.h> | #include <GRADD.h> | ||
GID gid; /* | GID gid; /* ID of the GRADD. */ | ||
ULONG ulFunction; /* | ULONG ulFunction; /* Set equal to VMI_CMD_VRAM. */ | ||
PVOID pIn; /* | PVOID pIn; /* Pointer to a VRAMIN data structure. */ | ||
PVOID pOut; /* | PVOID pOut; /* Pointer to a function-specific output data structure. */ | ||
ULONG rc; /* | ULONG rc; /* Return codes. */ | ||
rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> | rc = VMIENTRY(gid, ulFunction, pIn, pOut);</pre> |
Latest revision as of 12:38, 8 December 2022
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
This chapter describes the functions, called by the Video Manager (VMAN), that are designated by the prefix VMI_CMD_. Refer to Graphics Adapter Device Drivers for descriptions of the Graphics Hardware Interface functions and to Enhanced Direct Interface Video Extension (EnDIVE) Functions for descriptions of the EnDIVE functions.
VMI_CMD_xx Functions and GHI_CMD_xx Functions
There are only a few differences between the VMAN protocol, Video Manager Interface (VMI), and the GRADD protocol, Graphics Hardware Interface (GHI). In fact, the majority of the functions are identical, with only the prefix (VMI or GHI) indicating to which component the function belongs.
The common functions are as follows:
VMI | GHI |
---|---|
VMI_CMD_BANK | GHI_CMD_BANK |
VMI_CMD_BITBLT | GHI_CMD_BITBLT |
VMI_CMD_EVENT | GHI_CMD_EVENT |
VMI_CMD_EXTENSION | GHI_CMD_EXTENSION |
VMI_CMD_INIT | GHI_CMD_INIT |
VMI_CMD_INITPROC | GHI_CMD_INITPROC |
VMI_CMD_LINE | GHI_CMD_LINE |
VMI_CMD_MOVEPTR | GHI_CMD_MOVEPTR |
VMI_CMD_PALETTE | GHI_CMD_PALETTE |
VMI_CMD_QUERYCAPS | GHI_CMD_QUERYCAPS |
VMI_CMD_QUERYMODES | GHI_CMD_QUERYMODES |
VMI_CMD_REQUESTHW | GHI_CMD_REQUESTHW |
VMI_CMD_SETMODE | GHI_CMD_SETMODE |
VMI_CMD_SETPTR | GHI_CMD_SETPTR |
VMI_CMD_SHOWPTR | GHI_CMD_SHOWPTR |
VMI_CMD_TERM | GHI_CMD_TERM |
VMI_CMD_TERMPROC | GHI_CMD_TERMPROC |
VMI_CMD_TEXT | GHI_CMD_TEXT |
VMI_CMD_USERCAPS | GHI_CMD_USERCAPS |
VMI_CMD_VRAM | GHI_CMD_VRAM |
Note: The VMI_CMD_QUERYCHAININFO function has no corresponding GHI function.
VMAN and GRADD Entry Points
The main difference between the two types of functions (VMI_ and GHI_) is that the ulFunction parameter in #VMIEntry and #HWEntry points to the respective VMI_ or GHI_ function name.
VMI | GHI |
---|---|
VMIEntry | HWEntry |
Video Helper Functions
The following list identifies the VMI video helper functions:
VHAllocMem
- Syntax
Description:
VHAllocMem returns a 32-bit pointer to a piece of memory. The caller of this function supplies the byte count required. This function is a helper service for operations that are common across all GRADDs.
#include <GRADD.h> ULONG cBytes; /* Number of bytes of memory requested. */ PVOID pMem; /* Returned address of allocated memory, or NULL. */ pMem = VHAllocMem(cBytes);
- Parameters
- cBytes(ULONG) - input Number of bytes of memory required.
- Indicates the number of bytes of memory required for this allocation request.
- pMem(PVOID) - returns Return value.
- Success Returns pointer to allocated memory.
Error Returns NULL pointer.
- Success Returns pointer to allocated memory.
- Remarks
Memory is valid across all processes.
VHFreeMem
- Syntax
Description:
VHFreeMem frees memory that has been allocated via the VHAllocMem helper. This function is a helper service for operations that are common across all GRADDs.
#include <GRADD.h> PVOID pMem; /* Pointer to previous memory allocation. */ ULONG rc; /* Return codes. */ rc = VHFreeMem(pMem);
- Parameters
- pMem(PVOID) - input Pointer to memory previously allocated using VHAllocMem.
- rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VHLockMem
- Syntax
Description:
VHLockMem makes code or data segments available for ring 0 interrupt-time processing. At interrupt time, code and data segments must be non-swappable and accessible from the ring 0 context.
#include <GRADD.h> PVOID pAddress; /* Address within the first page of code or data. */ ULONG ulLength; /* Size of code or data segment. */ BOOL fData; /* FALSE indicates code segment; TRUE indicates data segment. */ ULONG rc; /* Return value. */ rc = VHLockMem(pAddress, ulLength, fData);
- Parameters
- pAddress(PVOID) - input Address within the first page of code or data.
- ulLength(ULONG) - input Size of code or data segment.
- fData(BOOL) - input FALSE indicates code segment; TRUE indicates data segment.
- rc(ULONG) - returns Return value.
Non-zero lockhandle indicates success; zero indicates error.
VHPhysToVirt
- Syntax
Description:
VHPhysToVirt converts physical address ranges to linear virtual address ranges for processes using VMI.
#include <GRADD.h> PMEMINFO pMemInfo; /* Pointer to linked list of MEMINFO structures defining address ranges. */ ULONG rc; rc = VHPhysToVirt (pMemInfo);
- Parameters
- pMemInfo(PMEMINFO) - input Pointer to linked list of #MEMINFO structures defining address ranges.
- rc(ULONG) - returns Return codes.
- Remarks
Linear virtual address ranges are valid for all processes.
VHMap
- Syntax
Description:
VHMap aliases process memory to a global ring 0 context.
#include <GRADD.h> PVOID pAddress; /* Address within the first page of code or data. */ ULONG ulLength; /* Size of code or data segment. */ ULONG rc; /* Return value. */ rc = VHMap(pAddress, ulLength);
- Parameters
- pAddress(PVOID) - input Address within the first page of code or data.
- ulLength(ULONG) - input Size of code or data segment.
- rc(ULONG) - returns Return value.
Non-zero indicates ring 0 alias address; zero indicates error.
VHMapVRAM
- Syntax
Description:
VHMapVRAM converts the physical address of VRAM to linear virtual aperture for both process and global ring 0 context.
#include <GRADD.h> ULONG ulPhysAddr; /* Physical address of the start of the VRAM aperture. */ ULONG ulLength; /* Length of VRAM aperture. */ PBYTE *pVRAM; /* Returned process virtual linear aperture pointer. */ PBYTE *pVRAMRing0; /* Returned ring 0 virtual linear aperture pointer. */ ULONG rc; /* Return value. */ rc = VHMapVRAM(ulPhysAddr, ulLength, pVRAM, pVRAMRing0);
- Parameters
- ulPhysAddr(ULONG) - input Physical address of the start of the VRAM aperture.
- ulLength(ULONG) - input Length of VRAM aperture.
- pVRAM(PBYTE *) - output Returned process virtual linear aperture pointer.
- pVRAMRing0(PBYTE *) - output Returned ring 0 virtual linear aperture pointer.
rc(ULONG) - returns Return value.
- RC_SUCCESS or RC_ERROR.
- Remarks
VHMapVRAM must be used instead of VHPhysToVirt() and VHMap() for the frame buffer so that the ring 0 address is available for SoftDraw. For other physical memory areas needed by GRADD at interrupt time, use VHPhysToVirt() and VHMap().
The ulPhysAddr and ulLength parameters for VHMapVRAM() and VHPhysToVirt() are usually obtained from the VIDEOPMI function PMIREQUEST_SETMODE.
The Video Manager Interface Functions
The remainder of this chapter contains a detailed description of the Video Manager interface. Proceed to the following alphabetical list for a description of each function. Helper functions and entry points are included for easy reference.
VMIEntry
- Syntax
Description:
VMIEntry is the single exported function from the Video Manager component. It is part of the Video Manager Interface (VMI) protocol and receives operations from the translation layer components.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set to appropriate VMI_CMD_ function. */ PVOID pIn; /* Pointer to applicable data structure. */ PVOID pOut; /* Pointer to applicable data structure. */ ULONG rc; /* Return codes. */ rc = VMIEntry(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set to appropriate VMI_CMD_ function.
- This parameter is set to one of the VMI_CMD_ functions shown in the table of common functions shown at the beginning of this section.
- pIn(PVOID) - input Pointer to applicable data structure.
- pOut(PVOID) - output Pointer to applicable data structure.
- rc(ULONG) - returns Return codes.
Valid values are dictated by the applicable VMI_CMD_ function.
VMI_CMD_BANK
- Syntax
Description:
VMI_CMD_BANK is called to set or get the region or bank number of the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_BANK. */ PVOID pIn; /* Pointer to a HWBANKIN data structure. */ PVOID pOut; /* Pointer to HWBANKOUT data structure. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_BANK.
- pIn(PVOID) - input Pointer to a #HWBANKIN data structure.
- pOut(PVOID) - output Pointer to #HWBANKOUT data structure.
rc(ULONG) - returns Return codes.
- RC_ERROR
- RC_SUCCESS
- RC_UNSUPPORTED
VMI_CMD_BITBLT
- Syntax
Description:
VMI_CMD_BITBLT is called to blit a rectangle or series of rectangles to or from the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_BITBLT. */ PVOID pIn; /* Pointer to a BITBLTINFO data structure. */ PVOID pOut; /* Null; no output structure needed. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_BITBLT.
- pIn(PVOID) - input Pointer to a #BITBLTINFO data structure.
- pOut(PVOID) - output Null; no output structure needed.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_EVENT
- Syntax
Description:
VMI_CMD_EVENTis called to notify a GRADD of specific events. VMAN sends this command directly to the GRADD chain identified by the GRADD ID.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_EVENT. */ PVOID pIn; /* Pointer to an HWEVENTIN data structure. */ PVOID pOut; /* NULL; no output structure needed. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_EVENT.
- pIn(PVOID) - input Pointer to an #HWEVENTIN data structure.
- pOut(PVOID) - output NULL; no output structure needed.
- rc(ULONG) - returns Return codes.
- RC_UNSUPPORTED
- RC_SUCCESS
VMI_CMD_EXTENSION
- Syntax
Description:
VMI_CMD_EXTENSION is called to send an extension command to a GRADD. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_EXTENSION. */ PVOID pIn; /* Pointer to an HWEXTENSION data structure. */ PVOID pOut; /* Pointer to an extension-specific output structure. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_EXTENSION.
- pIn(PVOID) - input Pointer to an #HWEXTENSION data structure.
- pOut(PVOID) - output Pointer to an extension-specific output structure.
rc(ULONG) - returns Return codes.
- RC_UNSUPPORTED
- RC_SUCCESS
- RC_ERROR
VMI_CMD_INIT
- Syntax
Description:
VMI_CMD_INITinforms the Video Manager (VMAN) that a translation layer has been loaded and that VMAN may need to be initialized. VMAN initializes itself once only; subsequent VMI_CMD_INIT calls are ignored.
During the first initialization, VMAN loads SOFTDRAW and all of the GRADDs specified by the environment variables.
#include <GRADD.h> GID gid; /* NULL. */ ULONG ulFunction; /* Set equal to VMI_CMD_INIT. */ PVOID pIn; /* NULL. */ PVOID pOut; /* NULL. */ ULONG rc; /* Return codes. */ rc = VMIEntry(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input NULL.
- ulFunction(ULONG) - input Set equal to VMI_CMD_INIT.
- pIn(PVOID) - input NULL.
- pOut(PVOID) - output NULL.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_INITPROC
- Syntax
Description:
VMI_CMD_INITPROC informs VMAN that a new process is being initialized. It indicates that this new process intends to be a client of the VMAN component.
VMAN ensures that all data and code is valid under this new process.
#include <GRADD.h> GID gid; /* NULL. */ ULONG ulFunction; /* Set equal to VMI_CMD_INITPROC. */ PVOID pIn; /* NULL. */ PVOID pOut; /* Pointer to an INITPROCOUT data structure. */ ULONG rc; /* Return codes. */ rc = VMIEntry(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input NULL.
- ulFunction(ULONG) - input Set equal to VMI_CMD_INITPROC.
- pIn(PVOID) - input NULL.
- pOut(PVOID) - output Pointer to an #INITPROCOUT data structure.
- rc(ULONG) - returns Return codes.
- RC_SUCCESS
RC_ERROR
- RC_SUCCESS
VMI_CMD_LINE
- Syntax
Description:
VMI_CMD_LINE is called to draw a line to the video display. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_LINE. */ PVOID pIn; /* Pointer to a LINEINFO or LINEINFO2 data structure. */ PVOID pOut; /* NULL; no output structure is needed. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_LINE.
- pIn(PVOID) - input Pointer to a #LINEINFO or #LINEINFO2 data structure.
- pOut(PVOID) - output NULL; no output structure is needed.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
- Remarks
The #LINEINFO structure can describe a sequence of line segments where each line segment may be clipped. The #LINEINFO2 structure describes a sequence of line segments where only the start of the first segment and the end of the last segment may be clipped. For many cases, the simpler LINEINFO2 data can be generated more efficiently than for the more general LINEINFO data.
The LINEINFO and LINEINFO2 structures can be differentiated using the ulLength field at the start of each structure.
Since the LINEINFO2 mechanism was defined after several GRADDs were already released, a LINEINFO2 structure will not be passed to a GRADD unless the GRADD sets the DS_SIMPLE_LINES flag in the ulFCFlags member of the #CAPSINFO structure returned for the #GHI_CMD_QUERYCAPS function. Note that if a GRADD indicates it can handle the LINEINFO2 structure, it may still be passed a LINEINFO structure when that generality is needed.
VMI_CMD_MOVEPTR
- Syntax
Description:
VMI_CMD_MOVEPTR is called to change the position of the pointer hot spot. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h>; GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_MOVEPTR. */ PVOID pIn; /* Pointer to an HWMOVEPTRIN data structure. */ PVOID pOut; /* NULL; no output structure is needed. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_MOVEPTR.
- pIn(PVOID) - input Pointer to an #HWMOVEPTRIN data structure.
- pOut(PVOID) - output NULL; no output structure is needed.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_PALETTE
- Syntax
Description:
This function is called to query or set the hardware color palette. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
The GRADD is expected to respond by describing the palette in a given array or by using the palette given in the array. The GRADD is always given an #HWPALETTEINFO structure with either the PALETTE_GET or PALETTE_SET flag to specifiy the operation to perform.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_PALETTE. */ PVOID pIn; /* Pointer to an HWPALETTEINFO data structure. */ PVOID pOut; /* NULL; no output structure is needed. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_PALETTE.
- pIn(PVOID) - input Pointer to an #HWPALETTEINFO data structure.
- pOut(PVOID) - output NULL; no output structure is needed.
- If '_SET' is specified by pIn, pOutIf '_GET' is specified by pIn, pOutis a pointer to an #HWPALETTEINFO data structure.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_QUERYCAPS
- Syntax
Description:
VMI_CMD_QUERYCAPS returns the capabilities of a particular GRADD. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
VMI_CMD_QUERYCAPS is not typically used by translation layers because the #VMI_CMD_QUERYCHAININFO function returns the capabilities of all GRADDs, as opposed to just one. VMI_CMD_QUERYCHAININFO is the recommended way of querying the capabilities of all GRADDs in the system.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_QUERYCAPS. */ PVOID pIn; /* NULL. */ PVOID pOut; /* Pointer to a CAPSINFO data structure. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYCAPS.
- pIn(PVOID) - input NULL.
- pOut(PVOID) - output Pointer to a #CAPSINFO data structure.
- rc(ULONG) - returns Return codes.
RC_SUCCESS
RC_ERROR
VMI_CMD_QUERYCHAININFO
- Syntax
Description:
VMI_CMD_QUERYCHAININFO is unique to VMAN (there is no corresponding function in the Graphics Hardware Interface). This function is called to obtain a pointer to the video chain information, which contains information about every GRADD currently loaded.
Each GRADDINFO structure contains information, such as capabilities and mode information, for a single GRADD. The #CHAININFO structure contains a pointer to a linked list of GRADDINFO structures. If multiple GRADD chains are in use, the head CHAININFO structure contains a pointer to the next CHAININFO structure.
#include <GRADD.h> GID gid; /* NULL. */ ULONG ulFunction; /* Set equal to VMI_CMD_QUERYCHAININFO. */ PVOID pIn; /* NULL. */ PVOID pOut; /* Pointer to a VMIQCI data structure. */ ULONG rc; /* Return codes. */ rc = VMIEntry(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input NULL.
- ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYCHAININFO.
- pIn(PVOID) - input NULL.
- pOut(PVOID) - output Pointer to a #VMIQCI data structure.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_QUERYMODES
- Syntax
Description:
VMI_CMD_QUERYMODES returns video mode information for a particular GRADD. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
VMI_CMD_QUERYMODES is not typically used by translation layers because the #VMI_CMD_QUERYCHAININFO function returns the supported modes of all GRADDs, as opposed to just one. VMI_CMD_QUERYCHAININFO is the recommended way of querying the available modes of all GRADDs in the system.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_QUERYMODES. */ PVOID pIn; /* Pointer that identifies a QUERYMODE operation. */ PVOID pOut; /* Pointer to the pIn operation. */ ULONG rc; /* Return codes. */ rc = VMIEntry(gid, ulFunction, pIn, pOut);
- VMI_CMD_QUERYMODES - Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYMODES.
- pIn(PVOID) - input Pointer that identifies a QUERYMODE operation.
- This pointer identifies one of the following operations:
- QUERYMODE_NUM_MODES
- QUERYMODE_MODE_DATA
- This pointer identifies one of the following operations:
- pOut(PVOID) - output Pointer to the pInoperation.
- This pointer indicates one of the following, depending on the value of pIn:
- QUERYMODE_NUM_MODES Indicates a pointer to a ULONG containing the number of supported modes.
- QUERYMODE_MODE_DATA Indicates a pointer to an array of #GDDMODEINFO structures large enough for the number of supported modes.
- This pointer indicates one of the following, depending on the value of pIn:
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_REQUESTHW
- Syntax
Description:
VMI_CMD_REQUESTHW is called to request access to the video hardware. VMAN processes this command and sends a GHI_CMD_REQUESTHW call to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_REQUESTHW. */ PVOID pIn; /* Pointer to an HWREQIN data structure. */ PVOID pOut; /* NULL; no output structure is needed. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_REQUESTHW.
- pIn(PVOID) - input Pointer to an #HWREQIN data structure.
- pOut(PVOID) - output NULL; no output structure is needed.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_SETMODE
- Syntax
Description:
VMI_CMD_SETMODE sets the video display adapter to a given mode. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller. The GRADD is expected to set the video mode, given an ID of the chosen mode.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_SETMODE. */ PVOID pIn; /* Pointer to PULONG containing the ID of the requested mode. */ PVOID pOut; /* NULL. */ ULONG rc; /* Return codes. */ rc = HWENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_SETMODE.
- pIn(PVOID) - input Pointer to PULONG containing the ID of the requested mode.
- pOut(PVOID) - output NULL.
rc(ULONG) - returns Return codes.
RC_SUCCESS
RC_ERROR
VMI_CMD_SETPTR
- Syntax
Description:
VMI_CMD_SETPTR sets the pointer AND,XOR masks. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_SETPTR. */ PVOID pIn; /* Pointer to an HWSETPTRIN data structure. */ PVOID pOut; /* Pointer to an HWSETPTROUT data structure. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters ===
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_SETPTR.
- pIn(PVOID) - input Pointer to an #HWSETPTRIN data structure.
- pOut(PVOID) - output Pointer to an #HWSETPTROUT data structure.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_SHOWPTR
- Syntax
Description:
VMI_CMD_SHOWPTR sets the visibility state of the pointer. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_SHOWPTR. */ PVOID pIn; /* Pointer to an HWSHOWPTRIN data structure. */ PVOID pOut; /* NULL; no output structure needed. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_SHOWPTR.
- pIn(PVOID) - input Pointer to an #HWSHOWPTRIN data structure.
- pOut(PVOID) - output NULL; no output structure needed.
rc(ULONG) - returns Return codes.
RC_SUCCESS
RC_ERROR
VMI_CMD_TERM
- Syntax
Description:
VMI_CMD_TERM is called by a translation layer when it no longer requires the services of VMAN.
#include <GRADD.h> GID gid; /* NULL; parameter ignored by VMAN. */ ULONG ulFunction; /* Set equal to VMI_CMD_TERM. */ PVOID pIn; /* NULL. */ PVOID pOut; /* NULL. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input NULL; parameter ignored by VMAN.
- ulFunction(ULONG) - input Set equal to VMI_CMD_TERM.
- pIn(PVOID) - input NULL.
- pOut(PVOID) - output NULL.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_TERMPROC
- Syntax
Description:
VMI_CMD_TERMPROC informs VMAN that an existing client process is being terminated. VMAN cleans up all resources owned by this process. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_TERMPROC. */ PVOID pIn; /* NULL. */ PVOID pOut; /* NULL. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_TERMPROC.
- pIn(PVOID) - input NULL.
- pOut(PVOID) - output NULL.
rc(ULONG) - returns Return codes.
- RC_SUCCESS
- RC_ERROR
VMI_CMD_TEXT
- Syntax
Description:
VMI_CMD_TEXT is called to draw text to the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_TEXT. */ PVOID pIn; /* Pointer to a TEXTBLTINFO data structure. */ PVOID pOut; /* Null; no output structure needed. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_TEXT.
- pIn(PVOID) - input Pointer to a #TEXTBLTINFO data structure.
- pOut(PVOID) - output Null; no output structure needed.
rc(ULONG) - returns Return codes.
- RC_ERROR
- RC_SIMULATE
- RC_SUCCESS
- RC_UNSUPPORTED
VMI_CMD_USERCAPS
- Syntax
Description:
VMI_CMD_USERCAPS enables and supports the CAPABILITIES button on the OS/2 System Object.
When the Video Configuration Manager presents the interface to the user, each capability is presented in a separate window page of the capabilities notebook in System Object. The window layout depends on the capability type :
- Boolean type is represented by a check box.
- Aggregate type is represented by a list box.
The capability description appears as the title for that control.
VMAN accumulates capabilities for all GRADDs, and routes capability settings to the specific GRADD that supports certain capabilities.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunc; /* Set equal to VMI_CMD_USERCAPS. */ PUSERCAPSIN pIn; /* Pointer to a USERCAPSIN data structure. */ PVOID pOut; /* Pointer to a buffer area. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunc, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunc(ULONG) - input Set equal to VMI_CMD_USERCAPS.
- pIn(#PUSERCAPSIN) - input Pointer to a #USERCAPSIN data structure.
- pOut(PVOID) - output Pointer to a buffer area.
Pointer to a buffer area whose format depends on the value of the ulFunction field of the #USERCAPSINstructure pointed to by pIn.
If pIn->ulFunction is QUERYCAPS, pOut points to a ULONG count followed by an array of #DRIVERCAPS structures. If pIn->ulFunction is QUERYCAPSLIST or SETCAP, pOut points to a #DRIVERCAPS structure.
The length of the buffer area provided is specified by the ulSize field of the #USERCAPSIN structure pointed to by pIn.
rc(ULONG) - returns Return codes.
- RC_UNSUPPORTED
- RC_SUCCESS
- RC_ERROR
VMI_CMD_VRAM
- Syntax
Description:
VMI_CMD_VRAM is called to allocate off-screen video memory. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.
#include <GRADD.h> GID gid; /* ID of the GRADD. */ ULONG ulFunction; /* Set equal to VMI_CMD_VRAM. */ PVOID pIn; /* Pointer to a VRAMIN data structure. */ PVOID pOut; /* Pointer to a function-specific output data structure. */ ULONG rc; /* Return codes. */ rc = VMIENTRY(gid, ulFunction, pIn, pOut);
- Parameters
- gid(GID) - input ID of the GRADD.
- ulFunction(ULONG) - input Set equal to VMI_CMD_VRAM.
- pIn(PVOID) - input Pointer to a #VRAMIN data structure.
- pOut(PVOID) - output Pointer to a function-specific output data structure.
If the ulFunction field of the VRAMIN structure pointed to by pIn is set to VRAM_ALLOCATE, VRAM_DEALLOCATE, or VRAM_QUERY, then pOut points to a #VRAMALLOCOUT data structure.
If the ulFunction field of the VRAMIN structure pointed to by pIn is set to VRAM_REGISTER or VRAM_DEREGISTER, then pOut points to a #VRAMREGISTEROUT data structure.
rc(ULONG) - returns Return codes.
- RC_UNSUPPORTED
- RC_SUCCESS
- RC_ERROR