// H to Pas Converter Ver0.3.0.3
//     Date : 97/09/01
//   Source : ddraw.h

//DirectX5 include file
//
//   Translated by kuroda Dycoon
//
//   1997/12/10

unit ddraw;


interface

uses Windows, OLE2;

const
  DIRECTDRAW_VERSION	= 00;

  DD_ROP_SPACE = ( 256 div 32);

  CO_E_NOTINITIALIZED	= 0401F0;

  _FACDD	= 6;

  CLSID_DirectDraw: TGUID = (
    D1:$D7B70EE0;D2:40;D3:CF;D4:($B0,,{viewgit}{/viewgit},,$AF,$C2,$CD,));
  CLSID_DirectDrawClipper: TGUID = (
    D1:3817A0;D2:DB3;D3:CF;D4:($A2,$DE,{viewgit}{/viewgit},$AA,{viewgit}{/viewgit},$b9,,));
  IID_IDirectDraw: TGUID = (
    D1:C14DB80;D2:$A733;D3:CE;D4:($A5,,{viewgit}{/viewgit},,$AF,{viewgit}{/viewgit}B,$E5,));
  IID_IDirectDraw2: TGUID = (
    D1:$B3A6F3E0;D2:B43;D3:CF;D4:($A2,$DE,{viewgit}{/viewgit},$AA,{viewgit}{/viewgit},$B9,,));
  IID_IDirectDrawSurface: TGUID = (
    D1:C14DB81;D2:$A733;D3:CE;D4:($A5,,{viewgit}{/viewgit},,$AF,{viewgit}{/viewgit}B,$E5,));
  IID_IDirectDrawSurface2: TGUID = (
    D1:805885;D2:eec;D3:cf;D4:(,,$a8,,,$c1,{viewgit}{/viewgit}e,));
  IID_IDirectDrawSurface3: TGUID = (
    D1:$DA044E00;D2:B2;D3:D0;D4:($A1,$D5,{viewgit}{/viewgit},$AA,{viewgit}{/viewgit},$B8,$DF,$BB));

  IID_IDirectDrawPalette: TGUID = (
    D1:C14DB84;D2:$A733;D3:CE;D4:($A5,,{viewgit}{/viewgit},,$AF,{viewgit}{/viewgit}B,$E5,));
  IID_IDirectDrawClipper: TGUID = (
    D1:C14DB85;D2:$A733;D3:CE;D4:($A5,,{viewgit}{/viewgit},,$AF,{viewgit}{/viewgit}B,$E5,));
  IID_IDirectDrawColorControl: TGUID = (
    D1:B9F0EE0;D2:{viewgit}{/viewgit}D7E;D3:D0;D4:(B,,{viewgit}{/viewgit},$A0,$C9,,$A3,$B8));


type

  IDirectDraw = class;
  IDirectDraw2 = class;
  IDirectDrawSurface = class;
  IDirectDrawSurface2 = class;
  IDirectDrawSurface3 = class;
  IDirectDrawPalette = class;
  IDirectDrawClipper = class;
  IDirectDrawColorControl = class;

  DDCOLORKEY = record
	 dwColorSpaceLowValue	: DWORD;
	 dwColorSpaceHighValue	: DWORD;
  end;

  DDSCAPS = record
	 dwCaps	: DWORD;	// capabilities of surface wanted
  end;

  DDPIXELFORMAT = record
	 dwSize	: DWORD;
	 dwFlags	: DWORD;
	 dwFourCC	: DWORD;
	case Integer of
	0: (
	   dwRGBBitCount	: DWORD;
	   dwRBitMask	: DWORD;
	   dwGBitMask	: DWORD;
	   dwBBitMask	: DWORD;
	   dwRGBAlphaBitMask	: DWORD;
	);
	1: (
	   dwYUVBitCount	: DWORD;
	   dwYBitMask	: DWORD;
	   dwUBitMask	: DWORD;
	   dwVBitMask	: DWORD;
	   dwYUVAlphaBitMask	: DWORD;
	);
	2: (
	   dwZBufferBitDepth	: DWORD;
	  Unknown2_2:  DWORD;
	  Unknown2_3:  DWORD;
	  Unknown2_4:  DWORD;
	   dwRGBZBitMask	: DWORD;
	);
	3: (
	   dwAlphaBitDepth	: DWORD;
	  Unknown3_2:  DWORD;
	  Unknown3_3:  DWORD;
	  Unknown3_4:  DWORD;
	   dwYUVZBitMask	: DWORD;
	);
  end;


  DDSURFACEDESC = 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	: longint;
	   dwBackBufferCount	: DWORD;
	   dwMipMapCount	: DWORD;
	   dwAlphaBitDepth	: DWORD;
	   dwReserved	: DWORD;
	   lpSurface	: Pointer;
	   ddckCKDestOverlay	: DDCOLORKEY;
	   ddckCKDestBlt	: DDCOLORKEY;
	   ddckCKSrcOverlay	: DDCOLORKEY;
	   ddckCKSrcBlt	: DDCOLORKEY;
	   ddpfPixelFormat	: DDPIXELFORMAT;
	   ddsCaps	: DDSCAPS;
	);
	1: (
	   dwLinearSize	: DWORD;
	  Unknown1_2:  DWORD;
	   dwZBufferBitDepth	: DWORD;
	);
	2: (
	  Unknown2_1:  longint;
	  Unknown2_2:  DWORD;
	   dwRefreshRate	: DWORD;
	);
  end;

  DDCOLORCONTROL = record
	 dwSize	: DWORD;
	 dwFlags	: DWORD;
	 lBrightness	: longint;
	 lContrast	: longint;
	 lHue	: longint;
	 lSaturation	: longint;
	 lSharpness	: longint;
	 lGamma	: longint;
	 lColorEnable	: longint;
	 dwReserved1	: DWORD;
  end;

    DDCAPS = record
	 dwSize	:DWORD  {  0};	// size of the DDDRIVERCAPS structure
	 dwCaps	:DWORD  {  4};	// driver specific capabilities
	 dwCaps2	:DWORD  {  8};	// more driver specific capabilites
	 dwCKeyCaps	:DWORD  {  c};	// color key capabilities of the surface
	 dwFXCaps	:DWORD  { 10};	// driver specific stretching and effects capabilites
	 dwFXAlphaCaps	:DWORD  { 14};	// alpha driver specific capabilities
	 dwPalCaps	:DWORD  { 18};	// palette capabilities
	 dwSVCaps	:DWORD  { 1c};	// stereo vision capabilities
	 dwAlphaBltConstBitDepths	:DWORD  { 20};	// DDBD_2,4,8
	 dwAlphaBltPixelBitDepths	:DWORD  { 24};	// DDBD_1,2,4,8
	 dwAlphaBltSurfaceBitDepths	:DWORD  { 28};	// DDBD_1,2,4,8
	 dwAlphaOverlayConstBitDepths	:DWORD  { 2c};	// DDBD_2,4,8
	 dwAlphaOverlayPixelBitDepths	:DWORD  { 30};	// DDBD_1,2,4,8
	 dwAlphaOverlaySurfaceBitDepths	:DWORD  { 34};	// DDBD_1,2,4,8
	 dwZBufferBitDepths	:DWORD  { 38};	// DDBD_8,16,24,32
	 dwVidMemTotal	:DWORD  { 3c};	// total amount of video memory
	 dwVidMemFree	:DWORD  { 40};	// amount of free video memory
	 dwMaxVisibleOverlays	:DWORD  { 44};	// maximum number of visible overlays
	 dwCurrVisibleOverlays	:DWORD  { 48};	// current number of visible overlays
	 dwNumFourCCCodes	:DWORD  { 4c};	// number of four cc codes
	 dwAlignBoundarySrc	:DWORD  { 50};	// source rectangle alignment
	 dwAlignSizeSrc	:DWORD  { 54};	// source rectangle byte size
	 dwAlignBoundaryDest	:DWORD  { 58};	// dest rectangle alignment
	 dwAlignSizeDest	:DWORD  { 5c};	// dest rectangle byte size
	 dwAlignStrideAlign	:DWORD { 60};	// stride alignment
	 dwRops	: array[0..DD_ROP_SPACE-1] of DWORD {64};	// ROPS supported
	 ddsCaps	:DDSCAPS { 84};	// DDSCAPS structure has all the general capabilities
	 dwMinOverlayStretch	:DWORD  { 88};	// minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
	 dwMaxOverlayStretch	:DWORD { 8c};	// maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
	 dwMinLiveVideoStretch	:DWORD { 90};	// minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
	 dwMaxLiveVideoStretch	:DWORD { 94};	// maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
	 dwMinHwCodecStretch	:DWORD { 98};	// minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
	 dwMaxHwCodecStretch	:DWORD { 9c};	// maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
	 dwReserved1	:DWORD { a0};	// reserved
	 dwReserved2	:DWORD { a4};	// reserved
	 dwReserved3	:DWORD { a8};	// reserved
	 dwSVBCaps	:DWORD { ac};	// driver specific capabilities for System->Vmem blts
	 dwSVBCKeyCaps	:DWORD { b0};	// driver color key capabilities for System->Vmem blts
	 dwSVBFXCaps	:DWORD { b4};	// driver FX capabilities for System->Vmem blts
	 dwSVBRops	: array[0..DD_ROP_SPACE-1] of DWORD{ b8};	// ROPS supported for System->Vmem blts
	 dwVSBCaps	: DWORD{ d8};	// driver specific capabilities for Vmem->System blts
	 dwVSBCKeyCaps	: DWORD{ dc};	// driver color key capabilities for Vmem->System blts
	 dwVSBFXCaps	: DWORD{ e0};	// driver FX capabilities for Vmem->System blts
	 dwVSBRops	: array[0..DD_ROP_SPACE-1] of DWORD{ e4};	// ROPS supported for Vmem->System blts
	 dwSSBCaps	: DWORD{104};	// driver specific capabilities for System->System blts
	 dwSSBCKeyCaps	: DWORD{108};	// driver color key capabilities for System->System blts
	 dwSSBFXCaps	: DWORD{10c};	// driver FX capabilities for System->System blts
	 dwSSBRops	: array[0..DD_ROP_SPACE-1] of DWORD{110};	// ROPS supported for System->System blts
	 dwMaxVideoPorts	: DWORD{130};	// maximum number of usable video ports
	 dwCurrVideoPorts	: DWORD{134};	// current number of video ports used
	 dwSVBCaps2	: DWORD{138};	// more driver specific capabilities for System->Vmem blts
	 dwNLVBCaps	: DWORD{13c};	// driver specific capabilities for non-local->local vidmem blts
	 dwNLVBCaps2	: DWORD{140};	// more driver specific capabilities non-local->local vidmem blts
	 dwNLVBCKeyCaps	: DWORD{144};	// driver color key capabilities for non-local->local vidmem blts
	 dwNLVBFXCaps	: DWORD{148};	// driver FX capabilities for non-local->local blts
	 dwNLVBRops	: array[0..DD_ROP_SPACE-1] of DWORD{14c};	// ROPS supported for non-local->local blts
         //dwReserved4	: DWORD{130};	// reserved
         //dwReserved5	: DWORD{134};	// reserved
         //dwReserved6	: DWORD{138};	// reserved
  end;

     LPDirectDrawSurface	= ^IDirectDrawSurface;

  DDOVERLAYFX = 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;
	   dwAlphaSrcConstBitDepth	: DWORD;
	   dwAlphaSrcConst	: DWORD;
	   dckDestColorkey	: DDCOLORKEY;
	   dckSrcColorkey	: DDCOLORKEY;
	   dwDDFX	: DWORD;
	   dwFlags	: DWORD;
	);
	1: (
	   lpDDSAlphaDest	: IDirectDrawSurface;
	  Unknown1_2:  DWORD;
	   lpDDSAlphaSrc	: IDirectDrawSurface;
	);
  end;

  DDBLTFX = 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;
	   dwZSrcConstBitDepth	: DWORD;
	   dwZSrcConst	: DWORD;
	   dwAlphaEdgeBlendBitDepth	: DWORD;
	   dwAlphaEdgeBlend	: DWORD;
	   dwReserved	: DWORD;
	   dwAlphaDestConstBitDepth	: DWORD;
	   dwAlphaDestConst	: DWORD;
	   dwAlphaSrcConstBitDepth	: DWORD;
	   dwAlphaSrcConst	: DWORD;
	   dwFillColor	: DWORD;
	   ddckDestColorkey	: DDCOLORKEY;
	   ddckSrcColorkey	: DDCOLORKEY;
	);
	1: (
	   lpDDSZBufferDest	: IDirectDrawSurface;
	  Unknown1_2:  DWORD;
	   lpDDSZBufferSrc	: IDirectDrawSurface;
	  Unknown1_4:  DWORD;
	  Unknown1_5:  DWORD;
	  Unknown1_6:  DWORD;
	  Unknown1_7:  DWORD;
	   lpDDSAlphaDest	: IDirectDrawSurface;
	  Unknown1_9:  DWORD;
	   lpDDSAlphaSrc	: IDirectDrawSurface;
	   dwFillDepth	: DWORD;
	);
	2: (
	  Unknown2_1:  DWORD;
	  Unknown2_2:  DWORD;
	  Unknown2_3:  DWORD;
	  Unknown2_4:  DWORD;
	  Unknown2_5:  DWORD;
	  Unknown2_6:  DWORD;
	  Unknown2_7:  DWORD;
	  Unknown2_8:  DWORD;
	  Unknown2_9:  DWORD;
	  Unknown2_10:  DWORD;
	   dwFillPixel	: DWORD;
	);
	3: (
	  Unknown3_1:  DWORD;
	  Unknown3_2:  DWORD;
	  Unknown3_3:  DWORD;
	  Unknown3_4:  DWORD;
	  Unknown3_5:  DWORD;
	  Unknown3_6:  DWORD;
	  Unknown3_7:  DWORD;
	  Unknown3_8:  DWORD;
	  Unknown3_9:  DWORD;
	  Unknown3_10:  DWORD;
	   lpDDSPattern	: IDirectDrawSurface;
	);
  end;

  LPDDBLTFX = ^DDBLTFX;

  DDBLTBATCH = record
	 lprDest	: ^TRECT;
	 lpDDSSrc	: IDirectDrawSurface;
	 lprSrc	: ^TRECT;
	 dwFlags	: DWORD;
   	 lpDDBltFx	: LPDDBLTFX;
  end;



  LPDIRECTDRAW	= IDirectDraw;
  LPDIRECTDRAW2	= IDirectDraw2;

  LPDIRECTDRAWSURFACE2	= IDirectDrawSurface2;
  LPDIRECTDRAWSURFACE3	= IDirectDrawSurface3;

  LPDIRECTDRAWPALETTE	= IDirectDrawPalette;
  LPDIRECTDRAWCLIPPER	= IDirectDrawClipper;
  LPDIRECTDRAWCOLORCONTROL	= IDirectDrawColorControl;



