Windows Driver Kit: Display Devices
DEVINFO

The DEVINFO structure provides information about the driver and its private PDEV to the graphics engine.

typedef struct tagDEVINFO {
  FLONG   flGraphicsCaps;
  LOGFONTW  lfDefaultFont;
  LOGFONTW  lfAnsiVarFont;
  LOGFONTW  lfAnsiFixFont;
  ULONG  cFonts;
  ULONG  iDitherFormat;
  USHORT  cxDither;
  USHORT  cyDither;
  HPALETTE  hpalDefault;
  FLONG  flGraphicsCaps2;
} DEVINFO, *PDEVINFO;

Members

flGraphicsCaps
Is a set of flags that describe graphics capabilities of the graphics driver and/or its hardware. These flags are defined in the following table.
FlagDefinition
GCAPS_ALTERNATEFILLHandles alternating fills.
GCAPS_ARBRUSHOPAQUESupports an arbitrary brush for text opaque rectangle (background color).
GCAPS_ARBRUSHTEXTSupports an arbitrary brush for the text foreground color.
GCAPS_ASYNCCHANGEThis flag is obsolete. In legacy drivers, this flag indicates that the driver can change the pointer shape in hardware while other drawing is occurring on the device.
GCAPS_ASYNCMOVEThe driver can move the pointer in hardware while other drawing is occurring on the device.
GCAPS_BEZIERSHandles Bezier curves.
GCAPS_CMYKCOLORThe driver supports the CYMK color space.
GCAPS_COLOR_DITHERHandles color dithering to a PDEV-compatible surface.
GCAPS_DIRECTDRAWThis flag is obsolete.
GCAPS_DITHERONREALIZESpecifies that GDI can call DrvRealizeBrush with the RGB to be dithered directly.
GCAPS_DONTJOURNALDisallows metafile printing to this printer driver. This is valid only for printer DCs and will generally result in slower return-to-application time when printing.
GCAPS_FONT_RASTERIZERDevice hardware can rasterize TrueType fonts.
GCAPS_FORCEDITHERAllows dithering on all geometric pens.
GCAPS_GEOMETRICWIDEHandles geometric widening.
GCAPS_GRAY16Handles antialiased text natively.
GCAPS_HALFTONEHandles halftoning.
GCAPS_HIGHRESTEXTThis flag is obsolete. In legacy drivers, this flag indicates that the driver is requesting glyph positions as returned by the STROBJ in FIX point coordinates.
GCAPS_HORIZSTRIKEThis flag is obsolete. In legacy drivers, this flag indicates that the driver handles horizontal strikeouts in DrvTextOut.
GCAPS_ICMIndicates that color management operations can be performed by the driver or printer hardware.
GCAPS_LAYEREDIndicates that this is a layer or mirror driver for remoting. Printer drivers cannot be layer drivers.
GCAPS_MONO_DITHERHandles monochrome dithering.
GCAPS_NO64BITMEMACCESSThis flag is obsolete.
GCAPS_NUPIndicates that "N-up" printing is supported.
GCAPS_OPAQUERECTHandles opaque rectangles in DrvTextOut.
GCAPS_PALMANAGEDSupports palette management.
GCAPS_PANNINGWhen GDI is simulating the pointer, it should call DrvMovePointer to notify the driver of the current cursor position. This allows the driver to handle panning virtual displays.
GCAPS_SCREENPRECISIONThe rasterizer (font engine) should choose a screen (soft) font over a device font when choosing a font for which there is no exact match.
GCAPS_VECTORFONTHandles stroking of vector fonts in DrvTextOut.
GCAPS_VERTSTRIKEThis flag is obsolete. In legacy drivers, this flag indicated that the driver handled vertical strikeouts in DrvTextOut.
GCAPS_WINDINGFILLHandles winding mode fills. See Path Fill Modes for more information.

