Compartir a través de


DirectDraw Callback Support Using DrvEnableDirectDraw

The display driver can implement the DrvEnableDirectDraw function to indicate various DirectDraw callback support. To indicate support, the driver returns pointers to the DD_CALLBACKS, DD_SURFACECALLBACKS, and DD_PALETTECALLBACKS structures in the pCallBacks, pSurfaceCallBacks, and pPaletteCallBacks parameters.

The driver populates members of the DD_CALLBACKS structure to indicate that it supports the following callback functions.

Callback Function Description

DdCanCreateSurface

Returns a value that indicates whether the driver can create a surface of the specified surface description.

DdCreatePalette

Creates a DirectDrawPalette object for the specified DirectDraw object.

DdCreateSurface

Creates a DirectDraw surface.

DdGetScanLine

Returns the number of the current physical scan line.

DdMapMemory

Maps application-modifiable portions of the frame buffer into the user-mode address space of the specified process, or it unmaps memory.

DdWaitForVerticalBlank

Returns the vertical blank status of the device.

The driver populates members of the DD_SURFACECALLBACKS structure to indicate that it supports the following callback functions.

Callback Function Description

DdAddAttachedSurface

Attaches a surface to another surface.

DdBlt

Performs a bit-block transfer (blt) of display data from a source surface to a destination surface.

DdDestroySurface

Destroys a DirectDraw surface.

DdFlip

Causes the surface memory associated with the target surface to become the primary surface, and the current surface to become the nonprimary surface.

DdGetBltStatus

Queries the blt status of the specified surface.

DdGetFlipStatus

Determines whether the most recently requested flip on a surface has occurred.

DdLock

Locks a specified area of surface memory and provides a valid pointer to a block of memory associated with a surface.

DdSetColorKey

Sets the color key value for the specified surface.

DdSetOverlayPosition

Sets the position for an overlay.

DdSetPalette

Attaches a palette to the specified surface.

DdUnlock

Releases the lock held on the specified surface.

DdUpdateOverlay

Repositions or modifies the visual attributes of an overlay surface.

The driver populates members of the DD_PALETTECALLBACKS structure to indicate that it supports the following callback functions.

Callback Function Description

DdDestroyPalette

Destroys the specified palette.

DdSetEntries

Updates the palette entries in the specified palette.