//  LPDDFXROP	= ^DDFXROP;
  LPDDSURFACEDESC	= ^DDSURFACEDESC;
  LPDDCOLORCONTROL	= ^DDCOLORCONTROL;
  LPDDCAPS = ^DDCAPS;
  LPDDCOLORKEY = ^DDCOLORKEY;
  LPDDPIXELFORMAT = ^DDPIXELFORMAT;
  LPDDOVERLAYFX = ^DDOVERLAYFX;
  LPDDSCAPS = ^DDSCAPS;
  LPDDBLTBATCH = ^DDBLTBATCH;

  LPPALETTEENTRY=^TPALETTEENTRY;


  LPDDENUMMODESCALLBACK = function ( const lpDDSurfaceDesc: DDSURFACEDESC ;
      lpContext: Pointer ): HRESULT ; stdcall ;
  LPDDENUMSURFACESCALLBACK = function ( lpDDSurface: IDirectDrawSurface ;
      const lpDDSurfaceDesc: DDSURFACEDESC ; lpContext: Pointer ): HRESULT ;
      stdcall ;

    IDirectDraw = class ( IUnknown )
//       ['{6C14DB80-A733-11CE-A521-0020AF0BE560}']
    function Compact: HRESULT;virtual ; stdcall ; abstract ;
    function CreateClipper(Para0: DWORD;var Para1 : IDIRECTDRAWCLIPPER;Para2: IUnknown): HRESULT; virtual ; stdcall ; abstract ;
    function CreatePalette(Para0: DWORD;Para1: PPALETTEENTRY;var Para2: IDirectDrawPalette;
	 Para3: IUnknown): HRESULT; virtual ; stdcall ; abstract ;
    function CreateSurface(const Para0: DDSURFACEDESC; var Para1: IDirectDrawSurface;
	 Para2: IUnknown): HRESULT; virtual ; stdcall ; abstract ;
    function DuplicateSurface(Para0: IDirectDrawSurface; var Para1: IDirectDrawSurface): HRESULT; virtual ; stdcall ; abstract ;
    function EnumDisplayModes(Para0: DWORD;Para1: lpDDSURFACEDESC; Para2: Pointer;
	 Para3: LPDDENUMMODESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function EnumSurfaces(Para0: DWORD;const Para1: DDSURFACEDESC; Para2: pointer; Para3: LPDDENUMSURFACESCALLBACK): HRESULT;virtual ; stdcall ; abstract ;
    function FlipToGDISurface: HRESULT; virtual ; stdcall ; abstract ;
    function GetCaps(var Para0: DDCAPS;var Para1: DDCAPS): HRESULT; virtual ; stdcall ; abstract ;
    function GetDisplayMode(const Para0: DDSURFACEDESC): HRESULT; virtual ; stdcall ; abstract ;
    function GetFourCCCodes(Para0: LPDWORD; Para1: LPDWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetGDISurface(var Para0: IDirectDrawSurface): HRESULT; virtual ; stdcall ; abstract ;
    function GetMonitorFrequency(Para0: LPDWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetScanLine(Para0: LPDWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetVerticalBlankStatus( var lpbIsInVB: BOOL): HRESULT; virtual ; stdcall ; abstract ;
    function Initialize(var Para0: PGUID): HRESULT; virtual ; stdcall ; abstract ;
    function RestoreDisplayMode: HRESULT; virtual ; stdcall ; abstract ;
    function SetCooperativeLevel(Para0: HWND; Para1: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function SetDisplayMode(Para0: DWORD; Para1: DWORD; Para2: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function WaitForVerticalBlank(Para0: DWORD; Para1: DWord): HRESULT; virtual ; stdcall ; abstract ;
  end;

    IDirectDrawSurface = class ( IUnknown )
//        ['{6C14DB81-A733-11CE-A521-0020AF0BE560}']
    function AddAttachedSurface(Para0: IDirectDrawSurface): HRESULT; virtual ; stdcall ; abstract ;
    function AddOverlayDirtyRect(const Para0: TRect): HRESULT; virtual ; stdcall ; abstract ;
    function Blt(const Para0: TRect; Para1: IDirectDrawSurface;const Para2: TREct; Para3: DWORD;
	 const Para4: DDBLTFX): HRESULT; virtual ; stdcall ; abstract ;
    function BltBatch(const lpDDBltBatch: DDBLTBATCH; Para1: DWORD; Para2: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function BltFast(Para0: DWORD; Para1: DWORD; Para2: IDirectDrawSurface;const Para3: TRect;
	 Para4: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function DeleteAttachedSurface(Para0: DWORD; Para1: IDirectDrawSurface): HRESULT; virtual ; stdcall ; abstract ;
    function EnumAttachedSurfaces(Para0: Pointer; Para1: LPDDENUMSURFACESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function EnumOverlayZOrders(Para0: DWORD; Para1: Pointer; Para2: LPDDENUMSURFACESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function Flip(Para0: IDirectDrawSurface; Para1: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetAttachedSurface( var lpDDSCaps: DDSCAPS ; var Para1: IDirectDrawSurface): HRESULT; virtual ; stdcall ; abstract ;
    function GetBltStatus(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetCaps(Para0: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function GetClipper(Para0: IDIRECTDRAWCLIPPER): HRESULT; virtual ; stdcall ; abstract ;
    function GetColorKey(Para0: DWORD; const Para1: DDCOLORKEY): HRESULT; virtual ; stdcall ; abstract ;
    function GetDC(var Para0: HDC): HRESULT; virtual ; stdcall ; abstract ;
    function GetFlipStatus(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetOverlayPosition(Para0: pointer; Para1: pointer): HRESULT; virtual ; stdcall ; abstract ;
    function GetPalette(var para0 : IDirectDrawPalette): HRESULT; virtual ; stdcall ; abstract ;
    function GetPixelFormat(const Para0: DDPIXELFORMAT): HRESULT; virtual ; stdcall ; abstract ;
    function GetSurfaceDesc(const Para0: DDSURFACEDESC): HRESULT; virtual ; stdcall ; abstract ;
    function Initialize(Para0: IDirectDraw;const Para1: DDSURFACEDESC): HRESULT; virtual ; stdcall ; abstract ;
    function IsLost: HRESULT; virtual ; stdcall ; abstract ;
    function Lock(Para0: PRect;var Para1: DDSURFACEDESC; Para2: DWORD; Para3: THandle): HRESULT; virtual ; stdcall ; abstract ;
    function ReleaseDC(Para0: HDC): HRESULT; virtual ; stdcall ; abstract ;
    function Restore: HRESULT; virtual ; stdcall ; abstract ;
    function SetClipper(Para0: IDIRECTDRAWCLIPPER): HRESULT; virtual ; stdcall ; abstract ;
    function SetColorKey(Para0: DWORD;const Para1: DDCOLORKEY): HRESULT; virtual ; stdcall ; abstract ;
    function SetOverlayPosition(Para0: longint; Para1: longint): HRESULT; virtual ; stdcall ; abstract ;
    function SetPalette(Para0: IDirectDrawPalette): HRESULT; virtual ; stdcall ; abstract ;
    function Unlock(Para0: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlay(const Para0: TRect; Para1: IDirectDrawSurface;const  Para2: TRect;
	 Para3: DWORD;const Para4: DDOVERLAYFX): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlayDisplay(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlayZOrder(Para0: DWORD; Para1: IDirectDrawSurface): HRESULT; virtual ; stdcall ; abstract ;
  end;


  IDirectDrawPalette = class ( IUnknown )
//    ['{6C14DB84-A733-11CE-A521-0020AF0BE560}']
    function GetCaps(Para0: LPDWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetEntries(Para0: DWORD; Para1: DWORD; Para2: DWORD; Para3: LPPALETTEENTRY): HRESULT; virtual ; stdcall ; abstract ;
    function Initialize(Para0: IDirectDraw; Para1: DWORD; Para2: LPPALETTEENTRY): HRESULT;virtual ; stdcall ; abstract ;
    function SetEntries(Para0: DWORD; Para1: DWORD; Para2: DWORD; Para3: LPPALETTEENTRY): HRESULT; virtual ; stdcall ; abstract ;
  end;

  IDirectDrawClipper = class ( IUnknown )
//    ['{6C14DB85-A733-11CE-A521-0020AF0BE560}']
    function GetClipList(const Para0: TRect; Para1: PRgnData;var Para2: DWord): HRESULT; virtual ; stdcall ; abstract ;
    function GetHWnd(var Para0: HWND): HRESULT; virtual ; stdcall ; abstract ;
    function Initialize(Para0: IDirectDraw; Para1: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function IsClipListChanged(var Para0: BOOL): HRESULT; virtual ; stdcall ; abstract ;
    function SetClipList(Para0: Pointer; Para1: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function SetHWnd(Para0: DWORD; Para1: HWND): HRESULT; virtual ; stdcall ; abstract ;
  end;

  IDirectDraw2 = class ( IUnknown )
//    ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}']
    function Compact: HRESULT; virtual ; stdcall ; abstract ;
    function CreateClipper(Para0: DWORD;var para1: IDIRECTDRAWCLIPPER; Para2: IUnknown): HRESULT; virtual ; stdcall ; abstract ;
    function CreatePalette(Para0: DWORD; Para1: LPPALETTEENTRY;var Para2: IDirectDrawPalette;
	  Para3: IUnknown): HRESULT; virtual ; stdcall ; abstract ;
    function CreateSurface(const Para0: DDSURFACEDESC; var Para1: IDirectDrawSurface;
	  Para2: IUnknown): HRESULT; virtual ; stdcall ; abstract ;
    function DuplicateSurface(Para0: IDirectDrawSurface; var Para1: IDirectDrawSurface): HRESULT; virtual ; stdcall ; abstract ;
    function EnumDisplayModes(Para0: DWORD;const Para1: DDSURFACEDESC; Para2: pointer;
	 Para3: LPDDENUMMODESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function EnumSurfaces(Para0: DWORD;const Para1: DDSURFACEDESC; Para2: Pointer; Para3: LPDDENUMSURFACESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function FlipToGDISurface: HRESULT; virtual ; stdcall ; abstract ;
    function GetCaps(var Para0: DDCAPS;var Para1: DDCAPS): HRESULT; virtual ; stdcall ; abstract ;
    function GetDisplayMode(const Para0: DDSURFACEDESC): HRESULT; virtual ; stdcall ; abstract ;
    function GetFourCCCodes(Para0: LPDWORD; Para1: LPDWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetGDISurface(var Para0: IDirectDrawSurface): HRESULT; virtual ; stdcall ; abstract ;
    function GetMonitorFrequency(Para0: LPDWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetScanLine(Para0: LPDWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetVerticalBlankStatus(Para0: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function Initialize(var Para0: PGUID): HRESULT; virtual ; stdcall ; abstract ;
    function RestoreDisplayMode: HRESULT; virtual ; stdcall ; abstract ;
    function SetCooperativeLevel(Para0: HWND; Para1: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function SetDisplayMode(Para0: DWORD; Para1: DWORD; Para2: DWORD; Para3: DWORD;
	 Para4: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function WaitForVerticalBlank(Para0: DWORD; Para1: DWord): HRESULT; virtual ; stdcall ; abstract ;
{** Added in the v2 interface **}
    function GetAvailableVidMem(const Para0: DDSCAPS;var Para1: DWORD;var Para2: DWORD): HRESULT; virtual ; stdcall ; abstract ;
  end;

    IDirectDrawSurface2 = class ( IUnknown )
//      ['{57805885-6eec-11cf-9441-a82303c10e27}']
    function AddAttachedSurface(Para0: IDIRECTDRAWSURFACE2): HRESULT; virtual ; stdcall ; abstract ;
    function AddOverlayDirtyRect(const Para0: TRect): HRESULT; virtual ; stdcall ; abstract ;
    function Blt(const Para0: TRect; Para1: IDIRECTDRAWSURFACE2;const Para2:TRect; Para3: DWORD;
	 const Para4: DDBLTFX): HRESULT; virtual ; stdcall ; abstract ;
    function BltBatch(const Para0: DDBLTBATCH; Para1: DWORD; Para2: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function BltFast(Para0: DWORD; Para1: DWORD; Para2: IDIRECTDRAWSURFACE2;const Para3: TRect;
	 Para4: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function DeleteAttachedSurface(Para0: DWORD; Para1: IDIRECTDRAWSURFACE2): HRESULT; virtual ; stdcall ; abstract ;
    function EnumAttachedSurfaces(Para0: Pointer; Para1: LPDDENUMSURFACESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function EnumOverlayZOrders(Para0: DWORD; Para1: Pointer; Para2: LPDDENUMSURFACESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function Flip(Para0: IDIRECTDRAWSURFACE2; Para1: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetAttachedSurface(const Para0: DDSCAPS; var Para1: IDIRECTDRAWSURFACE2): HRESULT; virtual ; stdcall ; abstract ;
    function GetBltStatus(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetCaps(const Para0: DDSCAPS): HRESULT; virtual ; stdcall ; abstract ;
    function GetClipper(Para0: IDIRECTDRAWCLIPPER): HRESULT; virtual ; stdcall ; abstract ;
    function GetColorKey(Para0: DWORD;const Para1: DDCOLORKEY): HRESULT; virtual ; stdcall ; abstract ;
    function GetDC(var Para0: HDC): HRESULT; virtual ; stdcall ; abstract ;
    function GetFlipStatus(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetOverlayPosition(Para0: Pointer; Para1: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function GetPalette(var Para0: IDirectDrawPalette): HRESULT; virtual ; stdcall ; abstract ;
    function GetPixelFormat(const Para0: DDPIXELFORMAT): HRESULT; virtual ; stdcall ; abstract ;
    function GetSurfaceDesc(const Para0: DDSURFACEDESC): HRESULT; virtual ; stdcall ; abstract ;
    function Initialize(Para0: IDirectDraw;const Para1: DDSURFACEDESC): HRESULT; virtual ; stdcall ; abstract ;
    function IsLost: HRESULT; virtual ; stdcall ; abstract ;
    function Lock(Para0: PRect;var Para1: DDSURFACEDESC; Para2: DWORD; Para3: THandle): HRESULT; virtual ; stdcall ; abstract ;
    function ReleaseDC(Para0: HDC): HRESULT; virtual ; stdcall ; abstract ;
    function Restore: HRESULT; virtual ; stdcall ; abstract ;
    function SetClipper(Para0: IDIRECTDRAWCLIPPER): HRESULT; virtual ; stdcall ; abstract ;
    function SetColorKey(Para0: DWORD;const Para1: DDCOLORKEY): HRESULT; virtual ; stdcall ; abstract ;
    function SetOverlayPosition(Para0: longint; Para1: longint): HRESULT; virtual ; stdcall ; abstract ;
    function SetPalette(Para0: IDirectDrawPalette): HRESULT; virtual ; stdcall ; abstract ;
    function Unlock(Para0: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlay(const Para0:TRect; Para1: IDIRECTDRAWSURFACE2;const Para2: TRect;
	 Para3: DWORD;const Para4: DDOVERLAYFX): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlayDisplay(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlayZOrder(Para0: DWORD; Para1: IDIRECTDRAWSURFACE2): HRESULT; virtual ; stdcall ; abstract ;
{** Added in the v2 interface **}
    function GetDDInterface(var Para0: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function PageLock(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function PageUnlock(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
  end;

    IDirectDrawSurface3 = class ( IUnknown )
//      ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}']
    function AddAttachedSurface(Para0: IDIRECTDRAWSURFACE3): HRESULT; virtual ; stdcall ; abstract ;
    function AddOverlayDirtyRect(const Para0: TRect): HRESULT; virtual ; stdcall ; abstract ;
    function Blt(Para0: Pointer; Para1: IDIRECTDRAWSURFACE3; Para2: Pointer; Para3: DWORD;
	 const Para4: DDBLTFX): HRESULT; virtual ; stdcall ; abstract ;
    function BltBatch(const Para0: DDBLTBATCH; Para1: DWORD; Para2: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function BltFast(Para0: DWORD; Para1: DWORD; Para2: IDIRECTDRAWSURFACE3; Para3: Pointer;
	 Para4: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function DeleteAttachedSurface(Para0: DWORD; Para1: IDIRECTDRAWSURFACE3): HRESULT; virtual ; stdcall ; abstract ;
    function EnumAttachedSurfaces(Para0: Pointer; Para1: LPDDENUMSURFACESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function EnumOverlayZOrders(Para0: DWORD; Para1: Pointer; Para2: LPDDENUMSURFACESCALLBACK): HRESULT; virtual ; stdcall ; abstract ;
    function Flip(Para0: IDIRECTDRAWSURFACE3; Para1: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetAttachedSurface(const Para0: DDSCAPS; var Para1: IDIRECTDRAWSURFACE3): HRESULT; virtual ; stdcall ; abstract ;
    function GetBltStatus(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetCaps(const Para0: DDSCAPS): HRESULT; virtual ; stdcall ; abstract ;
    function GetClipper(para0: IDIRECTDRAWCLIPPER): HRESULT; virtual ; stdcall ; abstract ;
    function GetColorKey(Para0: DWORD;const Para1: DDCOLORKEY): HRESULT; virtual ; stdcall ; abstract ;
    function GetDC(var Para0: HDC): HRESULT; virtual ; stdcall ; abstract ;
    function GetFlipStatus(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function GetOverlayPosition(Para0: Pointer; Para1: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function GetPalette(var para0: IDirectDrawPalette): HRESULT; virtual ; stdcall ; abstract ;
    function GetPixelFormat(const Para0: DDPIXELFORMAT): HRESULT; virtual ; stdcall ; abstract ;
    function GetSurfaceDesc(const Para0: DDSURFACEDESC): HRESULT; virtual ; stdcall ; abstract ;
    function Initialize(Para0: IDirectDraw;const Para1: DDSURFACEDESC): HRESULT; virtual ; stdcall ; abstract ;
    function IsLost: HRESULT; virtual ; stdcall ; abstract ;
    function Lock(Para0: PRect;var Para1: DDSURFACEDESC; Para2: DWORD; Para3: THandle): HRESULT; virtual ; stdcall ; abstract ;
    function ReleaseDC(Para0: HDC): HRESULT; virtual ; stdcall ; abstract ;
    function Restore: HRESULT; virtual ; stdcall ; abstract ;
    function SetClipper(Para0: IDIRECTDRAWCLIPPER): HRESULT; virtual ; stdcall ; abstract ;
    function SetColorKey(Para0: DWORD;const Para1: DDCOLORKEY): HRESULT; virtual ; stdcall ; abstract ;
    function SetOverlayPosition(Para0: longint; Para1: longint): HRESULT; virtual ; stdcall ; abstract ;
    function SetPalette(Para0: IDirectDrawPalette): HRESULT; virtual ; stdcall ; abstract ;
    function Unlock(Para0: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlay(const Para0: TRect; Para1: IDIRECTDRAWSURFACE3;const Para2: TRect;
	 Para3: DWORD;const Para4: DDOVERLAYFX): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlayDisplay(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function UpdateOverlayZOrder(Para0: DWORD; Para1: IDIRECTDRAWSURFACE3): HRESULT; virtual ; stdcall ; abstract ;
{** Added in the v2 interface **}
    function GetDDInterface(var Para0: Pointer): HRESULT; virtual ; stdcall ; abstract ;
    function PageLock(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
    function PageUnlock(Para0: DWORD): HRESULT; virtual ; stdcall ; abstract ;
{** Added in the V3 interface **}
    function SetSurfaceDesc(const Para0: DDSURFACEDESC; Para1: DWORD): HRESULT; virtual ; stdcall ; abstract ;
  end;

  IDirectDrawColorControl = class ( IUnknown )
//    ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}']
    function GetColorControls(const Para0: DDCOLORCONTROL): HRESULT; virtual ; stdcall ; abstract ;
    function SetColorControls(const Para0: DDCOLORCONTROL): HRESULT; virtual ; stdcall ; abstract ;
  end;

//  function DirectDrawEnumerateW(lpCallback: LPDDENUMCALLBACKW; lpContext: Pointer): HRESULT; stdcall;
//  function DirectDrawEnumerateA(lpCallback: LPDDENUMCALLBACKA; lpContext: Pointer): HRESULT; stdcall;
//type
//  LPDDENUMCALLBACK	= LPDDENUMCALLBACKW;
//const
//  DirectDrawEnumerate	= DirectDrawEnumerateW;
//type
//  LPDDENUMCALLBACK	= LPDDENUMCALLBACKA;
const
//  DirectDrawEnumerate	= DirectDrawEnumerateA;
  REGSTR_KEY_DDHW_DESCRIPTION	= 'Description';
  REGSTR_KEY_DDHW_DRIVERNAME	= 'DriverName';
  REGSTR_PATH_DDHW	= 'Hardware\DirectDrawDrivers';

  DDCREATE_HARDWAREONLY	= {viewgit}{/viewgit}000001;
  DDCREATE_EMULATIONONLY	= {viewgit}{/viewgit}000002;
  function DirectDrawCreate(lpGUID: PGUID; var lplpDD: IDirectDraw; pUnkOuter: IUnknown): HRESULT;stdcall ;
  function DirectDrawCreateClipper(dwFlags: DWORD; var lplpDDClipper: IDIRECTDRAWCLIPPER;
	 pUnkOuter: IUnknown): HRESULT;stdcall ;





type
  HRESULT	= longint;

  LPDDENUMCALLBACK = function ( lpGUID: PGUID ; lpDriverDescription: LPSTR ;
      lpDriverName: LPSTR ; lpContext: Pointer ): BOOL ;stdcall;



type
  DDCAPS_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	: DDSCAPS;	// 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;



const
  DDSD_CAPS	= {viewgit}{/viewgit}000001;	// default

{
 * dwHeight field is valid.
 }
  DDSD_HEIGHT	= {viewgit}{/viewgit}000002;

{
 * dwWidth field is valid.
 }
  DDSD_WIDTH	= {viewgit}{/viewgit}000004;

{
 * lPitch is valid.
 }
  DDSD_PITCH	= {viewgit}{/viewgit}000008;

{
 * dwBackBufferCount is valid.
 }
  DDSD_BACKBUFFERCOUNT	= {viewgit}{/viewgit}000020;

{
 * dwZBufferBitDepth is valid.
 }
  DDSD_ZBUFFERBITDEPTH	= {viewgit}{/viewgit}000040;

{
 * dwAlphaBitDepth is valid.
 }
  DDSD_ALPHABITDEPTH	= {viewgit}{/viewgit}000080;


{
 * lpSurface is valid.
 }
  DDSD_LPSURFACE	= {viewgit}{/viewgit}000800;

{
 * ddpfPixelFormat is valid.
 }
  DDSD_PIXELFORMAT	= {viewgit}{/viewgit}001000;

{
 * ddckCKDestOverlay is valid.
 }
  DDSD_CKDESTOVERLAY	= {viewgit}{/viewgit}002000;

{
 * ddckCKDestBlt is valid.
 }
  DDSD_CKDESTBLT	= {viewgit}{/viewgit}004000;

{
 * ddckCKSrcOverlay is valid.
 }
  DDSD_CKSRCOVERLAY	= {viewgit}{/viewgit}008000;

{
 * ddckCKSrcBlt is valid.
 }
  DDSD_CKSRCBLT	= {viewgit}{/viewgit}010000;

{
 * dwMipMapCount is valid.
 }
  DDSD_MIPMAPCOUNT	= {viewgit}{/viewgit}020000;

{
  * dwRefreshRate is valid
  }
  DDSD_REFRESHRATE	= {viewgit}{/viewgit}040000;

{
 * dwLinearSize is valid
 }
  DDSD_LINEARSIZE	= {viewgit}{/viewgit}080000;

{
 * All input fields are valid.
 }
  DDSD_ALL	= {viewgit}{/viewgit}0ff9ee;


{
 * DDCOLORCONTROL
 }


{
 * lBrightness field is valid.
 }
const
  DDCOLOR_BRIGHTNESS	= {viewgit}{/viewgit}000001;

{
 * lContrast field is valid.
 }
  DDCOLOR_CONTRAST	= {viewgit}{/viewgit}000002;

{
 * lHue field is valid.
 }
  DDCOLOR_HUE	= {viewgit}{/viewgit}000004;

{
 * lSaturation field is valid.
 }
  DDCOLOR_SATURATION	= {viewgit}{/viewgit}000008;

{
 * lSharpness field is valid.
 }
  DDCOLOR_SHARPNESS	= {viewgit}{/viewgit}000010;

{
 * lGamma field is valid.
 }
  DDCOLOR_GAMMA	= {viewgit}{/viewgit}000020;

{
 * lColorEnable field is valid.
 }
  DDCOLOR_COLORENABLE	= {viewgit}{/viewgit}000040;



{============================================================================
 *
 * Direct Draw Capability Flags
 *
 * These flags are used to describe the capabilities of a given Surface.
 * All flags are bit flags.
 *
 *==========================================================================}

{***************************************************************************
 *
 * DIRECTDRAWSURFACE CAPABILITY FLAGS
 *
 ***************************************************************************}

{
 * This bit is reserved. It should not be specified.
 }
  DDSCAPS_RESERVED1	= {viewgit}{/viewgit}000001;

{
 * Indicates that this surface contains alpha-only information.
 * (To determine if a surface is RGBA/YUVA, the pixel format must be
 * interrogated.)
 }
  DDSCAPS_ALPHA	= {viewgit}{/viewgit}000002;

{
 * 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	= {viewgit}{/viewgit}000004;

{
 * 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	= {viewgit}{/viewgit}000008;

{
 * 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	= {viewgit}{/viewgit}000010;

{
 * 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 standalonw 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	= {viewgit}{/viewgit}000020;

{
 * 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	= {viewgit}{/viewgit}000040;

{
 * 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	= {viewgit}{/viewgit}000080;

{
 * Indicates that unique DirectDrawPalette objects can be created and
 * attached to this surface.
 }
  DDSCAPS_PALETTE	= {viewgit}{/viewgit}000100;

{
 * Indicates that this surface is the primary surface.	The primary
 * surface represents what the user is seeing at the moment.
 }
  DDSCAPS_PRIMARYSURFACE	= {viewgit}{/viewgit}000200;

{
 * 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	= {viewgit}{/viewgit}000400;

{
 * Indicates that this surface memory was allocated in system memory
 }
  DDSCAPS_SYSTEMMEMORY	= {viewgit}{/viewgit}000800;

{
 * 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	= {viewgit}{/viewgit}001000;

{
 * 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	= {viewgit}{/viewgit}002000;

{
 * Indicates that this surface exists in video memory.
 }
  DDSCAPS_VIDEOMEMORY	= {viewgit}{/viewgit}004000;

{
 * 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	= {viewgit}{/viewgit}008000;

{
 * 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	= {viewgit}{/viewgit}010000;

{
 * 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	= {viewgit}{/viewgit}020000;

{
 * Indicates surface will have a DC associated longint term
 }
  DDSCAPS_OWNDC	= {viewgit}{/viewgit}040000;

{
 * Indicates surface should be able to receive live video
 }
  DDSCAPS_LIVEVIDEO	= {viewgit}{/viewgit}080000;

{
 * Indicates surface should be able to have a stream decompressed
 * to it by the hardware.
 }
  DDSCAPS_HWCODEC	= {viewgit}{/viewgit}100000;

{
 * Surface is a ModeX surface.
 *
 }
  DDSCAPS_MODEX	= {viewgit}{/viewgit}200000;

{
 * 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 imiticitly by CreateSurface.
 * If this bit is set then DDSCAPS_TEXTURE must also be set.
 }
  DDSCAPS_MIPMAP	= {viewgit}{/viewgit}400000;

{
 * This bit is reserved. It should not be specified.
 }
  DDSCAPS_RESERVED2	= {viewgit}{/viewgit}800000;


{
 * Indicates that memory for the surface is not allocated until the surface
 * is loaded (via the Direct3D texture Load() function).
 }
  DDSCAPS_ALLOCONLOAD	= 000000;

{
 * Indicates that the surface will recieve data from a video port.
 }
  DDSCAPS_VIDEOPORT	= 000000;

{
 * Indicates that a video memory surface is resident in true, local video
 * memory rather than non-local video memory. If this flag is specified then
 * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
 * DDSCAPS_NONLOCALVIDMEM.
 }
  DDSCAPS_LOCALVIDMEM	= 000000;

{
 * Indicates that a video memory surface is resident in non-local video
 * memory rather than true, local video memory. If this flag is specified
 * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
 * DDSCAPS_LOCALVIDMEM.
 }
  DDSCAPS_NONLOCALVIDMEM	= 000000;

{
 * Indicates that this surface is a standard VGA mode surface, and not a
 * ModeX surface. (This flag will never be set in combination with the
 * DDSCAPS_MODEX flag).
 }
  DDSCAPS_STANDARDVGAMODE	= 000000;

{
 * Indicates that this surface will be an optimized surface. This flag is
 * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
 * will be created without any underlying video memory until loaded.
 }
  DDSCAPS_OPTIMIZED	= 000000;



{***************************************************************************
 *
 * DIRECTDRAW DRIVER CAPABILITY FLAGS
 *
 ***************************************************************************}

{
 * Display hardware has 3D acceleration.
 }
  DDCAPS_3D	= {viewgit}{/viewgit}000001;

{
 * Indicates that DirectDraw will support only dest rectangles that are aligned
 * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
 * READ ONLY.
 }
  DDCAPS_ALIGNBOUNDARYDEST	= {viewgit}{/viewgit}000002;

{
 * Indicates that DirectDraw will support only source rectangles  whose sizes in
 * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively.  READ ONLY.
 }
  DDCAPS_ALIGNSIZEDEST	= {viewgit}{/viewgit}000004;
{
 * Indicates that DirectDraw will support only source rectangles that are aligned
 * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
 * READ ONLY.
 }
  DDCAPS_ALIGNBOUNDARYSRC	= {viewgit}{/viewgit}000008;

{
 * Indicates that DirectDraw will support only source rectangles  whose sizes in
 * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively.  READ ONLY.
 }
  DDCAPS_ALIGNSIZESRC	= {viewgit}{/viewgit}000010;

{
 * Indicates that DirectDraw will create video memory surfaces that have a stride
 * alignment equal to DIRECTDRAWCAPS.dwAlignStride.  READ ONLY.
 }
  DDCAPS_ALIGNSTRIDE	= {viewgit}{/viewgit}000020;

{
 * Display hardware is capable of blt operations.
 }
  DDCAPS_BLT	= {viewgit}{/viewgit}000040;

{
 * Display hardware is capable of asynchronous blt operations.
 }
  DDCAPS_BLTQUEUE	= {viewgit}{/viewgit}000080;

{
 * Display hardware is capable of color space conversions during the blt operation.
 }
  DDCAPS_BLTFOURCC	= {viewgit}{/viewgit}000100;

{
 * Display hardware is capable of stretching during blt operations.
 }
  DDCAPS_BLTSTRETCH	= {viewgit}{/viewgit}000200;

{
 * Display hardware is shared with GDI.
 }
  DDCAPS_GDI	= {viewgit}{/viewgit}000400;

{
 * Display hardware can overlay.
 }
  DDCAPS_OVERLAY	= {viewgit}{/viewgit}000800;

{
 * Set if display hardware supports overlays ban can not clip them.
 }
  DDCAPS_OVERLAYCANTCLIP	= {viewgit}{/viewgit}001000;

{
 * Indicates that overlay hardware is capable of color space conversions during
 * the overlay operation.
 }
  DDCAPS_OVERLAYFOURCC	= {viewgit}{/viewgit}002000;

{
 * Indicates that stretching can be done by the overlay hardware.
 }
  DDCAPS_OVERLAYSTRETCH	= {viewgit}{/viewgit}004000;

{
 * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
 * other than the primary surface.
 }
  DDCAPS_PALETTE	= {viewgit}{/viewgit}008000;

{
 * Indicates that palette changes can be syncd with the veritcal refresh.
 }
  DDCAPS_PALETTEVSYNC	= {viewgit}{/viewgit}010000;

{
 * Display hardware can return the current scan line.
 }
  DDCAPS_READSCANLINE	= {viewgit}{/viewgit}020000;

{
 * Display hardware has stereo vision capabilities.  DDSCAPS_PRIMARYSURFACELEFT
 * can be created.
 }
  DDCAPS_STEREOVIEW	= {viewgit}{/viewgit}040000;

{
 * Display hardware is capable of generating a vertical blank interrupt.
 }
  DDCAPS_VBI	= {viewgit}{/viewgit}080000;

{
 * Supports the use of z buffers with blt operations.
 }
  DDCAPS_ZBLTS	= {viewgit}{/viewgit}100000;

{
 * Supports Z Ordering of overlays.
 }
  DDCAPS_ZOVERLAYS	= {viewgit}{/viewgit}200000;

{
 * Supports color key
 }
  DDCAPS_COLORKEY	= {viewgit}{/viewgit}400000;

{
 * Supports alpha surfaces
 }
  DDCAPS_ALPHA	= {viewgit}{/viewgit}800000;

{
 * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
 }
  DDCAPS_COLORKEYHWASSIST	= 000000;

{
 * no hardware support at all
 }
  DDCAPS_NOHARDWARE	= 000000;

{
 * Display hardware is capable of color fill with bltter
 }
  DDCAPS_BLTCOLORFILL	= 000000;

{
 * Display hardware is bank switched, and potentially very slow at
 * random access to VRAM.
 }
  DDCAPS_BANKSWITCHED	= 000000;

{
 * Display hardware is capable of depth filling Z-buffers with bltter
 }
  DDCAPS_BLTDEPTHFILL	= 000000;

{
 * Display hardware is capable of clipping while bltting.
 }
  DDCAPS_CANCLIP	= 000000;

{
 * Display hardware is capable of clipping while stretch bltting.
 }
  DDCAPS_CANCLIPSTRETCHED	= 000000;

{
 * Display hardware is capable of bltting to or from system memory
 }
  DDCAPS_CANBLTSYSMEM	= 000000;


{***************************************************************************
 *
 * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
 *
 ***************************************************************************}

{
 * Display hardware is certified
 }
  DDCAPS2_CERTIFIED	= {viewgit}{/viewgit}000001;

{
 * Driver cannot interleave 2D operations (lock and blt) to surfaces with
 * Direct3D rendering operations eetween calls to BeginScene() and EndScene()
 }
  DDCAPS2_NO2DDURING3DSCENE	= {viewgit}{/viewgit}000002;

{
 * Display hardware contains a video port
 }
  DDCAPS2_VIDEOPORT	= {viewgit}{/viewgit}000004;

{
 * The overlay can be automatically flipped according to the video port
 * VSYNCs, providing automatic doubled buffered display of video port
 * data using an overlay
 }
  DDCAPS2_AUTOFLIPOVERLAY	= {viewgit}{/viewgit}000008;

{
 * Overlay can display each field of interlaced data individually while
 * it is interleaved in memory without causing jittery artifacts.
 }
  DDCAPS2_CANBOBINTERLEAVED	= {viewgit}{/viewgit}000010;

{
 * Overlay can display each field of interlaced data individually while
 * it is not interleaved in memory without causing jittery artifacts.
 }
  DDCAPS2_CANBOBNONINTERLEAVED	= {viewgit}{/viewgit}000020;

{
 * The overlay surface contains color controls (brightness, sharpness, etc.)
 }
  DDCAPS2_COLORCONTROLOVERLAY	= {viewgit}{/viewgit}000040;

{
 * The primary surface contains color controls (gamma, etc.)
 }
  DDCAPS2_COLORCONTROLPRIMARY	= {viewgit}{/viewgit}000080;

{
 * RGBZ -> RGB supported for 16:16 RGB:Z
 }
  DDCAPS2_CANDROPZ16BIT	= {viewgit}{/viewgit}000100;

{
 * Driver supports non-local video memory.
 }
  DDCAPS2_NONLOCALVIDMEM	= {viewgit}{/viewgit}000200;

{
 * Dirver supports non-local video memory but has different capabilities for
 * non-local video memory surfaces. If this bit is set then so must
 * DDCAPS2_NONLOCALVIDMEM.
 }
  DDCAPS2_NONLOCALVIDMEMCAPS	= {viewgit}{/viewgit}000400;

{
 * Driver neither requires nor prefers surfaces to be pagelocked when performing
 * blts involving system memory surfaces
 }
  DDCAPS2_NOPAGELOCKREQUIRED	= {viewgit}{/viewgit}000800;

{
 * Driver can create surfaces which are wider than the primary surface
 }
  DDCAPS2_WIDESURFACES	= {viewgit}{/viewgit}001000;

{
 * Driver supports bob using software without using a video port
 }
  DDCAPS2_CANFLIPODDEVEN	= {viewgit}{/viewgit}002000;

{***************************************************************************
 *
 * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
 *
 ***************************************************************************}

{
 * Supports alpha blending around the edge of a source color keyed surface.
 * For Blt.
 }
  DDFXALPHACAPS_BLTALPHAEDGEBLEND	= {viewgit}{/viewgit}000001;

{
 * 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	= {viewgit}{/viewgit}000002;

{
 * 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	= {viewgit}{/viewgit}000004;

{
 * 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	= {viewgit}{/viewgit}000008;

{
 * 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	= {viewgit}{/viewgit}000010;

{
 * Supports alpha blending around the edge of a source color keyed surface.
 * For Overlays.
 }
  DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND	= {viewgit}{/viewgit}000020;

{
 * 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	= {viewgit}{/viewgit}000040;

{
 * 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	= {viewgit}{/viewgit}000080;

{
 * 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	= {viewgit}{/viewgit}000100;

{
 * 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	= {viewgit}{/viewgit}000200;

{***************************************************************************
 *
 * 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	= {viewgit}{/viewgit}000020;

{
 * Uses arithmetic operations to stretch during blt
 * rather than pixel doubling techniques.  Along the Y axis. Only
 * works for x1, x2, etc.
 }
  DDFXCAPS_BLTARITHSTRETCHYN	= {viewgit}{/viewgit}000010;

{
 * Supports mirroring left to right in blt.
 }
  DDFXCAPS_BLTMIRRORLEFTRIGHT	= {viewgit}{/viewgit}000040;

{
 * Supports mirroring top to bottom in blt.
 }
  DDFXCAPS_BLTMIRRORUPDOWN	= {viewgit}{/viewgit}000080;

{
 * Supports arbitrary rotation for blts.
 }
  DDFXCAPS_BLTROTATION	= {viewgit}{/viewgit}000100;

{
 * Supports 90 degree rotations for blts.
 }
  DDFXCAPS_BLTROTATION90	= {viewgit}{/viewgit}000200;

{
 * DirectDraw supports arbitrary shrinking of a surface along the
 * x axis (horizontal direction) for blts.
 }
  DDFXCAPS_BLTSHRINKX	= {viewgit}{/viewgit}000400;

{
 * DirectDraw supports integer shrinking (1x,2x,) of a surface
 * along the x axis (horizontal direction) for blts.
 }
  DDFXCAPS_BLTSHRINKXN	= {viewgit}{/viewgit}000800;

{
 * DirectDraw supports arbitrary shrinking of a surface along the
 * y axis (horizontal direction) for blts.
 }
  DDFXCAPS_BLTSHRINKY	= {viewgit}{/viewgit}001000;

{
 * DirectDraw supports integer shrinking (1x,2x,) of a surface
 * along the y axis (vertical direction) for blts.
 }
  DDFXCAPS_BLTSHRINKYN	= {viewgit}{/viewgit}002000;

{
 * DirectDraw supports arbitrary stretching of a surface along the
 * x axis (horizontal direction) for blts.
 }
  DDFXCAPS_BLTSTRETCHX	= {viewgit}{/viewgit}004000;

{
 * DirectDraw supports integer stretching (1x,2x,) of a surface a * along the x axis (horizontal direction) for blts.
 }
  DDFXCAPS_BLTSTRETCHXN	= {viewgit}{/viewgit}008000;

{
 * DirectDraw supports arbitrary stretching of a surface along the
 * y axis (horizontal direction) for blts.
 }
  DDFXCAPS_BLTSTRETCHY	= {viewgit}{/viewgit}010000;

{
 * DirectDraw supports integer stretching (1x,2x,) of a surface
 * along the y axis (vertical direction) for blts.
 }
  DDFXCAPS_BLTSTRETCHYN	= {viewgit}{/viewgit}020000;

{
 * Uses arithmetic operations to stretch and shrink surfaces during
 * overlay rather than pixel doubling techniques.  Along the Y axis
 * for overlays.
 }
  DDFXCAPS_OVERLAYARITHSTRETCHY	= {viewgit}{/viewgit}040000;

{
 * 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	= {viewgit}{/viewgit}000008;

{
 * DirectDraw supports arbitrary shrinking of a surface along the
 * x axis (horizontal direction) for overlays.
 }
  DDFXCAPS_OVERLAYSHRINKX	= {viewgit}{/viewgit}080000;

{
 * DirectDraw supports integer shrinking (1x,2x,) of a surface
 * along the x axis (horizontal direction) for overlays.
 }
  DDFXCAPS_OVERLAYSHRINKXN	= {viewgit}{/viewgit}100000;

{
 * DirectDraw supports arbitrary shrinking of a surface along the
 * y axis (horizontal direction) for overlays.
 }
  DDFXCAPS_OVERLAYSHRINKY	= {viewgit}{/viewgit}200000;

{
 * DirectDraw supports integer shrinking (1x,2x,) of a surface
 * along the y axis (vertical direction) for overlays.
 }
  DDFXCAPS_OVERLAYSHRINKYN	= {viewgit}{/viewgit}400000;

{
 * DirectDraw supports arbitrary stretching of a surface along the
 * x axis (horizontal direction) for overlays.
 }
  DDFXCAPS_OVERLAYSTRETCHX	= {viewgit}{/viewgit}800000;

{
 * DirectDraw supports integer stretching (1x,2x,) of a surface
 * along the x axis (horizontal direction) for overlays.
 }
  DDFXCAPS_OVERLAYSTRETCHXN	= 000000;

{
 * DirectDraw supports arbitrary stretching of a surface along the
 * y axis (horizontal direction) for overlays.
 }
  DDFXCAPS_OVERLAYSTRETCHY	= 000000;

{
 * DirectDraw supports integer stretching (1x,2x,) of a surface
 * along the y axis (vertical direction) for overlays.
 }
  DDFXCAPS_OVERLAYSTRETCHYN	= 000000;

{
 * DirectDraw supports mirroring of overlays across the vertical axis
 }
  DDFXCAPS_OVERLAYMIRRORLEFTRIGHT	= 000000;

{
 * DirectDraw supports mirroring of overlays across the horizontal axis
 }
  DDFXCAPS_OVERLAYMIRRORUPDOWN	= 000000;

{***************************************************************************
 *
 * DIRECTDRAWRETEREO VIEW CAPABILITIES
 *
 ***************************************************************************}

{
 * The stereo view is accomplished via enigma encoding.
 }
  DDSVCAPS_ENIGMA	= {viewgit}{/viewgit}000001;

{
 * The stereo view is accomplished via high frequency flickering.
 }
  DDSVCAPS_FLICKER	= {viewgit}{/viewgit}000002;

{
 * 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	= {viewgit}{/viewgit}000004;

{
 * The stereo view is accomplished with split screen technology.
 }
  DDSVCAPS_SPLIT	= {viewgit}{/viewgit}000008;

{***************************************************************************
 *
 * DIRECTDRAWPALETTE CAPABILITIES
 *
 ***************************************************************************}

{
 * Index is 4 bits.  There are sixteen color entries in the palette table.
 }
  DDPCAPS_4BIT	= {viewgit}{/viewgit}000001;

{
 * 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 longint and is an index
 * into destination surface's 8bpp palette.
 }
  DDPCAPS_8BITENTRIES	= {viewgit}{/viewgit}000002;

{
 * Index is 8 bits.  There are 256 color entries in the palette table.
 }
  DDPCAPS_8BIT	= {viewgit}{/viewgit}000004;

{
 * Indicates that this DIRECTDRAWPALETTE should use the palette color array
 * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
 * object.
 }
  DDPCAPS_INITIALIZE	= {viewgit}{/viewgit}000008;

{
 * 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	= {viewgit}{/viewgit}000010;

{
 * 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	= {viewgit}{/viewgit}000020;

{
 * This palette can have all 256 entries defined
 }
  DDPCAPS_ALLOW256	= {viewgit}{/viewgit}000040;

{
 * This palette can have modifications to it synced with the monitors
 * refresh rate.
 }
  DDPCAPS_VSYNC	= {viewgit}{/viewgit}000080;

{
 * Index is 1 bit.  There are two color entries in the palette table.
 }
  DDPCAPS_1BIT	= {viewgit}{/viewgit}000100;

{
 * Index is 2 bit.  There are four color entries in the palette table.
 }
  DDPCAPS_2BIT	= {viewgit}{/viewgit}000200;


{***************************************************************************
 *
 * 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	= {viewgit}{/viewgit}004000;

{
 * 2 bits per pixel.
 }
  DDBD_2	= {viewgit}{/viewgit}002000;

{
 * 4 bits per pixel.
 }
  DDBD_4	= {viewgit}{/viewgit}001000;

{
 * 8 bits per pixel.
 }
  DDBD_8	= {viewgit}{/viewgit}000800;

{
 * 16 bits per pixel.
 }
  DDBD_16	= {viewgit}{/viewgit}000400;

{
 * 24 bits per pixel.
 }
  DDBD_24	= {viewgit}{/viewgit}000200;

{
 * 32 bits per pixel.
 }
  DDBD_32	= {viewgit}{/viewgit}000100;

{***************************************************************************
 *
 * 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	= {viewgit}{/viewgit}000001;

{
 * 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	= {viewgit}{/viewgit}000002;

{
 * 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	= {viewgit}{/viewgit}000004;

{
 * 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	= {viewgit}{/viewgit}000008;

{
 * 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	= {viewgit}{/viewgit}000010;


{***************************************************************************
 *
 * 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	= {viewgit}{/viewgit}000001;

{
 * Supports transparent blting using a color space to identify the replaceable
 * bits of the destination surface for RGB colors.
 }
  DDCKEYCAPS_DESTBLTCLRSPACE	= {viewgit}{/viewgit}000002;

{
 * Supports transparent blting using a color space to identify the replaceable
 * bits of the destination surface for YUV colors.
 }
  DDCKEYCAPS_DESTBLTCLRSPACEYUV	= {viewgit}{/viewgit}000004;

{
 * Supports transparent blting using a color key to identify the replaceable
 * bits of the destination surface for YUV colors.
 }
  DDCKEYCAPS_DESTBLTYUV	= {viewgit}{/viewgit}000008;

{
 * Supports overlaying using colorkeying of the replaceable bits of the surface
 * being overlayed for RGB colors.
 }
  DDCKEYCAPS_DESTOVERLAY	= {viewgit}{/viewgit}000010;

{
 * Supports a color space as the color key for the destination for RGB colors.
 }
  DDCKEYCAPS_DESTOVERLAYCLRSPACE	= {viewgit}{/viewgit}000020;

{
 * Supports a color space as the color key for the destination for YUV colors.
 }
  DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV	= {viewgit}{/viewgit}000040;

{
 * Supports only one active destination color key value for visible overlay
 * surfaces.
 }
  DDCKEYCAPS_DESTOVERLAYONEACTIVE	= {viewgit}{/viewgit}000080;

{
 * Supports overlaying using colorke ong of the replaceable bits of the
 * surface being overlayed for YUV colors.
 }
  DDCKEYCAPS_DESTOVERLAYYUV	= {viewgit}{/viewgit}000100;

{
 * Supports transparent blting using the color key for the source with
 * this surface for RGB colors.
 }
  DDCKEYCAPS_SRCBLT	= {viewgit}{/viewgit}000200;

{
 * Supports transparent blting using a color space for the source with
 * this surface for RGB colors.
 }
  DDCKEYCAPS_SRCBLTCLRSPACE	= {viewgit}{/viewgit}000400;

{
 * Supports transparent blting using a color space for the source with
 * this surface for YUV colors.
 }
  DDCKEYCAPS_SRCBLTCLRSPACEYUV	= {viewgit}{/viewgit}000800;

{
 * Supports transparent blting using the color key for the source with
 * this surface for YUV colors.
 }
  DDCKEYCAPS_SRCBLTYUV	= {viewgit}{/viewgit}001000;

{
 * Supports overlays using the color key for the source with this
 * overlay surface for RGB colors.
 }
  DDCKEYCAPS_SRCOVERLAY	= {viewgit}{/viewgit}002000;

{
 * Supports overlays using a color space as the source color key for
 * the overlay surface for RGB colors.
 }
  DDCKEYCAPS_SRCOVERLAYCLRSPACE	= {viewgit}{/viewgit}004000;

{
 * Supports overlays using a color space as the source color key for
 * the overlay surface for YUV colors.
 }
  DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV	= {viewgit}{/viewgit}008000;

{
 * Supports only one active source color key value for visible
 * overlay surfaces.
 }
  DDCKEYCAPS_SRCOVERLAYONEACTIVE	= {viewgit}{/viewgit}010000;

{
 * Supports overlays using the color key for the source with this
 * overlay surface for YUV colors.
 }
  DDCKEYCAPS_SRCOVERLAYYUV	= {viewgit}{/viewgit}020000;

{
 * there are no bandwidth trade-offs for using colorkey with an overlay
 }
  DDCKEYCAPS_NOCOSTOVERLAY	= {viewgit}{/viewgit}040000;


{***************************************************************************
 *
 * DIRECTDRAW PIXELFORMAT FLAGS
 *
 ***************************************************************************}

{
 * The surface has alpha channel information in the pixel format.
 }
  DDPF_ALPHAPIXELS	= {viewgit}{/viewgit}000001;

{
 * The pixel format contains alpha only information
 }
  DDPF_ALPHA	= {viewgit}{/viewgit}000002;

{
 * The FourCC code is valid.
 }
  DDPF_FOURCC	= {viewgit}{/viewgit}000004;

{
 * The surface is 4-bit color indexed.
 }
  DDPF_PALETTEINDEXED4	= {viewgit}{/viewgit}000008;

{
 * The surface is indexed into a palette which stores indices
 * into the destination surface's 8-bit palette.
 }
  DDPF_PALETTEINDEXEDTO8	= {viewgit}{/viewgit}000010;

{
 * The surface is 8-bit color indexed.
 }
  DDPF_PALETTEINDEXED8	= {viewgit}{/viewgit}000020;

{
 * The RGB data in the pixel format structure is valid.
 }
  DDPF_RGB	= {viewgit}{/viewgit}000040;

{
 * The surface will accept pixel data in the format specified
 * and compress it during the write.
 }
  DDPF_COMPRESSED	= {viewgit}{/viewgit}000080;

{
 * 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	= {viewgit}{/viewgit}000100;

{
 * pixel format is YUV - YUV data in pixel format struct is valid
 }
  DDPF_YUV	= {viewgit}{/viewgit}000200;

{
 * pixel format is a z buffer only surface
 }
  DDPF_ZBUFFER	= {viewgit}{/viewgit}000400;

{
 * The surface is 1-bit color indexed.
 }
  DDPF_PALETTEINDEXED1	= {viewgit}{/viewgit}000800;

{
 * The surface is 2-bit color indexed.
 }
  DDPF_PALETTEINDEXED2	= {viewgit}{/viewgit}001000;

{
 * The surface contains Z information in the pixels
 }
  DDPF_ZPIXELS	= {viewgit}{/viewgit}002000;

{===========================================================================
 *
 *
 * DIRECTDRAW CALLBACK FLAGS
 *
 *
 *==========================================================================}

{***************************************************************************
 *
 * DIRECTDRAW ENUMSURFACES FLAGS
 *
 ***************************************************************************}

{
 * Enumerate all of the surfaces that meet the search criterion.
 }
  DDENUMSURFACES_ALL	= {viewgit}{/viewgit}000001;

{
 * A search hit is a surface that matches the surface description.
 }
  DDENUMSURFACES_MATCH	= {viewgit}{/viewgit}000002;

{
 * A search hit is a surface that does not match the surface description.
 }
  DDENUFAURFACES_NOMATCH	= {viewgit}{/viewgit}000004;

{
 * Enumerate the first surface that can be created which meets the search criterion.
 }
  DDENUMSURFACES_CANBECREATED	= {viewgit}{/viewgit}000008;

{
 * Enumerate the surfaces that already exist that meet the search criterion.
 }
  DDENUMSURFACES_DOESEXIST	= {viewgit}{/viewgit}000010;


{***************************************************************************
 *
 * DIRECTDRAW SETDISPLAYMODE FLAGS
 *
 ***************************************************************************}

{
 * The desired mode is a standard VGA mode
 }
  DDSDM_STANDARDVGAMODE	= {viewgit}{/viewgit}000001;



{***************************************************************************
 *
 * 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	= {viewgit}{/viewgit}000001;

{
 * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
 * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
 * enumerated if the application has previously called SetCooperativeLevel with the
 * DDSCL_ALLOWMODEX flag set).
 }
  DDEDM_STANDARDVGAMODES	= {viewgit}{/viewgit}000002;


{***************************************************************************
 *
 * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
 *
 ***************************************************************************}

{
 * Exclusive mode owner will be responsible for the entire primary surface.
 * GDI can be ignored. used with DD
 }
  DDSCL_FULLSCREEN	= {viewgit}{/viewgit}000001;

{
 * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
 }
  DDSCL_ALLOWREBOOT	= {viewgit}{/viewgit}000002;

{
 * prevents DDRAW from modifying the application window.
 * prevents DDRAW from minimize/restore the application window on activation.
 }
  DDSCL_NOWINDOWCHANGES	= {viewgit}{/viewgit}000004;

{
 * app wants to work as a regular Windows application
 }
  DDSCL_NORMAL	= {viewgit}{/viewgit}000008;

{
 * app wants exclusive access
 }
  DDSCL_EXCLUSIVE	= {viewgit}{/viewgit}000010;


{
 * app can deal with non-windows display modes
 }
  DDSCL_ALLOWMODEX	= {viewgit}{/viewgit}000040;


{***************************************************************************
 *
 * 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	= {viewgit}{/viewgit}000001;

{
 * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
 * for the destination surface for this blt.
 }
  DDBLT_ALPHADESTCONSTOVERRIDE	= {viewgit}{/viewgit}000002;

{
 * The NEG suffix indicates that the destination surface becomes more
 * transparent as the alpha value increases. (0 is opaque)
 }
  DDBLT_ALPHADESTNEG	= {viewgit}{/viewgit}000004;

{
 * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
 * channel for the destination for this blt.
 }
  DDBLT_ALPHADESTSURFACEOVERRIDE	= {viewgit}{/viewgit}000008;

{
 * 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	= {viewgit}{/viewgit}000010;

{
 * 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	= {viewgit}{/viewgit}000020;

{
 * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
 * for the source for this blt.
 }
  DDBLT_ALPHASRCCONSTOVERRIDE	= {viewgit}{/viewgit}000040;

{
 * The NEG suffix indicates that the source surface becomes more transparent
 * as the alpha value increases. (0 is opaque)
 }
  DDBLT_ALPHASRCNEG	= {viewgit}{/viewgit}000080;

{
 * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
 * for the source for this blt.
 }
  DDBLT_ALPHASRCSURFACEOVERRIDE	= {viewgit}{/viewgit}000100;

{
 * 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	= {viewgit}{/viewgit}000200;

{
 * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
 * to fill the destination rectangle on the destination surface with.
 }
  DDBLT_COLORFILL	= {viewgit}{/viewgit}000400;

{
 * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
 * to use for the blt.
 }
  DDBLT_DDFX	= {viewgit}{/viewgit}000800;

{
 * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
 * that are not part of the Win32 API.
 }
  DDBLT_DDROPS	= {viewgit}{/viewgit}001000;

{
 * Use the color key associated with the destination surface.
 }
  DDBLT_KEYDEST	= {viewgit}{/viewgit}002000;

{
 * Use the dckDestColorkey field in the DDBLTFX structure as the color key
 * for the destination surface.
 }
  DDBLT_KEYDESTOVERRIDE	= {viewgit}{/viewgit}004000;

{
 * Use the color key associated with the source surface.
 }
  DDBLT_KEYSRC	= {viewgit}{/viewgit}008000;

{
 * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
 * for the source surface.
 }
  DDBLT_KEYSRCOVERRIDE	= {viewgit}{/viewgit}010000;

{
 * 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	= {viewgit}{/viewgit}020000;

{
 * Use the dwRotationAngle field in the DDBLTFX structure as the angle
 * (specified in 1/100th of a degree) to rotate the surface.
 }
  DDBLT_ROTATIONANGLE	= {viewgit}{/viewgit}040000;

{
 * 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	= {viewgit}{/viewgit}080000;

{
 * 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	= {viewgit}{/viewgit}100000;

{
 * 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	= {viewgit}{/viewgit}200000;

{
 * 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	= {viewgit}{/viewgit}400000;

{
 * 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	= {viewgit}{/viewgit}800000;

{
 * wait until the device is ready to handle the blt
 * this will cause blt to not return DDERR_WASSTILLDRAWING
 }
  DDBLT_WAIT	= 000000;

{
 * 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	= 000000;



{***************************************************************************
 *
 * BLTFAST FLAGS
 *
 ***************************************************************************}

  DDBLTFAST_NOCOLORKEY	= {viewgit}{/viewgit}000000;
  DDBLTFAST_SRCCOLORKEY	= {viewgit}{/viewgit}000001;
  DDBLTFAST_DESTCOLORKEY	= {viewgit}{/viewgit}000002;
  DDBLTFAST_WAIT	= {viewgit}{/viewgit}000010;

{***************************************************************************
 *
 * FLIP FLAGS
 *
 ***************************************************************************}

  DDFLIP_WAIT	= {viewgit}{/viewgit}000001;

{
 * Indicates that the target surface contains the even field of video data.
 * This flag is only valid with an overlay surface.
 }
  DDFLIP_EVEN	= {viewgit}{/viewgit}000002;

{
 * Indicates that the target surface contains the odd field of video data.
 * This flag is only valid with an overlay surface.
 }
  DDFLIP_ODD	= {viewgit}{/viewgit}000004;



{***************************************************************************
 *
 * 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	= {viewgit}{/viewgit}000001;

{
 * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
 * destination alpha channel for this overlay.
 }
  DDOVER_ALPHADESTCONSTOVERRIDE	= {viewgit}{/viewgit}000002;

{
 * The NEG suffix indicates that the destination surface becomes more
 * transparent as the alpha value increases.
 }
  DDOVER_ALPHADESTNEG	= {viewgit}{/viewgit}000004;

{
 * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
 * channel destination for this overlay.
 }
  DDOVER_ALPHADESTSURFACEOVERRIDE	= {viewgit}{/viewgit}000008;

{
 * 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	= {viewgit}{/viewgit}000010;

{
 * 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	= {viewgit}{/viewgit}000020;

{
 * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
 * alpha channel for this overlay.
 }
  DDOVER_ALPHASRCCONSTOVERRIDE	= {viewgit}{/viewgit}000040;

{
 * The NEG suffix indicates that the source surface becomes more transparent
 * as the alpha value increases.
 }
  DDOVER_ALPHASRCNEG	= {viewgit}{/viewgit}000080;

{
 * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
 * source for this overlay.
 }
  DDOVER_ALPHASRCSURFACEOVERRIDE	= {viewgit}{/viewgit}000100;

{
 * Turn this overlay off.
 }
  DDOVER_HIDE	= {viewgit}{/viewgit}000200;

{
 * Use the color key associated with the destination surface.
 }
  DDOVER_KEYDEST	= {viewgit}{/viewgit}000400;

{
 * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
 * for the destination surface
 }
  DDOVER_KEYDESTOVERRIDE	= {viewgit}{/viewgit}000800;

{
 * Use the color key associated with the source surface.
 }
  DDOVER_KEYSRC	= {viewgit}{/viewgit}001000;

{
 * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
 * for the source surface.
 }
  DDOVER_KEYSRCOVERRIDE	= {viewgit}{/viewgit}002000;

{
 * Turn this overlay on.
 }
  DDOVER_SHOW	= {viewgit}{/viewgit}004000;

{
 * Add a dirty rect to an emulated overlayed surface.
 }
  DDOVER_ADDDIRTYRECT	= {viewgit}{/viewgit}008000;

{
 * Redraw all dirty rects on an emulated overlayed surface.
 }
  DDOVER_REFRESHDIRTYRECTS	= {viewgit}{/viewgit}010000;

{
 * Redraw the entire surface on an emulated overlayed surface.
 }
  DDOVER_REFRESHALL	= {viewgit}{/viewgit}020000;


{
 * Use the overlay FX flags to define special overlay FX
 }
  DDOVER_DDFX	= {viewgit}{/viewgit}080000;

{
 * Autoflip the overlay when ever the video port autoflips
 }
  DDOVER_AUTOFLIP	= {viewgit}{/viewgit}100000;

{
 * Display each field of video port data individually without
 * causing any jittery artifacts
 }
  DDOVER_BOB	= {viewgit}{/viewgit}200000;

{
 * Indicates that bob/weave decisions should not be overridden by other
 * interfaces.
 }
  DDOVER_OVERRIDEBOBWEAVE	= {viewgit}{/viewgit}400000;

{
 * Indicates that the surface memory is composed of interleaved fields.
 }
  DDOVER_INTERLEAVED	= {viewgit}{/viewgit}800000;


{***************************************************************************
 *
 * 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	= {viewgit}{/viewgit}000000;	// 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	= {viewgit}{/viewgit}000001;

{
 * 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	= {viewgit}{/viewgit}000002;

{
 * Indicates that the surface being locked will only be read from.
 }
  DDLOCK_READONLY	= {viewgit}{/viewgit}000010;

{
 * Indicates that the surface being locked will only be written to
 }
  DDLOCK_WRITEONLY	= {viewgit}{/viewgit}000020;


{
 * Indicates that a system wide lock should not be taken when this surface
 * is locked. This has several advantages (cursor responsiveness, ability
 * to call more Windows functions, easier debugging) when locking video
 * memory surfaces. However, an application specifying this flag must
 * comply with a number of conditions documented in the help file.
 * Furthermore, this flag cannot be specified when locking the primary.
 }
  DDLOCK_NOSYSLOCK	= {viewgit}{/viewgit}000800;


{***************************************************************************
 *
 * DIRECTDRAWSURFACE PAGELOCK FLAGS
 *
 ***************************************************************************}

{
 * No flags defined at present
 }


{***************************************************************************
 *
 * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
 *
 ***************************************************************************}

{
 * No flags defined at present
 }


{***************************************************************************
 *
 * DIRECTDRAWSURFACE BLT FX FLAGS
 *
 ***************************************************************************}

{
 * If stretching, use arithmetic stretching along the Y axis for this blt.
 }
  DDBLTFX_ARITHSTRETCHY	= {viewgit}{/viewgit}000001;

{
 * Do this blt mirroring the surface left to right.  Spin the
 * surface around its y-axis.
 }
  DDBLTFX_MIRRORLEFTRIGHT	= {viewgit}{/viewgit}000002;

{
 * Do this blt mirroring the surface up and down.  Spin the surface
 * around its x-axis.
 }
  DDBLTFX_MIRRORUPDOWN	= {viewgit}{/viewgit}000004;

{
 * Schedule this blt to avoid tearing.
 }
  DDBLTFX_NOTEARING	= {viewgit}{/viewgit}000008;

{
 * Do this blt rotating the surface one hundred and eighty degrees.
 }
  DDBLTFX_ROTATE180	= {viewgit}{/viewgit}000010;

{
 * Do this blt rotating the surface two hundred and seventy degrees.
 }
  DDBLTFX_ROTATE270	= {viewgit}{/viewgit}000020;

{
 * Do this blt rotating the surface ninety degrees.
 }
  DDBLTFX_ROTATE90	= {viewgit}{/viewgit}000040;

{
 * Do this z blt using dwZBufferLow and dwZBufferHigh as  range values
 * specified to limit the bits copied from the source surface.
 }
  DDBLTFX_ZBUFFERRANGE	= {viewgit}{/viewgit}000080;

{
 * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
 * before comparing it with the desting z values.
 }
  DDBLTFX_ZBUFFERBASEDEST	= {viewgit}{/viewgit}000100;

{***************************************************************************
 *
 * DIRECTDRAWSURFACE OVERLAY FX FLAGS
 *
 ***************************************************************************}

{
 * If stretching, use arithmetic stretching along the Y axis for this overlay.
 }
  DDOVERFX_ARITHSTRETCHY	= {viewgit}{/viewgit}000001;

{
 * Mirror the overlay across the vertical axis
 }
  DDOVERFX_MIRRORLEFTRIGHT	= {viewgit}{/viewgit}000002;

{
 * Mirror the overlay across the horizontal axis
 }
  DDOVERFX_MIRRORUPDOWN	= {viewgit}{/viewgit}000004;

{***************************************************************************
 *
 * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
 *
 ***************************************************************************}

{
 * return when the vertical blank interval begins
 }
  DDWAITVB_BLOCKBEGIN	= {viewgit}{/viewgit}000001;

{
 * set up an event to trigger when the vertical blank begins
 }
  DDWAITVB_BLOCKBEGINEVENT	= {viewgit}{/viewgit}000002;

{
 * return when the vertical blank interval ends and display begins
 }
  DDWAITVB_BLOCKEND	= {viewgit}{/viewgit}000004;

{***************************************************************************
 *
 * DIRECTDRAW GETFLIPSTATUS FLAGS
 *
 ***************************************************************************}

{
 * is it OK to flip now?
 }
  DDGFS_CANFLIP	= {viewgit}{/viewgit}000001;

{
 * is the last flip finished?
 }
  DDGFS_ISFLIPDONE	= {viewgit}{/viewgit}000002;

{***************************************************************************
 *
 * DIRECTDRAW GETBLTSTATUS FLAGS
 *
 ***************************************************************************}

{
 * is it OK to blt now?
 }
  DDGBS_CANBLT	= {viewgit}{/viewgit}000001;

{
 * is the blt to the surface finished?
 }
  DDGBS_ISBLTDONE	= {viewgit}{/viewgit}000002;


{***************************************************************************
 *
 * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
 *
 ***************************************************************************}

{
 * Enumerate overlays back to front.
 }
  DDENUMOVERLAYZ_BACKTOFRONT	= {viewgit}{/viewgit}000000;

{
 * Enumerate overlays front to back
 }
  DDENUMOVERLAYZ_FRONTTOBACK	= {viewgit}{/viewgit}000001;

{***************************************************************************
 *
 * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
 *
 ***************************************************************************}

{
 * Send overlay to front
 }
  DDOVERZ_SENDTOFRONT	= {viewgit}{/viewgit}000000;

{
 * Send overlay to back
 }
  DDOVERZ_SENDTOBACK	= {viewgit}{/viewgit}000001;

{
 * Move Overlay forward
 }
  DDOVERZ_MOVEFORWARD	= {viewgit}{/viewgit}000002;

{
 * Move Overlay backward
 }
  DDOVERZ_MOVEBACKWARD	= {viewgit}{/viewgit}000003;

{
 * Move Overlay in front of relative surface
 }
  DDOVERZ_INSERTINFRONTOF	= {viewgit}{/viewgit}000004;

{
 * Move Overlay in back of relative surface
 }
  DDOVERZ_INSERTINBACKOF	= {viewgit}{/viewgit}000005;

{===========================================================================
 *
 *
 * DIRECTDRAW 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;

{***************************************************************************
 *
 * DIRECTDRAW 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;


  DDERR_GENERIC	= E_FAIL;


  DDERR_INVALIDPARAMS	= E_INVALIDARG;

  DDERR_OUTOFMEMORY	= E_OUTOFMEMORY;



  DDERR_NOTINITIALIZED	= CO_E_NOTINITIALIZED;


function DirectDrawEnumerate ( lpCallback: LPDDENUMCALLBACK ;
    lpContext: Pointer ): HRESULT ;stdcall ;


implementation

function DirectDrawEnumerate ; external 'DDRAW.DLL' name 'DirectDrawEnumerateA' ;
function DirectDrawCreate ; external 'DDRAW.DLL' ;
function DirectDrawCreateClipper ; external 'DDRAW.DLL' ;

end.