lfDefaultFont
Is an Extended Logical Font structure that specifies the default font for a device. For more information about this structure, see EXTLOGFONT in the Microsoft Window SDK documentation.
lfAnsiVarFont
Is an Extended Logical Font structure that specifies the default variable-pitch font for a device. For more information about this structure, see EXTLOGFONT in the Window SDK documentation.
lfAnsiFixFont
Is an Extended Logical Font structure that specifies the default fixed-pitch (monospaced) font for a device. For more information about this structure, see EXTLOGFONT in the Window SDK documentation.
cFonts
Specifies the number of device fonts. GDI assumes that the device can draw text with this number of fonts on its own surfaces and that the driver can provide metrics information about the fonts. If the driver sets cFonts to -1, GDI will wait until fonts are needed to query the driver for the actual number of fonts it supports in a call to DrvQueryFont.
iDitherFormat
Specifies the format of the bitmap. This parameter indicates how many bits of color information per pixel are requested, and must be one of the following values:
ValueMeaning
BMF_1BPPMonochrome
BMF_4BPP4 bits per pixel
BMF_8BPP8 bits per pixel
BMF_16BPP16 bits per pixel
BMF_24BPP24 bits per pixel
BMF_32BPP32 bits per pixel
BMF_4RLE4 bits per pixel, run length encoded
BMF_8RLE8 bits per pixel, run length encoded
BMF_JPEGJPEG compressed image
BMF_PNGPNG compressed image

cxDither and cyDither
Specify the dimensions of a dithered brush. If these members are nonzero, then the device can create a dithered brush for a given RGB color.
hpalDefault
Handle to the default palette for the device. The driver should create the palette by calling EngCreatePalette. The driver associates a palette with a device by returning this handle to GDI.
flGraphicsCaps2
Is a set of flags that describe additional graphics capabilities of the device driver. These flags are defined in the following table.
FlagDefinition
GCAPS2_ALPHACURSORHandles pointers with per-pixel alpha values.
GCAPS2_CHANGEGAMMARAMPThe display device has a loadable hardware gamma ramp.
GCAPS2_EXCLUDELAYEREDIndicates that this is an accessibility mirror driver. Mirror drivers that do not set this flag will still receive drawing primitives for layered HWNDs. See Mirror Drivers for more information.
GCAPS2_ICD_MULTIMONInforms GDI that the driver intends to handle DrvSetPixelFormat, DrvDescribePixelFormat, and DrvSwapBuffers calls in a multimon environment, even when the rectangle in the operation also intersects another device. Only one device is ever given the opportunity to handle those calls. If the capability is not specified and the region involved intersects more than one device, no driver is called.
GCAPS2_INCLUDEAPIBITMAPSWhen drawing calls are made to a device-independent bitmap (DIB), an accessibility mirror driver will be called. See Mirror Drivers for more information.
GCAPS2_JPEGSRCDevice can accept JPEG compressed images (that is, images for which BMF_JPEG is set in the SURFOBJ structure).
GCAPS2_MOUSETRAILSIndicates that the driver supports mouse trails (a succession of cursor images showing the mouse's location during a short period of time). The driver is capable of handling the values GDI sends in the fl parameter of the DrvSetPointerShape function. The driver should use the SPS_LENGTHMASK and SPS_FREQMASK masks to obtain values for the length and frequency of the mouse trails. See DrvSetPointerShape for more information about these masks.
GCAPS2_PNGSRCDevice can accept PNG compressed images (that is, images for which BMF_PNG is set in the SURFOBJ structure).
GCAPS2_SYNCFLUSHThe driver supports a programmatic-based flush mechanism for batched graphics DDI calls. DrvSynchronizeSurface will be called whenever GDI must flush any drawing that is being batched by the driver.
GCAPS2_SYNCTIMERThe driver supports a timer-based flush mechanism for batched graphics DDI calls. DrvSynchronizeSurface will be called periodically, based on a timer interval determined by GDI.

Comments

The driver's DrvEnablePDEV function fills in a DEVINFO structure; the driver should set only the members that are relevant to it. This structure is zero-initialized by GDI before DrvEnablePDEV is called. Applications do not have direct access to this structure.

If a driver sets GCAPS2_JPEGSRC or GCAPS2_PNGSRC in flGraphicsCaps2, the following rules apply:

  • The driver must provide a DrvQueryDeviceSupport function.
  • Every driver-defined graphics DDI function that receives a SURFOBJ structure as input must be able to either support the compressed format or return an error code.
  • The driver must be able to handle complex clip regions for images that use the compressed format.
  • For driver-defined graphics DDI functions that receive a ROP4 input argument, only 0xCCCC is used with JPEG and PNG formats.

Requirements

Headers: Declared in winddi.h. Include winddi.h.

See Also

DrvEnablePDEV, DrvQueryFont, DrvRealizeBrush, DrvTextOut


Send feedback on this topic
Built on November 19, 2009
Page view tracker