/packages/ptc/src/win32/directx/p_ddraw.pp
https://github.com/slibre/freepascal · Puppet · 5259 lines · 4867 code · 361 blank · 31 comment · 275 complexity · 8d08739756d3642ddbd99cc70dfc0c85 MD5 · raw file
Large files are truncated click here to view the full file
- (*==========================================================================;
- *
- * Copyright (C) Microsoft Corporation. All Rights Reserved.
- *
- * File: ddraw.h
- * Content: DirectDraw include file
- *
- ***************************************************************************)
- unit p_ddraw;
- {$MODE objfpc}{$H+}
- {$MACRO on}
- {$PACKRECORDS c}
- {$MODESWITCH NESTEDCOMMENTS-}
- {$DEFINE DIRECTDRAW_DYNAMIC_LINK}
- interface
- uses
- windows;
- {#ifndef __DDRAW_INCLUDED__
- #define __DDRAW_INCLUDED__
- //Disable the nameless union warning when building internally
- #undef ENABLE_NAMELESS_UNION_PRAGMA
- #ifdef DIRECTX_REDIST
- #define ENABLE_NAMELESS_UNION_PRAGMA
- #endif
- #ifdef ENABLE_NAMELESS_UNION_PRAGMA
- #pragma warning(disable:4201)
- #endif}
- (*
- * If you wish an application built against the newest version of DirectDraw
- * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION
- * to be the earlies version of DirectDraw you wish to run against. For,
- * example if you wish an application to run against a DX 3 runtime define
- * DIRECTDRAW_VERSION to be 0x0300.
- *)
- {$IFNDEF DIRECTDRAW_VERSION}
- {$DEFINE DIRECTDRAW_VERSION:=$0700}
- {$ENDIF} //#endif /* DIRECTDRAW_VERSION */
- {#if defined( _WIN32 ) && !defined( _NO_COM )
- #define COM_NO_WINDOWS_H
- #include <objbase.h>
- #else
- #define IUnknown void
- #if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT)
- #define CO_E_NOTINITIALIZED 0x800401F0L
- #endif
- #endif}
- const
- _FACDD = $876;
- //#define _FACDD 0x876
- //#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
- //#ifdef __cplusplus
- //extern "C" {
- //#endif
- //
- // For compilers that don't support nameless unions, do a
- //
- // #define NONAMELESSUNION
- //
- // before #include <ddraw.h>
- //
- {#ifndef DUMMYUNIONNAMEN
- #if defined(__cplusplus) || !defined(NONAMELESSUNION)
- #define DUMMYUNIONNAMEN(n)
- #else
- #define DUMMYUNIONNAMEN(n) u##n
- #endif
- #endif}
- {#ifndef MAKEFOURCC
- #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
- ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
- ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
- #endif //defined(MAKEFOURCC)}
- (*
- * FOURCC codes for DX compressed-texture pixel formats
- *)
- const
- FOURCC_DXT1 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('1') shl 24);
- FOURCC_DXT2 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('2') shl 24);
- FOURCC_DXT3 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('3') shl 24);
- FOURCC_DXT4 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('4') shl 24);
- FOURCC_DXT5 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('5') shl 24);
- (*
- * GUIDS used by DirectDraw objects
- *)
- //#if defined( _WIN32 ) && !defined( _NO_COM )
- const
- CLSID_DirectDraw: TGuid = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}';
- CLSID_DirectDraw7: TGuid = '{3c305196-50db-11d3-9cfe-00c04fd930c5}';
- CLSID_DirectDrawClipper: TGuid = '{593817A0-7DB3-11CF-A2DE-00AA00b93356}';
- IID_IDirectDraw: TGuid = '{6C14DB80-A733-11CE-A521-0020AF0BE560}';
- IID_IDirectDraw2: TGuid = '{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}';
- IID_IDirectDraw4: TGuid = '{9c59509a-39bd-11d1-8c4a-00c04fd930c5}';
- IID_IDirectDraw7: TGuid = '{15e65ec0-3b9c-11d2-b92f-00609797ea5b}';
- IID_IDirectDrawSurface: TGuid = '{6C14DB81-A733-11CE-A521-0020AF0BE560}';
- IID_IDirectDrawSurface2: TGuid = '{57805885-6eec-11cf-9441-a82303c10e27}';
- IID_IDirectDrawSurface3: TGuid = '{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}';
- IID_IDirectDrawSurface4: TGuid = '{0B2B8630-AD35-11D0-8EA6-00609797EA5B}';
- IID_IDirectDrawSurface7: TGuid = '{06675a80-3b9b-11d2-b92f-00609797ea5b}';
- IID_IDirectDrawPalette: TGuid = '{6C14DB84-A733-11CE-A521-0020AF0BE560}';
- IID_IDirectDrawClipper: TGuid = '{6C14DB85-A733-11CE-A521-0020AF0BE560}';
- IID_IDirectDrawColorControl: TGuid = '{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}';
- IID_IDirectDrawGammaControl: TGuid = '{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}';
- //#endif
- (*============================================================================
- *
- * DirectDraw Structures
- *
- * Various structures used to invoke DirectDraw.
- *
- *==========================================================================*)
- {struct IDirectDraw;
- struct IDirectDrawSurface;
- struct IDirectDrawPalette;
- struct IDirectDrawClipper;}
- {typedef struct IDirectDraw FAR *LPDIRECTDRAW;
- typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
- typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4;
- typedef struct IDirectDraw7 FAR *LPDIRECTDRAW7;
- typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
- typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
- typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
- typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4;
- typedef struct IDirectDrawSurface7 FAR *LPDIRECTDRAWSURFACE7;
- typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
- typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
- typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL;
- typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL;}
- type
- IDirectDraw = interface;
- IDirectDraw2 = interface;
- IDirectDraw4 = interface;
- IDirectDraw7 = interface;
- IDirectDrawSurface = interface;
- IDirectDrawSurface2 = interface;
- IDirectDrawSurface3 = interface;
- IDirectDrawSurface4 = interface;
- IDirectDrawSurface7 = interface;
- IDirectDrawPalette = interface;
- IDirectDrawClipper = interface;
- IDirectDrawColorControl = interface;
- IDirectDrawGammaControl = interface;
- {typedef struct _DDFXROP FAR *LPDDFXROP;
- typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
- typedef struct _DDSURFACEDESC2 FAR *LPDDSURFACEDESC2;
- typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;}
- (*
- * API's
- *)
- //#if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
- //#if defined( _WIN32 ) && !defined( _NO_ENUM )
- // typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
- LPDDENUMCALLBACKA = function(lpGUID: PGUID; lpDriverDescription: LPSTR; lpDriverName: LPSTR; lpContext: LPVOID): BOOL; stdcall;
- // typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
- LPDDENUMCALLBACKW = function(lpGUID: PGUID; lpDriverDescription: LPWSTR; lpDriverName: LPWSTR; lpContext: LPVOID): BOOL; stdcall;
- type
- { /*
- * Protect against old SDKs
- */
- #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
- #define HMONITOR_DECLARED
- DECLARE_HANDLE(HMONITOR);
- #endif}
- {$WARNING HMONITOR should go to the windows unit}
- HMONITOR = HANDLE;
- // typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
- LPDDENUMCALLBACKEXA = function(lpGUID: PGUID; lpDriverDescription: LPSTR; lpDriverName: LPSTR; lpContext: LPVOID; hm: HMONITOR): BOOL; stdcall;
-
- // typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
- LPDDENUMCALLBACKEXW = function(lpGUID: PGUID; lpDriverDescription: LPWSTR; lpDriverName: LPWSTR; lpContext: LPVOID; hm: HMONITOR): BOOL; stdcall;
- type
- // typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
- LPDIRECTDRAWENUMERATEEXA = function(lpCallback: LPDDENUMCALLBACKEXA; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall;
- // typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
- LPDIRECTDRAWENUMERATEEXW = function(lpCallback: LPDDENUMCALLBACKEXW; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall;
- { #ifdef UNICODE
- typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
- #define DirectDrawEnumerate DirectDrawEnumerateW
- typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX;
- typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX;
- #define DirectDrawEnumerateEx DirectDrawEnumerateExW
- #else
- typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
- #define DirectDrawEnumerate DirectDrawEnumerateA
- typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX;
- typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX;
- #define DirectDrawEnumerateEx DirectDrawEnumerateExA
- #endif}
- //#endif}
- (*
- * Flags for DirectDrawEnumerateEx
- * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
- * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
- * By default, only the primary display device is enumerated.
- * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
- *)
- (*
- * This flag causes enumeration of any GDI display devices which are part of
- * the Windows Desktop
- *)
- const
- DDENUM_ATTACHEDSECONDARYDEVICES = $00000001;
- (*
- * This flag causes enumeration of any GDI display devices which are not
- * part of the Windows Desktop
- *)
- DDENUM_DETACHEDSECONDARYDEVICES = $00000002;
- (*
- * This flag causes enumeration of non-display devices
- *)
- DDENUM_NONDISPLAYDEVICES = $00000004;
- REGSTR_KEY_DDHW_DESCRIPTION = 'Description';
- REGSTR_KEY_DDHW_DRIVERNAME = 'DriverName';
- REGSTR_PATH_DDHW = 'Hardware\DirectDrawDrivers';
- DDCREATE_HARDWAREONLY = $00000001;
- DDCREATE_EMULATIONONLY = $00000002;
- {#if defined(WINNT) || !defined(WIN32)
- #ifndef _HRESULT_DEFINED
- #define _HRESULT_DEFINED
- typedef __success(return >= 0) long HRESULT;
- #endif // !_HRESULT_DEFINED
- #endif}
- (*
- * Generic pixel format with 8-bit RGB and alpha components
- *)
- type
- PDDARGB = ^TDDARGB;
- TDDARGB = record
- blue: BYTE;
- green: BYTE;
- red: BYTE;
- alpha: BYTE;
- end;
- (*
- * This version of the structure remains for backwards source compatibility.
- * The DDARGB structure is the one that should be used for all DirectDraw APIs.
- *)
- PDDRGBA = ^TDDRGBA;
- TDDRGBA = record
- red: BYTE;
- green: BYTE;
- blue: BYTE;
- alpha: BYTE;
- end;
- (*
- * DDCOLORKEY
- *)
- PDDCOLORKEY = ^TDDCOLORKEY;
- TDDCOLORKEY = record
- dwColorSpaceLowValue: DWORD; // low boundary of color space that is to
- // be treated as Color Key, inclusive
- dwColorSpaceHighValue: DWORD; // high boundary of color space that is
- // to be treated as Color Key, inclusive
- end;
- PDirectDrawSurface = Pointer;
- (*
- * DDBLTFX
- * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
- *)
- PDDBLTFX = ^TDDBLTFX;
- TDDBLTFX = record
- dwSize: DWORD; // size of structure
- dwDDFX: DWORD; // FX operations
- dwROP: DWORD; // Win32 raster operations
- dwDDROP: DWORD; // Raster operations new for DirectDraw
- dwRotationAngle: DWORD; // Rotation angle for blt
- dwZBufferOpCode: DWORD; // ZBuffer compares
- dwZBufferLow: DWORD; // Low limit of Z buffer
- dwZBufferHigh: DWORD; // High limit of Z buffer
- dwZBufferBaseDest: DWORD; // Destination base value
- dwZDestConstBitDepth: DWORD; // Bit depth used to specify Z constant for destination
- case Integer of
- 0: (
- dwZDestConst: DWORD; // Constant to use as Z buffer for dest
- );
- 1: (
- lpDDSZBufferDest: PDirectDrawSurface; // Surface to use as Z buffer for dest
- dwZSrcConstBitDepth: DWORD; // Bit depth used to specify Z constant for source
- case Integer of
- 0: (
- dwZSrcConst: DWORD; // Constant to use as Z buffer for src
- );
- 1: (
- lpDDSZBufferSrc: PDirectDrawSurface; // Surface to use as Z buffer for src
- dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend
- dwAlphaEdgeBlend: DWORD; // Alpha for edge blending
- dwReserved: DWORD;
- dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination
- case Integer of
- 0: (
- dwAlphaDestConst: DWORD; // Constant to use as Alpha Channel
- );
- 1: (
- lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as Alpha Channel
- dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source
- case Integer of
- 0: (
- dwAlphaSrcConst: DWORD; // Constant to use as Alpha Channel
- );
- 1: (
- lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as Alpha Channel
- case Integer of
- 0: (
- dwFillColor: DWORD; // color in RGB or Palettized
- );
- 1: (
- dwFillDepth: DWORD; // depth value for z-buffer
- );
- 2: (
- dwFillPixel: DWORD; // pixel value for RGBA or RGBZ
- );
- 3: (
- lpDDSPattern: PDirectDrawSurface; // Surface to use as pattern
- ddckDestColorkey: TDDCOLORKEY; // DestColorkey override
- ddckSrcColorkey: TDDCOLORKEY; // SrcColorkey override
- );
- );
- );
- );
- );
- end;
- (*
- * DDSCAPS
- *)
- PDDSCAPS = ^TDDSCAPS;
- TDDSCAPS = record
- dwCaps: DWORD; // capabilities of surface wanted
- end;
- (*
- * DDOSCAPS
- *)
- PDDOSCAPS = ^TDDOSCAPS;
- TDDOSCAPS = record
- dwCaps: DWORD; // capabilities of surface wanted
- end;
- (*
- * This structure is used internally by DirectDraw.
- *)
- PDDSCAPSEX = ^TDDSCAPSEX;
- TDDSCAPSEX = record
- dwCaps2: DWORD;
- dwCaps3: DWORD;
- case Integer of
- 0: (
- dwCaps4: DWORD;
- );
- 1: (
- dwVolumeDepth: DWORD;
- );
- end;
- (*
- * DDSCAPS2
- *)
- PDDSCAPS2 = ^TDDSCAPS2;
- TDDSCAPS2 = record
- dwCaps: DWORD; // capabilities of surface wanted
- dwCaps2: DWORD;
- dwCaps3: DWORD;
- case Integer of
- 0: (
- dwCaps4: DWORD;
- );
- 1: (
- dwVolumeDepth: DWORD;
- );
- end;
- (*
- * DDCAPS
- *)
- const
- DD_ROP_SPACE = 256 div 32; // space required to store ROP array
- (*
- * NOTE: Our choosen structure number scheme is to append a single digit to
- * the end of the structure giving the version that structure is associated
- * with.
- *)
- (*
- * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally
- * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0.
- * New applications should use the DDCAPS structure defined below.
- *)
- type
- PDDCAPS_DX1 = ^TDDCAPS_DX1;
- TDDCAPS_DX1 = record
- dwSize: DWORD; // size of the DDDRIVERCAPS structure
- dwCaps: DWORD; // driver specific capabilities
- dwCaps2: DWORD; // more driver specific capabilites
- dwCKeyCaps: DWORD; // color key capabilities of the surface
- dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- dwPalCaps: DWORD; // palette capabilities
- dwSVCaps: DWORD; // stereo vision capabilities
- dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- dwVidMemTotal: DWORD; // total amount of video memory
- dwVidMemFree: DWORD; // amount of free video memory
- dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- dwNumFourCCCodes: DWORD; // number of four cc codes
- dwAlignBoundarySrc: DWORD; // source rectangle alignment
- dwAlignSizeSrc: DWORD; // source rectangle byte size
- dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- dwAlignSizeDest: DWORD; // dest rectangle byte size
- dwAlignStrideAlign: DWORD; // stride alignment
- dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities
- dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinLiveVideoStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only
- dwMaxLiveVideoStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only
- dwMinHwCodecStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only
- dwMaxHwCodecStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only
- dwReserved1: DWORD; // reserved
- dwReserved2: DWORD; // reserved
- dwReserved3: DWORD; // reserved
- end;
- (*
- * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
- * It is present for back compatability.
- *)
- PDDCAPS_DX3 = ^TDDCAPS_DX3;
- TDDCAPS_DX3 = record
- dwSize: DWORD; // size of the DDDRIVERCAPS structure
- dwCaps: DWORD; // driver specific capabilities
- dwCaps2: DWORD; // more driver specific capabilites
- dwCKeyCaps: DWORD; // color key capabilities of the surface
- dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- dwPalCaps: DWORD; // palette capabilities
- dwSVCaps: DWORD; // stereo vision capabilities
- dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- dwVidMemTotal: DWORD; // total amount of video memory
- dwVidMemFree: DWORD; // amount of free video memory
- dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- dwNumFourCCCodes: DWORD; // number of four cc codes
- dwAlignBoundarySrc: DWORD; // source rectangle alignment
- dwAlignSizeSrc: DWORD; // source rectangle byte size
- dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- dwAlignSizeDest: DWORD; // dest rectangle byte size
- dwAlignStrideAlign: DWORD; // stride alignment
- dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities
- dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwReserved1: DWORD; // reserved
- dwReserved2: DWORD; // reserved
- dwReserved3: DWORD; // reserved
- dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
- dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
- dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
- dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts
- dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
- dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
- dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
- dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts
- dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
- dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
- dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
- dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts
- dwReserved4: DWORD; // reserved
- dwReserved5: DWORD; // reserved
- dwReserved6: DWORD; // reserved
- end;
- (*
- * This structure is the DDCAPS structure as it was in version 5 of Direct X.
- * It is present for back compatability.
- *)
- PDDCAPS_DX5 = ^TDDCAPS_DX5;
- TDDCAPS_DX5 = record
- (* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure
- (* 4*) dwCaps: DWORD; // driver specific capabilities
- (* 8*) dwCaps2: DWORD; // more driver specific capabilites
- (* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface
- (* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- (* 14*) dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- (* 18*) dwPalCaps: DWORD; // palette capabilities
- (* 1c*) dwSVCaps: DWORD; // stereo vision capabilities
- (* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- (* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- (* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- (* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- (* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- (* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- (* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- (* 3c*) dwVidMemTotal: DWORD; // total amount of video memory
- (* 40*) dwVidMemFree: DWORD; // amount of free video memory
- (* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- (* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- (* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes
- (* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment
- (* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size
- (* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- (* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size
- (* 60*) dwAlignStrideAlign: DWORD; // stride alignment
- (* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- (* 84*) ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities
- (* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* a0*) dwReserved1: DWORD; // reserved
- (* a4*) dwReserved2: DWORD; // reserved
- (* a8*) dwReserved3: DWORD; // reserved
- (* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
- (* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
- (* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
- (* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts
- (* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
- (* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
- (* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
- (* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts
- (*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
- (*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
- (*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
- (*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts
- // Members added for DX5:
- (*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports
- (*134*) dwCurrVideoPorts: DWORD; // current number of video ports used
- (*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts
- (*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts
- (*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts
- (*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts
- (*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts
- (*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
- end;
- PDDCAPS_DX6 = ^TDDCAPS_DX6;
- TDDCAPS_DX6 = record
- (* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure
- (* 4*) dwCaps: DWORD; // driver specific capabilities
- (* 8*) dwCaps2: DWORD; // more driver specific capabilites
- (* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface
- (* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- (* 14*) dwFXAlphaCaps: DWORD; // alpha caps
- (* 18*) dwPalCaps: DWORD; // palette capabilities
- (* 1c*) dwSVCaps: DWORD; // stereo vision capabilities
- (* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- (* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- (* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- (* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- (* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- (* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- (* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- (* 3c*) dwVidMemTotal: DWORD; // total amount of video memory
- (* 40*) dwVidMemFree: DWORD; // amount of free video memory
- (* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- (* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- (* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes
- (* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment
- (* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size
- (* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- (* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size
- (* 60*) dwAlignStrideAlign: DWORD; // stride alignment
- (* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- (* 84*) ddsOldCaps: TDDSCAPS; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
- (* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* a0*) dwReserved1: DWORD; // reserved
- (* a4*) dwReserved2: DWORD; // reserved
- (* a8*) dwReserved3: DWORD; // reserved
- (* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
- (* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
- (* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
- (* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts
- (* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
- (* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
- (* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
- (* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts
- (*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
- (*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
- (*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
- (*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts
- (*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports
- (*134*) dwCurrVideoPorts: DWORD; // current number of video ports used
- (*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts
- (*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts
- (*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts
- (*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts
- (*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts
- (*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
- // Members added for DX6 release
- (*16c*) ddsCaps: TDDSCAPS2; // Surface Caps
- end;
- PDDCAPS_DX7 = ^TDDCAPS_DX7;
- TDDCAPS_DX7 = record
- (* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure
- (* 4*) dwCaps: DWORD; // driver specific capabilities
- (* 8*) dwCaps2: DWORD; // more driver specific capabilites
- (* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface
- (* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- (* 14*) dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- (* 18*) dwPalCaps: DWORD; // palette capabilities
- (* 1c*) dwSVCaps: DWORD; // stereo vision capabilities
- (* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- (* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- (* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- (* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- (* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- (* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- (* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- (* 3c*) dwVidMemTotal: DWORD; // total amount of video memory
- (* 40*) dwVidMemFree: DWORD; // amount of free video memory
- (* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- (* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- (* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes
- (* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment
- (* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size
- (* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- (* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size
- (* 60*) dwAlignStrideAlign: DWORD; // stride alignment
- (* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- (* 84*) ddsOldCaps: TDDSCAPS; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
- (* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- (* a0*) dwReserved1: DWORD; // reserved
- (* a4*) dwReserved2: DWORD; // reserved
- (* a8*) dwReserved3: DWORD; // reserved
- (* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
- (* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
- (* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
- (* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts
- (* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
- (* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
- (* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
- (* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts
- (*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
- (*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
- (*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
- (*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts
- (*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports
- (*134*) dwCurrVideoPorts: DWORD; // current number of video ports used
- (*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts
- (*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts
- (*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts
- (*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts
- (*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts
- (*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
- // Members added for DX6 release
- (*16c*) ddsCaps: TDDSCAPS2; // Surface Caps
- end;
- {$IF DIRECTDRAW_VERSION <= $300}
- TDDCAPS = TDDCAPS_DX3;
- {$ELSEIF DIRECTDRAW_VERSION <= $500}
- TDDCAPS = TDDCAPS_DX5;
- {$ELSEIF DIRECTDRAW_VERSION <= $600}
- TDDCAPS = TDDCAPS_DX6;
- {$ELSE}
- TDDCAPS = TDDCAPS_DX7;
- {$ENDIF}
- PDDCAPS = TDDCAPS;
- (*
- * DDPIXELFORMAT
- *)
- PDDPIXELFORMAT = ^TDDPIXELFORMAT;
- TDDPIXELFORMAT = record
- dwSize: DWORD; // size of structure
- dwFlags: DWORD; // pixel format flags
- dwFourCC: DWORD; // (FOURCC code)
- case Integer of
- 0: (
- dwRGBBitCount: DWORD; // how many bits per pixel
- );
- 1: (
- dwYUVBitCount: DWORD; // how many bits per pixel
- );
- 2: (
- dwZBufferBitDepth: DWORD; // how many total bits/pixel in z buffer (including any stencil bits)
- );
- 3: (
- dwAlphaBitDepth: DWORD; // how many bits for alpha channels
- );
- 4: (
- dwLuminanceBitCount: DWORD; // how many bits per pixel
- );
- 5: (
- dwBumpBitCount: DWORD; // how many bits per "buxel", total
- );
- 6: (
- dwPrivateFormatBitCount: DWORD; // Bits per pixel of private driver formats. Only valid in texture
- // format list and if DDPF_D3DFORMAT is set
- case Integer of
- 0: (
- dwRBitMask: DWORD; // mask for red bit
- );
- 1: (
- dwYBitMask: DWORD; // mask for Y bits
- );
- 2: (
- dwStencilBitDepth: DWORD; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
- );
- 3: (
- dwLuminanceBitMask: DWORD; // mask for luminance bits
- );
- 4: (
- dwBumpDuBitMask: DWORD; // mask for bump map U delta bits
- );
- 5: (
- dwOperations: DWORD; // DDPF_D3DFORMAT Operations
- case Integer of
- 0: (
- dwGBitMask: DWORD; // mask for green bits
- );
- 1: (
- dwUBitMask: DWORD; // mask for U bits
- );
- 2: (
- dwZBitMask: DWORD; // mask for Z bits
- );
- 3: (
- dwBumpDvBitMask: DWORD; // mask for bump map V delta bits
- );
- 4: (
- MultiSampleCaps: record
- wFlipMSTypes: WORD; // Multisample methods supported via flip for this D3DFORMAT
- wBltMSTypes: WORD; // Multisample methods supported via blt for this D3DFORMAT
- end;
- case Integer of
- 0: (
- dwBBitMask: DWORD; // mask for blue bits
- );
- 1: (
- dwVBitMask: DWORD; // mask for V bits
- );
- 2: (
- dwStencilBitMask: DWORD; // mask for stencil bits
- );
- 3: (
- dwBumpLuminanceBitMask: DWORD; // mask for luminance in bump map
- case Integer of
- 0: (
- dwRGBAlphaBitMask: DWORD; // mask for alpha channel
- );
- 1: (
- dwYUVAlphaBitMask: DWORD; // mask for alpha channel
- );
- 2: (
- dwLuminanceAlphaBitMask: DWORD; // mask for alpha channel
- );
- 3: (
- dwRGBZBitMask: DWORD; // mask for Z channel
- );
- 4: (
- dwYUVZBitMask: DWORD; // mask for Z channel
- );
- );
- );
- );
- );
- end;
- (*
- * DDOVERLAYFX
- *)
- PDDOVERLAYFX = ^TDDOVERLAYFX;
- TDDOVERLAYFX = record
- dwSize: DWORD; // size of structure
- dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend
- dwAlphaEdgeBlend: DWORD; // Constant to use as alpha for edge blend
- dwReserved: DWORD;
- dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination
- case Integer of
- 0: (
- dwAlphaDestConst: DWORD; // Constant to use as alpha channel for dest
- );
- 1: (
- lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as alpha channel for dest
- dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source
- case Integer of
- 0: (
- dwAlphaSrcConst: DWORD; // Constant to use as alpha channel for src
- );
- 1: (
- lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as alpha channel for src
- dckDestColorkey: TDDCOLORKEY; // DestColorkey override
- dckSrcColorkey: TDDCOLORKEY; // DestColorkey override
- dwDDFX: DWORD; // Overlay FX
- dwFlags: DWORD; // flags
- );
- );
- end;
- (*
- * DDBLTBATCH: BltBatch entry structure
- *)
- PDDBLTBATCH = ^TDDBLTBATCH;
- TDDBLTBATCH = record
- lprDest: PRECT;
- lpDDSSrc: IDirectDrawSurface;
- lprSrc: PRECT;
- dwFlags: DWORD;
- lpDDBltFx: PDDBLTFX;
- end;
- (*
- * DDGAMMARAMP
- *)
- PDDGAMMARAMP = ^TDDGAMMARAMP;
- TDDGAMMARAMP = record
- red: array [0..255] of WORD;
- green: array [0..255] of WORD;
- blue: array [0..255] of WORD;
- end;
- (*
- * This is the structure within which DirectDraw returns data about the current graphics driver and chipset
- *)
- const
- MAX_DDDEVICEID_STRING = 512;
- type
- PDDDEVICEIDENTIFIER = ^TDDDEVICEIDENTIFIER;
- TDDDEVICEIDENTIFIER = record
- (*
- * These elements are for presentation to the user only. They should not be used to identify particular
- * drivers, since this is unreliable and many different strings may be associated with the same
- * device, and the same driver from different vendors.
- *)
- szDriver: array [0..MAX_DDDEVICEID_STRING-1] of char;
- szDescription: array [0..MAX_DDDEVICEID_STRING-1] of char;
- (*
- * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
- * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
- * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
- *
- * This version has the form:
- * wProduct = HIWORD(liDriverVersion.HighPart)
- * wVersion = LOWORD(liDriverVersion.HighPart)
- * wSubVersion = HIWORD(liDriverVersion.LowPart)
- * wBuild = LOWORD(liDriverVersion.LowPart)
- *)
- //#ifdef _WIN32
- liDriverVersion: LARGE_INTEGER; { Defined for applications and other 32 bit components }
- //#else
- // DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
- // DWORD dwDriverVersionHighPart;
- //#endif
- (*
- * These elements can be used to identify particular chipsets. Use with extreme caution.
- * dwVendorId Identifies the manufacturer. May be zero if unknown.
- * dwDeviceId Identifies the type of chipset. May be zero if unknown.
- * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
- * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
- *)
- dwVendorId: DWORD;
- dwDeviceId: DWORD;
- dwSubSysId: DWORD;
- dwRevision: DWORD;
- (*
- * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
- * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
- * reprofile the graphics subsystem.
- * This element can also be used to identify particular problematic drivers.
- *)
- guidDeviceIdentifier: TGuid;
- end;
- PDDDEVICEIDENTIFIER2 = ^TDDDEVICEIDENTIFIER2;
- TDDDEVICEIDENTIFIER2 = record
- (*
- * These elements are for presentation to the user only. They should not be used to identify particular
- * drivers, since this is unreliable and many different strings may be associated with the same
- * device, and the same driver from different vendors.
- *)
- szDriver: array [0..MAX_DDDEVICEID_STRING-1] of char;
- szDescription: array [0..MAX_DDDEVICEID_STRING-1] of char;
- (*
- * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
- * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
- * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
- *
- * This version has the form:
- * wProduct = HIWORD(liDriverVersion.HighPart)
- * wVersion = LOWORD(liDriverVersion.HighPart)
- * wSubVersion = HIWORD(liDriverVersion.LowPart)
- * wBuild = LOWORD(liDriverVersion.LowPart)
- *)
- //#ifdef _WIN32
- liDriverVersion: LARGE_INTEGER; { Defined for applications and other 32 bit components }
- //#else
- // DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
- // DWORD dwDriverVersionHighPart;
- //#endif
- (*
- * These elements can be used to identify particular chipsets. Use with extreme caution.
- * dwVendorId Identifies the manufacturer. May be zero if unknown.
- * dwDeviceId Identifies the type of chipset. May be zero if unknown.
- * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
- * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
- *)
- dwVendorId: DWORD;
- dwDeviceId: DWORD;
- dwSubSysId: DWORD;
- dwRevision: DWORD;
- (*
- * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
- * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
- * reprofile the graphics subsystem.
- * This element can also be used to identify particular problematic drivers.
- *)
- guidDeviceIdentifier: TGuid;
- (*
- * This element is used to determine the Windows Hardware Quality Lab (WHQL)
- * certification level for this driver/device pair.
- *)
- dwWHQLLevel: DWORD;
- end;
- (*
- * Flags for the IDirectDraw4::GetDeviceIdentifier method
- *)
- (*
- * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
- * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
- * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
- * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
- * of the DirectDraw object involved.
- *)
- const
- DDGDI_GETHOSTIDENTIFIER = $00000001;
- (*
- * callbacks
- *)
- {typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
- #ifdef STREAMING
- typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
- #endif}
- type
- (*
- * DDSURFACEDESC
- *)
- PDDSURFACEDESC = ^TDDSURFACEDESC;
- TDDSURFACEDESC = record
- dwSize: DWORD; // size of the DDSURFACEDESC structure
- dwFlags: DWORD; // determines what fields are valid
- dwHeight: DWORD; // height of surface to be created
- dwWidth: DWORD; // width of input surface
- case Integer of
- 0: (
- lPitch: LONG; // distance to start of next line (return value only)
- );
- 1: (
- dwLinearSize: DWORD; // Formless late-allocated optimized surface size
- dwBackBufferCount: DWORD; // number of back buffers requested
- case Integer of
- 0: (
- dwMipMapCount: DWORD; // number of mip-map levels requested
- );
- 1: (
- dwZBufferBitDepth: DWORD; // depth of Z buffer requested
- );
- 2: (
- dwRefreshRate: DWORD; // refresh rate (used when display mode is described)
- dwAlphaBitDepth: DWORD; // depth of alpha buffer requested
- dwReserved: DWORD; // reserved
- lpSurface: LPVOID; // pointer to the associated surface memory
- ddckCKDestOverlay: TDDCOLORKEY; // color key for destination overlay use
- ddckCKDestBlt: TDDCOLORKEY; // color key for destination blt use
- ddckCKSrcOverlay: TDDCOLORKEY; // color key for source overlay use
- ddckCKSrcBlt: TDDCOLORKEY; // color key for source blt use
- ddpfPixelFormat: TDDPIXELFORMAT; // pixel format description of the surface
- ddsCaps: TDDSCAPS; // direct draw surface capabilities
- );
- );
- end;
- (*
- * DDSURFACEDESC2
- *)
- PDDSURFACEDESC2 = ^TDDSURFACEDESC2;
- TDDSURFACEDESC2 = record
- dwSize: DWORD; // size of the DDSURFACEDESC structure
- dwFlags: DWORD; // determines what…