MMDDraw.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:103k
- {========================================================================}
- {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
- {========================================================================}
- {= All Rights Reserved =}
- {========================================================================}
- {= D 01099 Dresden = Tel.: +0351-8012255 =}
- {= Loewenstr.7a = info@swiftsoft.de =}
- {========================================================================}
- {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
- {========================================================================}
- {= This code is for reference purposes only and may not be copied or =}
- {= distributed in any format electronic or otherwise except one copy =}
- {= for backup purposes. =}
- {= =}
- {= No Delphi Component Kit or Component individually or in a collection=}
- {= subclassed or otherwise from the code in this unit, or associated =}
- {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
- {= without express permission from SwiftSoft. =}
- {= =}
- {= For more licence informations please refer to the associated =}
- {= HelpFile. =}
- {========================================================================}
- {= $Date: 20.01.1998 - 18:00:00 $ =}
- {========================================================================}
- {= Aufgabe: DirectDraw Unit =}
- {========================================================================}
- {= This code is for reference purposes only and may not be copied or =}
- {= distributed in any format electronic or otherwise except one copy =}
- {= for backup purposes. =}
- {= =}
- {= No Delphi Component Kit or Component individually or in a collection=}
- {= subclassed or otherwise from the code in this unit, or associated =}
- {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
- {= without express permission from SwiftSoft. =}
- {= =}
- {= For more licence informations please refer to the associated =}
- {= HelpFile. =}
- {========================================================================}
- unit MMDDraw;
- {$I COMPILER.INC}
- interface
- uses
- Windows,
- MMOle2;
- type
- PVOID = Pointer;
- LONG = LongInt;
- PLONG = ^LONG;
- PUnknown = ^IUnknown;
- PHWND = ^HWND;
- PHDC = ^HDC;
- {== GUIDs used by DirectDraw objects =========================================}
- const
- CLSID_DirectDraw : TGUID =
- (D1:$D7B70EE0;D2:$4340;D3:$11CF;D4:($B0,$63,$00,$20,$AF,$C2,$CD,$35));
- CLSID_DirectDrawClipper : TGUID =
- (D1:$593817A0;D2:$7DB3;D3:$11CF;D4:($A2,$DE,$00,$AA,$00,$B9,$33,$56));
- IID_IDirectDraw : TGUID =
- (D1:$6C14DB80;D2:$A733;D3:$11CE;D4:($A5,$21,$00,$20,$AF,$0B,$E5,$60));
- IID_IDirectDraw2 : TGUID =
- (D1:$B3A6F3E0;D2:$2B43;D3:$11CF;D4:($A2,$DE,$00,$AA,$00,$B9,$33,$56));
- IID_IDirectDrawSurface : TGUID =
- (D1:$6C14DB81;D2:$A733;D3:$11CE;D4:($A5,$21,$00,$20,$AF,$0B,$E5,$60));
- IID_IDirectDrawSurface2 : TGUID =
- (D1:$57805885;D2:$6EEC;D3:$11CF;D4:($94,$41,$A8,$23,$03,$C1,$0E,$27));
- IID_IDirectDrawPalette : TGUID =
- (D1:$6C14DB84;D2:$A733;D3:$11CE;D4:($A5,$21,$00,$20,$AF,$0B,$E5,$60));
- IID_IDirectDrawClipper : TGUID =
- (D1:$6C14DB85;D2:$A733;D3:$11CE;D4:($A5,$21,$00,$20,$AF,$0B,$E5,$60));
- {== Various structures used to invoke DirectDraw =============================}
- const
- REGSTR_KEY_DDHW_DESCRIPTION = 'Description';
- REGSTR_KEY_DDHW_DRIVERNAME = 'DriverName';
- REGSTR_PATH_DDHW = 'HardwareDirectDrawDrivers';
- DDCREATE_HARDWAREONLY = $00000001;
- DDCREATE_EMULATIONONLY = $00000002;
- {== Interfaces follow ========================================================}
- const
- DD_ROP_SPACE = (256 div 32); // space required to store ROP array
- type
- PDirectDrawSurface = ^IDirectDrawSurface;
- IDirectDrawSurface = class;
- PDirectDrawClipper = ^IDirectDrawClipper;
- IDirectDrawClipper = class;
- PDirectDrawPalette = ^IDirectDrawPalette;
- IDirectDrawPalette = class;
- {-- TDDCOLORKEY --------------------------------------------------------------}
- 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;
- {-- TDDBLTFX - used to pass override information to the surface callback Blt -}
- TDWDDSurface = record
- case Byte of
- 0: (dw: DWORD); // Constant to use as Z buffer
- 1: (lpDDS: PDIRECTDRAWSURFACE); // Surface to use as Z buffer
- end;
- TDDFillStyle = record
- case Byte of
- 0: (dwFillColor: DWORD); // color in RGB or Palettized
- 1: (dwFillDepth: DWORD); // depth value for z-buffer
- 2: (lpDDSPattern: PDIRECTDRAWSURFACE); // Surface to use as pattern
- end;
- 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
- ZDest : TDWDDSurface;
- dwZSrcConstBitDepth : DWORD; // Bit depth used to specify Z constant for source
- ZSrc : TDWDDSurface;
- 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
- AlphaDest : TDWDDSurface;
- dwAlphaSrcConstBitDepth : DWORD; // Bit depth used to specify alpha constant for source
- AlphaSrc : TDWDDSurface;
- Fill : TDDFillStyle;
- ddckDestColorkey : TDDCOLORKEY; // DestColorkey override
- ddckSrcColorkey : TDDCOLORKEY; // SrcColorkey override
- end;
- {-- TDDSCAPS -----------------------------------------------------------------}
- PDDSCAPS = ^TDDSCAPS;
- TDDSCAPS = record
- dwCaps : DWORD; // capabilities of surface wanted
- end;
- {-- TDDCAPS ------------------------------------------------------------------}
- PDDCAPS = ^TDDCAPS;
- TDDCAPS = 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;
- {-- TDDPIXELFORMAT -----------------------------------------------------------}
- PDDPIXELFORMAT = ^TDDPIXELFORMAT;
- TDDPIXELFORMAT = record
- dwSize : DWORD; // size of structure
- dwFlags : DWORD; // pixel format flags
- dwFourCC : DWORD; // (FOURCC code)
- case Byte of
- 0:(dwRGBBitCount: DWORD; dwRBitMask: DWORD; dwGBitMask: DWORD; dwBBitMask: DWORD; dwRGBAlphaBitMask: DWORD);
- 1:(dwYUVBitCount: DWORD; dwYBitMask: DWORD; dwUBitMask: DWORD; dwVBitMask: DWORD; dwYUVAlphaBitMask: DWORD);
- // how many bits for z buffers
- 2:(dwZBufferBitDepth: DWORD);
- // how many bits for alpha channels
- 3:(dwAlphaBitDepth: DWORD);
- end;
- {-- TDDOVERLAYFX -------------------------------------------------------------}
- 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
- AlphaDest : TDWDDSurface;
- dwAlphaSrcConstBitDepth : DWORD; // Bit depth used to specify alpha constant for source
- AlphaSrc : TDWDDSurface;
- dckDestColorkey : TDDCOLORKEY; // DestColorkey override
- dckSrcColorkey : TDDCOLORKEY;
- dwDDFX : DWORD; // Overlay FX
- dwFlags : DWORD; // flags
- end;
- {-- TDDBLTBATCH --------------------------------------------------------------}
- PDDBLTBATCH = ^TDDBLTBATCH;
- TDDBLTBATCH = record
- lprDest : PRECT;
- lpDDSSrc : PDIRECTDRAWSURFACE;
- lprSrc : PRECT;
- dwFlags : DWORD;
- lpDDBltFx : PDDBLTFX;
- end;
- {-- Callbacks ----------------------------------------------------------------}
- PCLIPPERCALLBACK = function(lpDDClipper: PDIRECTDRAWCLIPPER; hWnd: HWND; code: DWORD; lpContext: PVOID): DWORD; pascal;
- // #ifdef STREAMING
- // typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
- // #endif
- {-- TDDSURFACEDESC -----------------------------------------------------------}
- TDDSurfaceValue = record
- case Byte 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)
- end;
- 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
- lPitch : LONG; // distance to start of next line (return value only)
- dwBackBufferCount : DWORD; // number of back buffers requested
- Value : TDDSurfaceValue;
- dwAlphaBitDepth : DWORD; // depth of alpha buffer requested
- dwReserved : DWORD; // reserved
- lpSurface : PVOID; // 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;
- PDDENUMCALLBACKA = function(pGUID: PGUID; lpDriverDescription, lpDriverName: LPSTR; lpContext: PVOID): BOOL; pascal;
- PDDENUMCALLBACKW = function(pGUID: PGUID; lpDriverDescription, lpDriverName: LPWSTR; lpContext: PVOID): BOOL; pascal;
- PDDENUMCALLBACK = PDDENUMCALLBACKA;
-
- PDDENUMMODESCALLBACK = function(lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: PVOID): HRESULT; pascal;
- PDDENUMSURFACESCALLBACK = function(lpDDSurface: PDIRECTDRAWSURFACE; lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: PVOID): HRESULT; pascal;
- {-- IDirectDraw --------------------------------------------------------------}
- PDirectDraw = ^IDirectDraw;
- IDirectDraw = class(IUnknown)
- public
- function Compact: HRESULT; virtual; stdcall; abstract;
- function CreateClipper(dwFlags: DWORD; var lplpDDClipper: PDIRECTDRAWCLIPPER; pUnkOuter: PUnknown): HRESULT; virtual; stdcall; abstract;
- function CreatePalette(dwFlags: DWORD; lpColorTable: PPALETTEENTRY; var lplpDDPalette: PDIRECTDRAWPALETTE; pUnkOuter: PUnknown): HRESULT; virtual; stdcall; abstract;
- function CreateSurface(lpDDSurfaceDesc: PDDSURFACEDESC; var lplpDDSurface: PDIRECTDRAWSURFACE; pUnkOuter: PUnknown): HRESULT; virtual; stdcall; abstract;
- function DuplicateSurface(lpDDSurface: PDIRECTDRAWSURFACE; var lplpDupDDSurface: PDIRECTDRAWSURFACE): HRESULT; virtual; stdcall; abstract;
- function EnumDisplayModes(dwFlags: DWORD; lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: PVOID; lpEnumModesCallback: PDDENUMMODESCALLBACK): HRESULT; virtual; stdcall; abstract;
- function EnumSurfaces(dwFlags: DWORD; lpDDSD: PDDSURFACEDESC; lpContext: PVOID; lpEnumCallback: PDDENUMSURFACESCALLBACK): HRESULT; virtual; stdcall; abstract;
- function FlipToGDISurface: HRESULT; virtual; stdcall; abstract;
- function GetCaps(lpDDDriverCaps: PDDCAPS; lpDDHELCaps: PDDCAPS): HRESULT; virtual; stdcall; abstract;
- function GetDisplayMode(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; virtual; stdcall; abstract;
- function GetFourCCCodes(lpNumCodes: PDWORD; lpCodes: PDWORD ): HRESULT; virtual; stdcall; abstract;
- function GetGDISurface(var lplpGDIDDSSurface: PDIRECTDRAWSURFACE): HRESULT; virtual; stdcall; abstract;
- function GetMonitorFrequency(lpdwFrequency: PDWORD): HRESULT; virtual; stdcall; abstract;
- function GetScanLine(lpdwScanLine: PDWORD): HRESULT; virtual; stdcall; abstract;
- function GetVerticalBlankStatus(lpblsInVB: PBOOL): HRESULT; virtual; stdcall; abstract;
- function Initialize(lpGUID: PGUID): HRESULT; virtual; stdcall; abstract;
- function RestoreDisplayMode: HRESULT; virtual; stdcall; abstract;
- function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD): HRESULT; virtual; stdcall; abstract;
- function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THANDLE): HRESULT; virtual; stdcall; abstract;
- end;
- {-- IDirectDraw2 -------------------------------------------------------------}
- PDirectDraw2 = ^IDirectDraw2;
- IDirectDraw2 = class(IUnknown)
- public
- function Compact: HRESULT; virtual; stdcall; abstract;
- function CreateClipper(dwFlags: DWORD; var lplpDDClipper: PDIRECTDRAWCLIPPER; pUnkOuter: PUnknown): HRESULT; virtual; stdcall; abstract;
- function CreatePalette(dwFlags: DWORD; lpColorTable: PPALETTEENTRY; var lplpDDPalette: PDIRECTDRAWPALETTE; pUnkOuter: PUnknown): HRESULT; virtual; stdcall; abstract;
- function CreateSurface(lpDDSurfaceDesc: PDDSURFACEDESC; var lplpDDSurface: PDIRECTDRAWSURFACE; pUnkOuter: PUnknown): HRESULT; virtual; stdcall; abstract;
- function DuplicateSurface(lpDDSurface: PDIRECTDRAWSURFACE; var lplpDupDDSurface: PDIRECTDRAWSURFACE): HRESULT; virtual; stdcall; abstract;
- function EnumDisplayModes(dwFlags: DWORD; lpDDSurfaceDesc: PDDSURFACEDESC; lpContext: PVOID; lpEnumModesCallback: PDDENUMMODESCALLBACK): HRESULT; virtual; stdcall; abstract;
- function EnumSurfaces(dwFlags: DWORD; lpDDSD: PDDSURFACEDESC; lpContext: PVOID; lpEnumCallback: PDDENUMSURFACESCALLBACK): HRESULT; virtual; stdcall; abstract;
- function FlipToGDISurface: HRESULT; virtual; stdcall; abstract;
- function GetCaps(lpDDDriverCaps: PDDCAPS; lpDDHELCaps: PDDCAPS): HRESULT; virtual; stdcall; abstract;
- function GetDisplayMode(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; virtual; stdcall; abstract;
- function GetFourCCCodes(lpNumCodes: PDWORD; lpCodes: PDWORD ): HRESULT; virtual; stdcall; abstract;
- function GetGDISurface(var lplpGDIDDSSurface: PDIRECTDRAWSURFACE): HRESULT; virtual; stdcall; abstract;
- function GetMonitorFrequency(lpdwFrequency: PDWORD): HRESULT; virtual; stdcall; abstract;
- function GetScanLine(lpdwScanLine: PDWORD): HRESULT; virtual; stdcall; abstract;
- function GetVerticalBlankStatus(lpblsInVB: PBOOL): HRESULT; virtual; stdcall; abstract;
- function Initialize(lpGUID: PGUID): HRESULT; virtual; stdcall; abstract;
- function RestoreDisplayMode: HRESULT; virtual; stdcall; abstract;
- function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- { SetDisplayMode changed in v2 }
- function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; dwRefreshRate: DWORD; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THANDLE): HRESULT; virtual; stdcall; abstract;
- { Added in the v2 interface }
- function GetAvailableVidMem(lpDDSCaps: PDDSCAPS; lpdwTotal: PDWORD; lpdwFree: PDWORD): HRESULT; virtual; stdcall; abstract;
- end;
- {-- IDirectDrawPalette -------------------------------------------------------}
- IDirectDrawPalette = class(IUnknown)
- public
- function GetCaps(lpdwCaps: PDWORD): HRESULT; virtual; stdcall; abstract;
- function GetEntries(dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD; lpEntries: PPALETTEENTRY): HRESULT; virtual; stdcall; abstract;
- function Initialize(lpDD: PDIRECTDRAW; dwFlags: DWORD; lpDDColorTable: PPALETTEENTRY): HRESULT; virtual; stdcall; abstract;
- function SetEntries(dwFlags: DWORD; dwStartingEntry: DWORD; dwCount: DWORD; lpEntries: PPALETTEENTRY): HRESULT; virtual; stdcall; abstract;
- end;
- {-- IDirectDrawClipper -------------------------------------------------------}
- IDirectDrawClipper = class(IUnknown)
- public
- function GetClipList(lpRect: PRECT; lpClipList: PRGNDATA; lpdwSize: PDWORD): HRESULT; virtual; stdcall; abstract;
- function GetHWnd(lphWnd: PHWND): HRESULT; virtual; stdcall; abstract;
- function Initialize(lpDD: PDIRECTDRAW; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function IsClipListChanged(lpbChanged: PBOOL): HRESULT; virtual; stdcall; abstract;
- function SetClipList(lpClipList: PRGNDATA; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function SetHWnd(dwFlags: DWORD; hWnd: HWND): HRESULT; virtual; stdcall; abstract;
- end;
- {-- IDirectDrawSurface -------------------------------------------------------}
- IDirectDrawSurface = class(IUnknown)
- public
- function AddAttachedSurface(lpDDSAttachedSurface: PDIRECTDRAWSURFACE): HRESULT; virtual; stdcall; abstract;
- function AddOverlayDirtyRect(lpRect: PRECT): HRESULT; virtual; stdcall; abstract;
- function Blt(lpDestRect: PRECT; lpDDSrcSurface: PDIRECTDRAWSURFACE; lpSrcRect: PRECT; dwFlags: DWORD; lpDDBltFx: PDDBLTFX): HRESULT; virtual; stdcall; abstract;
- function BltBatch(lpDDBltBatch: PDDBLTBATCH; dwCount: DWORD; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function BltFast(dwX: DWORD; dwY: DWORD; lpDDSrcSurface: PDIRECTDRAWSURFACE; lpSrcRect: PRECT; dwTrans: DWORD): HRESULT; virtual; stdcall; abstract;
- function DeleteAttachedSurface(dwFlags: DWORD; lpDDSAttachedSurface: PDIRECTDRAWSURFACE): HRESULT; virtual; stdcall; abstract;
- function EnumAttachedSurfaces(lpContext: PVOID; lpEnumSurfacesCallback: PDDENUMSURFACESCALLBACK): HRESULT; virtual; stdcall; abstract;
- function EnumOverlayZOrders(dwFlags: DWORD; lpContext: PVOID; lpfnCallback: PDDENUMSURFACESCALLBACK): HRESULT; virtual; stdcall; abstract;
- function Flip(lpDDSurfaceTargetOverride: PDIRECTDRAWSURFACE; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function GetAttachedSurface(lpDDSCaps: PDDSCAPS; var lplpDDAttachedSurface: PDIRECTDRAWSURFACE): HRESULT; virtual; stdcall; abstract;
- function GetBltStatus(dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function GetCaps(lpDDSCaps: PDDSCAPS): HRESULT; virtual; stdcall; abstract;
- function GetClipper(var lplpDDClipper: PDIRECTDRAWCLIPPER): HRESULT; virtual; stdcall; abstract;
- function GetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; virtual; stdcall; abstract;
- function GetDC(lphDC: PHDC): HRESULT; virtual; stdcall; abstract;
- function GetFlipStatus(dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function GetOverlayPosition(lplX: PLONG; lplY: PLONG ): HRESULT; virtual; stdcall; abstract;
- function GetPalette(var lplpDDPalette: PDIRECTDRAWPALETTE): HRESULT; virtual; stdcall; abstract;
- function GetPixelFormat(lpDDPixelFormat: PDDPIXELFORMAT): HRESULT; virtual; stdcall; abstract;
- function GetSurfaceDesc(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; virtual; stdcall; abstract;
- function Initialize(lpDD: PDIRECTDRAW; lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; virtual; stdcall; abstract;
- function IsLost: HRESULT; virtual; stdcall; abstract;
- function Lock(lpDestRect: PRECT; lpDDSurfaceDesc: PDDSURFACEDESC; dwFlags: DWORD; hEvent: THANDLE): HRESULT; virtual; stdcall; abstract;
- function ReleaseDC(hDC: HDC): HRESULT; virtual; stdcall; abstract;
- function Restore: HRESULT; virtual; stdcall; abstract;
- function SetClipper(lpDDClipper: PDIRECTDRAWCLIPPER): HRESULT; virtual; stdcall; abstract;
- function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; virtual; stdcall; abstract;
- function SetOverlayPosition(lX: LONG; lY: LONG): HRESULT; virtual; stdcall; abstract;
- function SetPalette(lpDDPalette: PDIRECTDRAWPALETTE): HRESULT; virtual; stdcall; abstract;
- function Unlock(lpSurfaceData: PVOID): HRESULT; virtual; stdcall; abstract;
- function UpdateOverlay(lpSrcRect: PRECT; lpDDDestSurface: PDIRECTDRAWSURFACE; lpDestRect: PRECT; dwFlags: DWORD; lpDDOverlayFx: PDDOVERLAYFX): HRESULT; virtual; stdcall; abstract;
- function UpdateOverlayDisplay(dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: PDIRECTDRAWSURFACE): HRESULT; virtual; stdcall; abstract;
- end;
- {-- IDirectDrawSurface2 and related interfaces -------------------------------}
- PDirectDrawSurface2 = ^IDirectDrawSurface2;
- IDirectDrawSurface2 = class(IUnknown)
- function AddAttachedSurface(lpDDSAttachedSurface: PDIRECTDRAWSURFACE2): HRESULT; virtual; stdcall; abstract;
- function AddOverlayDirtyRect(lpRect: PRECT): HRESULT; virtual; stdcall; abstract;
- function Blt(lpDestRect: PRECT; lpDDSrcSurface: PDIRECTDRAWSURFACE2; lpSrcRect: PRECT; dwFlags: DWORD; lpDDBltFx: PDDBLTFX): HRESULT; virtual; stdcall; abstract;
- function BltBatch(lpDDBltBatch: PDDBLTBATCH; dwCount: DWORD; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function BltFast(dwX: DWORD; dwY: DWORD; lpDDSrcSurface: PDIRECTDRAWSURFACE2; lpSrcRect: PRECT; dwTrans: DWORD): HRESULT; virtual; stdcall; abstract;
- function DeleteAttachedSurface(dwFlags: DWORD; lpDDSAttachedSurface: PDIRECTDRAWSURFACE2): HRESULT; virtual; stdcall; abstract;
- function EnumAttachedSurfaces(lpContext: PVOID; lpEnumSurfacesCallback: PDDENUMSURFACESCALLBACK): HRESULT; virtual; stdcall; abstract;
- function EnumOverlayZOrders(dwFlags: DWORD; lpContext: PVOID; lpfnCallback: PDDENUMSURFACESCALLBACK): HRESULT; virtual; stdcall; abstract;
- function Flip(lpDDSurfaceTargetOverride: PDIRECTDRAWSURFACE2; dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function GetAttachedSurface(lpDDSCaps: PDDSCAPS; var lplpDDAttachedSurface: PDIRECTDRAWSURFACE2): HRESULT; virtual; stdcall; abstract;
- function GetBltStatus(dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function GetCaps(lpDDSCaps: PDDSCAPS): HRESULT; virtual; stdcall; abstract;
- function GetClipper(var lplpDDClipper: PDIRECTDRAWCLIPPER): HRESULT; virtual; stdcall; abstract;
- function GetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; virtual; stdcall; abstract;
- function GetDC(lphDC: PHDC): HRESULT; virtual; stdcall; abstract;
- function GetFlipStatus(dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function GetOverlayPosition(lplX: PLONG; lplY: PLONG): HRESULT; virtual; stdcall; abstract;
- function GetPalette(var lplpDDPalette: PDIRECTDRAWPALETTE): HRESULT; virtual; stdcall; abstract;
- function GetPixelFormat(lpDDPixelFormat: PDDPIXELFORMAT): HRESULT; virtual; stdcall; abstract;
- function GetSurfaceDesc(lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; virtual; stdcall; abstract;
- function Initialize(lpDD: PDIRECTDRAW; lpDDSurfaceDesc: PDDSURFACEDESC): HRESULT; virtual; stdcall; abstract;
- function IsLost: HRESULT; virtual; stdcall; abstract;
- function Lock(lpDestRect: PRECT; lpDDSurfaceDesc: PDDSURFACEDESC; dwFlags: DWORD; hEvent: THANDLE): HRESULT; virtual; stdcall; abstract;
- function ReleaseDC(hDC: HDC): HRESULT; virtual; stdcall; abstract;
- function Restore: HRESULT; virtual; stdcall; abstract;
- function SetClipper(lpDDClipper: PDIRECTDRAWCLIPPER): HRESULT; virtual; stdcall; abstract;
- function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDCOLORKEY): HRESULT; virtual; stdcall; abstract;
- function SetOverlayPosition(lX: LONG; lY: LONG): HRESULT; virtual; stdcall; abstract;
- function SetPalette(lpDDPalette: PDIRECTDRAWPALETTE): HRESULT; virtual; stdcall; abstract;
- function Unlock(lpSurfaceData: PVOID): HRESULT; virtual; stdcall; abstract;
- function UpdateOverlay(lpSrcRect: PRECT; lpDDDestSurface: PDIRECTDRAWSURFACE2; lpDestRect: PRECT; dwFlags: DWORD; lpDDOverlayFx: PDDOVERLAYFX): HRESULT; virtual; stdcall; abstract;
- function UpdateOverlayDisplay(dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: PDIRECTDRAWSURFACE2): HRESULT; virtual; stdcall; abstract;
- { Added in the v2 interface }
- function GetDDInterface(var lplpDD: PVOID): HRESULT; virtual; stdcall; abstract;
- function PageLock(dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- function PageUnlock(dwFlags: DWORD): HRESULT; virtual; stdcall; abstract;
- end;
- // #ifdef WINNT
- // //This is the user-mode entry stub to the kernel mode procedure.
- // extern HRESULT NtDirectDrawCreate( GUID FAR *lpGUID, HANDLE *lplpDD, IUnknown FAR *pUnkOuter );
- // #endif
- {-- Caps flags ---------------------------------------------------------------}
- const
- // ddsCaps field is valid.
- DDSD_CAPS = $00000001; // default
- // dwHeight field is valid.
- DDSD_HEIGHT = $00000002;
- // dwWidth field is valid.
- DDSD_WIDTH = $00000004;
- // lPitch is valid.
- DDSD_PITCH = $00000008;
- // dwBackBufferCount is valid.
- DDSD_BACKBUFFERCOUNT = $00000020;
- // dwZBufferBitDepth is valid.
- DDSD_ZBUFFERBITDEPTH = $00000040;
- // dwAlphaBitDepth is valid.
- DDSD_ALPHABITDEPTH = $00000080;
- // ddpfPixelFormat is valid.
- DDSD_PIXELFORMAT = $00001000;
- // ddckCKDestOverlay is valid.
- DDSD_CKDESTOVERLAY = $00002000;
- // ddckCKDestBlt is valid.
- DDSD_CKDESTBLT = $00004000;
- // ddckCKSrcOverlay is valid.
- DDSD_CKSRCOVERLAY = $00008000;
- // ddckCKSrcBlt is valid.
- DDSD_CKSRCBLT = $00010000;
- // dwMipMapCount is valid.
- DDSD_MIPMAPCOUNT = $00020000;
- // dwRefreshRate is valid
- DDSD_REFRESHRATE = $00040000;
- // All input fields are valid.
- DDSD_ALL = $0007F9EE;
- {== Capability flags =========================================================}
- // These flags are used to describe the capabilities of a given Surface.
- // All flags are bit flags.
- const
- //
- // This bit currently has no meaning.
- //
- DDSCAPS_3D = $00000001;
- //
- // Indicates that this surface contains alpha information. The pixel
- // format must be interrogated to determine whether this surface
- // contains only alpha information or alpha information interlaced
- // with pixel color data (e.g. RGBA or YUVA).
- //
- DDSCAPS_ALPHA = $00000002;
- //
- // Indicates that this surface is a backbuffer. It is generally
- // set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
- // It indicates that this surface is THE back buffer of a surface
- // flipping structure. DirectDraw supports N surfaces in a
- // surface flipping structure. Only the surface that immediately
- // precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
- // The other surfaces are identified as back buffers by the presence
- // of the DDSCAPS_FLIP capability, their attachment order, and the
- // absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
- // capabilities. The bit is sent to CreateSurface when a standalone
- // back buffer is being created. This surface could be attached to
- // a front buffer and/or back buffers to form a flipping surface
- // structure after the CreateSurface call. See AddAttachments for
- // a detailed description of the behaviors in this case.
- //
- DDSCAPS_BACKBUFFER = $00000004;
- //
- // Indicates a complex surface structure is being described. A
- // complex surface structure results in the creation of more than
- // one surface. The additional surfaces are attached to the root
- // surface. The complex structure can only be destroyed by
- // destroying the root.
- //
- DDSCAPS_COMPLEX = $00000008;
- //
- // Indicates that this surface is a part of a surface flipping structure.
- // When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
- // DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
- // on the resulting creations. The dwBackBufferCount field in the
- // DDSURFACEDESC structure must be set to at least 1 in order for
- // the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
- // must always be set with creating multiple surfaces through CreateSurface.
- //
- DDSCAPS_FLIP = $00000010;
- //
- // Indicates that this surface is THE front buffer of a surface flipping
- // structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
- // capability bit is set.
- // If this capability is sent to CreateSurface then a standalone front buffer
- // is created. This surface will not have the DDSCAPS_FlIP capability.
- // It can be attached to other back buffers to form a flipping structure.
- // See AddAttachments for a detailed description of the behaviors in this
- // case.
- //
- DDSCAPS_FRONTBUFFER = $00000020;
- //
- // Indicates that this surface is any offscreen surface that is not an overlay,
- // texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
- // to identify plain vanilla surfaces.
- //
- DDSCAPS_OFFSCREENPLAIN = $00000040;
- //
- // Indicates that this surface is an overlay. It may or may not be directly visible
- // depending on whether or not it is currently being overlayed onto the primary
- // surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
- // overlayed at the moment.
- //
- DDSCAPS_OVERLAY = $00000080;
- //
- // Indicates that unique DirectDrawPalette objects can be created and
- // attached to this surface.
- //
- DDSCAPS_PALETTE = $00000100;
- //
- // Indicates that this surface is the primary surface. The primary
- // surface represents what the user is seeing at the moment.
- //
- DDSCAPS_PRIMARYSURFACE = $00000200;
- //
- // Indicates that this surface is the primary surface for the left eye.
- // The primary surface for the left eye represents what the user is seeing
- // at the moment with the users left eye. When this surface is created the
- // DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
- // right eye.
- //
- DDSCAPS_PRIMARYSURFACELEFT = $00000400;
- //
- // Indicates that this surface memory was allocated in system memory
- //
- DDSCAPS_SYSTEMMEMORY = $00000800;
- //
- // Indicates that this surface can be used as a 3D texture. It does not
- // indicate whether or not the surface is being used for that purpose.
- //
- DDSCAPS_TEXTURE = $00001000;
- //
- // Indicates that a surface may be a destination for 3D rendering. This
- // bit must be set in order to query for a Direct3D Device Interface
- // from this surface.
- //
- DDSCAPS_3DDEVICE = $00002000;
- //
- // Indicates that this surface exists in video memory.
- //
- DDSCAPS_VIDEOMEMORY = $00004000;
- //
- // Indicates that changes made to this surface are immediately visible.
- // It is always set for the primary surface and is set for overlays while
- // they are being overlayed and texture maps while they are being textured.
- //
- DDSCAPS_VISIBLE = $00008000;
- //
- // Indicates that only writes are permitted to the surface. Read accesses
- // from the surface may or may not generate a protection fault, but the
- // results of a read from this surface will not be meaningful. READ ONLY.
- //
- DDSCAPS_WRITEONLY = $00010000;
- //
- // Indicates that this surface is a z buffer. A z buffer does not contain
- // displayable information. Instead it contains bit depth information that is
- // used to determine which pixels are visible and which are obscured.
- //
- DDSCAPS_ZBUFFER = $00020000;
- //
- // Indicates surface will have a DC associated long term
- //
- DDSCAPS_OWNDC = $00040000;
- //
- // Indicates surface should be able to receive live video
- //
- DDSCAPS_LIVEVIDEO = $00080000;
- //
- // Indicates surface should be able to have a stream decompressed
- // to it by the hardware.
- //
- DDSCAPS_HWCODEC = $00100000;
- //
- // Surface is a 320x200 or 320x240 ModeX surface
- //
- DDSCAPS_MODEX = $00200000;
- //
- // Indicates surface is one level of a mip-map. This surface will
- // be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
- // This can be done explicitly, by creating a number of surfaces and
- // attaching them with AddAttachedSurface or by implicitly by CreateSurface.
- // If this bit is set then DDSCAPS_TEXTURE must also be set.
- //
- DDSCAPS_MIPMAP = $00400000;
- //
- // Indicates that memory for the surface is not allocated until the surface
- // is loaded (via the Direct3D texture load() function).
- //
- DDSCAPS_ALLOCONLOAD = $04000000;
- {-- Driver capability flags --------------------------------------------------}
- //
- // Display hardware has 3D acceleration.
- //
- DDCAPS_3D = $00000001;
- //
- // Indicates that DirectDraw will support only dest rectangles that are aligned
- // on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
- // READ ONLY.
- //
- DDCAPS_ALIGNBOUNDARYDEST = $00000002;
- //
- // Indicates that DirectDraw will support only source rectangles whose sizes in
- // BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
- //
- DDCAPS_ALIGNSIZEDEST = $00000004;
- //
- // Indicates that DirectDraw will support only source rectangles that are aligned
- // on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
- // READ ONLY.
- //
- DDCAPS_ALIGNBOUNDARYSRC = $00000008;
- //
- // Indicates that DirectDraw will support only source rectangles whose sizes in
- // BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
- //
- DDCAPS_ALIGNSIZESRC = $00000010;
- //
- // Indicates that DirectDraw will create video memory surfaces that have a stride
- // alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
- //
- DDCAPS_ALIGNSTRIDE = $00000020;
- //
- // Display hardware is capable of blt operations.
- //
- DDCAPS_BLT = $00000040;
- //
- // Display hardware is capable of asynchronous blt operations.
- //
- DDCAPS_BLTQUEUE = $00000080;
- //
- // Display hardware is capable of color space conversions during the blt operation.
- //
- DDCAPS_BLTFOURCC = $00000100;
- //
- // Display hardware is capable of stretching during blt operations.
- //
- DDCAPS_BLTSTRETCH = $00000200;
- //
- // Display hardware is shared with GDI.
- //
- DDCAPS_GDI = $00000400;
- //
- // Display hardware can overlay.
- //
- DDCAPS_OVERLAY = $00000800;
- //
- // Set if display hardware supports overlays but can not clip them.
- //
- DDCAPS_OVERLAYCANTCLIP = $00001000;
- //
- // Indicates that overlay hardware is capable of color space conversions during
- // the overlay operation.
- //
- DDCAPS_OVERLAYFOURCC = $00002000;
- //
- // Indicates that stretching can be done by the overlay hardware.
- //
- DDCAPS_OVERLAYSTRETCH = $00004000;
- //
- // Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
- // other than the primary surface.
- //
- DDCAPS_PALETTE = $00008000;
- //
- // Indicates that palette changes can be syncd with the veritcal refresh.
- //
- DDCAPS_PALETTEVSYNC = $00010000;
- //
- // Display hardware can return the current scan line.
- //
- DDCAPS_READSCANLINE = $00020000;
- //
- // Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
- // can be created.
- //
- DDCAPS_STEREOVIEW = $00040000;
- //
- // Display hardware is capable of generating a vertical blank interrupt.
- //
- DDCAPS_VBI = $00080000;
- //
- // Supports the use of z buffers with blt operations.
- //
- DDCAPS_ZBLTS = $00100000;
- //
- // Supports Z Ordering of overlays.
- //
- DDCAPS_ZOVERLAYS = $00200000;
- //
- // Supports color key
- //
- DDCAPS_COLORKEY = $00400000;
- //
- // Supports alpha surfaces
- //
- DDCAPS_ALPHA = $00800000;
- //
- // colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
- //
- DDCAPS_COLORKEYHWASSIST = $01000000;
- //
- // no hardware support at all
- //
- DDCAPS_NOHARDWARE = $02000000;
- //
- // Display hardware is capable of color fill with bltter
- //
- DDCAPS_BLTCOLORFILL = $04000000;
- //
- // Display hardware is bank switched, and potentially very slow at
- // random access to VRAM.
- //
- DDCAPS_BANKSWITCHED = $08000000;
- //
- // Display hardware is capable of depth filling Z-buffers with bltter
- //
- DDCAPS_BLTDEPTHFILL = $10000000;
- //
- // Display hardware is capable of clipping while bltting.
- //
- DDCAPS_CANCLIP = $20000000;
- //
- // Display hardware is capable of clipping while stretch bltting.
- //
- DDCAPS_CANCLIPSTRETCHED = $40000000;
- //
- // Display hardware is capable of bltting to or from system memory
- //
- DDCAPS_CANBLTSYSMEM = $80000000;
- {-- More driver capability flags (dwCaps2) -----------------------------------}
- //
- // Display hardware is certified
- //
- DDCAPS2_CERTIFIED = $00000001;
- //
- // Driver cannot interleave 2D operations (lock and blt) to surfaces with
- // Direct3D rendering operations between calls to BeginScene() and EndScene()
- //
- DDCAPS2_NO2DDURING3DSCENE = $00000002;
- {-- DirectDraw FX ALPHA capability flags -------------------------------------}
- //
- // Supports alpha blending around the edge of a source color keyed surface.
- // For Blt.
- //
- DDFXALPHACAPS_BLTALPHAEDGEBLEND = $00000001;
- //
- // Supports alpha information in the pixel format. The bit depth of alpha
- // information in the pixel format can be 1,2,4, or 8. The alpha value becomes
- // more opaque as the alpha value increases. (0 is transparent.)
- // For Blt.
- //
- DDFXALPHACAPS_BLTALPHAPIXELS = $00000002;
- //
- // Supports alpha information in the pixel format. The bit depth of alpha
- // information in the pixel format can be 1,2,4, or 8. The alpha value
- // becomes more transparent as the alpha value increases. (0 is opaque.)
- // This flag can only be set if DDCAPS_ALPHA is set.
- // For Blt.
- //
- DDFXALPHACAPS_BLTALPHAPIXELSNEG = $00000004;
- //
- // Supports alpha only surfaces. The bit depth of an alpha only surface can be
- // 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
- // (0 is transparent.)
- // For Blt.
- //
- DDFXALPHACAPS_BLTALPHASURFACES = $00000008;
- //
- // The depth of the alpha channel data can range can be 1,2,4, or 8.
- // The NEG suffix indicates that this alpha channel becomes more transparent
- // as the alpha value increases. (0 is opaque.) This flag can only be set if
- // DDCAPS_ALPHA is set.
- // For Blt.
- //
- DDFXALPHACAPS_BLTALPHASURFACESNEG = $00000010;
- //
- // Supports alpha blending around the edge of a source color keyed surface.
- // For Overlays.
- //
- DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND = $00000020;
- //
- // Supports alpha information in the pixel format. The bit depth of alpha
- // information in the pixel format can be 1,2,4, or 8. The alpha value becomes
- // more opaque as the alpha value increases. (0 is transparent.)
- // For Overlays.
- //
- DDFXALPHACAPS_OVERLAYALPHAPIXELS = $00000040;
- //
- // Supports alpha information in the pixel format. The bit depth of alpha
- // information in the pixel format can be 1,2,4, or 8. The alpha value
- // becomes more transparent as the alpha value increases. (0 is opaque.)
- // This flag can only be set if DDCAPS_ALPHA is set.
- // For Overlays.
- //
- DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG = $00000080;
- //
- // Supports alpha only surfaces. The bit depth of an alpha only surface can be
- // 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
- // (0 is transparent.)
- // For Overlays.
- //
- DDFXALPHACAPS_OVERLAYALPHASURFACES = $00000100;
- //
- // The depth of the alpha channel data can range can be 1,2,4, or 8.
- // The NEG suffix indicates that this alpha channel becomes more transparent
- // as the alpha value increases. (0 is opaque.) This flag can only be set if
- // DDCAPS_ALPHA is set.
- // For Overlays.
- //
- DDFXALPHACAPS_OVERLAYALPHASURFACESNEG = $00000200;
- {-- DirectDraw FX capability flags -------------------------------------------}
- //
- // Uses arithmetic operations to stretch and shrink surfaces during blt
- // rather than pixel doubling techniques. Along the Y axis.
- //
- DDFXCAPS_BLTARITHSTRETCHY = $00000020;
- //
- // Uses arithmetic operations to stretch during blt
- // rather than pixel doubling techniques. Along the Y axis. Only
- // works for x1, x2, etc.
- //
- DDFXCAPS_BLTARITHSTRETCHYN = $00000010;
- //
- // Supports mirroring left to right in blt.
- //
- DDFXCAPS_BLTMIRRORLEFTRIGHT = $00000040;
- //
- // Supports mirroring top to bottom in blt.
- //
- DDFXCAPS_BLTMIRRORUPDOWN = $00000080;
- //
- // Supports arbitrary rotation for blts.
- //
- DDFXCAPS_BLTROTATION = $00000100;
- //
- // Supports 90 degree rotations for blts.
- //
- DDFXCAPS_BLTROTATION90 = $00000200;
- //
- // DirectDraw supports arbitrary shrinking of a surface along the
- // x axis (horizontal direction) for blts.
- //
- DDFXCAPS_BLTSHRINKX = $00000400;
- //
- // DirectDraw supports integer shrinking (1x,2x,) of a surface
- // along the x axis (horizontal direction) for blts.
- //
- DDFXCAPS_BLTSHRINKXN = $00000800;
- //
- // DirectDraw supports arbitrary shrinking of a surface along the
- // y axis (horizontal direction) for blts.
- //
- DDFXCAPS_BLTSHRINKY = $00001000;
- //
- // DirectDraw supports integer shrinking (1x,2x,) of a surface
- // along the y axis (vertical direction) for blts.
- //
- DDFXCAPS_BLTSHRINKYN = $00002000;
- //
- // DirectDraw supports arbitrary stretching of a surface along the
- // x axis (horizontal direction) for blts.
- //
- DDFXCAPS_BLTSTRETCHX = $00004000;
- //
- // DirectDraw supports integer stretching (1x,2x,) of a surface
- // along the x axis (horizontal direction) for blts.
- //
- DDFXCAPS_BLTSTRETCHXN = $00008000;
- //
- // DirectDraw supports arbitrary stretching of a surface along the
- // y axis (horizontal direction) for blts.
- //
- DDFXCAPS_BLTSTRETCHY = $00010000;
- //
- // DirectDraw supports integer stretching (1x,2x,) of a surface
- // along the y axis (vertical direction) for blts.
- //
- DDFXCAPS_BLTSTRETCHYN = $00020000;
- //
- // Uses arithmetic operations to stretch and shrink surfaces during
- // overlay rather than pixel doubling techniques. Along the Y axis
- // for overlays.
- //
- DDFXCAPS_OVERLAYARITHSTRETCHY = $00040000;
- //
- // Uses arithmetic operations to stretch surfaces during
- // overlay rather than pixel doubling techniques. Along the Y axis
- // for overlays. Only works for x1, x2, etc.
- //
- DDFXCAPS_OVERLAYARITHSTRETCHYN = $00000008;
- //
- // DirectDraw supports arbitrary shrinking of a surface along the
- // x axis (horizontal direction) for overlays.
- //
- DDFXCAPS_OVERLAYSHRINKX = $00080000;
- //
- // DirectDraw supports integer shrinking (1x,2x,) of a surface
- // along the x axis (horizontal direction) for overlays.
- //
- DDFXCAPS_OVERLAYSHRINKXN = $00100000;
- //
- // DirectDraw supports arbitrary shrinking of a surface along the
- // y axis (horizontal direction) for overlays.
- //
- DDFXCAPS_OVERLAYSHRINKY = $00200000;
- //
- // DirectDraw supports integer shrinking (1x,2x,) of a surface
- // along the y axis (vertical direction) for overlays.
- //
- DDFXCAPS_OVERLAYSHRINKYN = $00400000;
- //
- // DirectDraw supports arbitrary stretching of a surface along the
- // x axis (horizontal direction) for overlays.
- //
- DDFXCAPS_OVERLAYSTRETCHX = $00800000;
- //
- // DirectDraw supports integer stretching (1x,2x,) of a surface
- // along the x axis (horizontal direction) for overlays.
- //
- DDFXCAPS_OVERLAYSTRETCHXN = $01000000;
- //
- // DirectDraw supports arbitrary stretching of a surface along the
- // y axis (horizontal direction) for overlays.
- //
- DDFXCAPS_OVERLAYSTRETCHY = $02000000;
- //
- // DirectDraw supports integer stretching (1x,2x,) of a surface
- // along the y axis (vertical direction) for overlays.
- //
- DDFXCAPS_OVERLAYSTRETCHYN = $04000000;
- //
- // DirectDraw supports mirroring of overlays across the vertical axis
- //
- DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000;
- //
- // DirectDraw supports mirroring of overlays across the horizontal axis
- //
- DDFXCAPS_OVERLAYMIRRORUPDOWN = $10000000;
- {-- DirectDraw stereo view capabilities --------------------------------------}
- //
- // The stereo view is accomplished via enigma encoding.
- //
- DDSVCAPS_ENIGMA = $00000001;
- //
- // The stereo view is accomplished via high frequency flickering.
- //
- DDSVCAPS_FLICKER = $00000002;
- //
- // The stereo view is accomplished via red and blue filters applied
- // to the left and right eyes. All images must adapt their colorspaces
- // for this process.
- //
- DDSVCAPS_REDBLUE = $00000004;
- //
- // The stereo view is accomplished with split screen technology.
- //
- DDSVCAPS_SPLIT = $00000008;
- {-- DirectDrawPalette capabilities -------------------------------------------}
- //
- // Index is 4 bits. There are sixteen color entries in the palette table.
- //
- DDPCAPS_4BIT = $00000001;
- //
- // Index is onto a 8 bit color index. This field is only valid with the
- // DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
- // surface is in 8bpp. Each color entry is one byte long and is an index
- // into destination surface's 8bpp palette.
- //
- DDPCAPS_8BITENTRIES = $00000002;
- //
- // Index is 8 bits. There are 256 color entries in the palette table.
- //
- DDPCAPS_8BIT = $00000004;
- //
- // Indicates that this DIRECTDRAWPALETTE should use the palette color array
- // passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
- // object.
- //
- DDPCAPS_INITIALIZE = $00000008;
- //
- // This palette is the one attached to the primary surface. Changing this
- // table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
- // and supported.
- //
- DDPCAPS_PRIMARYSURFACE = $00000010;
- //
- // This palette is the one attached to the primary surface left. Changing
- // this table has immediate effect on the display for the left eye unless
- // DDPSETPAL_VSYNC is specified and supported.
- //
- DDPCAPS_PRIMARYSURFACELEFT = $00000020;
- //
- // This palette can have all 256 entries defined
- //
- DDPCAPS_ALLOW256 = $00000040;
- //
- // This palette can have modifications to it synced with the monitors
- // refresh rate.
- //
- DDPCAPS_VSYNC = $00000080;
- //
- // Index is 1 bit. There are two color entries in the palette table.
- //
- DDPCAPS_1BIT = $00000100;
- //
- // Index is 2 bit. There are four color entries in the palette table.
- //
- DDPCAPS_2BIT = $00000200;
- {-- DirectDrawPalette setentry constants -------------------------------------}
- {-- DirectDrawPalette getentry constants -------------------------------------}
- // 0 is the only legal value
- {-- DirectDrawSurface setpalette constants -----------------------------------}
- {-- DirectDraw bitdepth constants --------------------------------------------}
- // NOTE: These are only used to indicate supported bit depths. These
- // are flags only, they are not to be used as an actual bit depth. The
- // absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
- // bit depths in a surface or for changing the display mode.
- //
- // 1 bit per pixel.
- //
- DDBD_1 = $00004000;
- //
- // 2 bits per pixel.
- //
- DDBD_2 = $00002000;
- //
- // 4 bits per pixel.
- //
- DDBD_4 = $00001000;
- //
- // 8 bits per pixel.
- //
- DDBD_8 = $00000800;
- //
- // 16 bits per pixel.
- //
- DDBD_16 = $00000400;
- //
- // 24 bits per pixel.
- //
- DDBD_24 = $00000200;
- //
- // 32 bits per pixel.
- //
- DDBD_32 = $00000100;
- {-- DirectDrawSurface set/get color key flags --------------------------------}
- //
- // Set if the structure contains a color space. Not set if the structure
- // contains a single color key.
- //
- DDCKEY_COLORSPACE = $00000001;
- //
- // Set if the structure specifies a color key or color space which is to be
- // used as a destination color key for blt operations.
- //
- DDCKEY_DESTBLT = $00000002;
- //
- // Set if the structure specifies a color key or color space which is to be
- // used as a destination color key for overlay operations.
- //
- DDCKEY_DESTOVERLAY = $00000004;
- //
- // Set if the structure specifies a color key or color space which is to be
- // used as a source color key for blt operations.
- //
- DDCKEY_SRCBLT = $00000008;
- //
- // Set if the structure specifies a color key or color space which is to be
- // used as a source color key for overlay operations.
- //
- DDCKEY_SRCOVERLAY = $00000010;
- {-- DirectDraw color key capability flags ------------------------------------}
- //
- // Supports transparent blting using a color key to identify the replaceable
- // bits of the destination surface for RGB colors.
- //
- DDCKEYCAPS_DESTBLT = $00000001;
- //
- // Supports transparent blting using a color space to identify the replaceable
- // bits of the destination surface for RGB colors.
- //
- DDCKEYCAPS_DESTBLTCLRSPACE = $00000002;
- //
- // Supports transparent blting using a color space to identify the replaceable
- // bits of the destination surface for YUV colors.
- //
- DDCKEYCAPS_DESTBLTCLRSPACEYUV = $00000004;
- //
- // Supports transparent blting using a color key to identify the replaceable
- // bits of the destination surface for YUV colors.
- //
- DDCKEYCAPS_DESTBLTYUV = $00000008;
- //
- // Supports overlaying using colorkeying of the replaceable bits of the surface
- // being overlayed for RGB colors.
- //
- DDCKEYCAPS_DESTOVERLAY = $00000010;
- //
- // Supports a color space as the color key for the destination for RGB colors.
- //
- DDCKEYCAPS_DESTOVERLAYCLRSPACE = $00000020;
- //
- // Supports a color space as the color key for the destination for YUV colors.
- //
- DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV = $00000040;
- //
- // Supports only one active destination color key value for visible overlay
- // surfaces.
- //
- DDCKEYCAPS_DESTOVERLAYONEACTIVE = $00000080;
- //
- // Supports overlaying using colorkeying of the replaceable bits of the
- // surface being overlayed for YUV colors.
- //
- DDCKEYCAPS_DESTOVERLAYYUV = $00000100;
- //
- // Supports transparent blting using the color key for the source with
- // this surface for RGB colors.
- //
- DDCKEYCAPS_SRCBLT = $00000200;
- //
- // Supports transparent blting using a color space for the source with
- // this surface for RGB colors.
- //
- DDCKEYCAPS_SRCBLTCLRSPACE = $00000400;
- //
- // Supports transparent blting using a color space for the source with
- // this surface for YUV colors.
- //
- DDCKEYCAPS_SRCBLTCLRSPACEYUV = $00000800;
- //
- // Supports transparent blting using the color key for the source with
- // this surface for YUV colors.
- //
- DDCKEYCAPS_SRCBLTYUV = $00001000;
- //
- // Supports overlays using the color key for the source with this
- // overlay surface for RGB colors.
- //
- DDCKEYCAPS_SRCOVERLAY = $00002000;
- //
- // Supports overlays using a color space as the source color key for
- // the overlay surface for RGB colors.
- //
- DDCKEYCAPS_SRCOVERLAYCLRSPACE = $00004000;
- //
- // Supports overlays using a color space as the source color key for
- // the overlay surface for YUV colors.
- //
- DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV = $00008000;
- //
- // Supports only one active source color key value for visible
- // overlay surfaces.
- //
- DDCKEYCAPS_SRCOVERLAYONEACTIVE = $00010000;
- //
- // Supports overlays using the color key for the source with this
- // overlay surface for YUV colors.
- //
- DDCKEYCAPS_SRCOVERLAYYUV = $00020000;
- //
- // there are no bandwidth trade-offs for using colorkey with an overlay
- //
- DDCKEYCAPS_NOCOSTOVERLAY = $00040000;
- {-- DirectDraw pixelformat flags ---------------------------------------------}
- //
- // The surface has alpha channel information in the pixel format.
- //
- DDPF_ALPHAPIXELS = $00000001;
- //
- // The pixel format contains alpha only information
- //
- DDPF_ALPHA = $00000002;
- //
- // The FourCC code is valid.
- //
- DDPF_FOURCC = $00000004;
- //
- // The surface is 4-bit color indexed.
- //
- DDPF_PALETTEINDEXED4 = $00000008;
- //
- // The surface is indexed into a palette which stores indices
- // into the destination surface's 8-bit palette.
- //
- DDPF_PALETTEINDEXEDTO8 = $00000010;
- //
- // The surface is 8-bit color indexed.
- //
- DDPF_PALETTEINDEXED8 = $00000020;
- //
- // The RGB data in the pixel format structure is valid.
- //
- DDPF_RGB = $00000040;
- //
- // The surface will accept pixel data in the format specified
- // and compress it during the write.
- //
- DDPF_COMPRESSED = $00000080;
- //
- // The surface will accept RGB data and translate it during
- // the write to YUV data. The format of the data to be written
- // will be contained in the pixel format structure. The DDPF_RGB
- // flag will be set.
- //
- DDPF_RGBTOYUV = $00000100;
- //
- // pixel format is YUV - YUV data in pixel format struct is valid
- //
- DDPF_YUV = $00000200;
- //
- // pixel format is a z buffer only surface
- //
- DDPF_ZBUFFER = $00000400;
- //
- // The surface is 1-bit color indexed.
- //
- DDPF_PALETTEINDEXED1 = $00000800;
- //
- // The surface is 2-bit color indexed.
- //
- DDPF_PALETTEINDEXED2 = $00001000;
- {== DirectDraw callback flags ================================================}
- {-- DirectDraw EnumSurfaces flags --------------------------------------------}
- //
- // Enumerate all of the surfaces that meet the search criterion.
- //
- DDENUMSURFACES_ALL = $00000001;
- //
- // A search hit is a surface that matches the surface description.
- //
- DDENUMSURFACES_MATCH = $00000002;
- //
- // A search hit is a surface that does not match the surface description.
- //
- DDENUMSURFACES_NOMATCH = $00000004;
- //
- // Enumerate the first surface that can be created which meets the search criterion.
- //
- DDENUMSURFACES_CANBECREATED = $00000008;
- //
- // Enumerate the surfaces that already exist that meet the search criterion.
- //
- DDENUMSURFACES_DOESEXIST = $00000010;
- {-- DirectDraw EnumDisplayModes flags ----------------------------------------}
- //
- // Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
- // that a particular mode will be enumerated only once. This flag specifies whether
- // the refresh rate is taken into account when determining if a mode is unique.
- //
- DDEDM_REFRESHRATES = $00000001;
- {-- DirectDraw SetCooperativeLevel flags -------------------------------------}
- //
- // Exclusive mode owner will be responsible for the entire primary surface.
- // GDI can be ignored. used with DD
- //
- DDSCL_FULLSCREEN = $00000001;
- //
- // allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
- //
- DDSCL_ALLOWREBOOT = $00000002;
- //
- // prevents DDRAW from modifying the application window.
- // prevents DDRAW from minimize/restore the application window on activation.
- //
- DDSCL_NOWINDOWCHANGES = $00000004;
- //
- // app wants to work as a regular Windows application
- //
- DDSCL_NORMAL = $00000008;
- //
- // app wants exclusive access
- //
- DDSCL_EXCLUSIVE = $00000010;
- //
- // app can deal with non-windows display modes
- //
- DDSCL_ALLOWMODEX = $00000040;
- {-- DirectDraw blt flags -----------------------------------------------------}
- //
- // Use the alpha information in the pixel format or the alpha channel surface
- // attached to the destination surface as the alpha channel for this blt.
- //
- DDBLT_ALPHADEST = $00000001;
- //
- // Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
- // for the destination surface for this blt.
- //
- DDBLT_ALPHADESTCONSTOVERRIDE = $00000002;
- //
- // The NEG suffix indicates that the destination surface becomes more
- // transparent as the alpha value increases. (0 is opaque)
- //
- DDBLT_ALPHADESTNEG = $00000004;
- //
- // Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
- // channel for the destination for this blt.
- //
- DDBLT_ALPHADESTSURFACEOVERRIDE = $00000008;
- //
- // Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
- // for the edges of the image that border the color key colors.
- //
- DDBLT_ALPHAEDGEBLEND = $00000010;
- //
- // Use the alpha information in the pixel format or the alpha channel surface
- // attached to the source surface as the alpha channel for this blt.
- //
- DDBLT_ALPHASRC = $00000020;
- //
- // Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
- // for the source for this blt.
- //
- DDBLT_ALPHASRCCONSTOVERRIDE = $00000040;
- //
- // The NEG suffix indicates that the source surface becomes more transparent
- // as the alpha value increases. (0 is opaque)
- //
- DDBLT_ALPHASRCNEG = $00000080;
- //
- // Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
- // for the source for this blt.
- //
- DDBLT_ALPHASRCSURFACEOVERRIDE = $00000100;
- //
- // Do this blt asynchronously through the FIFO in the order received. If
- // there is no room in the hardware FIFO fail the call.
- //
- DDBLT_ASYNC = $00000200;
- //
- // Uses the dwFillColor field in the DDBLTFX structure as the RGB color
- // to fill the destination rectangle on the destination surface with.
- //
- DDBLT_COLORFILL = $00000400;
- //
- // Uses the dwDDFX field in the DDBLTFX structure to specify the effects
- // to use for the blt.
- //
- DDBLT_DDFX = $00000800;
- //
- // Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
- // that are not part of the Win32 API.
- //
- DDBLT_DDROPS = $00001000;
- //
- // Use the color key associated with the destination surface.
- //
- DDBLT_KEYDEST = $00002000;
- //
- // Use the dckDestColorkey field in the DDBLTFX structure as the color key
- // for the destination surface.
- //
- DDBLT_KEYDESTOVERRIDE = $00004000;
- //
- // Use the color key associated with the source surface.
- //
- DDBLT_KEYSRC = $00008000;
- //
- // Use the dckSrcColorkey field in the DDBLTFX structure as the color key
- // for the source surface.
- //
- DDBLT_KEYSRCOVERRIDE = $00010000;
- //
- // Use the dwROP field in the DDBLTFX structure for the raster operation
- // for this blt. These ROPs are the same as the ones defined in the Win32 API.
- //
- DDBLT_ROP = $00020000;
- //
- // Use the dwRotationAngle field in the DDBLTFX structure as the angle
- // (specified in 1/100th of a degree) to rotate the surface.
- //
- DDBLT_ROTATIONANGLE = $00040000;
- //
- // Z-buffered blt using the z-buffers attached to the source and destination
- // surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
- // z-buffer opcode.
- //
- DDBLT_ZBUFFER = $00080000;
- //
- // Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
- // in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
- // for the destination.
- //
- DDBLT_ZBUFFERDESTCONSTOVERRIDE = $00100000;
- //
- // Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
- // field in the DDBLTFX structure as the z-buffer and z-buffer opcode
- // respectively for the destination.
- //
- DDBLT_ZBUFFERDESTOVERRIDE = $00200000;
- //
- // Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
- // in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
- // for the source.
- //
- DDBLT_ZBUFFERSRCCONSTOVERRIDE = $00400000;
- //
- // Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
- // field in the DDBLTFX structure as the z-buffer and z-buffer opcode
- // respectively for the source.
- //
- DDBLT_ZBUFFERSRCOVERRIDE = $00800000;
- //
- // wait until the device is ready to handle the blt
- // this will cause blt to not return DDERR_WASSTILLDRAWING
- //
- DDBLT_WAIT = $01000000;
- //
- // Uses the dwFillDepth field in the DDBLTFX structure as the depth value
- // to fill the destination rectangle on the destination Z-buffer surface
- // with.
- //
- DDBLT_DEPTHFILL = $02000000;
- {-- BltFast flags ------------------------------------------------------------}
- DDBLTFAST_NOCOLORKEY = $00000000;
- DDBLTFAST_SRCCOLORKEY = $00000001;
- DDBLTFAST_DESTCOLORKEY = $00000002;
- DDBLTFAST_WAIT = $00000010;
- {-- Flip flags ---------------------------------------------------------------}
- DDFLIP_WAIT = $00000001;
- {-- DirectDraw surface overlay flags -----------------------------------------}
- //
- // Use the alpha information in the pixel format or the alpha channel surface
- // attached to the destination surface as the alpha channel for the
- // destination overlay.
- //
- DDOVER_ALPHADEST = $00000001;
- //
- // Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
- // destination alpha channel for this overlay.
- //
- DDOVER_ALPHADESTCONSTOVERRIDE = $00000002;
- //
- // The NEG suffix indicates that the destination surface becomes more
- // transparent as the alpha value increases.
- //
- DDOVER_ALPHADESTNEG = $00000004;
- //
- // Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
- // channel destination for this overlay.
- //
- DDOVER_ALPHADESTSURFACEOVERRIDE = $00000008;
- //
- // Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
- // channel for the edges of the image that border the color key colors.
- //
- DDOVER_ALPHAEDGEBLEND = $00000010;
- //
- // Use the alpha information in the pixel format or the alpha channel surface
- // attached to the source surface as the source alpha channel for this overlay.
- //
- DDOVER_ALPHASRC = $00000020;
- //
- // Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
- // alpha channel for this overlay.
- //
- DDOVER_ALPHASRCCONSTOVERRIDE = $00000040;
- //
- // The NEG suffix indicates that the source surface becomes more transparent
- // as the alpha value increases.
- //
- DDOVER_ALPHASRCNEG = $00000080;
- //
- // Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
- // source for this overlay.
- //
- DDOVER_ALPHASRCSURFACEOVERRIDE = $00000100;
- //
- // Turn this overlay off.
- //
- DDOVER_HIDE = $00000200;
- //
- // Use the color key associated with the destination surface.
- //
- DDOVER_KEYDEST = $00000400;
- //
- // Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
- // for the destination surface
- //
- DDOVER_KEYDESTOVERRIDE = $00000800;
- //
- // Use the color key associated with the source surface.
- //
- DDOVER_KEYSRC = $00001000;
- //
- // Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
- // for the source surface.
- //
- DDOVER_KEYSRCOVERRIDE = $00002000;
- //
- // Turn this overlay on.
- //
- DDOVER_SHOW = $00004000;
- //
- // Add a dirty rect to an emulated overlayed surface.
- //
- DDOVER_ADDDIRTYRECT = $00008000;
- //
- // Redraw all dirty rects on an emulated overlayed surface.
- //
- DDOVER_REFRESHDIRTYRECTS = $00010000;
- //
- // Redraw the entire surface on an emulated overlayed surface.
- //
- DDOVER_REFRESHALL = $00020000;
- //
- // Use the overlay FX flags to define special overlay FX
- //
- DDOVER_DDFX = $00080000;
- {-- DirectDrawSurface lock flags ---------------------------------------------}
- //
- // The default. Set to indicate that Lock should return a valid memory pointer
- // to the top of the specified rectangle. If no rectangle is specified then a
- // pointer to the top of the surface is returned.
- //
- DDLOCK_SURFACEMEMORYPTR = $00000000; // default
- //
- // Set to indicate that Lock should wait until it can obtain a valid memory
- // pointer before returning. If this bit is set, Lock will never return
- // DDERR_WASSTILLDRAWING.
- //
- DDLOCK_WAIT = $00000001;
- //
- // Set if an event handle is being passed to Lock. Lock will trigger the event
- // when it can return the surface memory pointer requested.
- //
- DDLOCK_EVENT = $00000002;
- //
- // Indicates that the surface being locked will only be read from.
- //
- DDLOCK_READONLY = $00000010;
- //
- // Indicates that the surface being locked will only be written to
- //
- DDLOCK_WRITEONLY = $00000020;
- {-- DDS pagelock flags -------------------------------------------------------}
- //
- // No flags defined at present
- //
- {-- DDS pageunlock flags -----------------------------------------------------}
- //
- // No flags defined at present
- //
- {-- DDS blt FX flags ---------------------------------------------------------}
- //
- // If stretching, use arithmetic stretching along the Y axis for this blt.
- //
- DDBLTFX_ARITHSTRETCHY = $00000001;
- //
- // Do this blt mirroring the surface left to right. Spin the
- // surface around its y-axis.
- //
- DDBLTFX_MIRRORLEFTRIGHT = $00000002;
- //
- // Do this blt mirroring the surface up and down. Spin the surface
- // around its x-axis.
- //
- DDBLTFX_MIRRORUPDOWN = $00000004;
- //
- // Schedule this blt to avoid tearing.
- //
- DDBLTFX_NOTEARING = $00000008;
- //
- // Do this blt rotating the surface one hundred and eighty degrees.
- //
- DDBLTFX_ROTATE180 = $00000010;
- //
- // Do this blt rotating the surface two hundred and seventy degrees.
- //
- DDBLTFX_ROTATE270 = $00000020;
- //
- // Do this blt rotating the surface ninety degrees.
- //
- DDBLTFX_ROTATE90 = $00000040;
- //
- // Do this z blt using dwZBufferLow and dwZBufferHigh as range values
- // specified to limit the bits copied from the source surface.
- //
- DDBLTFX_ZBUFFERRANGE = $00000080;
- //
- // Do this z blt adding the dwZBufferBaseDest to each of the sources z values
- // before comparing it with the desting z values.
- //
- DDBLTFX_ZBUFFERBASEDEST = $00000100;
- {-- DDS overlay FX flags -----------------------------------------------------}
- //
- // If stretching, use arithmetic stretching along the Y axis for this overlay.
- //
- DDOVERFX_ARITHSTRETCHY = $00000001;
- //
- // Mirror the overlay across the vertical axis
- //
- DDOVERFX_MIRRORLEFTRIGHT = $00000002;
- //
- // Mirror the overlay across the horizontal axis
- //
- DDOVERFX_MIRRORUPDOWN = $00000004;
- {-- DirectDraw WaitForVerticalBlank flags ------------------------------------}
- //
- // return when the vertical blank interval begins
- //
- DDWAITVB_BLOCKBEGIN = $00000001;
- //
- // set up an event to trigger when the vertical blank begins
- //
- DDWAITVB_BLOCKBEGINEVENT = $00000002;
- //
- // return when the vertical blank interval ends and display begins
- //
- DDWAITVB_BLOCKEND = $00000004;
- {-- DD GetFlipStatus flags ---------------------------------------------------}
- //
- // is it OK to flip now?
- //
- DDGFS_CANFLIP = $00000001;
- //
- // is the last flip finished?
- //
- DDGFS_ISFLIPDONE = $00000002;
- {-- DD GetBltStatus flags ----------------------------------------------------}
- //
- // is it OK to blt now?
- //
- DDGBS_CANBLT = $00000001;
- //
- // is the blt to the surface finished?
- //
- DDGBS_ISBLTDONE = $00000002;
- {-- DD EnumOverlayZOrder flags -----------------------------------------------}
- //
- // Enumerate overlays back to front.
- //
- DDENUMOVERLAYZ_BACKTOFRONT = $00000000;
- //
- // Enumerate overlays front to back
- //
- DDENUMOVERLAYZ_FRONTTOBACK = $00000001;
- {-- DD UpdateOverlayZOrder flags ---------------------------------------------}
- //
- // Send overlay to front
- //
- DDOVERZ_SENDTOFRONT = $00000000;
- //
- // Send overlay to back
- //
- DDOVERZ_SENDTOBACK = $00000001;
- //
- // Move Overlay forward
- //
- DDOVERZ_MOVEFORWARD = $00000002;
- //
- // Move Overlay backward
- //
- DDOVERZ_MOVEBACKWARD = $00000003;
- //
- // Move Overlay in front of relative surface
- //
- DDOVERZ_INSERTINFRONTOF = $00000004;
- //
- // Move Overlay in back of relative surface
- //
- DDOVERZ_INSERTINBACKOF = $00000005;
- {== DD return codes ==========================================================}
- // The return values from DirectDraw Commands and Surface that return an HRESULT
- // are codes from DirectDraw concerning the results of the action
- // requested by DirectDraw.
- //
- // Status is OK
- //
- // Issued by: DirectDraw Commands and all callbacks
- //
- DD_OK = 0;
- {-- DD EnumCallback return values --------------------------------------------}
- // EnumCallback returns are used to control the flow of the DIRECTDRAW and
- // DIRECTDRAWSURFACE object enumerations. They can only be returned by
- // enumeration callback routines.
- //
- // stop the enumeration
- //
- DDENUMRET_CANCEL = 0;
- //
- // continue the enumeration
- //
- DDENUMRET_OK = 1;
- {-- DD errors ----------------------------------------------------------------}
- // Errors are represented by negative values and cannot be combined.
- DDERR_BASE = $88760000;
- //
- // This object is already initialized
- //
- DDERR_ALREADYINITIALIZED = DDERR_BASE + 5 ;
- //
- // This surface can not be attached to the requested surface.
- //
- DDERR_CANNOTATTACHSURFACE = DDERR_BASE + 10 ;
- //
- // This surface can not be detached from the requested surface.
- //
- DDERR_CANNOTDETACHSURFACE = DDERR_BASE + 20 ;
- //
- // Support is currently not available.
- //
- DDERR_CURRENTLYNOTAVAIL = DDERR_BASE + 40 ;
- //
- // An exception was encountered while performing the requested operation
- //
- DDERR_EXCEPTION = DDERR_BASE + 55 ;
- //
- // Generic failure.
- //
- DDERR_GENERIC = E_FAIL ;
- //
- // Height of rectangle provided is not a multiple of reqd alignment
- //
- DDERR_HEIGHTALIGN = DDERR_BASE + 90 ;
- //
- // Unable to match primary surface creation request with existing
- // primary surface.
- //
- DDERR_INCOMPATIBLEPRIMARY = DDERR_BASE + 95 ;
- //
- // One or more of the caps bits passed to the callback are incorrect.
- //
- DDERR_INVALIDCAPS = DDERR_BASE + 100 ;
- //
- // DirectDraw does not support provided Cliplist.
- //
- DDERR_INVALIDCLIPLIST = DDERR_BASE + 110 ;
- //
- // DirectDraw does not support the requested mode
- //
- DDERR_INVALIDMODE = DDERR_BASE + 120 ;
- //
- // DirectDraw received a pointer that was an invalid DIRECTDRAW object.
- //
- DDERR_INVALIDOBJECT = DDERR_BASE + 130 ;
- //
- // One or more of the parameters passed to the callback function are
- // incorrect.
- //
- DDERR_INVALIDPARAMS = E_INVALIDARG;
- //
- // pixel format was invalid as specified
- //
- DDERR_INVALIDPIXELFORMAT = DDERR_BASE + 145 ;
- //
- // Rectangle provided was invalid.
- //
- DDERR_INVALIDRECT = DDERR_BASE + 150 ;
- //
- // Operation could not be carried out because one or more surfaces are locked
- //
- DDERR_LOCKEDSURFACES = DDERR_BASE + 160 ;
- //
- // There is no 3D present.
- //
- DDERR_NO3D = DDERR_BASE + 170 ;
- //
- // Operation could not be carried out because there is no alpha accleration
- // hardware present or available.
- //
- DDERR_NOALPHAHW = DDERR_BASE + 180 ;
- //
- // no clip list available
- //
- DDERR_NOCLIPLIST = DDERR_BASE + 205 ;
- //
- // Operation could not be carried out because there is no color conversion
- // hardware present or available.
- //
- DDERR_NOCOLORCONVHW = DDERR_BASE + 210 ;
- //
- // Create function called without DirectDraw object method SetCooperativeLevel
- // being called.
- //
- DDERR_NOCOOPERATIVELEVELSET = DDERR_BASE + 212 ;
- //
- // Surface doesn't currently have a color key
- //
- DDERR_NOCOLORKEY = DDERR_BASE + 215 ;
- //
- // Operation could not be carried out because there is no hardware support
- // of the dest color key.
- //
- DDERR_NOCOLORKEYHW = DDERR_BASE + 220 ;
- //
- // No DirectDraw support possible with current display driver
- //
- DDERR_NODIRECTDRAWSUPPORT = DDERR_BASE + 222 ;
- //
- // Operation requires the application to have exclusive mode but the
- // application does not have exclusive mode.
- //
- DDERR_NOEXCLUSIVEMODE = DDERR_BASE + 225 ;
- //
- // Flipping visible surfaces is not supported.
- //
- DDERR_NOFLIPHW = DDERR_BASE + 230 ;
- //
- // There is no GDI present.
- //
- DDERR_NOGDI = DDERR_BASE + 240 ;
- //
- // Operation could not be carried out because there is no hardware present
- // or available.
- //
- DDERR_NOMIRRORHW = DDERR_BASE + 250 ;
- //
- // Requested item was not found
- //
- DDERR_NOTFOUND = DDERR_BASE + 255 ;
- //
- // Operation could not be carried out because there is no overlay hardware
- // present or available.
- //
- DDERR_NOOVERLAYHW = DDERR_BASE + 260 ;
- //
- // Operation could not be carried out because there is no appropriate raster
- // op hardware present or available.
- //
- DDERR_NORASTEROPHW = DDERR_BASE + 280 ;
- //
- // Operation could not be carried out because there is no rotation hardware
- // present or available.
- //
- DDERR_NOROTATIONHW = DDERR_BASE + 290 ;
- //
- // Operation could not be carried out because there is no hardware support
- // for stretching
- //
- DDERR_NOSTRETCHHW = DDERR_BASE + 310 ;
- //
- // DirectDrawSurface is not in 4 bit color palette and the requested operation
- // requires 4 bit color palette.
- //
- DDERR_NOT4BITCOLOR = DDERR_BASE + 316 ;
- //
- // DirectDrawSurface is not in 4 bit color index palette and the requested
- // operation requires 4 bit color index palette.
- //
- DDERR_NOT4BITCOLORINDEX = DDERR_BASE + 317 ;
- //
- // DirectDraw Surface is not in 8 bit color mode and the requested operation
- // requires 8 bit color.
- //
- DDERR_NOT8BITCOLOR = DDERR_BASE + 320 ;
- //
- // Operation could not be carried out because there is no texture mapping
- // hardware present or available.
- //
- DDERR_NOTEXTUREHW = DDERR_BASE + 330 ;
- //
- // Operation could not be carried out because there is no hardware support
- // for vertical blank synchronized operations.
- //
- DDERR_NOVSYNCHW = DDERR_BASE + 335 ;
- //
- // Operation could not be carried out because there is no hardware support
- // for zbuffer blting.
- //
- DDERR_NOZBUFFERHW = DDERR_BASE + 340 ;
- //
- // Overlay surfaces could not be z layered based on their BltOrder because
- // the hardware does not support z layering of overlays.
- //
- DDERR_NOZOVERLAYHW = DDERR_BASE + 350 ;
- //
- // The hardware needed for the requested operation has already been
- // allocated.
- //
- DDERR_OUTOFCAPS = DDERR_BASE + 360 ;
- //
- // DirectDraw does not have enough memory to perform the operation.
- //
- DDERR_OUTOFMEMORY = E_OUTOFMEMORY;
- //
- // DirectDraw does not have enough memory to perform the operation.
- //
- DDERR_OUTOFVIDEOMEMORY = DDERR_BASE + 380 ;
- //
- // hardware does not support clipped overlays
- //
- DDERR_OVERLAYCANTCLIP = DDERR_BASE + 382 ;
- //
- // Can only have ony color key active at one time for overlays
- //
- DDERR_OVERLAYCOLORKEYONLYONEACTIVE = DDERR_BASE + 384 ;
- //
- // Access to this palette is being refused because the palette is already
- // locked by another thread.
- //
- DDERR_PALETTEBUSY = DDERR_BASE + 387 ;
- //
- // No src color key specified for this operation.
- //
- DDERR_COLORKEYNOTSET = DDERR_BASE + 400 ;
- //
- // This surface is already attached to the surface it is being attached to.
- //
- DDERR_SURFACEALREADYATTACHED = DDERR_BASE + 410 ;
- //
- // This surface is already a dependency of the surface it is being made a
- // dependency of.
- //
- DDERR_SURFACEALREADYDEPENDENT = DDERR_BASE + 420 ;
- //
- // Access to this surface is being refused because the surface is already
- // locked by another thread.
- //
- DDERR_SURFACEBUSY = DDERR_BASE + 430 ;
- //
- // Access to this surface is being refused because no driver exists
- // which can supply a pointer to the surface.
- // This is most likely to happen when attempting to lock the primary
- // surface when no DCI provider is present.
- //
- DDERR_CANTLOCKSURFACE = DDERR_BASE + 435 ;
- //
- // Access to Surface refused because Surface is obscured.
- //
- DDERR_SURFACEISOBSCURED = DDERR_BASE + 440 ;
- //
- // Access to this surface is being refused because the surface is gone.
- // The DIRECTDRAWSURFACE object representing this surface should
- // have Restore called on it.
- //
- DDERR_SURFACELOST = DDERR_BASE + 450 ;
- //
- // The requested surface is not attached.
- //
- DDERR_SURFACENOTATTACHED = DDERR_BASE + 460 ;
- //
- // Height requested by DirectDraw is too large.
- //
- DDERR_TOOBIGHEIGHT = DDERR_BASE + 470 ;
- //
- // Size requested by DirectDraw is too large -- The individual height and
- // width are OK.
- //
- DDERR_TOOBIGSIZE = DDERR_BASE + 480 ;
- //
- // Width requested by DirectDraw is too large.
- //
- DDERR_TOOBIGWIDTH = DDERR_BASE + 490 ;
- //
- // Action not supported.
- //
- DDERR_UNSUPPORTED = E_NOTIMPL;
- //
- // FOURCC format requested is unsupported by DirectDraw
- //
- DDERR_UNSUPPORTEDFORMAT = DDERR_BASE + 510 ;
- //
- // Bitmask in the pixel format requested is unsupported by DirectDraw
- //
- DDERR_UNSUPPORTEDMASK = DDERR_BASE + 520 ;
- //
- // vertical blank is in progress
- //
- DDERR_VERTICALBLANKINPROGRESS = DDERR_BASE + 537 ;
- //
- // Informs DirectDraw that the previous Blt which is transfering information
- // to or from this Surface is incomplete.
- //
- DDERR_WASSTILLDRAWING = DDERR_BASE + 540 ;
- //
- // Rectangle provided was not horizontally aligned on reqd. boundary
- //
- DDERR_XALIGN = DDERR_BASE + 560 ;
- //
- // The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
- // identifier.
- //
- DDERR_INVALIDDIRECTDRAWGUID = DDERR_BASE + 561 ;
- //
- // A DirectDraw object representing this driver has already been created
- // for this process.
- //
- DDERR_DIRECTDRAWALREADYCREATED = DDERR_BASE + 562 ;
- //
- // A hardware only DirectDraw object creation was attempted but the driver
- // did not support any hardware.
- //
- DDERR_NODIRECTDRAWHW = DDERR_BASE + 563 ;
- //
- // this process already has created a primary surface
- //
- DDERR_PRIMARYSURFACEALREADYEXISTS = DDERR_BASE + 564 ;
- //
- // software emulation not available.
- //
- DDERR_NOEMULATION = DDERR_BASE + 565 ;
- //
- // region passed to Clipper::GetClipList is too small.
- //
- DDERR_REGIONTOOSMALL = DDERR_BASE + 566 ;
- //
- // an attempt was made to set a clip list for a clipper objec that
- // is already monitoring an hwnd.
- //
- DDERR_CLIPPERISUSINGHWND = DDERR_BASE + 567 ;
- //
- // No clipper object attached to surface object
- //
- DDERR_NOCLIPPERATTACHED = DDERR_BASE + 568 ;
- //
- // Clipper notification requires an HWND or
- // no HWND has previously been set as the CooperativeLevel HWND.
- //
- DDERR_NOHWND = DDERR_BASE + 569 ;
- //
- // HWND used by DirectDraw CooperativeLevel has been subclassed,
- // this prevents DirectDraw from restoring state.
- //
- DDERR_HWNDSUBCLASSED = DDERR_BASE + 570 ;
- //
- // The CooperativeLevel HWND has already been set.
- // It can not be reset while the process has surfaces or palettes created.
- //
- DDERR_HWNDALREADYSET = DDERR_BASE + 571 ;
- //
- // No palette object attached to this surface.
- //
- DDERR_NOPALETTEATTACHED = DDERR_BASE + 572 ;
- //
- // No hardware support for 16 or 256 color palettes.
- //
- DDERR_NOPALETTEHW = DDERR_BASE + 573 ;
- //
- // If a clipper object is attached to the source surface passed into a
- // BltFast call.
- //
- DDERR_BLTFASTCANTCLIP = DDERR_BASE + 574 ;
- //
- // No blter.
- //
- DDERR_NOBLTHW = DDERR_BASE + 575 ;
- //
- // No DirectDraw ROP hardware.
- //
- DDERR_NODDROPSHW = DDERR_BASE + 576 ;
- //
- // returned when GetOverlayPosition is called on a hidden overlay
- //
- DDERR_OVERLAYNOTVISIBLE = DDERR_BASE + 577 ;
- //
- // returned when GetOverlayPosition is called on a overlay that UpdateOverlay
- // has never been called on to establish a destionation.
- //
- DDERR_NOOVERLAYDEST = DDERR_BASE + 578 ;
- //
- // returned when the position of the overlay on the destionation is no longer
- // legal for that destionation.
- //
- DDERR_INVALIDPOSITION = DDERR_BASE + 579 ;
- //
- // returned when an overlay member is called for a non-overlay surface
- //
- DDERR_NOTAOVERLAYSURFACE = DDERR_BASE + 580 ;
-
- //
- // An attempt was made to set the cooperative level when it was already
- // set to exclusive.
- //
- DDERR_EXCLUSIVEMODEALREADYSET = DDERR_BASE + 581 ;
- //
- // An attempt has been made to flip a surface that is not flippable.
- //
- DDERR_NOTFLIPPABLE = DDERR_BASE + 582 ;
- //
- // Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
- // created.
- //
- DDERR_CANTDUPLICATE = DDERR_BASE + 583 ;
- //
- // Surface was not locked. An attempt to unlock a surface that was not
- // locked at all, or by this process, has been attempted.
- //
- DDERR_NOTLOCKED = DDERR_BASE + 584 ;
- //
- // Windows can not create any more DCs
- //
- DDERR_CANTCREATEDC = DDERR_BASE + 585 ;
- //
- // No DC was ever created for this surface.
- //
- DDERR_NODC = DDERR_BASE + 586 ;
- //
- // This surface can not be restored because it was created in a different
- // mode.
- //
- DDERR_WRONGMODE = DDERR_BASE + 587 ;
- //
- // This surface can not be restored because it is an implicitly created
- // surface.
- //
- DDERR_IMPLICITLYCREATED = DDERR_BASE + 588 ;
- //
- // The surface being used is not a palette-based surface
- //
- DDERR_NOTPALETTIZED = DDERR_BASE + 589 ;
- //
- // The display is currently in an unsupported mode
- //
- DDERR_UNSUPPORTEDMODE = DDERR_BASE + 590 ;
- //
- // Operation could not be carried out because there is no mip-map
- // texture mapping hardware present or available.
- //
- DDERR_NOMIPMAPHW = DDERR_BASE + 591 ;
- //
- // The requested action could not be performed because the surface was of
- // the wrong type.
- //
- DDERR_INVALIDSURFACETYPE = DDERR_BASE + 592 ;
- //
- // A DC has already been returned for this surface. Only one DC can be
- // retrieved per surface.
- //
- DDERR_DCALREADYCREATED = DDERR_BASE + 620 ;
- //
- // The attempt to page lock a surface failed.
- //
- DDERR_CANTPAGELOCK = DDERR_BASE + 640 ;
- //
- // The attempt to page unlock a surface failed.
- //
- DDERR_CANTPAGEUNLOCK = DDERR_BASE + 660 ;
- //
- // An attempt was made to page unlock a surface with no outstanding page locks.
- //
- DDERR_NOTPAGELOCKED = DDERR_BASE + 680 ;
- //
- // An attempt was made to invoke an interface member of a DirectDraw object
- // created by CoCreateInstance() before it was initialized.
- //
- DDERR_NOTINITIALIZED = CO_E_NOTINITIALIZED;
- {-- API's --------------------------------------------------------------------}
- (*
- function DirectDrawEnumerate(lpCallback: PDDENUMCALLBACK;
- lpContext: Pointer): HRESULT; stdcall;
- function DirectDrawCreate(lpGUID: PGUID; var lplpDD: IDirectDraw;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- function DirectDrawCreateClipper(dwFlags: DWORD;
- var lplpDDClipper: IDirectDrawClipper;
- pUnkOuter: IUnknown): HRESULT; stdcall;
- *)
- implementation
- uses
- SysUtils;
- (*
- const
- DLLName = 'DDRAW.DLL';
- function DirectDrawEnumerate; external DLLName name 'DirectDrawEnumerateA' ;
- function DirectDrawCreate; external DLLName;
- function DirectDrawCreateClipper ; external DLLName;
- *)
- end.