Graphics Adapter Device Driver Reference: Difference between revisions
Line 276: | Line 276: | ||
LONG rc; /* Return Code. */ | LONG rc; /* Return Code. */ | ||
rc = GreEscape(hdc, lCode, lInCount, pbInData, | rc = GreEscape(hdc, lCode, lInCount, pbInData, plOutCount, pbOutData);</pre> | ||
;Parameters | |||
:'''hdc'''(HDC) - input A handle to the device context. | |||
'''hdc'''(HDC) - input A handle to the device context. | :'''lCode'''(LONG) - input DEVESC_QUERYDRIVERCAPS | ||
:'''lInCount'''(LONG) - input Not used. | |||
'''lCode'''(LONG) - input DEVESC_QUERYDRIVERCAPS | :'''pbInData'''(PBYTE) - input Not used. | ||
:'''plOutCount'''(PLONG) - output The number of bytes of data pointed to by ''pbOutData.'' | |||
'''lInCount'''(LONG) - input Not used. | ::On return, this is updated to the number of bytes returned. | ||
:'''pbOutData'''(PBYTE) - output The address of a buffer that will contain a ULONG variable specifying the number of capabilities. | |||
'''pbInData'''(PBYTE) - input Not used. | ::On return, this buffer contains a ULONG variable that specifies the number of capabilities that the driver supports, immediately followed by an array of [[#DRIVERCAPS]] structures. | ||
:;Note:This allows a driver to export multiple capabilities (each, in turn, gets its own page in the System icon). | |||
'''plOutCount'''(PLONG) - output The number of bytes of data pointed to by ''pbOutData.'' | :'''rc'''(LONG) - returns Return Code. | ||
::Returns NO_ERROR. | |||
On return, this is updated to the number of bytes returned. | |||
'''pbOutData'''(PBYTE) - output The address of a buffer that will contain a ULONG variable specifying the number of capabilities. | |||
On return, this buffer contains a ULONG variable that specifies the number of capabilities that the driver supports, immediately followed by an array of [[#DRIVERCAPS]] structures. | |||
'''rc'''(LONG) - returns Return Code. | |||
Returns NO_ERROR. | |||
=== GreEscape DEVESC_QUERYDRIVERCAPSLIST === | === GreEscape DEVESC_QUERYDRIVERCAPSLIST === | ||
Line 331: | Line 319: | ||
plOutCount, pbOutData);</pre> | plOutCount, pbOutData);</pre> | ||
;Parameters | |||
:'''hdc'''(HDC) - input A handle to the device context. | |||
'''hdc'''(HDC) - input A handle to the device context. | :'''lCode'''(LONG) - input DEVESC_QUERYDRIVERCAPSLIST | ||
:'''lInCount'''(LONG) - input Number of bytes pointed to by ''pbInData.'' | |||
'''lCode'''(LONG) - input DEVESC_QUERYDRIVERCAPSLIST | :'''pbInData'''(PBYTE) - input Pointer to a [[#DRIVERCAPS]] data structure. | ||
::The DRIVERCAPS data structure specifies the driver capability to query. Storage is already allocated for ''pValueList, pCurrentValue,''and ''pDefaultValue.'' | |||
'''lInCount'''(LONG) - input Number of bytes pointed to by ''pbInData.'' | ::When ''ulCapsType''= CAPSTYPE_BOOLEAN, the driver does not have to fill ''pValueList.'' | ||
:'''plOutCount'''(PLONG) - output Not used. | |||
'''pbInData'''(PBYTE) - input Pointer to a [[#DRIVERCAPS]] data structure. | :'''pbOutData'''(PBYTE) - output Not used. | ||
:'''rc'''(LONG) - returns Return Code. | |||
The DRIVERCAPS data structure specifies the driver capability to query. Storage is already allocated for ''pValueList, pCurrentValue,''and ''pDefaultValue.'' | ::Returns NO_ERROR. | ||
When ''ulCapsType''= CAPSTYPE_BOOLEAN, the driver does not have to fill ''pValueList.'' | |||
'''plOutCount'''(PLONG) - output Not used. | |||
'''pbOutData'''(PBYTE) - output Not used. | |||
'''rc'''(LONG) - returns Return Code. | |||
Returns NO_ERROR. | |||
=== GreEscape DEVESC_SETDRIVERCAPSVALUE === | === GreEscape DEVESC_SETDRIVERCAPSVALUE === | ||
Line 377: | Line 355: | ||
LONG rc; /* Return Code. */ | LONG rc; /* Return Code. */ | ||
rc = GreEscape(hdc, lCode, lInCount, pbInData, | rc = GreEscape(hdc, lCode, lInCount, pbInData, plOutCount, pbOutData);</pre> | ||
Returns NO_ERROR. | ;Parameters | ||
:'''hdc'''(HDC) - input A handle to the device context. | |||
:'''lCode'''(LONG) - input DEVESC_SETDRIVERCAPSVALUE | |||
:'''lInCount'''(LONG) - input Number of bytes pointed to by ''pbInData.'' | |||
:'''pbInData'''(PBYTE) - input Pointer to a [[#DRIVERCAPS]] data structure. | |||
::The DRIVERCAPS data structure specifies the driver capability to set. | |||
:'''plOutCount'''(PLONG) - output Not used. | |||
:'''pbOutData'''(PBYTE) - output Not used. | |||
:'''rc'''(LONG) - returns Return Code. | |||
::Returns NO_ERROR. | |||
=== How to Write to Windows Profiling Files in OS/2 === | === How to Write to Windows Profiling Files in OS/2 === |
Revision as of 17:11, 12 July 2019
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
About This Book
The Graphics Adapter Device Driver (GRADD) Reference supports OS/2 Warp on the Intel hardware platform. The information in this book describes the GRADD driver model, how the related components work together, and why the GRADD model enhances OS/2 Warp device-driver support.
Detailed descriptions of control structures, data structures, and I/O formats have been included to help you understand and use the interfaces.
Developers using this book should be familiar with the C or assembler programming language and the OS/2 operating system.
How This Book is Organized
This book includes the following chapters and supporting appendixes:
- Introduction to Graphics Adapter Device Drivers
- This chapter briefly describes the design philosophy of the GRADD Model.
- GRADD Model Components
- This chapter provides details on each of the components and how they work together within the GRADD Model.
- Video Manager
- This chapter contains a list of the Video Manager Interface functions, as well as a detailed description of each.
- Graphics Adapter Device Drivers
- This chapter describes the device driver interface (DDI) for a GRADD, how and when to add extensions, and detailed description of each Graphics Hardware Interface function. In addition, this chapter describes the Enhanced Direct Interface Video Extension (EnDIVE) functions.
- VIDEOPMI.DLL Exported Functions
- This chapter describes the format and syntax used to define the data necessary to set a video mode while in OS/2 Protect Mode. It also includes the APIs.
- VIDEO Protect-Mode Interface
- This chapter discusses the purpose of the VIDEO Protect-Mode Interface (PMI) used in IBM Operating System/2. It is an extension of the VESA SVPMI standard currently in use by the operating system's base and virtual video subsystems. The PMI provides a means of setting Super VGA video modes while in Protect Mode and of enabling their virtualization in multiple DOS sessions.
- Installing Video Configuration Manager for OS/2
- This chapter discussed the Video Configuration Manager (VCMAN), the OS/2 operating-system-service module VIDEOCFG.DLL, how video installation and configuration information is stored in a persistent namespace in the Registry; this discussion includes the functions used to install and configure video adapters and monitors.
Appendixes
- Appendix A. OS/2 Version Compatibility Considerations
- This appendix describes information in terms of version compatibility.
- Appendix B. Syntax Conventions
- This appendix indicates the conventions that have been used for the parameter names found in the data types.
- Appendix C. Data Types
- This appendix contains a description of the parameters for all the data types called by the Video Manager Interface, the Graphics Hardware Interface, the Video Configuration Manager, and the Protect-Mode Interface.
- Appendix D. Notices
- This appendix contains legal notices.
- Miscellaneous
- A glossary and an index are included.
Assistance
Technical support for device driver development is provided by the IBM Driver Development Support Center (DDSC) through a bulletin board system (BBS) known as the "DUDE." You are encouraged to use the DUDE to obtain support by sending in your questions and reviewing the question and answer database which can be downloaded for off-line review.
To access the DUDE, dial 512-838-9717 (using a modem) to register and access the support system. For voice support in the United States, call 512-838-9493.
Additional assistance is available through the IBM Solution Developer Program. For membership information:
- Internet: ibmsdp@vnet.ibm.com
- US/Canada: 800-627-8363
- International: 770-835-9902
- International Fax: 770-835-9444
Ordering Information
For an illustration of OS/2 Technical Publications and other related product documents, see the figure labeled "OS/2 Technical Publications". The documents represented in this illustration are available only in English.
In addition to the actual tools and source code available on The IBM Developer Connection Device Driver Kit for OS/2, this CD-ROM also includes the following DDK reference books in online format.
- The Physical Device Driver Reference
- The Storage Device Driver Reference
- The Input/Output Device Driver Reference
- The Pen for OS/2 Device Driver Reference
- The Virtual Device Driver Reference
- The Presentation Device Driver Reference
- The Display Device Driver Reference
- The Printer Device Driver Reference
- The MMPM/2 Device Driver Reference (Multimedia)
VIDEOCFG.DLL Exported Functions
The VIDEOCFG.DLL shared library represents the video configuration module in OS/2. Resolution, monitor, and refresh configuration methods are standardized, meaning that IBM- and vendor-shipped drivers for different video devices have the same user interface for the video configuration. The configuration of the resolution is handled by Page 1 of the System Icon notebook. The monitor configuration is handled by Page 2 of the System icon notebook. Page 2 is offered whenever the PMI subsystem contains timing information in its mode table and the attached monitor does not support the VESA DDC standard. For DDC monitors, Page 2 is not offered, because the DDC standard provides a software interface for retrieving monitor specifications and no user interaction is required.
Resolution listbox entries are based on the mode table supported by the display driver, as retrieved via the DspQueryDisplayResolutions API. Refresh listbox on Page 1 is offered for each display driver supported mode that has timing information (VerticalRefresh other than 0xFFFF) in the PMI subsystem mode table.
User configuration is recorded at closing of the System object in VIDEO.CFG , a private profiling file. This is a flat file with syntax similar to that of the PMI. The very first VIDEO.CFG is created by the SVGA.EXE utility (both the IBM-shipped version and the SVGAOEM.EXE provided in the DDK for vendor modification) and reflects the detected monitor configuration at install time. The only generic monitor detection built into the utility is that of the VESA DDC standard. For adapter-specific current monitor configuration, the utility has to be modified to "read" the current settings. An alternative approach is to choose and hard code some standard settings as the default monitor configuration. All of the legacy monitors, as well as the original default settings, are stored in the monitor database. The monitor database is composed of MONITOR.DIF and the optional PRIVATE.DIF. The PRIVATE.DIF can be created by vendors performing RIPL install who prefer to leave MONITOR.DIF as a read-only file. .DIF files are flat files with PMI-like syntax and can be edited to correct or add new legacy monitor entries.
VIDEOCFG.DLL also supports a generic display driver configuration, which allows display drivers to declare one or more settings, the type of each setting, possible values, as well as current value of each setting. When the display driver does have a need to handle some user interface, this feature is the preferred method to any custom configuration. The reason it is preferred is that, in the future, with dynamic resolution change and adapter change, the configuration manager will be able to save and restore all of the display driver custom settings. Note that VIDEOCFG does not attempt to understand the nature of each setting, nor is it performing any profiling of the setting changes.
When the feature is exported by the display driver via a DevEscape (see #Generic Video Configuration Interface), VIDEOCFG provides a "Capabilities" button on Page 1 that opens a notebook with one page dedicated to each declared setting. Help for each setting, if desired, has to be exported by the display driver via a resource module and a resource ID for the help. As the user makes changes to the settings, the display driver is notified at the time the System Icon changes and is responsible for recording ( profiling) the new value. Each time the pages of the settings are opened, VIDEOCFG will query the display driver for the current value of each exported setting.
Current monitor and mode configuration can be queried and changed via the VIDEOCFG's exported APIs, all of which are listed here and prototyped in h\svgadefs. h.
Exported Functions
The following API services are exported by VIDEOCFG.DLL:
- AddMonitorData
- GetAllMonitors
- GetCurrentCFG
- GetCurrentDesktopMode
- QueryNumMonitors
- SetCurrentCFG
The format and syntax of each of the above functions is shown on the following pages.
AddMonitorData
Syntax
Description:
AddMonitorData adds a monitor definition to the VIDEOCFG.DLL monitor definitions database. The monitor definition is also written to the MONITOR.DIF file.
#include <svgadefs.h> MONITORINFO *pNewMonitorInfo; /* Pointer to the MONITORINFO data structure. */ ULONG rc; /* Return codes. */ rc = AddMonitorData(*pNewMonitorInfo);
Parameters
*pNewMonitorInfo(#MONITORINFO) - input Pointer to the MONITORINFO data structure.
This parameter points to the #MONITORINFO data structure that specifies the new monitor definition to add to the database.
rc(ULONG) - returns Return codes.
0 Function is successful
Nonzero Returns one of the following errors:
ERROR_INVALID_PARAMETER
ERROR_NO_MONITOR_SUPPORT
Remarks
None.
GetAllMonitors
Syntax
Description:
GetAllMonitors retrieves all monitor definitions. These monitor definitions are defined in the MONITOR.DIF file.
#include <svgadefs.h> MONITORINFO *pMonitors; /* Pointer to the array of MONITORINFO data structures. */ PULONG pulBufferSize; /* Specifies the size of the pMonitors buffer, in bytes. */ ULONG rc; /* Return codes. */ rc = GetAllMonitors(*pMonitors, pulBufferSize);
Parameters
*pMonitors(MONITORINFO) - output Pointer to the array of #MONITORINFO data structures.
This parameter points to the array of MONITORINFO data structures that receive all the monitor definitions in the MONITOR.DIF file.
pulBufferSize(PULONG) - output Specifies the size of the pMonitorsbuffer, in bytes.
If the buffer size is too small to contain all monitor definitions, the ERROR_NOT_ENOUGH_MEMORY error is returned. The variable is then given the size of the buffer required in order to contain all monitor definitions.
rc(ULONG) - returns Return codes.
0 Function is successful
Nonzero Returns one of the following errors:
ERROR_INVALID_PARAMETER
ERROR_NO_MONITOR_SUPPORT
ERROR_NOT_ENOUGH_MEMORY
GetAllMonitors - Remarks
None.
GetCurrentCFG
Description:
GetCurrentCFGgets the current video configuration stored in the Registry.
#include <svgadefs.h> ADAPTERINFO *pAdapter; /* Pointer to the ADAPTERINFO data structure. */ MONITORINFO *pMonitor; /* Pointer to the MONITORINFO data structure. */ ULONG rc; /* Return codes. */ rc = GetCurrentCFG(*pAdapter, *pMonitor);
GetCurrentCFG - Parameters
*pAdapter(ADAPTERINFO) - output Pointer to the #ADAPTERINFO data structure.
This parameter points to the data structure receiving the current video adapter information.
*pMonitor(MONITORINFO) - output Pointer to the #MONITORINFO data structure.
This parameter points to the data structure receiving the current video monitor information.
rc(ULONG) - returns Return codes.
0 Function is successful
Nonzero Returns one of the following errors:
ERROR_INVALID_PARAMETER
ERROR_INVALID_CONFIGURATION
GetCurrentCFG - Remarks
None.
GetCurrentDesktopMode
Description:
GetCurrentDesktopModeretrieves the current desktop mode information stored in the Registry. The desktop mode information includes X and Y resolutions, bits per pixel, vertical and horizontal refresh rates, vertical and horizontal polarity positives, and screen top, bottom, left, and right.
#include <svgadefs.h> VIDEO_ADAPTER *pVideoAdapter; /* Pointer to the VIDEO_ADAPTER data structure. */ ULONG rc; /* Return codes. */ rc = GetCurrentDesktopMode(*pVideoAdapter);
GetCurrentDesktopMode - Parameters
*pVideoAdapter(VIDEO_ADAPTER) - output Pointer to the #VIDEO_ADAPTER data structure.
This parameter points to the data structure receiving the desktop mode information.
rc(ULONG) - returns Return codes.
TRUE Function is successful
FALSE Function is unsuccessful.
GetCurrentDesktopMode - Remarks
None.
QueryNumMonitors
Description:
QueryNumMonitors queries the number of monitor defintions available.
#include <svgadefs.h> PULONG pulNumMonitors; /* Pointer to variable receiving the number of monitor definitions. */ ULONG rc; /* Return codes. */ rc = QueryNumMonitors(pulNumMonitors);
QueryNumMonitors - Parameters
pulNumMonitors(PULONG) - output Pointer to variable receiving the number of monitor definitions.
rc(ULONG) - returns Return codes.
0 Function is successful
Nonzero Returns the following error:
ERROR_NO_MONITOR_SUPPORT
QueryNumMonitors - Remarks
None.
SetCurrentCFG
Description:
SetCurrentCFGsets the current video configuration in the Registry.
#include <svgadefs.h> ADAPTERINFO *pAdapter; /* Pointer to the ADAPTERINFO data structure. */ MONITORINFO *pMonitor; /* Pointer to the MONITORINFO data structure. */ ULONG rc; /* Return codes. */ rc = SetCurrentCFG(*pAdapter, *pMonitor);
SetCurrentCFG - Parameters
*pAdapter(ADAPTERINFO) - input Pointer to the #ADAPTERINFO data structure.
This parameter points to the data structure that specifies the current adapter configuration to be set in the Registry.
*pMonitor(MONITORINFO) - input Pointer to the #MONITORINFO data structure.
This parameter points to the data structure that specifies the current monitor configuration to be set in the Registry.
rc(ULONG) - returns Return codes.
0 Function is successful
Nonzero Returns one of the following errors:
ERROR_INVALID_PARAMETER
ERROR_INVALID_CONFIGURATION
SetCurrentCFG - Remarks
None.
Generic Video Configuration Interface
The Video Configuration Manager supports a generic video configuration interface that allows any display driver to interface with the user via notebook settings in the System icon. The driver needs to export DevEscape calls that identify the capability. The driver also needs to provide DevEscape calls that allow the VIDEOCFG to query the current value and notify the driver when the user sets the value. The DevEscape functions are invoked as Ring3. The method of recording the current setting, as well as default values, is at the driver's discretion.
GreEscape DEVESC_QUERYDRIVERCAPS
Simulation support:
This function is optional for display drivers and has no simulation support .
Description:
GreEscape DEVESC_QUERYDRIVERCAPSreturns the capabilities descriptions. The values for each capability are not yet allocated and are queried later. The #define DEVESC_QUERYDRIVERCAPS (4010L) is defined in SVGADEFS.H.
#define INCL_GRE_DEVICE #include <GRADD.h> HDC hdc; /* A handle to the device context. */ LONG lCode; /* DEVESC_QUERYDRIVERCAPS */ LONG lInCount; /* Not used. */ PBYTE pbInData; /* Not used. */ PLONG plOutCount; /* The number of bytes of data pointed to by pbOutData. */ PBYTE pbOutData; /* The address of a buffer that will contain a ULONG variable specifying the number of capabilities. */ LONG rc; /* Return Code. */ rc = GreEscape(hdc, lCode, lInCount, pbInData, plOutCount, pbOutData);
- Parameters
- hdc(HDC) - input A handle to the device context.
- lCode(LONG) - input DEVESC_QUERYDRIVERCAPS
- lInCount(LONG) - input Not used.
- pbInData(PBYTE) - input Not used.
- plOutCount(PLONG) - output The number of bytes of data pointed to by pbOutData.
- On return, this is updated to the number of bytes returned.
- pbOutData(PBYTE) - output The address of a buffer that will contain a ULONG variable specifying the number of capabilities.
- On return, this buffer contains a ULONG variable that specifies the number of capabilities that the driver supports, immediately followed by an array of #DRIVERCAPS structures.
- Note
- This allows a driver to export multiple capabilities (each, in turn, gets its own page in the System icon).
- rc(LONG) - returns Return Code.
- Returns NO_ERROR.
GreEscape DEVESC_QUERYDRIVERCAPSLIST
Simulation support:
This function is optional for display drivers and has no simulation support .
Description:
GreEscape DEVESC_QUERYDRIVERCAPSLISTfills the pValueList, pCurrentValue,and pDefaultValuein the #DRIVERCAPS data structure. The members must be 0 padded up to the ulValueMemberSizein the pValueList.
There are three kind of data types that we are supporting at the present time-boolean, aggregate of int values, and aggregate of strings. These data types are defined as follows:
#define CAPSTYPE_BOOLEAN 1L #define CAPSTYPE_AGGREGATE_INT 2L #define CAPSTYPE_AGGREGATE_STRING 3L
#define INCL_GRE_DEVICE #include <GRADD.h> HDC hdc; /* A handle to the device context. */ LONG lCode; /* DEVESC_QUERYDRIVERCAPSLIST */ LONG lInCount; /* Number of bytes pointed to by pbInData. */ PBYTE pbInData; /* Pointer to a DRIVERCAPS data structure. */ PLONG plOutCount; /* Not used. */ PBYTE pbOutData; /* Not used. */ LONG rc; /* Return Code. */ rc = GreEscape(hdc, lCode, lInCount, pbInData, plOutCount, pbOutData);
- Parameters
- hdc(HDC) - input A handle to the device context.
- lCode(LONG) - input DEVESC_QUERYDRIVERCAPSLIST
- lInCount(LONG) - input Number of bytes pointed to by pbInData.
- pbInData(PBYTE) - input Pointer to a #DRIVERCAPS data structure.
- The DRIVERCAPS data structure specifies the driver capability to query. Storage is already allocated for pValueList, pCurrentValue,and pDefaultValue.
- When ulCapsType= CAPSTYPE_BOOLEAN, the driver does not have to fill pValueList.
- plOutCount(PLONG) - output Not used.
- pbOutData(PBYTE) - output Not used.
- rc(LONG) - returns Return Code.
- Returns NO_ERROR.
GreEscape DEVESC_SETDRIVERCAPSVALUE
Simulation support:
This function is optional for display drivers and has no simulation support .
Description:
GreEscape DEVESC_SETDRIVERCAPSVALUEwill set the value that user has selected. The new value is specified in pCurrentValue.
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 and aggregate type is represented by a listbox. The capability description appears as the title for that control.
If the driver is going to support these capabilities in multiple languages, it must get the capability description (szCapsDesc) and capability aggreate strings, if applicable, from a resource module that contains already- translated strings.
#define INCL_GRE_DEVICE #include <GRADD.h> HDC hdc; /* A handle to the device context. */ LONG lCode; /* DEVESC_SETDRIVERCAPSVALUE */ LONG lInCount; /* Number of bytes pointed to by pbInData. */ PBYTE pbInData; /* Pointer to a DRIVERCAPS data structure. */ PLONG plOutCount; /* Not used. */ PBYTE pbOutData; /* Not used. */ LONG rc; /* Return Code. */ rc = GreEscape(hdc, lCode, lInCount, pbInData, plOutCount, pbOutData);
- Parameters
- hdc(HDC) - input A handle to the device context.
- lCode(LONG) - input DEVESC_SETDRIVERCAPSVALUE
- lInCount(LONG) - input Number of bytes pointed to by pbInData.
- pbInData(PBYTE) - input Pointer to a #DRIVERCAPS data structure.
- The DRIVERCAPS data structure specifies the driver capability to set.
- plOutCount(PLONG) - output Not used.
- pbOutData(PBYTE) - output Not used.
- rc(LONG) - returns Return Code.
- Returns NO_ERROR.
How to Write to Windows Profiling Files in OS/2
Some display drivers must perform windows profiling (updates to SYSTEM.INI or WIN.INI file). The following sample source file can be included in display driver source and executed at ring 3 only.
typedef ULONG APIENTRY WPF1(VOID); typedef WPF1 *PWPF1; typedef BOOL APIENTRY WPF2(ULONG, BOOL); typedef WPF2 *PWPF2; typedef BOOL APIENTRY WPF3(ULONG, PSZ); typedef WPF3 *PWPF3; BOOL UpdateWindowsIniFiles(VOID) { BOOL result = TRUE; BOOL res1; ULONG hWpf; CHAR szUpdateString[256]; PWPF1 pWpfOpenProfileList; PWPF2 pWpfCloseProfileList; PWPF3 pWpfWriteProfileListLine; HMODULE hMod; if (DosLoadModule(NULL, 0, "WINPRF", &hMod) || DosQueryProcAddr(hMod, 0, "WPFOPENPROFILELIST", (PFN *)&pWpfOpenProfileList) || DosQueryProcAddr(hMod, 0, "WPFCLOSEPROFILELIST", (PFN *)&pWpfCloseProfileList) || DosQueryProcAddr(hMod, 0, "WPFWRITEPROFILELISTLINE", (PFN *)&pWpfWriteProfileListLine)) { return FALSE; } // Open the profile handler. if (hWpf = (*pWpfOpenProfileList)()) { /* ** szUpdateString has the following format ** ** <profile name> <section> <keyword> [value] ** ** ex. "system.ini boot sdisplay.drv wd3116sl.drv" will insert the line ** sdisplay.drv=wd3116sl.drv in the boot section of system.ini ** ** if [value] is omitted, the <keyword> is deleted from the section */ if (!(*pWpfWriteProfileListLine)(hWpf, szUpdateString)) { result = FALSE; // Win Ini update failed! } res1 = (*pWpfCloseProfileList)(hWpf, result); // Close or abort the updates result &= res1; } else { result = FALSE; } return result; }
Most Frequently Asked Video Configuration Questions and Answers
How does the user configure monitor, resolution, and refresh in OS/2? The user interface for video configuration is located in the System object member of the System Setup folder, which can be brought up by clicking the right mouse button on the desktop area.
Why use the System Icon monitor configuration vs. custom configuration? System Icon provides a large pool of legacy monitors and a consistent device-independent resolution/refresh/monitor configuration. The OS/2 Warp, Version 3.0 System Icon configuration support can be installed on OS/2 2.1 and will be supported on future versions of OS/2. The Sysem Icon's initial configuration reflects the configuration that was performed by the BIOS.
What other video configuration features are supported by the System Icon? VIDEOCFG, the binary module that owns the System's video pages, also has a generic capability interface. This generic interface allows for expansion of configuration if a vendor needs additional pages, such as a page for font selection, orientation selection, or any other discrete value configuration.
What is needed to get the System Icon to display the monitor list? The mode table exported by the PMI subsystem has to have at least one graphics mode with a [MonitorModeInfo] section. The presence of this graphics mode indicates that the base video system can take into account monitor capabilities.
What is needed to get the System Icon to display the Monitor size button? The PMI subsystem mode table has to have at least one mode with startup values for ScreenLeftEdge, ScreenRightEdge and so forth. The support for monitor sizing is disabled in the DDK version of the VIDEOCFG, but a refresh of the VIDEOCFG is available on request.
How are monitor capabilities described in OS/2? OS/2 has a pre-built database of about 300 monitors. The list is ordered alphabetically by monitor manufacturer name. Each monitor is described in terms of the resolutions it supports and the maximum refresh value for each resolution. The syntax does not allow for optimum or multiple timing choices. The database is a flat file, MONITOR.DIF, that can be modified. VIDEOCFG.DLL exports APIs that allow for monitor database queries and expansion.
Where is the current configuration stored? Current monitor configuration capabilities, as well as the current refresh for each mode and screen sizing information, are stored in a flat file, VIDEO.CFG, whose syntax is very similar to PMI. The content can be queried or changed by calling VIDEOCFG.DLL's configuration APIs.
Where does the default monitor come from? SVGA.EXE (SVGAOEM.EXE) formats the very first VIDEO.CFG that communicates to the configurator the current refresh configuration, as left by the BIOS. We have assembled per-adapter information that lets us understand how each vendor records its refresh configuration. These values are formatted into the VIDEO.CFG. If SVGA.EXE does not format the file, the very first monitor from the MONITOR.DIF database is chosen. Otherwise, the original (default) VIDEO.CFG monitor capabilities are added to the MONITOR.DIF so that the customer can go back to the BIOS-configured monitor capabilities.
Is there DDC support? SVGA.EXE (and SVGAOEM.EXE) and the configuration do support the DDC1 standard. SVGA.EXE formats the VIDEO.CFG with the DDC1- queried capabilities and marks the monitor as DDC. This automatically excludes any monitor from the database. As a result, the customer is not offered monitor selection page, but does have refresh choices per mode on Page 1. In order to change from a DDC monitor to a non-DDC monitor, the customer has to do one of the following:
- Change the current VIDEO.CFG's monitor name from the "DDC" keyword to anything else
- Issue a SetCurrentCFG API into the VIDEOCFG.DLL and specify a name other than DDC for the current monitor's name
- Remove VIDEO.CFG will also enable the monitor selection.
Where do the refresh values in the refresh listbox on Page 1 come from? The resolutions offered represent the resolutions returned by the display driver that are also available from the PMI subsystem. The match is done on horizontal and vertical resolution and color depth (NOT pixel depth).
If at least one of the resolutions in this group has a [MonitorModeInfo] section, the refresh box will be offered. The content of the refresh box is tied into the currently selected resolution. The refresh values are those found in the VIDEOPMI's mode query list that are within the range of the currently selected monitor. The highlight (default) is on the highest value in the listbox (unless overridden by the customer). Changing the selected monitor affects the range and elicits immediate change if the range has been diminished. If the range is increased, the configured refresh remains the same and has to be increased by the customer, if so desired.
What does "DEFAULT" entry in the refresh listbox mean? If the very first VIDEO.CFG has 0xFF for the resolutions vertical refresh, the entry "DEFAULT" will be highlighted in the refresh box. The actual set mode will also pass the 0xFF in the mode structure, so that the selection of the refresh is entirely up to the PMI subsystem (PMI file or imported binary that handles the setmode function). The "DEFAULT" can be used in places where the startup configuration of an adapter is not known at first, but the base video subsystem has ways of setting appropriate (non-harmful) refresh values. If the SVGADATA.PMI contains [MonitorModeInfo] sections with refresh entries other than 0xFF, the refresh listbox will also contain those, but the customer has to override the default highlight. As soon as an actual (non-DDC) monitor is chosen, the DEFAULT will no longer be a valid option in the refresh listbox. Going back to the original monitor "DEFAULT" would put the "DEFAULT" refresh entry into the listbox.
How could a vendor be noncommittal about the refresh values it supports? The vendor could provide a single [MonitorModeInfo] section that represent its highest refresh capability. This information will be filtered against the monitor's capabilities (the monitor's range is always the highest refresh entry), which effectively notifies the customer that only one ( highest capability of the monitor) refresh can be offered. The vendor could specify its [MonitorModeInfo] entry to be so high that no monitor is discriminated against. However, we strongly recommend that the monitor's refresh value passed into the setmode be respected and set as close as possible. There is the potential for some legal problems if the values requested are not within a margin. Regulations, such as ISO 9000 specifications, are established and enforced by countries where our product is sold, not by IBM.
Could the OS/2 configuration serve to configure BIOS/WIN-OS2? If the setmode function servicing the requested refresh also sets configuration registers used by the BIOS / WIN-OS2 driver before or after it changes the clock registers, this will affect non-OS2 mode sets as well. It is not recommended that non-OS2 applications read the VIDEO.CFG, as its format is open to change. The GetCurrentCFG and GetCurrentDesktopMode APIs are exported by the VIDEOCFG.DLL for OS/2 applications so that the current monitor capabilities and current resolution/refresh/monitor sizing values can be read.
How can new monitors be added to the list? A new monitor can be added by using the AddMonitorData API exported by the VIDEOCFG or by manually editing the MONITOR.DIF file. A PRIVATE.DIF file with new monitor entries will accomplish the same thing while keeping MONITOR.DIF as read-only.
Are customers configuring their monitors or the refresh in OS/2? The answer is both, if the vendor's PMI file has more than one [MonitorModeInfo] section per mode. In other words, after selecting the monitor, the customer still has multiple refresh choices if the PMI file had multiple refresh entries for the current mode below the monitor's end-of-range. Some vendors have utilities that are geared towards monitor configuration (a somewhat limited monitor list is usually the problem) and some are geared towards the refresh value setting (most users have a hard time understanding what the refresh means). We have a two-pronged configuration which, in the absence of DDC, lets the user choose a monitor as a way of limiting the highest refresh, and still select one of the more standard timings for a given resolution.
How can the System Icon refresh support be installed on OS/2 2.1? In order to install VIDEOCFG on OS/2 2.x, the VCFGINST.EXE utility provided in the video\bin directory should be executed first. This utility installs WPVIDSYS.DLL, which subclassed WPSYSTEM class to VIDEOCFG.DLL. Both WPVIDSYS.DLL and VIDEOCFG.DLL should be copied into the LIBPATH and will become active upon a reboot following the VCFGINST.EXE. There used to be a version of VIDEOCFG for OS/2 2.x called VIDEOCFG.206. This version is now consolidated into VIDEOCFG.DLL, so a single library can be installed on both versions of the operating system.
You can also download the S3_864.ZIP from CompuServe, OS2SUP library 23 ( search for 86C84 and UPGRADE keywords). This package supports S3 864/964 and 764 and showcases the installation on OS/2 2.x. The 764 driver also uses VIDEOPMI's software interrupt services.
OS/2 Version Compatibility Considerations
This version of the GRADD Reference was written to support OS/2 Warp on the Intel hardware platform.
Syntax Conventions
The programming statements in this book use the C language syntax. Support for code written in C is provided in header files identified by the filename extension ".h". Assembler support is provided in the include files identified by the filename extension ".INC".
Parameter Names
Parameter names are constructed to show the data type of the parameter and to indicate its use:
- A lowercase prefix of one or more characters that indicates the data type.
- An optional qualifier starting with an uppercase letter.
Where possible, standard names have been used to describe parameters. Where multiple-word qualifiers are used, the order of the words is not significant.
For example:
hdc /* device context handle */ pszFilename /* pointer to a character string */
The following standard base tags and their associated type names are defined:
Tag | Data Type | Description |
---|---|---|
f | BOOL | Flag or Boolean variable. The qualifier describes the condition associated with the flag when it is TRUE. For example, fSuccess is TRUE if successful and FALSE if not; whereas fError is TRUE if an error occurred and FALSE if no error occurred. For objects of type BOOL, the value 0 implies FALSE and any nonzero value implies TRUE. |
ch | CHAR | Signed eight-bit quantity; a character. |
s | SHORT | Signed 16-bit quantity; a SHORT. This is often used in place of us when it does not matter whether the value is signed or unsigned. |
l | LONG | Signed 32-bit quantity; a LONG. This is often used in place of ul when it does not matter whether the value is signed or unsigned. |
uch | UCHAR | Unsigned eight-bit quantity; a byte. Same as b. |
us | USHORT | Unsigned 16-bit quantity. |
ul | ULONG | Unsigned 32-bit quantity. |
b | BYTE | Unsigned eight-bit quantity; a byte. Same as uch. |
sz | CHAR[ ] | NULL-terminated string of characters. |
fb | UCHAR | Byte of flags, that is, an array of flags packed in a BYTE. |
fs | USHORT | SHORT of flags, that is, an array of flags packed in a USHORT. |
fl | ULONG | LONG of flags, that is, an array of flags packed in a ULONG. The three preceding types are used when more than one flag is combined into a byte, SHORT or LONG. Typically, the values are combined with the OR operator and are always unsigned. |
r | REA | Real number, single precision 32-bits. |
rd | DOUBLE | Real number, double precision 64-bits. |
pfn | Pointer to a function. | |
x | X-coordinate. | |
y | Y-coordinate. |
The following standard prefixes are also defined:
Prefix | Description |
---|---|
p | 32-bit pointer for an 80386 microprocessor. For
example, pch is a pointer to a character. |
a | Array. For example, ach is an array of characters. |
i | Index to an array. For example, an ich is used to index an ach. |
c | Count. For example, cch is a count of characters. |
d | Delta or difference between instances of a type. For example, dx is the difference between two values of x. |
h | Handle. A value that uniquely identifies an object but cannot directly be used to access it. For example, hps is a PS handle. |
mp | Mapping array. This prefix is always followed by two base types rather than one and represents the most general case of an array. Mathematically, an array is a function mapping the index to the value stored in the array. The prefix mp is an abbreviation of map. In the construct mpab, a is the type of the index and b is the type of the value stored in the array. In most cases, the only type that is important is the type of the value.
The index is usually an integer with no other meaning (the a prefix is used in this instance). |
off | Offset. Generally used as an offset within a data structure. The actual address of the element within the data structure is derived by adding an offset to a pointer, which points to the beginning of the data structure. Normally, OFF is a byte offset. For example: pfoo = (FOO*) ( (BYTE*) pfooBase + 0fff00 ) |
id | Identifier. This is generally used for values that
identify some object. Usually the association of the ID value and the object are established by the programmer. For example, all windows are identified by their Window ID, which can be set and queried by the programmer. |
cmd | Command. Used for command values, typically as function parameters. |
Some parameters are used in pairs; the qualifiers that are used reflect the relationship between the two variables. For example:
Parameter | Description |
---|---|
First/Last | First and last elements in a set. These are typically used with indexes or pointers (pchFirst, pchLast). Both values represent valid values (compare with Min/Max below). For all valid values of x: xFirst <= x <= xLast. The use of > with First or < with Last is almost always an "off-by-one" error.
For example, to determine whether an ich is within ichFirst and ichLast: if (ich >= ichFirst && ich <= ichLast) ... A typical loop: for (ich = ichFirst; ich <= ichLast; ich++) ... |
Min/Max | Similar to First/Last except that Max is not a valid value in the set (Min is a valid value). For all valid values of x in the set: xMin < = x < xMax. The use of > with Min or < = with Max is almost always an "off-by-one" error.
For example, to determine whether an ich is within ichMin and ichMax: if (ich >= ichMin && ich < ichMax) ... A typical loop: for (ich = ichMin; ich < /* or != */ ichMax; ich++) ... |
The current value (Cur) qualifier can be used with Min and Max when Min or Max can change over time (for example, pbStackMaxCur). | |
Old/New | Old and new. Typically used for values or states when it is necessary to compare the old and new states of the value. |
Next/Prev | Next and previous. Typically used in situations in which items are being enumerated, such as with linked lists. |
Src/Dst | Source and destination. Typically used in transfer operations. |
T | A temporary value. |
Save | A temporary, saved value. Typically used when saving and restoring some state. |
Cur | Current value. |
The base types and their prefixes are defined as follows:
Data Type | Prefix |
---|---|
PSZ | psz |
PCH | pch |
HAB | hab |
HPS | hps |
HDC | hdc |
HRGN | hrgn |
HBITMAP | hbmp |
PLONG | pl |
POINTL | ptl |
POINTL | pt |
RECTL | rcl |
RECTL | rc |
HWND | hwnd |
WPOINT | wpt |
WRECT | wrc |
FIXED | fx |
Parameters for defined structures are the defined parameter names. For example:
AREADEFS struct { defSet fFlags CodePage }AREADEFS
System-defined constants and flags are represented as two or more uppercase WORDs or mnemonic abbreviations separated by underscores. For example, SYS_CONSTANT and SYS_FLAG.
Return Values
Function-handling routines pass full 32-bit return codes back to the calling function. In MASM, the return code is passed in the EAX Register.
Register Content Preservation
Registers EAX, ECX, and EDX can be destroyed. All other registers must be preserved.
Handles
All handles and pointers are 32-bit values.
Coordinates
All coordinates are passed as signed 32-bit values unless stated otherwise. World, model, and presentation-page space coordinates are restricted to the 28 low-order bits and lie within the range F8000000h through 07FFFFFFh. Device space coordinates are restricted to the 16 low-order bits and lie within the range FFFF0000h through 0000FFFFh.
Data Types
Proceed to the next section for a description of the data types referenced in this book.
ADAPTERINFO
The ADAPTERINFO data structure receives information for the current video adapter.
typedef struct _ADAPTERINFO { ULONG cb; /* Length of the structure. */ ULONG ulAdapterID; /* Specifies the adapter by ID. */ CHAR szOEMString[MAX_OEM_STRING]; /* Contains adapter information. */ CHAR szDACString[MAX_DAC_STRING]; /* Contains DAC information. */ CHAR szRevision[MAX_VERSION]; /* Contains version information. */ ULONG ulTotalMemory; /* Total video memory. */ ULONG ulMMIOBaseAddress; /* Base address for memory-mapped I/O registers. */ ULONG ulPIOBaseAddress; /* Base address for I/O ports. */ BYTE bBusType; /* Type of bus (PCI, VLB, and so on.) */ BYTE bEndian; /* Big Endian or little Endian. */ USHORT usDeviceBusID; /* Reserved. */ USHORT usVendorBusID; /* Reserved. */ USHORT usSlotID; /* Reserved. */ } ADAPTERINFO; typedef ADAPTERINFO * FAR * PADAPTERINFO ;
- Fields
- cb(ULONG) Length of the structure.
- ulAdapterID(ULONG) Specifies the adapter by ID.
- szOEMString[MAX_OEM_STRING](CHAR) Contains adapter information.
- Valid value is as follows: MAX_OEM_STRING 128
- szDACString[MAX_DAC_STRING](CHAR) Contains DAC information.
- Valid value is as follows: MAX_DAC_STRING 128
- szRevision[MAX_VERSION](CHAR) Contains version information.
- Valid value is as follows: MAX_VERSION 128
- ulTotalMemory(ULONG) Total video memory.
- ulMMIOBaseAddress(ULONG) Base address for memory-mapped I/O registers.
- ulPIOBaseAddress(ULONG) Base address for I/O ports.
- bBusType(BYTE) Type of bus (PCI, VLB, and so on.)
- The valid values for this flag are as follows:
- ISA_BUS 0
- VLB_BUS 1
- PCI_BUS 2
- EISA_BUS 3
- PCMCIA_BUS 4
- MCA_BUS 5
- bEndian(BYTE) Big Endian or little Endian.
- LITTLE_ENDIAN 0
- BIG_ENDIAN 1
- usDeviceBusID(USHORT) Reserved.
- usVendorBusID(USHORT) Reserved.
- usSlotID(USHORT) Reserved.
APIRET
Unsigned integer in the range 0 through 4 294 967 295.
typedef unsigned long APIRET;
BANKDATA
The BANKDATA data structure contains the current mode ID and the bank number.
typedef struct _BANKDATA { MODEID miBank; /* ID of the current mode. */ ULONG ulBank; /* Current bank number. */ } BANKDATA; typedef BANKDATA *FAR *PBANKDATA;
- Fields
- miBank(MODEID) ID of the current mode.
- ulBank(ULONG) Current bank number.
BITBLTINFO
BitBlt information structure. BitBlt information structure, used for the #GHI_CMD_BITBLT and #VMI_CMD_BITBLT functions.
typedef struct _BITBLTINFO { ULONG ulLength; /* Length of the BITBLTINFO data structure, in bytes. */ ULONG ulBltFlags; /* Flags for rendering of rasterized data. */ ULONG cBlits; /* Count of Blts to be performed. */ ULONG ulROP; /* Raster operation. */ ULONG ulMonoBackROP; /* Background mix if B_APPLY_BACK_ROP is set. */ ULONG ulSrcFGColor; /* Monochrome source Foreground color. */ ULONG ulSrcBGColor; /* Monochrome source Background color and transparent color. */ ULONG ulPatFGColor; /* Monochrome pattern Foreground color. */ ULONG ulPatBGColor; /* Monochrome pattern Background color. */ PBYTE abColors; /* Pointer to color translation table. */ PBMAPINFO pSrcBmapInfo; /* Pointer to source bit map (BMAPINFO) */ PBMAPINFO pDstBmapInfo; /* Pointer to destination bit map (BMAPINFO). */ PBMAPINFO pPatBmapInfo; /* Pointer to pattern bit map (BMAPINFO). */ PPOINTL aptlSrcOrg; /* Pointer to array of source origin POINTLs. */ PPOINTL aptlPatOrg; /* Pointer to array of pattern origin POINTLs. */ PBLTRECT abrDst; /* Pointer to array of Blt rects. */ PRECTL prclSrcBounds; /* Pointer to source bounding rect of source Blts. */ PRECTL prclDstBounds; /* Pointer to destination bounding rect of destination Blts. */ } BITBLTINFO; typedef BITBLTINFO * PBITBLTINFO ;
- Fields
- ulLength(ULONG) Length of the BITBLTINFO data structure, in bytes.
- ulBltFlags(ULONG) Flags for rendering of rasterized data.
- Miscellaneous flags used by the graphics engine for rendering of rasterized data:
- BF_DEFAULT_STATE Blt direction is left to right and top to bottom.
- BF_DIR_X_NEGATIVE Blt direction is towards X origin.
- BF_DIR_Y_NEGATIVE Blt direction is towards Y origin.
- BF_ROP_INCL_SRC ROP includes a source bit map.
- BF_ROP_INCL_PAT ROP includes a pattern bit map.
- BF_SRC_TRANSPARENT Source transparent involved. SRC will not change when SRC=BG_COLOR.
- BF_DST_TRANSPARENT Destination transparent involved. DST will not change when DST=BG_COLOR.
- BF_PAT_TRANSPARENT Pattern transparent involved. Pattern not involved when PAT=BG_COLOR.
- BF_PAT_SOLID Pattern is solid; all Foreground color.
- BF_PAT_HOLLOW Pattern is hollow (empty); no Foreground color.
- BF_APPLY_BACK_ROP Treat ROP as Foreground mix and MonoBackROP as Background mix.
- BF_SRC_MONOINVERT Zero (0) bits are Foreground on monochrome SRC bit map.
- BF_PAT_MONOINVERT Zero (0) bits are Foreground on monochrome PAT bit map.
- BF_SR_BITS_EXTERNAL Source bit map bits are in a nondevice-specific format.
- BF_LAST_BLT Defines last blit in a banded BitBlit.
- BF_SRC_Y_FLIP Source Y coordinates are inverted relative to device origin.
- cBlits(ULONG) Count of Blts to be performed.
- ulROP(ULONG) Raster operation.
- ulMonoBackROP(ULONG) Background mix if B_APPLY_BACK_ROP is set.
- ulSrcFGColor(ULONG) Monochrome source Foreground color.
- ulSrcBGColor(ULONG) Monochrome source Background color and transparent color.
- ulPatFGColor(ULONG) Monochrome pattern Foreground color.
- ulPatBGColor(ULONG) Monochrome pattern Background color.
- abColors(PBYTE) Pointer to color translation table.
- pSrcBmapInfo(PBMAPINFO) Pointer to source bit map (#BMAPINFO)
- pDstBmapInfo(#PBMAPINFO) Pointer to destination bit map (BMAPINFO).
- pPatBmapInfo(PBMAPINFO) Pointer to pattern bit map (BMAPINFO).
- aptlSrcOrg(PPOINTL) Pointer to array of source origin #POINTLs.
- aptlPatOrg(PPOINTL) Pointer to array of pattern origin POINTLs.
- abrDst(#PBLTRECT) Pointer to array of Blt rects.
- prclSrcBounds(PRECTL) Pointer to source bounding rect of source Blts.
- prclDstBounds(PRECTL) Pointer to destination bounding rect of destination Blts.
BLTRECT
Destination rectangle for a bitblt operation.
typedef struct _BLTRECT { ULONG ulXOrg; /* X origin of the destination Blt. */ ULONG ulYOrg; /* Y origin of the destination Blt. */ ULONG ulXExt; /* X extent of the BitBlt. */ ULONG ulYExt; /* Y extent of the BitBlt. */ } BLTRECT; typedef BLTRECT * PBLTRECT ;
- Fields
- ulXOrg(ULONG) X origin of the destination Blt.
- ulYOrg(ULONG) Y origin of the destination Blt.
- ulXExt(ULONG) X extent of the BitBlt.
- ulYExt(ULONG) Y extent of the BitBlt.
BMAPINFO
Device-dependent bit map information structure.
typedef struct _BMAPINFO { ULONG ulLength; /* Length of the BMAPINFO data structure, in bytes. */ ULONG ulType; /* Description of the Blt. */ ULONG ulWidth; /* Width in pels of the bit map. */ ULONG ulHeight; /* Height in pels of the bit map. */ ULONG ulBpp; /* Number of bits per pel/color depth. */ ULONG ulBytesPerLine; /* Number of aligned bytes per line. */ PBYTE pBits; /* Pointer to bit-map bits. */ } BMAPINFO; typedef BMAPINFO * PBMAPINFO ;
- Fields
- ulLength(ULONG) Length of the BMAPINFO data structure, in bytes.
- ulType(ULONG) Description of the Blt.
- BMAP_VRAM Bit map is in video memory.
- BMAP_MEMORY Bit map is in system memory.
- BMAP_VERTICAL_SCAN Scan lines are in a vertical format instead of the default horizontal format.
- BMAP_FONT BitBlit is a set of font character glyphs.
- ulWidth(ULONG) Width in pels of the bit map.
- ulHeight(ULONG) Height in pels of the bit map.
- ulBpp(ULONG) Number of bits per pel/color depth.
- ulBytesPerLine(ULONG) Number of aligned bytes per line.
- pBits(PBYTE) Pointer to bit-map bits.
The scanlines of the bit map can be either byte-aligned or word-aligned.
BUFFER
Data structure inside #INTCRF containing the input/output buffers for the bios call.
typedef struct _BUFFER { BYTE bBufferType; /* Input buffer. */ BYTE bReserved; /* Reserved */ BYTE bSelCRF; /* CRF flag for the selector. */ BYTE bOffCRF; /* CRF flag for the offset. */ VOID pAddress; /* Linear address of the buffer. */ ULONG ulSize; } BUFFER; typedef BUFFER * PBUFFER ;
- Fields
- bBufferType(BYTE) Input buffer.
- BUFFER_NONE 0
- INPUT_BUFFER 1
- OUTPUT_BUFFER 2
- bReserved(BYTE) Reserved
- bSelCRF(BYTE) CRF flag for the selector.
- UlONG index into the CRF.
- bOffCRF(BYTE) CRF flag for the offset.
- ULONG index into the CRF.
- pAddressLinear address of the buffer.
- ulSize(ULONG)
CAPSINFO
GRADD capability information.
typedef struct _CAPSINFO { ULONG ulLength; /* Size of the CAPSINFO data structure, in bytes. */ PSZ pszFunctionClassID; /* Name describing function set. */ ULONG ulFCFlags; /* Function class specific flags. */ } CAPSINFO; typedef CAPSINFO * PCAPSINFO ;
- Fields
- ulLength(ULONG) Size of the CAPSINFO data structure, in bytes.
- pszFunctionClassID(PSZ) Name describing the function set.
- A GRADD supporting the base function set should return pszFunctionClassID pointing to the string "Base Function."
The following definition is provided:
- define BASE_FUNCTION_CLASS "Base Function"
CAPSINFO Field - ulFCFlags
ULONG(PVOID) Function class specific flags.
For the base function class, the following flags are defined:
- define GC_SEND_MEM_TO_MEM 0x00000001 /* Invoke GRADD for bitblts and lines even when hardware display memory is not used. Normally such cases are not sent to a GRADD since the hardware is unlikely to provide acceleration for system memory bitmaps. */
#define TEXTBLT_DOWNLOADABLE 0x00002000 /* Downloadable fonts supported. */
#define TEXTBLT_CLIPABLE 0x00004000 /* Clipable fonts. */
#define TEXTBLT_DS_DEVICE_FONTS 0x00008000 /* Device supports hardware fonts. */
#define DS_SIMPLE_LINES 0x00800000 /* GRADD handles LINEINFO2. */
CHAININFO
Information returned to callers of the #VMI_CMD_QUERYCHAININFO function.
typedef struct _CHAININFO { CID cid; /* GRADD chain ID. */ PSZ pszChainName; /* GRADD chain name. */ PFNHWENTRY pChainHWEntry; /* Entry point for this chain. */ PGRADDINFO pGraddList; /* List of GRADDs in this chain. */ CHAININFO pNextChainInfo; /* Pointer to next GRADD in this chain. */ } CHAININFO; typedef CHAININFO * PCHAININFO ;
- Field
- cid(CID) GRADD chain ID.
- pszChainName(PSZ) GRADD chain name.
- pChainHWEntry(PFNHWENTRY) Entry point for this chain.
- pGraddList(#PGRADDINFO) List of GRADDs in this chain.
- pNextChainInfo(CHAININFO) Pointer to next GRADD in this chain.
CLUTDATA
The CLUTDATA data structure receives information for the number of #RGB array entries.
typedef struct _CLUTDATA { ULONG ulRGBCount; /* Number of aRGB entries that follow. */ ULONG ulRGBStart; /* Start index for RGB triplets. */ SVGARGB aRGB[1]; /* Start of SVGARGB; one entry is allocated. */ } CLUTDATA; typedef CLUTDATA * FAR * PCLUTDATA ;
- Fields
- ulRGBCount(ULONG) Number of aRGB entries that follow.
- ulRGBStart(ULONG) Start index for #RGB triplets.
- aRGB[1](SVGARGB) Start of #SVGARGB; one entry is allocated.
CODECINFO
Determines whether data is to be compressed or decompressed.
typedef struct _CODECINFO { ULONG ulLength; /* Size of the CODECINFO data structure, in bytes. */ FOURCC fccCodecType; /* Describes compression type; 'RAW' if uncompressed. */ ULONG ulCodecCaps; /* Flag indicating CODEC capabilities. */ } CODECINFO; typedef CODECINFO * PCODECINFO ;
- Fields
- ulLength(ULONG) Size of the CODECINFO data structure, in bytes.
- fccCodecType(FOURCC) Describes compression type; 'RAW' if uncompressed.
- The FOURCC flags have the following values:
- CODEC_ULTIMOTION "ULTI"
- CODEC_INDEO21 "RT21"
- CODEC_INDEO31 "IV31"
- CODEC_MPEG1 "MPG1"
- CODEC_MPEG2 "MPG2"
- CODEC_MJPEG "MJPG"
- The FOURCC flags have the following values:
- ulCodecCaps(ULONG) Flag indicating CODEC capabilities.
- The following values are valid:
- CODEC_ACCEL_STRETCHBLT 0x0002; hardware stretch
- CODEC_ACCEL_BLTCOPROC 0x0002; hardware Blt
- CODEC_ACCEL_DECOMP 0x0004; has hardware decompression
- CODEC_ACCEL_COMP 0x0008; has hardware compression
- The following values are valid:
COLORINFO
Color formats for source and destination data, organized in order of preference from the driver's perspective. This data structure is required in any driver supporting EnDIVE.
typedef struct _COLORINFO { ULONG ulLength; /* Size of the COLORINFO data structure, in bytes. */ FOURCC fccColorEncoding; /* Field containing a name for the color space. */ } COLORINFO; typedef COLORINFO * PCOLORINFO ;
- Fields
- ulLength(ULONG) Size of the COLORINFO data structure, in bytes.
- fccColorEncoding(FOURCC) Field containing a name for the color space.
- The FOURCC represents a name (for example, RGB8, Y24, and so on). The bits per pixel and data layout of the color space is implied by the name.
- This field can have the following values:
- FOURCC(ch0,ch1,ch2,ch3)
((ULONG)(BYTE)(ch0) | ((ULONG)(BYTE)(ch1) <<8) | \ ((ULONG)(BYTE)(CH2)<<16) | ((ULONG)(BYTE)(CH3)<<24))
- FOURCC_LUT8 FOURCC('L','U','T','8') 8-bit palettized color space
- FOURCC_R565 FOURCC('R','5','6','5') RGB 565
- FOURCC_R555 FOURCC('R','5','5','5') RGB 555
- FOURCC_R666 FOURCC('R','6','6','6') RGB 666
- FOURCC_R664 FOURCC('R','6','6','4') RGB 664
- FOURCC_RGB3 FOURCC('R','G','B','3') RGB 24 in 3 bytes
- FOURCC_BGR3 FOURCC('B','G','R','3') BGR 24 in 3 bytes
- FOURCC_RGB4 FOURCC('R','G','B','4') RGB 24 in 4 bytes
- FOURCC_BGR4 FOURCC('B','G','R','4') BGR 24 in 4 bytes
- FOURCC_Y888 FOURCC('Y','8','8','8') YUV 24
- FOURCC_Y411 FOURCC('Y','4','1','1') YUV 411 interleaved 4 x 1 subsampled
- FOURCC_Y422 FOURCC('Y','4','2','2') YUV 422 (CCIR601)
- FOURCC_YUV9 FOURCC('Y','U','V','9') YUV9
- FOURCC_Y2X2 FOURCC('Y','2','X','2') YUV 2 by 2 subsampled multiplane
- FOURCC_Y4X4 FOURCC('Y','4','X','4') YUV 4 by 4 subsampled multiplane
CUSTPALINFO
Custom palette information.
typedef struct _CUSTPALINFO { ULONG ulLength; /* Size of the CUSTPALINFO data structure, in bytes. */ ULONG fFlags; /* Palette flag. */ ULONG ulStartIndex; /* Starting palette index. */ ULONG ulNumEntries; /* Number of palette slots to query or set. */ PRGB2 pRGBs; /* Pointer to the array of RGB values. */ } CUSTPALINFO; typedef CUSTPALINFO * PCUSTPALINFO ;
- Fields
- ulLength(ULONG) Size of the CUSTPALINFO data structure, in bytes.
- fFlags(ULONG) Palette flag.
- Not used at this time.
- ulStartIndex(ULONG) Starting palette index.
- ulNumEntries(ULONG) Number of palette slots to query or set.
- pRGBs(#PRGB2) Pointer to the array of RGB values.
DRIVERCAPS
Information structure used for #GreEscape DEVESC_QUERYDRIVERCAPSLIST, #VMI_CMD_USERCAPS, #GHI_CMD_USERCAPS, and #GreEscape DEVESC_QUERYDRIVERCAPS functions.
typedef struct _DRIVERCAPS { ULONG ulCb; /* Length of the source structure in bytes. */ CHAR szCapsDesc[256]; /* Capability description. */ CHAR szHelpFileName[256]; /* Help file name. */ ULONG ulHelpId; /* Help resource id. */ ULONG ulCapsType; /* Defines the returned data type. */ ULONG ulValueMemberSize; /* Size of each member. */ ULONG ulNumValueMember; /* Number of members if aggregate. */ PVOID pValueList; /* Pointer to storage for the members data. */ PVOID pCurrentValue; /* Pointer to the current selected value descriptions. */ PVOID pDefaultValue; /* Pointer to the default (reset) value information. */ BOOL bDefaultValueSupported; /* Return TRUE if driver supports default. */ BOOL bStaticCaps; /* Return TRUE if need to reboot for the new capability. */ } DRIVERCAPS; typedef DRIVERCAPS * PDRIVERCAPS ;
- Fields
- ulCb(ULONG) Length of the source structure in bytes.
- szCapsDesc[256](CHAR) Capability description.
- szHelpFileName[256](CHAR) Help file name.
- ulHelpId(ULONG) Help resource id.
- ulCapsType(ULONG) Defines the returned data type.
- This field defines the datatype returned in pValueList, pCurrentValue, and pDefaultValue.
- There are three data types currently supported, specified by the ulCapsType field: boolean, aggregate of int values, and aggregate of strings. These data types can be defined as follows:
- #define CAPSTYPE_BOOLEAN 1L
#define CAPSTYPE_AGGREGATE_INT 2L
#define CAPSTYPE_AGGREGATE_STRING 3L- Note
- When ulCapsType is CAPSTYPE_BOOLEAN, the driver does not have to fill in pValueList.
- ulValueMemberSize(ULONG) Size of each member.
- ulNumValueMember(ULONG) Number of members if aggregate.
- pValueList(PVOID) Pointer to storage for the members data.
- pCurrentValue(PVOID) Pointer to the current selected value descriptions.
- pDefaultValue(PVOID) Pointer to the default (reset) value information.
- bDefaultValueSupported(BOOL) Return TRUE if driver supports default.
- bStaticCaps(BOOL) Return TRUE if need to reboot for the new capability.
DEVFONTINFO
Information structure used for #GHI_CMD_TEXT and #VMI_CMD_TEXT functions. The #TEXTBLTINFO structure includes a pointer to DEVFONTINFO.
typedef struct _DEVFONTINFO { ULONG ulFntCnt; /* Maximum glyphs contained in this font. */ ULONG fFontInfo; /* Flags used to define DBCS or fixed font. */ ULONG ulEngTag; /* Renderer tag. */ ULONG ulUniqueFntID; /* Unique font identifier. */ ULONG ulMaxHeight; /* Maximum glyph height. */ ULONG ulMaxWidth; /* Maximum glyph width. */ PGHBTBL pghbTbl; /* Pointer to high byte table. */ ULONG ulHalfWidth; /* Reserved. */ CHAR szGlyphlist[16]; /* Reserved */ ULONG ulReserved1; /* Reserved. */ ULONG ulReserved2; /* Reserved. */ } DEVFONTINFO; typedef DEVFONTINFO * PDEVFONTINFO ;
- Fields
- ulFntCnt(ULONG) Maximum glyphs contained in this font.
- fFontInfo(ULONG) Flags used to define DBCS or fixed font.
DFI_FIXED_FONT A predefined number, such as the following:
#define DFI_FIXED_FONT 0x00000001
DFI_DBCS_FONT A predefined number, such as the following:
#define DFI_DBCS_FONT 0x00000002
- ulEngTag(ULONG) Renderer tag.
GRETAG A predefined string, such as the following:
#define GRETAG ('G'+('R'<<8)+('E'<<16)+('_'<<24)) //"GRE_"
WINTAG A predefined string, such as the following:
#define WINTAG ('W'+('I'<<8)+('N'&<<16)+('_'<<24)) //"WIN_"
- ulUniqueFntID(ULONG) Unique font identifier.
- ulMaxHeight(ULONG) Maximum glyph height.
- ulMaxWidth(ULONG) Maximum glyph width.
- pghbTbl(#PGHBTBL) Pointer to high byte table.
- ulHalfWidth(ULONG) Reserved.
- szGlyphlist[16](CHAR) Reserved
- ulReserved1(ULONG) Reserved.
- ulReserved2(ULONG) Reserved.
FBINFO
Information on frame buffer characteristics.
typedef struct _FBINFO { ULONG ulLength; /* Length of FBINFO data structure, in bytes. */ ULONG ulFlags; /* Specifies the capabilities supported. */ ULONG ulBPP; /* Screen bits per pel. */ ULONG ulXres; /* Number of screen X pels. */ ULONG ulYres; /* Number of screen Y pels. */ ULONG ulScanLineBytes; /* Number of bytes per scanline. */ ULONG fccColorEncoding; /* Screen color encoding. */ ULONG ulENDIVEDrivers; /* Number of EnDIVE drivers installed under GRADD architecture. */ } FBINFO; typedef FBINFO *PFBINFO;
- Fields
- ulLength(ULONG) Length of FBINFO data structure, in bytes.
- ulFlags(ULONG) Specifies the capabilities supported.
- This flag has the following value:
- FB_SUPPORTSVRAMALLOC 0x0010; supports allocation of on-card memory
- This flag has the following value:
- ulBPP(ULONG) Screen bits per pel.
- This value may be 32 for some 24-bit color adapters.
- ulXres(ULONG) Number of screen X pels.
FBINFO Field - ulYres
ulYres(ULONG) Number of screen Y pels.
FBINFO Field - ulScanLineBytes
ulScanLineBytes(ULONG) Number of bytes per scanline.
FBINFO Field - fccColorEncoding
fccColorEncoding(ULONG) Screen color encoding.
FBINFO Field - ulENDIVEDrivers
ulENDIVEDrivers(ULONG) Number of EnDIVE drivers installed under GRADD architecture.
FONTDATA
The FONTDATA data structure contains font and character information.
typedef struct _FONTDATA { ULONG ulCharCount; /* Number of characters in the font. */ ULONG ulFontHeight; /* Number of scan lines per character. */ ULONG ulFontWidth; /* Number of columns per character. */ BYTE bFontData[1]; /* ulCharCount*ulFontHeight entries. */ } FONTDATA; typedef FONTDATA * FAR * PFONTDATA ;
FONTDATA Field - ulCharCount
ulCharCount(ULONG) Number of characters in the font.
FONTDATA Field - ulFontHeight
ulFontHeight(ULONG) Number of scan lines per character.
FONTDATA Field - ulFontWidth
ulFontWidth(ULONG) Number of columns per character.
FONTDATA Field - bFontData[1]
bFontData[1](BYTE) ulCharCount*ulFontHeight entries.
GDDINITIN
Information provided to the GRADD in the GHI_CMD_INIT function.
typedef struct _GDDINITIN { ULONG ulLength; /* Length of the GDDINITIN data structure, in bytes. */ PFNHWENTRY pfnChainedHWEntry; /* Entry of previous GRADD in chain. */ } GDDINITIN; typedef GDDINITIN * PGDDINITIN ;
GDDINITIN Field - ulLength
ulLength(ULONG) Length of the GDDINITIN data structure, in bytes.
GDDINITIN Field - pfnChainedHWEntry
pfnChainedHWEntry(PFNHWENTRY) Entry of previous GRADD in chain.
GDDINITOUT
Information returned by the GRADD to the caller of the GHI_CMD_INIT function.
typedef struct _GDDINITOUT { ULONG ulLength; /* Length of the GDDINITOUT data structure, in bytes. */ ULONG cFunctionClasses; /* Number of function classes supported. */ } GDDINITOUT; typedef GDDINITOUT * PGDDINITOUT ;
GDDINITOUT Field - ulLength
ulLength(ULONG) Length of the GDDINITOUT data structure, in bytes.
GDDINITOUT Field - cFunctionClasses
cFunctionClasses(ULONG) Number of function classes supported.
In most cases, this value will be equal to one (1). A GRADD can, however, return a zero (0). This is typically done by filter GRADDs that do not want to be entered in the CHAININFO/GRADDINFO information returned to the translation layer via the VMI_CMD_QUERYCHAININFO function. A GRADD can include built-in extensions by returning a value greater than one (1).
GDDMODEINFO
Mode-specific information provided by the GRADD.
typedef struct _GDDMODEINFO { ULONG ulLength; /* Size of the GDDMODEINFO data structure, in bytes. */ ULONG ulModeId; /* ID used to make SETMODE request. */ ULONG ulBpp; /* Number of colors (bpp). */ ULONG ulHorizResolution; /* Number of horizontal pels. */ ULONG ulVertResolution; /* Number of vertical scan lines. */ ULONG ulRefreshRate; /* Refresh rate in Hz. */ PBYTE pbVRAMPhys; /* Physical address of VRAM. */ ULONG ulApertureSize; /* Size of VRAM, in bytes. */ ULONG ulScanLineSize; /* Size of one scan line, in bytes. */ } GDDMODEINFO; typedef GDDMODEINFO * PGDDMODEINFO ;
GDDMODEINFO Field - ulLength
ulLength(ULONG) Size of the GDDMODEINFO data structure, in bytes.
GDDMODEINFO Field - ulModeId
ulModeId(ULONG) ID used to make SETMODE request.
GDDMODEINFO Field - ulBpp
ulBpp(ULONG) Number of colors (bpp).
GDDMODEINFO Field - ulHorizResolution
ulHorizResolution(ULONG) Number of horizontal pels.
GDDMODEINFO Field - ulVertResolution
ulVertResolution(ULONG) Number of vertical scan lines.
GDDMODEINFO Field - ulRefreshRate
ulRefreshRate(ULONG) Refresh rate in Hz.
This value is zero (0) if Hz not available.
GDDMODEINFO Field - pbVRAMPhys
pbVRAMPhys(PBYTE) Physical address of VRAM.
GDDMODEINFO Field - ulApertureSize
ulApertureSize(ULONG) Size of VRAM, in bytes.
GDDMODEINFO Field - ulScanLineSize
ulScanLineSize(ULONG) Size of one scan line, in bytes.
GHBTBL
Glyph high byte table.
typedef struct _GHBTBL { PGLBTBL pglbTbl[1]; /* Up to 256 entries per table */ } GHBTBL; typedef GHBTBL * PGHBTBL ;
GHBTBL Field - pglbTbl[1]
pglbTbl[1](#PGLBTBL) Up to 256 entries per table
GLBTBL
Glyph low byte table.
typedef struct _GLBTBL { PGLYPHINFO pGlyphInfo[1]; /* Up to 256 entries per table */ } GLBTBL; typedef GLBTBL * PGLBTBL ;
GLBTBL Field - pGlyphInfo[1]
pGlyphInfo[1](#PGLYPHINFO) Up to 256 entries per table
GRADDINFO
Information describing an individual GRADD.
typedef struct _GRADDINFO { GID gid; /* ID of the GRADD. */ PSZ pszGraddName; /* Name of this GRADD. */ PFNHWENTRY pGraddEntry; /* Pointer to HWENTRY for this GRADD. */ PFNHWENTRY pChainEntry; /* Pointer to HWENTRY for this GRADD chain. */ ULONG cModes; /* Count of available graphics modes. */ GDDMODEINFO pModeInfo; /* Pointer to GDDMODEINFO data structure. */ CAPSINFO pCapsInfo; /* Pointer to CAPSINFO data structure. */ GRADDINFO pNextGraddInfo; /* Pointer to next GRADDINFO data structure. */ } GRADDINFO; typedef GRADDINFO * PGRADDINFO ;
GRADDINFO Field - gid
gid(GID) ID of the GRADD.
GRADDINFO Field - pszGraddName
pszGraddName(PSZ) Name of this GRADD.
GRADDINFO Field - pGraddEntry
pGraddEntry(PFNHWENTRY) Pointer to HWENTRY for this GRADD.
GRADDINFO Field - pChainEntry
pChainEntry(PFNHWENTRY) Pointer to HWENTRY for this GRADD chain.
GRADDINFO Field - cModes
cModes(ULONG) Count of available graphics modes.
This is the count of the available graphics modes supported by this GRADD.
GRADDINFO Field - pModeInfo
pModeInfo(#GDDMODEINFO) Pointer to GDDMODEINFO data structure.
GRADDINFO Field - pCapsInfo
pCapsInfo(#CAPSINFO) Pointer to CAPSINFO data structure.
GRADDINFO Field - pNextGraddInfo
pNextGraddInfo(GRADDINFO) Pointer to next GRADDINFO data structure.
This points to the next data structure in this GRADD chain.
GLYPHINFO
Information structure referenced by the pointer to glyph indices ( pGlyphIndicies) in the #TEXTBLTINFO structure.
typedef struct _GLYPHINFO { CHAR bAspace; /* Reserved */ CHAR bBspace; /* Reserved */ CHAR bCspace; /* Reserved */ CHAR bPad; /* Reserved */ BMAPINFO bmapinfo; /* Destination physical surface descriptions */ } GLYPHINFO; typedef GLYPHINFO * PGLYPHINFO ;
GLYPHINFO Field - bAspace
bAspace(CHAR) Reserved
GLYPHINFO Field - bBspace
bBspace(CHAR) Reserved
GLYPHINFO Field - bCspace
bCspace(CHAR) Reserved
GLYPHINFO Field - bPad
bPad(CHAR) Reserved
GLYPHINFO Field - bmapinfo
bmapinfo(#BMAPINFO) Destination physical surface descriptions
HWBANKIN
Information structure used for #GHI_CMD_TEXT and #VMI_CMD_TEXT functions.
typedef struct _HWBANKIN { ULONG ulLength; /* Length of the HWBANKIN data structure, in bytes. */ ULONG ulFlags; /* Defines for ulFlags. */ ULONG ulBank; /* Bank number. */ } HWBANKIN; typedef HWBANKIN * PHWBANKIN ;
HWBANKIN Field - ulLength
ulLength(ULONG) Length of the HWBANKIN data structure, in bytes.
HWBANKIN Field - ulFlags
ulFlags(ULONG) Defines for ulFlags.
BANK_SET 1
BANK_GET 2
HWBANKIN Field - ulBank
ulBank(ULONG) Bank number.
HWBANKOUT
Information structure used for #GHI_CMD_TEXT and #VMI_CMD_TEXT functions.
typedef struct _HWBANKOUT { ULONG ulLength; /* Length of the HWBANKOUT data structure, in bytes. */ ULONG ulBank; /* Bank number. */ } HWBANKOUT; typedef HWBANKOUT * PHWBANKOUT ;
HWBANKOUT Field - ulLength
ulLength(ULONG) Length of the HWBANKOUT data structure, in bytes.
HWBANKOUT Field - ulBank
ulBank(ULONG) Bank number.
HWEVENTIN
Input data to the #GHI_CMD_EVENT function.
typedef struct _HWEVENTIN { ULONG ulLength; /* Size of the HWEVENTIN data structure, in bytes. */ ULONG ulEvent; /* Flag indicating type of event. */ ULONG pEventData; /* Pointer to event-specific data. */ } HWEVENTIN; typedef HWEVENTIN * PHWEVENTIN ;
HWEVENTIN Field - ulLength
ulLength(ULONG) Size of the HWEVENTIN data structure, in bytes.
HWEVENTIN Field - ulEvent
ulEvent(ULONG) Flag indicating type of event.
Valid values are:
EVENT_BACKGROUND
EVENT_FOREGROUND
EVENT_NEWCHAININFO
HWEVENTIN Field - pEventData
pEventData(ULONG) Pointer to event-specific data.
HWEXTENSION
Input data to the #GHI_CMD_EXTENSION function.
typedef struct _HWEXTENSION { ULONG ulLength; /* Size of the HWEXTENSION data structure, in bytes. */ ULONG ulXSubFunction; /* Subfunction code. */ ULONG cScrChangeRects; /* Count of screen rectangles affected by HWEXTENSION. */ PRECTL arectlScreen; /* Array of screen rectangles affected by HWEXTENSION. */ ULONG ulXFlags; /* Flag indicating hardware serialization. */ PVOID pXP1; /* Extension-specific input packet. */ } HWEXTENSION; typedef HWEXTENSION * PHWEXTENSION ;
HWEXTENSION Field - ulLength
ulLength(ULONG) Size of the HWEXTENSION data structure, in bytes.
HWEXTENSION Field - ulXSubFunction
ulXSubFunction(ULONG) Subfunction code.
HWEXTENSION Field - cScrChangeRects
cScrChangeRects(ULONG) Count of screen rectangles affected by HWEXTENSION.
HWEXTENSION Field - arectlScreen
arectlScreen(#PRECTL) Array of screen rectangles affected by HWEXTENSION.
HWEXTENSION Field - ulXFlags
ulXFlags(ULONG) Flag indicating hardware serialization.
Value for this flag is as follows:
X_REQUESTHW 1
HWEXTENSION Field - pXP1
pXP1(PVOID) Extension-specific input packet.
HWMOVEPTRIN
Input packet provided to the GRADD in the GHI_CMD_MOVEPTR function.
typedef struct _HWMOVEPTRIN { ULONG ulLength; /* Size of the HWMOVEPTRIN data structure, in bytes. */ POINTL ptlPos; /* Pointer to video screen coordinate of pointer hot spot. */ } HWMOVEPTRIN; typedef HWMOVEPTRIN * PHWMOVEPTRIN ;
HWMOVEPTRIN Field - ulLength
ulLength(ULONG) Size of the HWMOVEPTRIN data structure, in bytes.
HWMOVEPTRIN Field - ptlPos
ptlPos(#POINTL) Pointer to video screen coordinate of pointer hot spot.
Video screen coordinates are expected in the ptlPosfield.
HWPALETTEINFO
Input packet provided to the GRADD in the #GHI_CMD_PALETTE function.
typedef struct _HWPALETTEINFO { ULONG ulLength; /* Size of the HWPALETTEINFO data structure, in bytes. */ ULONG fFlags; /* Palette flag. */ ULONG ulStartIndex; /* Starting palette index. */ ULONG ulNumEntries; /* Number of palette slots to query or set. */ PRGB2 pRGBs; /* Pointer to the array of RGB values. */ } HWPALETTEINFO; typedef HWPALETTEINFO * PHWPALETTEINFO ;
HWPALETTEINFO Field - ulLength
ulLength(ULONG) Size of the HWPALETTEINFO data structure, in bytes.
HWPALETTEINFO Field - fFlags
fFlags(ULONG) Palette flag.
These flags have the following values:
PALETTE_GET 0x0001
PALETTE_SET 0x0002
HWPALETTEINFO Field - ulStartIndex
ulStartIndex(ULONG) Starting palette index.
HWPALETTEINFO Field - ulNumEntries
ulNumEntries(ULONG) Number of palette slots to query or set.
HWPALETTEINFO Field - pRGBs
pRGBs(#PRGB2) Pointer to the array of #RGB values.
HWREQIN
Input packet to the #GHI_CMD_REQUESTHW function.
typedef struct _HWREQIN { ULONG ulLength; /* Size of the HWREQIN data structure, in bytes. */ ULONG ulFlags; /* Request option flags. */ ULONG cScrChangeRects; /* Count of screen rectangles affected by HWREQIN. */ PRECTL arectlScreen; /* Array of screen rectangles affected by HWREQIN. */ } HWREQIN; typedef HWREQIN * PHWREQIN ;
HWREQIN Field - ulLength
ulLength(ULONG) Size of the HWREQIN data structure, in bytes.
HWREQIN Field - ulFlags
ulFlags(ULONG) Request option flags.
Request option flags can be defined as follows:
- define REQUEST_HW 0x01
#define REQUEST_SEM_ONLY 0x02
If the REQUEST_HW flag is set, the VMAN hardware serialization lock is obtained, and pointer exclusion is performed.
- If the REQUEST_HW flag is set and the REQUEST_SEM_ONLY flag is not set, VMAN invokes the GRADD for GHI_CMD_REQUESTHW to request the linear aperture to the frame buffer.
�If the REQUEST_HW flag is set and the REQUEST_SEM_ONLY flag is set, VMAN does not invoke the GRADD for GHI_CMD_REQUESTHW.
If the REQUEST_HW flag is not set, the VMAN hardware serialization lock is released, and pointer exclusion is ended.
- If the REQUEST_HW flag is not set and the REQUEST_SEM_ONLY flag is not set , VMAN invokes the GRADD for GHI_CMD_REQUESTHW to release the linear aperture to the frame buffer.
�If the REQUEST_HW flag is not set and the REQUEST_SEM_ONLY flag is set, VMAN does not invoke the GRADD for GHI_CMD_REQUESTHW.
HWREQIN Field - cScrChangeRects
cScrChangeRects(ULONG) Count of screen rectangles affected by HWREQIN.
HWREQIN Field - arectlScreen
arectlScreen(#PRECTL) Array of screen rectangles affected by HWREQIN.
HWSETPTRIN
Input packet to the GHI_CMD_SETPTR function.
typedef struct _HWSETPTRIN { ULONG ulLength; /* Size of the HWSETPTRIN data structure, in bytes. */ PBYTE pbANDMask; /* Pointer to AND bit-mask pointer. */ PBYTE pbXORMask; /* Pointer to XOR bit-mask pointer. */ PBYTE pbBits; /* Pointer to color pointer image. */ ULONG ulBpp; /* Color pointer bits per pel. */ ULONG ulWidth; /* Pointer width in pels. */ ULONG ulHeight; /* Pointer height in pels. */ POINTL ptlHotspot; /* Pointer to hot spot coordinate. */ } HWSETPTRIN; typedef HWSETPTRIN * PHWSETPTRIN ;
HWSETPTRIN Field - ulLength
ulLength(ULONG) Size of the HWSETPTRIN data structure, in bytes.
HWSETPTRIN Field - pbANDMask
pbANDMask(PBYTE) Pointer to AND bit-mask pointer.
HWSETPTRIN Field - pbXORMask
pbXORMask(PBYTE) Pointer to XOR bit-mask pointer.
HWSETPTRIN Field - pbBits
pbBits(PBYTE) Pointer to color pointer image.
HWSETPTRIN Field - ulBpp
ulBpp(ULONG) Color pointer bits per pel.
HWSETPTRIN Field - ulWidth
ulWidth(ULONG) Pointer width in pels.
HWSETPTRIN Field - ulHeight
ulHeight(ULONG) Pointer height in pels.
HWSETPTRIN Field - ptlHotspot
ptlHotspot(#POINTL) Pointer to hot spot coordinate.
HWSETPTROUT
Output packet returned by the GRADD to the caller of the GHI_CMD_SETPTR function.
typedef struct _HWSETPTROUT { ULONG ulLength; /* Size of the HWSETPTROUT data structure, in bytes. */ ULONG ulStatus; /* Current cursor description bits. */ } HWSETPTROUT; typedef HWSETPTROUT * PHWSETPTROUT ;
HWSETPTROUT Field - ulLength
ulLength(ULONG) Size of the HWSETPTROUT data structure, in bytes.
HWSETPTROUT Field - ulStatus
ulStatus(ULONG) Current cursor description bits.
Values are as follows:
POINTER_VISIBLE 0x0001; cursor is visible.
POINTER_COLOR 0x0002; cursor is color (vs. monochrome).
POINTER_SOFTWARE 0x0004; this GRADD is not using a hardware sprite.
HWSHOWPTRIN
Input packet to the GHI_CMD_SHOWPTR function.
typedef struct _HWSHOWPTRIN { ULONG ulLength; /* Size of the HWSHOWPTRIN data structure, in bytes. */ BOOL fShow; /* Indicates the visibility state of the pointer. */ } HWSHOWPTRIN; typedef HWSHOWPTRIN * PHWSHOWPTRIN ;
HWSHOWPTRIN Field - ulLength
ulLength(ULONG) Size of the HWSHOWPTRIN data structure, in bytes.
HWSHOWPTRIN Field - fShow
fShow(BOOL) Indicates the visibility state of the pointer.
Values are as follows:
TRUE Pointer is visible.
FALSE Pointer is not visible.
IMAGEBUF
Characteristics describing an image.
typedef struct _IMAGEBUF { ULONG ulLength; /* Length of IMAGEBUF data structure, in bytes. */ ULONG ulFlags; /* Image buf flag. */ ULONG ulType; /* Flag indicating type of memory: VRAM or system. */ PBYTE pBits; /* Virtual address of the image. */ ULONG ulImgWidth; /* Image width, in pels. */ ULONG ulImgHeight; /* Image height, in pels. */ ULONG ulBytesPerScan; /* Bytes per scan line. */ PCOLORINFO pColorInfo; /* Color space of data in buffer. */ PCODECINFO pCodecInfo; /* Compression type of data in buffer. */ PCUSTPALINFO pCustPalInfo; /* Pointer to custom palette information. */ } IMAGEBUF; typedef IMAGEBUF * PIMAGEBUF ;
IMAGEBUF Field - ulLength
ulLength(ULONG) Length of IMAGEBUF data structure, in bytes.
IMAGEBUF Field - ulFlags
ulFlags(ULONG) Image buf flag.
This flag has the following values:
IBF_Y_ORG_BOTTOM 0x0001; origin is set at bottom
Note:This flag can be used as an optimization for 8-bpp images for the following two conditions:
1.The hardware has support for cached custom palettes, and the client application is playing frames using the same palette. The driver will return IMG_CAPS_PAL_CACHING if it has this support.
2.The screen is in 256-color mode and the source image bits have already been translated to the current hardware palette.
IBF_IGNORE_CUST_PAL 0x0002; ignore the custom palette
IMAGEBUF Field - ulType
ulType(ULONG) Flag indicating type of memory: VRAM or system.
This flag has the following values:
IBT_SRC_VRAM 0x0000; indicates source is VRAM memory
IBT_SRC_MEM 0x0001; indicates source is system memory
IMAGEBUF Field - pBits
pBits(PBYTE) Virtual address of the image.
Not required if source is in VRAM.
IMAGEBUF Field - ulImgWidth
ulImgWidth(ULONG) Image width, in pels.
IMAGEBUF Field - ulImgHeight
ulImgHeight(ULONG) Image height, in pels.
IMAGEBUF Field - ulBytesPerScan
ulBytesPerScan(ULONG) Bytes per scan line.
IMAGEBUF Field - pColorInfo
pColorInfo(#PCOLORINFO) Color space of data in buffer.
IMAGEBUF Field - pCodecInfo
pCodecInfo(#PCODECINFO) Compression type of data in buffer.
IMAGEBUF Field - pCustPalInfo
pCustPalInfo(#PCUSTPALINFO) Pointer to custom palette information.
IMAGECAPS
Capabilities of the video accelerator driver.
typedef struct _IMAGECAPS { ULONG ulLength; /* Length of IMAGECAPS data structure, in bytes. */ ULONG ulCaps; /* Flag that specifies image capabilities supported. */ ULONG ulMaxHorz; /* Maximum horizontal pels supported by scaler. */ ULONG ulMaxVert; /* Maximum vertical lines supported by scaler. */ BOOL fAccelMem; /* Flag indicating whether the hardware accelerator has additional VRAM for use. */ ULONG ulPhysAddrVRAM; /* Physical address of the hardware accelerator VRAM. */ ULONG ulSize; /* Size of hardware accelerator VRAM, in bytes. */ ULONG ulScanLineBytes; /* Size of scan line, in bytes. */ ULONG ulNumCodecs; /* Number of FOURCCs that follow in this structure. */ PCODECINFO pCodecList; /* Pointer to array of CODEC FOURCCs. */ ULONG ulNumSrc; /* Number of source COLORINFO data structures pointed to by pSrcColorInfo. */ PCOLORINFO pSrcColorInfo; /* Pointer to array of source COLORINFO data structures. */ ULONG ulNumDst; /* Number of destination COLORINFO data structures pointed to by pDstColorInfo. */ PCOLORINFO pDstColorInfo; /* Pointer to array of destination COLORINFO data structures. */ } IMAGECAPS; typedef IMAGECAPS * PIMAGECAPS ;
IMAGECAPS Field - ulLength
ulLength(ULONG) Length of IMAGECAPS data structure, in bytes.
IMAGECAPS Field - ulCaps
ulCaps(ULONG) Flag that specifies image capabilities supported.
This flag has the following values:
IMAGECAPS_STRETCHBLT 0x0001; has hardware stretch Blt assist
IMAGECAPS_CAPTURE 0x0002; has capture to VRAM hardware present
IMAGECAPS_1X_BLT 0x0004; has nonstretch Blt assist
IMAGECAPS_WINDOWCLIP 0x0008; supports clipping in hardware and/or software
IMAGECAPS_BUFALLOC 0x0010; supports allocation of on-card memory
IMAGECAPS_RECTALLOC 0x0020; supports allocation of rectangles in on-card memory
IMAGECAPS_COMP 0x0040; compression supported by driver
IMAGECAPS_DECOMP 0x0080; decompression supported by driver
IMAGECAPS_PAL_CACHING 0x0100; supports 8-bit palette caching
IMAGECAPS_INTERPOL 0x0200; supports color interpolation in hardware
IMAGECAPS_BYLOCSYSMEM 0x0400; able to read/write to system memory
IMIAGECAPS_SEM_BYPASS 0x0800; device serialization not required
IMAGECAPS_NO_SHARED_FB 0x1000; overlay device
IMAGECAPS Field - ulMaxHorz
ulMaxHorz(ULONG) Maximum horizontal pels supported by scaler.
IMAGECAPS Field - ulMaxVert
ulMaxVert(ULONG) Maximum vertical lines supported by scaler.
IMAGECAPS Field - fAccelMem
fAccelMem(BOOL) Flag indicating whether the hardware accelerator has additional VRAM for use.
The following values are valid:
TRUE VRAM available.
FALSE VRAM not available.
IMAGECAPS Field - ulPhysAddrVRAM
ulPhysAddrVRAM(ULONG) Physical address of the hardware accelerator VRAM.
This parameter is valid only if fAccelMem = TRUE.
IMAGECAPS Field - ulSize
ulSize(ULONG) Size of hardware accelerator VRAM, in bytes.
This parameter is valid only if fAccelMem = TRUE.
IMAGECAPS Field - ulScanLineBytes
ulScanLineBytes(ULONG) Size of scan line, in bytes.
Number of bytes includes padding. This parameter is valid only if fAccelMem = TRUE.
IMAGECAPS Field - ulNumCodecs
ulNumCodecs(ULONG) Number of FOURCCs that follow in this structure.
IMAGECAPS Field - pCodecList
pCodecList(#PCODECINFO) Pointer to array of CODEC FOURCCs.
This field points to the array of FOURCCs supported by the hardware accelerator.
IMAGECAPS Field - ulNumSrc
ulNumSrc(ULONG) Number of source #COLORINFO data structures pointed to by pSrcColorInfo.
IMAGECAPS Field - pSrcColorInfo
pSrcColorInfo(#PCOLORINFO) Pointer to array of source COLORINFO data structures.
IMAGECAPS Field - ulNumDst
ulNumDst(ULONG) Number of destination COLORINFO data structures pointed to by pDstColorInfo.
IMAGECAPS Field - pDstColorInfo
pDstColorInfo(#PCOLORINFO) Pointer to array of destination COLORINFO data structures.
IMAGEPACK
Information pertaining to PutImage and GetImage.
typedef struct _IMAGEPACK { ULONG ulLength; /* Length of IMAGEPACK data structure, in bytes. */ ULONG ulFlags; /* Image pack flag. */ ULONG ulHandle; /* Unique ID returned by VRAMREGISTEROUT. */ ULONG ulID; /* Unique buffer ID. */ ULONG ulCmdMask; /* Specific changes since the last frame. */ PIMAGEBUF pPutBuf; /* Used as source image in PutImage command. */ PIMAGEBUF pGetBuf; /* Used as destination image in GetImage command. */ POINTL ptlDstOrg; /* Destination origin (origin at upper left). */ ULONG ulDstXext; /* Destination X extent. */ ULONG ulDstYext; /* Destination Y extent. */ POINTL ptlSrcOrg; /* Offset into the source image. */ ULONG ulSrcXext; /* Source X extent. */ ULONG ulSrcYext; /* Source Y extent. */ ULONG cVisRects; /* Number of output visible rectangles. */ PRECTL prctlVis; /* Pointer to array of visible regions. */ POINTL ptlWBOrg; /* Origin of off-screen VRAM work buffer. */ ULONG cWBBytes; /* Number of bytes in the work buffer. */ PBYTE pVirtVRAM; /* A 32-bit virtual pointer to the start of VRAM. */ ULONG ulGrafXPar; /* Transparent color for overlay type devices. */ } IMAGEPACK; typedef IMAGEPACK * PIMAGEPACK ;
- IMAGEPACK
- ulLength(ULONG) Length of IMAGEPACK data structure, in bytes.
- ulFlags(ULONG) Image pack flag.
- This flag has the following value:
- IPF_DONT_INTERPOLATE 0x0001; don't use hardware color interpolation
- This flag has the following value:
- ulHandle(ULONG) Unique ID returned by #VRAMREGISTEROUT.
- ulID(ULONG) Unique buffer ID.
- ulCmdMask(ULONG) Specific changes since the last frame.
- The following values are valid:
- IPC_INTERMEDIATE_PUT 0x0001; not used at this time
IPC_RECTLS 0x0002; visible regions have changed
IPC_SRC_COLOR 0x0004; source color information has changed
IPC_DST_COLOR 0x0008; destination color information has changed
IPC_PALETTE 0x0010; palette color information has changed
IPC_SRC_SIZE 0x0020; source size information has changed
IPC_DST_SIZE 0x0040; destination size information has changed
IPC_DST_POS 0x0080; destination position information has changed
IPC_DROP_FRAME 0x0100; ignore this frame
- IPC_INTERMEDIATE_PUT 0x0001; not used at this time
- The following values are valid:
- pPutBuf(#PIMAGEBUF) Used as source image in PutImage command.
- pGetBuf(PIMAGEBUF) Used as destination image in GetImage command.
- ptlDstOrg(#POINTL) Destination origin (origin at upper left).
- ulDstXext(ULONG) Destination X extent.
- ulDstYext(ULONG) Destination Y extent.
- ptlSrcOrg(#POINTL) Offset into the source image.
- ulSrcXext(ULONG) Source X extent.
- ulSrcYext(ULONG) Source Y extent.
- cVisRects(ULONG) Number of output visible rectangles.
- prctlVis(#PRECTL) Pointer to array of visible regions.
- ptlWBOrg(#POINTL) Origin of off-screen VRAM work buffer.
- cWBBytes(ULONG) Number of bytes in the work buffer.
- pVirtVRAM(PBYTE) A 32-bit virtual pointer to the start of VRAM.
- ulGrafXPar(ULONG) Transparent color for overlay type devices.
INITVDM
Data structure to initialize the full VDM session.
typedef struct _INITVDM { ULONG ulFlags; /* VDM initialization type. */ } INITVDM; typedef INITVDM * PINITVDM ;
- Fields
- ulFlags(ULONG) VDM initialization type.
- VDM_POSTLOAD 0x1 Adapter just loaded (used internally for initialization).
- VDM_INITIALIZE 0x2 Force initialization of a permanently open VDM, even if previously initialized.
INTCRF
Data structure to make a bios call.
typedef struct _INTCRF { ULONG ulBIOSIntNo; /* 0x10 for INT10 calls. */ VCRF aCRF; /* Client register frame. */ BUFFER pB[2]; /* Description of input/output buffers. */ } INTCRF; typedef INTCRF * PINTCRF ;
INTCRF Field - ulBIOSIntNo
ulBIOSIntNo(ULONG) 0x10 for INT10 calls.
INTCRF Field - aCRF
aCRF(#VCRF) Client register frame.
INTCRF Field - pB[2]
pB[2](#BUFFER) Description of input/output buffers.
INITPROCOUT
Information returned by the GRADD to the caller of the GHI_CMD_INITPROC function.
typedef struct _INITPROCOUT { ULONG ulLength; /* Length of the INITPROCOUT data structure, in bytes. */ ULONG ulVRAMVirt; /* 32-bit virtual address of VRAM. */ } INITPROCOUT; typedef INITPROCOUT * PINITPROCOUT ;
INITPROCOUT Field - ulLength
ulLength(ULONG) Length of the INITPROCOUT data structure, in bytes.
INITPROCOUT Field - ulVRAMVirt
ulVRAMVirt(ULONG) 32-bit virtual address of VRAM.
LINEINFO
Line information data structure shared by cLines in the alpkLinePack array.
typedef struct _LINEINFO { ULONG ulLength; /* Length of LINEINFO data structure. */ ULONG ulType; /* Defines line type. */ ULONG ulStyleMask; /* A 32-bit style mask. */ ULONG cLines; /* Count of lines to be drawn. */ ULONG ulFGColor; /* Line Foreground color. */ ULONG ulBGColor; /* Line Background color. */ USHORT usForeROP; /* Line Foreground mix. */ USHORT usBackROP; /* Line Background mix. */ PBMAPINFO pDstBmapInfo; /* Pointer to destination surface bit map. */ PLINEPACK alpkLinePack; /* Pointer to LINEPACK data structure. */ PRECTL prclBounds; /* Pointer to bounding rect of a clipped line. */ } LINEINFO; typedef LINEINFO * PLINEINFO ;
- Field
- ulLength(ULONG) Length of LINEINFO data structure.
- ulType(ULONG) Defines line type.
- LINE_SOLID Line will be solid in Foreground color.
LINE_INVISIBLE Line is not drawn.
LINE_ALTERNATE Line will be alternating Foreground and Background color; ignores style.
- LINE_SOLID Line will be solid in Foreground color.
- ulStyleMask(ULONG) A 32-bit style mask.
- cLines(ULONG) Count of lines to be drawn.
- ulFGColor(ULONG) Line Foreground color.
- ulBGColor(ULONG) Line Background color.
- usForeROP(USHORT) Line Foreground mix.
- usBackROP(USHORT) Line Background mix.
- The following flags apply to ulForeROP and ulBackROP:
LR_ZERO
LR_INVERTMERGEPAT
LR_MASKINVERTPAT
LR_INVERTCOPYPAT
LR_MASKPATINVERT
LR_INVERT
LR_XORPAT
LR_INVERTMASKPAT
LR_MASKPAT
LR_INVERTXORPAT
LR_LEAVEALONE
LR_MERGEINVERTPAT
LR_PATCOPY
LR_MERGEPATINVERT
LR_MERGEPAT
LR_ONE
- The following flags apply to ulForeROP and ulBackROP:
- pDstBmapInfo(#PBMAPINFO) Pointer to destination surface bit map.
- alpkLinePack(PLINEPACK) Pointer to #LINEPACK data structure.
- prclBounds(#PRECTL) Pointer to bounding rect of a clipped line.
LINEINFO2
Line information data structure for simple lines, used for #VMI_CMD_LINE and #GHI_CMD_LINE functions.
The LINEINFO2 structure will never be passed to a GRADD unless the GRADD indicates it can handle both LINEINFO and LINEINFO2 structures by setting the DS_SIMPLE_LINES flag in the ulFCFlags member of #CAPSINFO.
typedef struct _LINEINFO2 { ULONG ulLength; /* Length of LINEINFO2 data structure. */ ULONG ulType; /* Defines line type. */ ULONG ulStyleMask; /* A 32-bit style mask. */ ULONG cLines; /* Count of lines to be drawn. */ ULONG ulFGColor; /* Line Foreground color. */ ULONG ulBGColor; /* Line Background color. */ USHORT usForeROP; /* Line Foreground mix. */ USHORT usBackROP; /* Line Background mix. */ PBMAPINFO pDstBmapInfo; /* Pointer to destination surface bit map. */ ULONG ulFlags; /* Line flags. */ ULONG ulXYStyleStep; /* Low byte of low word: x style, High byte of low word: y style. */ PULONG pulStyleValue; /* Pointer to style value at start point. */ POINTL ptlOrigin; /* Origin to be added to all coordinates. */ PPOINTL pptlStart; /* Pointer to POINTL defining start point. */ PPOINTL pptlLines; /* Pointer to POINTL array defining connected line endpoints. */ POINTL ptlClipStart; /* Clipped start point if it is clipped. */ POINTL ptlClipEnd; /* Clipped end point if it is clipped. */ LONG lClipStartError; /* Bresenham error at the clip start for first line. */ PRECTL prclBounds; /* Pointer to bounding rect of clipped lines. */ } LINEINFO2; typedef LINEINFO2 * PLINEINFO2 ;
- Fields
- ulLength(ULONG) Length of LINEINFO2 data structure.
- ulType(ULONG) Defines line type.
- LINE_SOLID Line will be solid in Foreground color.
LINE_INVISIBLE Line is not drawn.
LINE_ALTERNATE Line will be alternating Foreground and Background color; ignores style.
- LINE_SOLID Line will be solid in Foreground color.
- ulStyleMask(ULONG) A 32-bit style mask.
- cLines(ULONG) Count of lines to be drawn.
- ulFGColor(ULONG) Line Foreground color.
- ulBGColor(ULONG) Line Background color.
- usForeROP(USHORT) Line Foreground mix.
- usBackROP(USHORT) Line Background mix.
- The following flags apply to ulForeROP and ulBackROP:
- LR_ZERO
- LR_INVERTMERGEPAT
- LR_MASKINVERTPAT
- LR_INVERTCOPYPAT
- LR_MASKPATINVERT
- LR_INVERT
- LR_XORPAT
- LR_INVERTMASKPAT
- LR_MASKPAT
- LR_INVERTXORPAT
- LR_LEAVEALONE
- LR_MERGEINVERTPAT
- LR_PATCOPY
- LR_MERGEPATINVERT
- LR_MERGEPAT
- LR_ONE
- pDstBmapInfo(#PBMAPINFO) Pointer to destination surface bit map.
- ulFlags(ULONG) Flags used for the LINEINFO2 data structure.
LINE_DO_FIRST_PEL Draw first pel of first line if not clipped.
LINE_DO_LAST_PEL Draw last pel of last line if not clipped.
LINE_MONO_INVERT Invert bits for mono destination.
LINE_START_CLIP Start of first line is clipped.
LINE_END_CLIP End of last line is clipped.
LINE_Y_FLIP Flip Y for all lines.
LINE_ALL_RADIAL All lines oriented 0, 45, 90, 135, 180, 225, 270, or 315 degrees.
LINE_DISJOINT Successive pairs of points in pptlLines array define disconnected line segments.
- Field - ulXYStyleStep
ulXYStyleStep(ULONG) Low byte of low word: x style, High byte of low word: y style.
The x style step is used for X-major lines where abs(dx) > abs(dy). The x style step is used for lines where abs(dx) < abs(dy).
The style step is added to the current style value for each pel.
- Field - pulStyleValue
pulStyleValue(PULONG) Pointer to style value at current pel.
The style value is composed as an error value and a mask position, as follows:
high word (16 bits) | 3 bits | 5 bits | 8 bits |
not used | not used | mask position | error value |
The style value is updated as lines are drawn.
- Fields
- ptlOrigin(#POINTL) Origin to be added to all coordinates.
- pptlStart(PPOINTL) Pointer to #POINTL defining start point of first line.
- pptlLines(PPOINTL) Pointer to #POINTLarray defining connected line endpoints.
- The number of array entries is defined by #cLines.
- ptlClipStart(#POINTL) Clipped start point if it is clipped.
- ptlClipEnd(POINTL) Clipped end point if it is clipped.
- lClipStartError(LONG) Bresenham error at the clip start point for first line (not valid if first line is horizontal or vertical).
- prclBounds(#PRECTL) Pointer to bounding rect of a clipped line.
LINEPACK
Line information data structure on a per-line basis.
typedef struct _LINEPACK { ULONG ulStyleStep; /* Value to be added to ulStyleValue. */ ULONG ulStyleValue; /* Style value at the current pel. */ ULONG ulFlags; /* Flags used for the LINEPACK data structure. */ LINEPACK plpkNext; /* Pointer to next LINEPACK data structure. */ ULONG ulAbsDeltaX; /* Clipped Bresenham Delta X, absolute. */ ULONG ulAbsDeltaY; /* Clipped Bresenham Delta Y, absolute. */ POINTL ptlClipStart; /* Pointer to location for device to perform Bresenham algorithm. */ POINTL ptlClipEnd; /* Ending location for Bresenham algorithm (see ptlClipStart). */ POINTL ptlStart; /* Pointer to starting location for line. */ POINTL ptlEnd; /* Ending location for line. */ LONG lClipStartError; /* Standard Bresenham error at the clipped start point. */ } LINEPACK; typedef LINEPACK * PLINEPACK ;
- Field - ulStyleStep
ulStyleStep(ULONG) Value to be added to ulStyleValue.
The value to be added to ulStyleValue on each pel stepped along the style major direction.
- Field - ulStyleValue
ulStyleValue(ULONG) Style value at the current pel.
The style value is composed of an error value and a mask position, as follows:
high word |3 bits |5 bits |8 bits -------------+-------------+-------------+----------- not used |not used |mask pos |error value
- Field - ulFlags
ulFlags(ULONG) Flags used for the LINEPACK data structure.
LINE_DO_FIRST_PEL Draws the first pel.
LINE_DIR_Y_POSITIVE Indicates line direction is bottom-to-top.
LINE_HORIZONTAL Indicates line is horizontal. No Bresenham algorithm.
LINE_X_MAJOR Line is XMAJOR.
LINE_DIR_X_POSITIVE Indicates line direction is left-to-right.
LINE_VERTICAL Indicates line is vertical. No Bresenham algorithm.
LINE_STYLE_X_MAJOR Line style is XMAJOR.
LINE_DO_LAST_PEL Draws the last pel.
- Field - plpkNext
plpkNext(LINEPACK) Pointer to next LINEPACK data structure.
- Field - ulAbsDeltaX
ulAbsDeltaX(ULONG) Clipped Bresenham Delta X, absolute.
- Field - ulAbsDeltaY
ulAbsDeltaY(ULONG) Clipped Bresenham Delta Y, absolute.
- Field - ptlClipStart
ptlClipStart(#POINTL) Pointer to location for device to perform Bresenham algorithm.
Pointer to location where device performs the Bresenham algorithm. Sets only the pels from ptlClipStart to ptlClipEnd, inclusive.
- Field - ptlClipEnd
ptlClipEnd(POINTL) Ending location for Bresenham algorithm (see ptlClipStart).
- Field - ptlStart
ptlStart(POINTL) Pointer to starting location for line.
The device can perform the Bresenham algorithm from ptlStart or ptlClipStart.
- Field - ptlEnd
ptlEnd(POINTL) Ending location for line.
- Field - lClipStartError
lClipStartError(LONG) Standard Bresenham error at the clipped start point.
Error is calculated from the initial error and the error increments for major step and diagonal step. The initial error and the error increments are as follows:
MAX Maximum (ulAbsDeltaX, ulAbsDeltaY)
MIN Minimum (ulAbsDeltaX, ulAbsDeltaY)
Major Increment Increment to the error for stepping along the major axis:
2 * MIN.
Diagonal Increment Increment to the error for stepping along the major and minor axes:
2 * MIN - 2 * MAX.
Initial Error Error at the start point:
2 * MIN - MAX, if LINE_DIR_X_POSITIVE is On.
2 * MIN - MAX - 1, if LINE_DIR_X_POSITIVE is Off.
Horizontal and vertical lines The line is drawn from the clipped start to clipped end.
The lClipStartError will not be given.
First pel consideration Set the first pel at ptlStart (not ptlClipStart) only if LINE_DO_FIRST_PEL is set and the first pel is not clipped.
Last pel consideration Set the last pel at ptlEnd (not ptlClipEnd) only if LINE_DO_LAST_PEL is set and the last pel is not clipped.
Styling Lines are styled using the ulStyleMask, ulStyleStep, and ulStyleValue.
ulStyleMask A 32-bit style mask.
Error Value Error value at the current pel.
Mask Position Bit position of the ulStyleMask.
If this bit is on, set the current pel to the ulFGColor through usForeROP; otherwise, set the current pel to the ulBGColor through usBackRop.
MEMINFO
Physical to linear virtual address range conversion structure.
typedef struct _MEMINFO { ULONG ulPhysAddr; /* Start of physical address range. */ ULONG ulMemLen; /* Length of address range in bytes. */ ULONG ulVirtAddr; /* Virtual address corresponding to physical address range start. */ /* (This linear virtual address is returned by VHPhysToVirt.) */ struct _MEMINFO pNextMI; /* Pointer to the next MEMINFO structure in linked list. */ /* In the last structure in the linked list, this must be set to NULL. */ } MEMINFO; typedef MEMINFO * PMEMINFO ;
- Field - ulPhysAddr
ulPhysAddr(ULONG)
- Field - ulMemLen
ulMemLen(ULONG)
- Field - ulVirtAddr
ulVirtAddr(ULONG)
- MEMINFO Field - pNextMI
pNextMI(struct_MEMINFO)
MONITORINFO
The MONITORINFO data structure receives information for the current video monitor.
typedef struct _MONITORINFO { CHAR szMonitor[MAX_MONITOR_LEN]; /* Contains monitor information. */ MONITORMODEINFO MonitorModeInfo[MAX_MONITOR_MODES]; /* Contains information about the monitor mode. */ } MONITORINFO; typedef MONITORINFO * FAR * PMONITORINFO ;
- Fields
- szMonitor[MAX_MONITOR_LEN](CHAR) Contains monitor information.
- MonitorModeInfo[MAX_MONITOR_MODES](#MONITORMODEINFO) Contains information about the monitor mode.
MONITORMODEINFO
Contains information on the types of monitor modes.
typedef struct _MONITORMODEINFO { USHORT usXResolution; /* Horizontal pixels. */ USHORT usYResolution; /* Vertical scan lines. */ BYTE bVertRefresh; /* Vertical refresh rate. */ BYTE bHorizRefresh; /* Horizontal refresh rate. */ BYTE bVPolarityPos; /* Vertical polarity. */ BYTE bHPolarityPos; /* Horizontal polarity. */ USHORT usScrnTop; /* Vertical blanking away from the top, in line counts. */ USHORT usScrnBottom; /* Vertical blanking away from the bottom, in line counts. */ USHORT usScrnLeft; /* Horizontal blanking away from the left, in pixel counts. */ USHORT usScrnRight; /* Horizontal blanking away from the right, in pixel counts. */ } MONITORMODEINFO; typedef MONITORMODEINFO * FAR * PMONITORMODEINFO ;
- Fields
- usXResolution(USHORT) Horizontal pixels.
- usYResolution(USHORT) Vertical scan lines.
- bVertRefresh(BYTE) Vertical refresh rate.
- bHorizRefresh(BYTE) Horizontal refresh rate.
- bVPolarityPos(BYTE) Vertical polarity.
- bHPolarityPos(BYTE) Horizontal polarity.
- usScrnTop(USHORT) Vertical blanking away from the top, in line counts.
- usScrnBottom(USHORT) Vertical blanking away from the bottom, in line counts.
- usScrnLeft(USHORT) Horizontal blanking away from the left, in pixel counts .
- usScrnRight(USHORT) Horizontal blanking away from the right, in pixel counts.
PALETTEDATA
The PALETTEDATA data structure contains information on the palette registers.
typedef struct _PALETTEDATA { ULONG ulPalCount; /* Specifies the number of bPaletteData entries that follow. */ ULONG ulPalStart; /* Start index for data. */ BYTE bPaletteData; /* One byte is allocated; start of palette. */ } PALETTEDATA; typedef PALETTEDATA * FAR * PPALETTEDATA ;
- Fields
- ulPalCount(ULONG) Specifies the number of bPaletteData entries that follow .
- ulPalStart(ULONG) Start index for data.
- bPaletteData(BYTE) One byte is allocated; start of palette.
POINTL
Point structure (long integers).
typedef struct _POINTL { LONG x; /* X-coordinate. */ LONG y; /* Y-coordinate. */ } POINTL; typedef POINTL * PPOINTL ;
- Fields
- x(LONG) X-coordinate.
- y(LONG) Y-coordinate.
RECTL
Rectangle structure.
typedef struct _RECTL { LONG xLeft; /* X-coordinate of left-hand edge of rectangle. */ LONG yBottom; /* Y-coordinate of bottom edge of rectangle. */ LONG xRight; /* X-coordinate of right-hand edge of rectangle. */ LONG yTop; /* Y-coordinate of top edge of rectangle. */ } RECTL; typedef RECTL * PRECTL ;
- Fields
- xLeft(LONG) X-coordinate of left-hand edge of rectangle.
- yBottom(LONG) Y-coordinate of bottom edge of rectangle.
- xRight(LONG) X-coordinate of right-hand edge of rectangle.
- yTop(LONG) Y-coordinate of top edge of rectangle.
RGB
RGB color value.
typedef struct _RGB { BYTE bBlue; /* Blue component of the color definition. */ BYTE bGreen; /* Green component of the color definition. */ BYTE bRed; /* Red component of the color definition. */ } RGB; typedef RGB * PRGB ;
- Fields
- bBlue(BYTE) Blue component of the color definition.
- bGreen(BYTE) Green component of the color definition.
- bRed(BYTE) Red component of the color definition.
RGB2
RGB color value.
typedef struct _RGB2 { BYTE bBlue; /* Blue component of the color definition. */ BYTE bGreen; /* Green component of the color definition. */ BYTE bRed; /* Red component of the color definition. */ BYTE fcOptions; /* Entry options. */ } RGB2; typedef RGB2 * PRGB2;
- Fields
- bBlue(BYTE) Blue component of the color definition.
- bGreen(BYTE) Green component of the color definition.
- bRed(BYTE) Red component of the color definition.
- fcOptions(BYTE) Entry options.
These can be ORed together if required:
PC_RESERVED The color entry is reserved for animating color with the palette manager.
PC_EXPLICIT The low-order word of the color table entry designates a physical palette slot. This allows an application to show the actual contents of the device palette as realized for other logical palettes. This does not prevent the color in the slot from being changed for any reason.
SVGARGB
The SVGARGB data structure contains the values of RGB.
typedef struct _SVGARGB { BYTE bR; /* Value of Red. */ BYTE bG; /* Value of Green. */ BYTE bB; /* Value of Blue. */ BYTE bUnused; /* Reserved. */ } SVGARGB; typedef SVGARGB * FAR * PSVGARGB ;
- Fields
- bR(BYTE) Value of Red.
- bG(BYTE) Value of Green.
- bB(BYTE) Value of Blue.
- bUnused(BYTE) Reserved.
TEXTBLTINFO
Information structure used for #GHI_CMD_TEXT and #VMI_CMD_TEXT functions. The TEXTBLTINFO structure includes a pointer to #DEVFONTINFO.
typedef struct _TEXTBLTINFO { ULONG ulLength; /* Length of the TEXTBLTINFO structure, in bytes. */ ULONG flOptions; /* Not used. */ ULONG lGlyphCnt; /* Count of glyph indices provided on this call. */ PLONG pGlyphIndicies; /* Pointer to glyph indices. */ ULONG ulFGMix; /* Foreground mix mode. */ ULONG ulBGMix; /* Background mix mode. */ ULONG ulFGColor; /* Foreground colors. */ ULONG ulBGColor; /* Background colors. */ PBMAPINFO pDstBmapInfo; /* Pointer to destination physical surface descriptions. */ PDEVFONTINFO pDevFntInfo; /* Pointer to DEVFONTINFO for additional font information. */ ULONG ulClpCnt; /* Number of clip regions that intersect glyph data. */ PBLTRECT abrClipRects; /* Array of ulClpCnt clip rectangles. */ PPOINTL aptlSrcOrg; /* Array of glyph origin points. */ PBLTRECT abrDst; /* Array of destination rectangles. */ } TEXTBLTINFO; typedef TEXTBLTINFO * PTEXTBLTINFO ;
- Fields
- ulLength(ULONG) Length of the TEXTBLTINFO structure, in bytes.
- flOptions(ULONG) Not used.
- lGlyphCnt(ULONG) Count of glyph indices provided on this call.
- If the specified device does not support clipping, then this field may not match actual characters in the original string. Each glyph will be repeated for each clipping rectangle of that character.
- pGlyphIndicies(PLONG) Pointer to glyph indices.
- This string can also be modified based on lGlyphCnt conditions. Refer to #GLYPHINFO for example structures to access glyph information. The lowest byte is used to access the low byte table and the 2nd to lowest byte is used to access the high byte table.
- ulFGMix(ULONG) Foreground mix mode.
- ulBGMix(ULONG) Background mix mode.
- ulFGColor(ULONG) Foreground colors.
- ulBGColor(ULONG) Background colors.
- pDstBmapInfo(#PBMAPINFO) Pointer to destination physical surface descriptions.
- pDevFntInfo(#PDEVFONTINFO) Pointer to P#DEVFONTINFO for additional font information.
- ulClpCnt(ULONG) Number of clip regions that intersect glyph data.
- abrClipRects(#PBLTRECT) Array of ulClpCnt clip rectangles.
- aptlSrcOrg(#PPOINTL) Array of glyph origin points.
- abrDst(#PBLTRECT) Array of destination rectangles.
USERCAPSIN
Information structure used for #GHI_CMD_USERCAPS and #VMI_CMD_USERCAPS functions.
typedef struct _USERCAPSIN { ULONG ulLength; /* Length of the USERCAPSIN structure in bytes. */ ULONG ulFunction; /* Specifies the QUERYCAPS, QUERYCAPSLIST, or SETCAPS subfunctions. */ ULONG ulSize; /* Length, in bytes, of buffer area. */ } USERCAPSIN; typedef USERCAPSIN *PUSERCAPSIN;
- Fields
- ulLength(ULONG) Length of the USERCAPSIN structure in bytes.
- ulFunction(ULONG) Specifies the QUERYCAPS, QUERYCAPSLIST, or SETCAPS subfunctions.
The subfunctions, specified by the ulFunction field of the USERCAPSIN structure, may be defined as follows:
- QUERYCAPS
#define QUERYCAPS 1L
QUERYCAPS returns the number of capabilities and capability descriptions in the buffer area pointed to by pOut.
Because the values for each capability are not yet allocated, the pValueList, pCurrentValue, and pDefaultValue fields in the #DRIVERCAPS structures must not be filled in for this call.
The driver must ensure that the buffer area size, specified by ulSize, is sufficient for the supported number of capabilities. If not, the driver should return the number of capabilities supported in the first word of the buffer area and a return code of RC_ERROR. The driver will be reinvoked with a larger buffer area for QUERYCAPS. This allows a driver to export multiple capabilities (each, in turn, gets its own page in the System Object notebook).
- QUERYCAPSLIST
#define QUERYCAPSLIST 2L
QUERYCAPSLIST fills the pValueList, pCurrentValue, and pDefaultValue fields in the #DRIVERCAPS structure pointed to by pOut. The members must be 0 padded up to the length specified by ulValueMemberSize.
- SETCAP
#define SETCAP 3L
SETCAP sets a value that the user has selected. The value is specified in the pCurrentValue field of the #DRIVERCAPS structure pointed to by pOut.
- Field - ulSize
ulSize(ULONG) Length, in bytes, of buffer area.
VCRF
Data structure inside #INTCRF containing the register values to be passed in the bios call.
typedef struct _VCRF { ULONG reg_eax; ULONG reg_ebx; ULONG reg_ecx; ULONG reg_edx; ULONG reg_ebp; ULONG reg_esi; ULONG reg_edi; ULONG reg_ds; ULONG reg_es; ULONG reg_fs; ULONG reg_gs; ULONG reg_cs; ULONG reg_eip; ULONG reg_eflag; ULONG reg_ss; ULONG reg_esp; } VCRF;
- Field - reg_eax
reg_eax(ULONG)
- Field - reg_ebx
reg_ebx(ULONG)
- Field - reg_ecx
reg_ecx(ULONG)
- Field - reg_edx
reg_edx(ULONG)
- Field - reg_ebp
reg_ebp(ULONG)
- Field - reg_esi
reg_esi(ULONG)
- Field - reg_edi
reg_edi(ULONG)
- Field - reg_ds
reg_ds(ULONG)
- Field - reg_es ===
reg_es(ULONG)
- Field - reg_fs
reg_fs(ULONG)
- Field - reg_gs
reg_gs(ULONG)
- Field - reg_cs
reg_cs(ULONG)
- Field - reg_eip
reg_eip(ULONG)
- Field - reg_eflag
reg_eflag(ULONG)
- Field - reg_ss
reg_ss(ULONG)
- Field - reg_esp
reg_esp(ULONG)
VIDEO_ADAPTER
The VIDEO_ADAPTER data structure receives information for the desktop mode.
typedef struct _VIDEO_ADAPTER { HVIDEO hvideo; /* The handle for this adapter. */ ADAPTERINFO Adapter; /* Hardware information for this adapter. */ VIDEOMODEINFO ModeInfo; /* Information about the current video mode. */ } VIDEO_ADAPTER; typedef VIDEO_ADAPTER *FAR *PVIDEO_ADAPTER;
- Field - hvideo ===
hvideo(HVIDEO) The handle for this adapter.
- Field - Adapter ===
Adapter(#ADAPTERINFO) Hardware information for this adapter.
- Field - ModeInfo ===
ModeInfo(#VIDEOMODEINFO) Information about the current video mode.
VIDEOMODEINFO
The VIDEOMODEINFO data structure receives information for the current video monitor.
Note: The cband ulColorsfields are new to VIDEDOMODEINFO. The color depth field (ulColors) was introduced to differentiate between pixel and color depth.
typedef struct _VIDEOMODEINFO { ULONG cb; /* Size of the structure. */ MODEID miModeId; /* Used to make a SetMode request. */ USHORT usType; /* Flag indicating mode type. */ USHORT usInt10ModeSet; /* Interrupt 10 mode. */ USHORT usXResolution; /* Horizontal pixels. */ USHORT usYResolution; /* Vertical scanlines. */ ULONG ulBufferAddress; /* Physical address of VRAM. */ ULONG ulApertureSize; /* VRAM aperture. */ ULONG ulColors; /* Color depth. */ BYTE bBitsPerPixel; /* Pixel depth. */ BYTE bBitPlanes; /* Number of planes. */ BYTE bXCharSize; /* Font width. */ BYTE bYCharSize; /* Font height. */ USHORT usBytesPerScanLine; /* Number of bytes per scan line. */ USHORT usTextRows; /* Number of text rows. */ ULONG ulPageLength; /* Number of bytes to save a plane. */ ULONG ulSavesize; /* Total bytes of VRAM to save. */ BYTE bVrtRefresh; /* Vertical refresh rate. */ BYTE bHrtRefresh; /* Horizontal refresh rate. */ BYTE bVrtPolPos; /* Vertical polarity. */ BYTE bHrtPolPos; /* Horizontal polarity. */ USHORT usScrnTop; /* Vertical blanking away from the top, in line counts. */ USHORT usScrnBottom; /* Vertical blanking away from the bottom, in line counts. */ USHORT usScrnLeft; /* Horizontal blanking away from the left, in pixel counts. */ USHORT usScrnRight; /* Horizontal blanking away from the right, in pixel counts. */ CHAR szColorFormat[8]; /* Color format string for true color or high-color modes. */ CHAR szColorWeight[8]; /* Color weight string for true color or high-color modes. */ } VIDEOMODEINFO; typedef VIDEOMODEINFO *FAR *PVIDEOMODEINFO;
- Field - cb
cb(ULONG) Size of the structure.
- Field - miModeId
miModeId(MODEID) Used to make a SetMode request.
- Field - usType
usType(USHORT) Flag indicating mode type.
The following values are valid for this flag:
MODE_FLAG_NOT_MONO 0x0001; Mono-compatible
MODE_FLAG_GRAPHICS 0x0002; Text mode, Graphics
MODE_FLAG_NO_CLR_BRST 0x0004; Disable Color burst
MODE_FLAG_NATIVE 0x0008; Native (advanced function) mode
IGNORE_CLR_BRST 0x0010; Disable color burst; doesn't make sense for this mode
NOT_PLASMA 0x0020; will not work on plasma display
MODE_FLAG_VGA_ENTRY 0x0040; VGA mode, needs clean up
- Field - usInt10ModeSet
usInt10ModeSet(USHORT) Interrupt 10 mode.
- Field - usXResolution
usXResolution(USHORT) Horizontal pixels.
- Field - usYResolution
usYResolution(USHORT) Vertical scanlines.
- Field - ulBufferAddress
ulBufferAddress(ULONG) Physical address of VRAM.
- Field - ulApertureSize
ulApertureSize(ULONG) VRAM aperture.
- Field - ulColors
ulColors(ULONG) Color depth.
- Field - bBitsPerPixel
bBitsPerPixel(BYTE) Pixel depth.
- Field - bBitPlanes
bBitPlanes(BYTE) Number of planes.
- Field - bXCharSize
bXCharSize(BYTE) Font width.
- Field - bYCharSize
bYCharSize(BYTE) Font height.
- Field - usBytesPerScanLine
usBytesPerScanLine(USHORT) Number of bytes per scan line.
- Field - usTextRows
usTextRows(USHORT) Number of text rows.
- Field - ulPageLength
ulPageLength(ULONG) Number of bytes to save a plane.
- Field - ulSavesize
ulSavesize(ULONG) Total bytes of VRAM to save.
- Field - bVrtRefresh
bVrtRefresh(BYTE) Vertical refresh rate.
- Field - bHrtRefresh
bHrtRefresh(BYTE) Horizontal refresh rate.
- Field - bVrtPolPos
bVrtPolPos(BYTE) Vertical polarity.
- Field - bHrtPolPos
bHrtPolPos(BYTE) Horizontal polarity.
- Field - usScrnTop
usScrnTop(USHORT) Vertical blanking away from the top, in line counts.
- Field - usScrnBottom
usScrnBottom(USHORT) Vertical blanking away from the bottom, in line counts.
- Field - usScrnLeft
usScrnLeft(USHORT) Horizontal blanking away from the left, in pixel counts.
- Field - usScrnRight
usScrnRight(USHORT) Horizontal blanking away from the right, in pixel counts.
- Field - szColorFormat[8]
szColorFormat[8](CHAR) Color format string for true color or high-color modes.
- Field - szColorWeight[8]
szColorWeight[8](CHAR) Color weight string for true color or high-color modes.
VIDEORESOURCEPACK
The VIDEORESOURCEPACK data structure contains resource information and definitions.
typedef struct _VIDEORESOURCEPACK { ULONG ConsRes; /* An array of resource definitions. */ ULONG ulNumCons; /* Number of resources. */ } VIDEORESOURCEPACK; typedef VIDEORESOURCEPACK * FAR * PVIDEORESOURCEPACK ;
- Field - ConsRes
ConsRes(ULONG) An array of resource definitions.
- Field - ulNumCons
ulNumCons(ULONG) Number of resources.
VIDEOSTATE
The VIDEOSTATE data structure receives information for the mode to be saved .
typedef struct _VIDEOSTATE { ULONG fStateFlags; /* Flag indicating what to save. */ MODEID miState; /* Contains the mode ID for the mode to be saved. */ PVOID pModeData; /* Pointer to set mode command sequence. */ ULONG ulVRAMSaveSize; /* Number of bytes per page to save. */ PVRAMDATA pVRAM; /* Pointer to video memory. */ PCLUTDATA pCLUT; /* Pointer to palette data. */ PFONTDATA pFONT; /* Pointer to font data. */ } VIDEOSTATE; typedef VIDEOSTATE * FAR * PVIDEOSTATE ;
- Field - fStateFlags
fStateFlags(ULONG) Flag indicating what to save.
STATEFLAG_REGISTERS 0x0001
STATEFLAG_CLUT 0x0002
STATEFLAG_VRAM 0x0004
STATEFLAG_FONT 0x0008
- Field - miState
miState(MODEID) Contains the mode ID for the mode to be saved.
- Field - pModeData
pModeData(PVOID) Pointer to set mode command sequence.
- Field - ulVRAMSaveSize
ulVRAMSaveSize(ULONG) Number of bytes per page to save.
- Field - pVRAM
pVRAM(PVRAMDATA) Pointer to video memory.
- Field - pCLUT
pCLUT(PCLUTDATA) Pointer to palette data.
- Field - pFONT
pFONT(PFONTDATA) Pointer to font data.
VMIQCI
Output packet returned by the GRADD to the caller of the VMI_CMD_ QUERYCHAININFO function.
typedef struct _VMIQCI { ULONG ulLength; /* Size of the VMIQCI data structure, in bytes. */ PCHAININFO pciHead; /* Pointer to the head of the GRADD chain. */ } VMIQCI; typedef VMIQCI *PVMIQCI;
- Field - ulLength
ulLength(ULONG) Size of the VMIQCI data structure, in bytes.
- Field - pciHead
pciHead(#PCHAININFO) Pointer to the head of the GRADD chain.
VRAMALLOCIN
Input packet to the GHI_CMD_VRAM function.
typedef struct _VRAMALLOCIN { ULONG ulLength; /* Size of the VRAMALLOCIN data structure, in bytes. */ ULONG ulFlags; /* Flag indicating type of VRAM allocation. */ ULONG ulID; /* ID required as input only on deallocation. */ ULONG ulFunction; /* Requested function: allocate, deallocate, or query. */ ULONG ulHandle; /* Handle returned from registering. */ ULONG ulSize; /* Requested allocation size in bytes. */ ULONG ulWidth; /* Requested allocation width in pixels. */ ULONG ulHeight; /* Requested allocation height in scanlines. */ } VRAMALLOCIN; typedef VRAMALLOCIN *PVRAMALLOCIN;
- Field - ulLength
ulLength(ULONG) Size of the VRAMALLOCIN data structure, in bytes.
- Field - ulFlags
ulFlags(ULONG) Flag indicating type of VRAM allocation.
Values are as follows:
VRAM_ALLOC_SHARED 0x0001
VRAM_ALLOC_RECTANGLE 0x0002
VRAM_ALLOC_STATIC 0x1000
- Field - ulID
ulID(ULONG) ID required as input only on deallocation.
- Field - ulFunction
ulFunction(ULONG) Requested function: allocate, deallocate, or query.
Values are as follows:
VRAM_ALLOCATE 1
VRAM_DEALLOCATE 2
VRAM_QUERY 3
- Field - ulHandle
ulHandle(ULONG) Handle returned from registering.
- Field - ulSize
ulSize(ULONG) Requested allocation size in bytes.
- Field - ulWidth
ulWidth(ULONG) Requested allocation width in pixels.
- Field - ulHeight
ulHeight(ULONG) Requested allocation height in scanlines.
VRAMALLOCOUT
Output packet returned by the GRADD to the caller of the GHI_CMD_VRAM function.
typedef struct _VRAMALLOCOUT { ULONG ulLength; /* Size of the VRAMALLOCOUT data structure, in bytes. */ ULONG ulFlags; /* Flag indicating type of VRAM allocation. */ ULONG ulID; /* ID returned on allocation. */ POINTL ptlStart; /* X and Y location of VRAM. */ ULONG ulSize; /* Requested size of VRAM, in bytes. */ ULONG ulScanLineBytes; /* Length of scan line, in bytes. */ } VRAMALLOCOUT; typedef VRAMALLOCOUT *PVRAMALLOCOUT;
- Field - ulLength
ulLength(ULONG) Size of the VRAMALLOCOUT data structure, in bytes.
- Field - ulFlags
ulFlags(ULONG) Flag indicating type of VRAM allocation.
Value is as follows:
- VRAM_ALLOC_WORKBUFFER 0x0004
- Field - ulID
ulID(ULONG) ID returned on allocation.
- Field - ptlStart
ptlStart(#POINTL) X and Y location of VRAM.
- Field - ulSize
ulSize(ULONG) Requested size of VRAM, in bytes.
- Field - ulScanLineBytes
ulScanLineBytes(ULONG) Length of scan line, in bytes.
VRAMDATA
The VRAMDATA data structure is a pointer to video memory.
typedef BYTE VRAMDATA;
VRAMIN
Input packet to the #GHI_CMD_VRAM function.
typedef struct _VRAMIN { ULONG ulLength; /* Size of the VRAMIN data structure, in bytes. */ ULONG ulFunction; /* Flag indicating type of VRAM allocation. */ PVOID pIn; /* Pointer to an allocate or register packet. */ } VRAMIN; typedef VRAMIN *PVRAMIN;
- Field - ulLength
ulLength(ULONG) Size of the VRAMIN data structure, in bytes.
- VRAMIN Field - ulFunction
ulFunction(ULONG) Flag indicating type of VRAM allocation.
Values are as follows:
VRAM_ALLOCATE 1
VRAM_DEALLOCATE 2
VRAM_QUERY 3
VRAM_REGISTER 4
VRAM_DEREGISTER 5
- Field - pIn
pIn(PVOID) Pointer to an allocate or register packet.
If the ulFunction field of the VRAMIN structure is set to VRAM_ALLOCATE, VRAM_DEALLOCATE, or VRAM_QUERY, then pIn points to a #VRAMALLOCIN data structure.
If the ulFunction field of the VRAMIN structure is set to VRAM_REGISTER or VRAM_DEGISTER, then pIn points to a #VRAMREGISTERIN data structure.
VRAMREGISTERIN
Input packet to the GHI_CMD_VRAM function via the VRAMIN data structure.
typedef struct _VRAMREGISTERIN { ULONG ulLength; /* Size of the VRAMREGISTERIN data structure, in bytes. */ ULONG ulHandle; /* Handle required as input on deregister. */ ULONG ulFlags; /* Flag indicating type of VRAM registration. */ } VRAMREGISTERIN; typedef VRAMREGISTERIN *PVRAMREGISTERIN;
- Fields
- ulLength(ULONG) Size of the VRAMREGISTERIN data structure, in bytes.
- ulHandle(ULONG) Handle required as input on deregister.
- ulFlags(ULONG) Flag indicating type of VRAM registration.
- Values are as follows:
- VRAM_REGISTER_HANDLE 0x0001
- VRAM_REGISTER_VRAMONLY 0x1000
- Values are as follows:
VRAMREGISTEROUT
Output packet returned by the GRADD to the caller of the GHI_CMD_VRAM function via the VRAMIN data structure.
typedef struct _VRAMREGISTEROUT { ULONG ulLength; /* Size of the VRAMREGISTEROUT data structure, in bytes. */ ULONG ulFlags; /* Not used at this time. */ ULONG ulHandle; /* Handle returned on register. */ } VRAMREGISTEROUT; typedef VRAMREGISTEROUT *PVRAMRGISTEROUT;
- Fields
- ulLength(ULONG) Size of the VRAMREGISTEROUT data structure, in bytes.
- ulFlags(ULONG) Not used at this time.
- ulHandle(ULONG) Handle returned on register.
Notices
OS/2 Developer Connection Device Driver Kit, Version 4 Edition (June 1996)
The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent with local law:INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time.
It is possible that this publication may contain reference to, or information about, IBM products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that IBM intends to announce such IBM products, programming, or services in your country.
Requests for technical information about IBM products should be made to your IBM reseller or IBM marketing representative.
Copyright Notices
COPYRIGHT LICENSE: This publication contains printed sample application programs in source language, which illustrate OS/2 programming techniques. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the OS/2 application programming interface.
Each copy of any portion of these sample programs or any derivative work, which is distributed to others, must include a copyright notice as follows: "(C) (your company name) (year). All rights reserved."
(C) Copyright International Business Machines Corporation 1996. All rights reserved.
Note to U.S. Government Users - Documentation related to restricted rights - Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.
Disclaimers
References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Subject to IBM's valid intellectual property or other legally protectable rights, any functionally equivalent product, program, or service may be used instead of the IBM product, program, or service. The evaluation and verification of operation in conjunction with other products , except those expressly designated by IBM, are the responsibility of the user.
IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
500 Columbus Avenue
Thornwood, NY 10594
U.S.A.
Asia-Pacific users can inquire, in writing, to the IBM Director of Intellectual Property and Licensing, IBM World Trade Asia Corporation, 2-31 Roppongi 3-chome, Minato-ku, Tokyo 106, Japan.
Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact IBM Corporation, Department LZKS, 11400 Burnet Road, Austin, TX 78758 U.S.A. Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.
Trademarks
The following terms are trademarks of the IBM Corporation in the United States or other countries or both:
IBM Multimedia Presentation Manager/2 OS/2 OS/2 Warp Personal System/2 PowerPC Presentation Manager PS/2 WIN-OS/2 Workplace Shell XGA
The following terms are trademarks of other companies:
Trademark Owner
ATI ATI Technologies, Inc.
Cirrus Logic Cirrus Logic, Inc.
MASM Microsoft Corporation
PCMCIA Personal Computer Memory Card International Association
S3 S3 Incorporated
SVPMI Super VGA Protect Mode Interface
VDM Geographics Systems, Ltd.
VESA Video Electronics Standards Association
Viper VLB Diamond Computer Systems, Inc.
Weitek Weitek Corporation
Windows is a trademark of Microsoft Corporation
Other company, product, and service names, which may be denoted by a double asterisk (**), may be trademarks or service marks of others.