DDDR/2 - Data Types

Data Types
A description of each data type follows.

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; 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:

bEndian (BYTE) Big Endian or little Endian.

usDeviceBusID (USHORT) Reserved.

usVendorBusID (USHORT) Reserved.

usSlotID(USHORT) Reserved.

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; miBank (MODEID) ID of the current mode.

ulBank (ULONG) Current bank number.

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; ulRGBCount (ULONG) Number of aRGB entries that follow.

ulRGBStart (ULONG) Start index for RGBtriplets.

aRGB[1] (SVGARGB) Start of SVGARGB; one entry is allocated.

DRIVERCAPS
Information structure used for GreEscape DEVESC_QUERYDRIVERCAPSLIST 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; 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: Note: When ulCapsType is CAPSTYPE_BOOLEAN, the driver does not have to fill in pValueList.
 * 1) define CAPSTYPE_BOOLEAN         1L
 * 2) define CAPSTYPE_AGGREGATE_INT   2L
 * 3) define CAPSTYPE_AGGREGATE_STRING 3L

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.

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; ulCharCount (ULONG) Number of characters in the font.

ulFontHeight (ULONG) Number of scan lines per character.

ulFontWidth (ULONG) Number of columns per character.

bFontData[1] (BYTE) ulCharCount*ulFontHeight entries.

INITVDM
Data structure to initialize the full VDM session. typedef struct _INITVDM { ULONG    ulFlags;  /*  VDM initialization type. */ } INITVDM; typedef INITVDM *PINITVDM;

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; ulBIOSIntNo (ULONG) 0x10 for INT10 calls.

aCRF (VCRF) Client register frame.

pB[2] (BUFFER) Description of input/output buffers.

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; szMonitor[MAX_MONITOR_LEN] (CHAR) Contains monitor information.

MonitorModeInfo[MAX_MONITOR_MODES] (MONITORMODEINFO) Contains information about the monitor mode.

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; 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.

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;

bBlue (BYTE) Blue component of the color definition.

bGreen (BYTE) Green component of the color definition.

bRed (BYTE) Red component of the color definition.

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; bR (BYTE) Value of Red.

bG (BYTE) Value of Green.

bB (BYTE) Value of Blue.

bUnused (BYTE) Reserved.

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; hvideo (HVIDEO) The handle for this adapter.

Adapter (ADAPTERINFO) Hardware information for this adapter.

ModeInfo (VIDEOMODEINFO) Information about the current video mode.

VIDEOMODEINFO
The VIDEOMODEINFO data structure receives information for the current video monitor.

Note: The cb and ulColors fields 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; cb (ULONG) Size of the structure.

miModeId (MODEID) Used to make a SetMode request.

usType (USHORT) Flag indicating mode type.

The following values are valid for this flag:

usInt10ModeSet (USHORT) Interrupt 10 mode.

usXResolution (USHORT) Horizontal pixels.

usYResolution (USHORT) Vertical scanlines.

ulBufferAddress (ULONG) Physical address of VRAM.

ulApertureSize (ULONG) VRAM aperture.

ulColors (ULONG) Color depth.

bBitsPerPixel (BYTE) Pixel depth.

bBitPlanes (BYTE) Number of planes.

bXCharSize (BYTE) Font width.

bYCharSize (BYTE) Font height.

usBytesPerScanLine (USHORT) Number of bytes per scan line.

usTextRows (USHORT) Number of text rows.

ulPageLength (ULONG) Number of bytes to save a plane.

ulSavesize (ULONG) Total bytes of VRAM to save.

bVrtRefresh (BYTE) Vertical refresh rate.

bHrtRefresh (BYTE) Horizontal refresh rate.

bVrtPolPos (BYTE) Vertical polarity.

bHrtPolPos (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.

szColorFormat[8] (CHAR) Color format string for true color or high-color modes.

szColorWeight[8] (CHAR) Color weight string for true color or high-color modes.

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; fStateFlags (ULONG) Flag indicating what to save.

miState (MODEID) Contains the mode ID for the mode to be saved.

pModeData (PVOID) Pointer to set mode command sequence.

ulVRAMSaveSize (ULONG) Number of bytes per page to save.

pVRAM (PVRAMDATA) Pointer to video memory.

pCLUT (PCLUTDATA) Pointer to palette data.

pFONT (PFONTDATA) Pointer to font data.

GRE Function Tests (By Function Name)
Additional information can be found in Display Test Tool. See also GRE Function Tests (By Test-Case Name).

GRE Function Tests (By Test-Case Name)
Additional information can be found in Display Test Tool. See also GRE Function Tests (By Function Name).

Graphics Engine Functions
The following tables list and briefly describe the graphics engine functions: The first table shows the graphics engine attribute functions.

DTT Script File Command Summary

 * CHOOSE:Select the next test case to be executed. The operand is the case- sensitive name of the test case to be selected.
 * DCTYPE:Specify the device context for subsequent test cases.
 * The operand is one of the following:
 * OD_QUEUED Output is to be queued. (This is the default.)
 * OD_DIRECT Output is not to be queued.
 * OD_INFO The device context is to be used only to retrieve information.
 * OD_METAFILE The device context will be used to write a metafile.
 * OD_METAFILE_NOQUERY The same as OD_METAFILE, except the querying of attributes is not permitted.
 * OD_MEMORY A device context that is used to contain a bit map.


 * DELAY:Delay script execution for five seconds.
 * DISPLAY:Execute the currently selected test case.
 * EXIT:Terminate DTT immediately.
 * PSTYPE:Specify the presentation-space type to be used for subsequent test cases.
 * The operand is one of the following:
 * GPIT_MICRO Micro-presentation space.
 * GPIT_NORMAL Normal presentation space. (This is the default.)


 * PSUNITS:Specify the presentation-space units to be used for subsequent test cases.
 * The operand is one of the following:
 * PU_ARBITRARY Application-convenient units.
 * PU_PELS Pel coordinates. (This is the default.)
 * PU_LOMETRIC Units of 0.1 mm.
 * PU_HIMETRIC Units of 0.01 mm.
 * PU_LOENGLISH Units of 0.01 inch.
 * PU_HIENGLISH Units of 0.001 inch.
 * PU_TWIPS Units of 1/1440 inch.

DTT Command-Line Options Summary

 * -F Specify the path and file name for the DTT log file.
 * -I Specify the path and file name for a DTT script file.
 * -L Specify the logging level for the DTT session.
 * -K Specify the path and file name for a DTT test-case index file to be created.
 * -N Specify the path and file name for a DTT test-case index file to be loaded.
 * -S Search LIBPATH for test-case DLLs.
 * -T Specify a search pattern to locate test case DLLs to be preloaded.
 * -? Display the DTT command-line options.

Sample DTT Script File

 * Sample DTT script file

DCTYPE OD_QUEUED
 * Select a device context.

PSTYPE GPIT_NORMAL
 * Set the presentation space type.

PSUNITS PU_PELS
 * Set the presentation space units.


 * Select test cases and execute them; pause five
 * seconds between each test.

Choose GreBitPre1 Display Delay

Choose GreDisjointLinesExh Display Delay

Choose GrePolyLineExh Display Delay

Choose GreMarkerExh Display Delay

Choose GreTextApp1 Display Delay

Choose GreBitApp1 Display Delay

Choose GreCharRectExh Display Delay

Choose GreIntersectClipRectangleExh Display Delay

Choose GreSetAndGetAttributesExh1 Display Delay

EXIT
 * Terminate DTT.

Glyph Codes
DBCS PM has reserved glyphs 768 - 1023 for DBCS glyphs. The following list shows the relationship between glyph pattern and glyph code ID in code page 932, except kanji patterns. The following is a Glyph Code Table. The following is a Glyph Code Table, reserved by DBCS.
 * 1) define UGL_DBCSFIRST           0x0300      /* 256 reserved */
 * 2) define UGL_DBCSLAST            0x03FF