home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / DDRAW.H < prev    next >
C/C++ Source or Header  |  1997-01-16  |  102KB  |  3,106 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1994-1996 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:    ddraw.h
  6.  *  Content:    DirectDraw include file
  7.  *
  8.  ***************************************************************************/
  9.  
  10. #ifndef __DDRAW_INCLUDED__
  11. #define __DDRAW_INCLUDED__
  12. #if defined( _WIN32 )  && !defined( _NO_COM )
  13. #define COM_NO_WINDOWS_H
  14. #include <objbase.h>
  15. #else
  16. #define IUnknown        void
  17. #ifndef WINNT
  18.     #define CO_E_NOTINITIALIZED 0x800401F0L
  19. #endif
  20. #endif
  21.  
  22. #define _FACDD    0x876
  23. #define MAKE_DDHRESULT( code )    MAKE_HRESULT( 1, _FACDD, code )
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28.  
  29. /*
  30.  * GUIDS used by DirectDraw objects
  31.  */
  32. #if defined( _WIN32 ) && !defined( _NO_COM )
  33. DEFINE_GUID( CLSID_DirectDraw,            0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  34. DEFINE_GUID( CLSID_DirectDrawClipper,           0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  35. DEFINE_GUID( IID_IDirectDraw,            0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  36. DEFINE_GUID( IID_IDirectDraw2,                  0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  37. DEFINE_GUID( IID_IDirectDrawSurface,        0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  38. DEFINE_GUID( IID_IDirectDrawSurface2,        0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  39.  
  40. DEFINE_GUID( IID_IDirectDrawPalette,        0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  41. DEFINE_GUID( IID_IDirectDrawClipper,        0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  42.                  
  43. #endif
  44.  
  45. /*============================================================================
  46.  *
  47.  * DirectDraw Structures
  48.  *
  49.  * Various structures used to invoke DirectDraw.
  50.  *
  51.  *==========================================================================*/
  52.  
  53. struct IDirectDraw;
  54. struct IDirectDrawSurface;
  55. struct IDirectDrawPalette;
  56. struct IDirectDrawClipper;
  57.  
  58. typedef struct IDirectDraw            FAR *LPDIRECTDRAW;
  59. typedef struct IDirectDraw2            FAR *LPDIRECTDRAW2;
  60. typedef struct IDirectDrawSurface        FAR *LPDIRECTDRAWSURFACE;
  61. typedef struct IDirectDrawSurface2        FAR *LPDIRECTDRAWSURFACE2;
  62.  
  63. typedef struct IDirectDrawPalette        FAR *LPDIRECTDRAWPALETTE;
  64. typedef struct IDirectDrawClipper        FAR *LPDIRECTDRAWCLIPPER;
  65.  
  66. typedef struct _DDFXROP            FAR *LPDDFXROP;
  67. typedef struct _DDSURFACEDESC        FAR *LPDDSURFACEDESC;
  68.  
  69. /*
  70.  * API's
  71.  */
  72. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  73. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  74.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  75.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  76.     extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  77.     extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  78.     #ifdef UNICODE
  79.     typedef LPDDENUMCALLBACKW     LPDDENUMCALLBACK;
  80.     #define DirectDrawEnumerate    DirectDrawEnumerateW
  81.     #else
  82.     typedef LPDDENUMCALLBACKA     LPDDENUMCALLBACK;
  83.     #define DirectDrawEnumerate    DirectDrawEnumerateA
  84.     #endif
  85.     extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  86.     extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  87.     #ifdef WINNT
  88.     //This is the user-mode entry stub to the kernel mode procedure.
  89.     extern HRESULT NtDirectDrawCreate( GUID FAR *lpGUID, HANDLE *lplpDD, IUnknown FAR *pUnkOuter );
  90.     #endif
  91. #endif
  92.  
  93. #define REGSTR_KEY_DDHW_DESCRIPTION    "Description"
  94. #define REGSTR_KEY_DDHW_DRIVERNAME    "DriverName"
  95. #define REGSTR_PATH_DDHW        "Hardware\\DirectDrawDrivers"
  96.  
  97. #define DDCREATE_HARDWAREONLY        0x00000001l
  98. #define DDCREATE_EMULATIONONLY        0x00000002l
  99.  
  100. #ifdef WINNT
  101. typedef long HRESULT;
  102. #endif
  103.  
  104. //#ifndef WINNT
  105. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  106. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  107. //#endif
  108. /*
  109.  * DDCOLORKEY
  110.  */
  111. typedef struct _DDCOLORKEY
  112. {
  113.     DWORD    dwColorSpaceLowValue;    // low boundary of color space that is to 
  114.                     // be treated as Color Key, inclusive
  115.     DWORD    dwColorSpaceHighValue;    // high boundary of color space that is 
  116.                     // to be treated as Color Key, inclusive
  117. } DDCOLORKEY;
  118.  
  119. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  120.  
  121. /*
  122.  * DDBLTFX
  123.  * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  124.  */
  125. typedef struct _DDBLTFX
  126. {
  127.     DWORD    dwSize;                // size of structure
  128.     DWORD    dwDDFX;                // FX operations
  129.     DWORD    dwROP;                // Win32 raster operations
  130.     DWORD    dwDDROP;            // Raster operations new for DirectDraw
  131.     DWORD    dwRotationAngle;        // Rotation angle for blt
  132.     DWORD    dwZBufferOpCode;        // ZBuffer compares
  133.     DWORD    dwZBufferLow;            // Low limit of Z buffer
  134.     DWORD    dwZBufferHigh;            // High limit of Z buffer
  135.     DWORD    dwZBufferBaseDest;        // Destination base value
  136.     DWORD    dwZDestConstBitDepth;        // Bit depth used to specify Z constant for destination
  137.     union
  138.     {
  139.     DWORD    dwZDestConst;            // Constant to use as Z buffer for dest
  140.     LPDIRECTDRAWSURFACE lpDDSZBufferDest;    // Surface to use as Z buffer for dest
  141.     };
  142.     DWORD    dwZSrcConstBitDepth;        // Bit depth used to specify Z constant for source
  143.     union
  144.     {
  145.     DWORD    dwZSrcConst;            // Constant to use as Z buffer for src
  146.     LPDIRECTDRAWSURFACE lpDDSZBufferSrc;    // Surface to use as Z buffer for src
  147.     };
  148.     DWORD    dwAlphaEdgeBlendBitDepth;    // Bit depth used to specify constant for alpha edge blend
  149.     DWORD    dwAlphaEdgeBlend;        // Alpha for edge blending
  150.     DWORD    dwReserved;
  151.     DWORD    dwAlphaDestConstBitDepth;    // Bit depth used to specify alpha constant for destination
  152.     union
  153.     {
  154.     DWORD    dwAlphaDestConst;        // Constant to use as Alpha Channel
  155.     LPDIRECTDRAWSURFACE lpDDSAlphaDest;    // Surface to use as Alpha Channel
  156.     };
  157.     DWORD    dwAlphaSrcConstBitDepth;    // Bit depth used to specify alpha constant for source
  158.     union
  159.     {
  160.     DWORD    dwAlphaSrcConst;        // Constant to use as Alpha Channel
  161.     LPDIRECTDRAWSURFACE lpDDSAlphaSrc;    // Surface to use as Alpha Channel
  162.     };
  163.     union
  164.     {
  165.     DWORD    dwFillColor;            // color in RGB or Palettized
  166.     DWORD   dwFillDepth;                    // depth value for z-buffer
  167.     LPDIRECTDRAWSURFACE lpDDSPattern;    // Surface to use as pattern
  168.     };
  169.     DDCOLORKEY    ddckDestColorkey;        // DestColorkey override
  170.     DDCOLORKEY    ddckSrcColorkey;        // SrcColorkey override
  171. } DDBLTFX;
  172.  
  173. typedef DDBLTFX FAR* LPDDBLTFX;
  174.  
  175.  
  176. /*
  177.  * DDSCAPS
  178.  */
  179. typedef struct _DDSCAPS
  180. {
  181.     DWORD    dwCaps;        // capabilities of surface wanted
  182. } DDSCAPS;
  183.  
  184. typedef DDSCAPS FAR* LPDDSCAPS; 
  185.  
  186. /*
  187.  * DDCAPS
  188.  */
  189. #define DD_ROP_SPACE        (256/32)    // space required to store ROP array
  190.  
  191. typedef struct _DDCAPS
  192. {
  193.     DWORD    dwSize;            // size of the DDDRIVERCAPS structure
  194.     DWORD    dwCaps;            // driver specific capabilities
  195.     DWORD    dwCaps2;        // more driver specific capabilites
  196.     DWORD    dwCKeyCaps;        // color key capabilities of the surface
  197.     DWORD    dwFXCaps;        // driver specific stretching and effects capabilites
  198.     DWORD    dwFXAlphaCaps;        // alpha driver specific capabilities
  199.     DWORD    dwPalCaps;        // palette capabilities
  200.     DWORD    dwSVCaps;        // stereo vision capabilities
  201.     DWORD    dwAlphaBltConstBitDepths;    // DDBD_2,4,8
  202.     DWORD    dwAlphaBltPixelBitDepths;    // DDBD_1,2,4,8
  203.     DWORD    dwAlphaBltSurfaceBitDepths;    // DDBD_1,2,4,8
  204.     DWORD    dwAlphaOverlayConstBitDepths;    // DDBD_2,4,8
  205.     DWORD    dwAlphaOverlayPixelBitDepths;    // DDBD_1,2,4,8
  206.     DWORD    dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  207.     DWORD    dwZBufferBitDepths;        // DDBD_8,16,24,32
  208.     DWORD    dwVidMemTotal;        // total amount of video memory
  209.     DWORD    dwVidMemFree;        // amount of free video memory
  210.     DWORD    dwMaxVisibleOverlays;    // maximum number of visible overlays
  211.     DWORD    dwCurrVisibleOverlays;    // current number of visible overlays
  212.     DWORD    dwNumFourCCCodes;    // number of four cc codes
  213.     DWORD    dwAlignBoundarySrc;    // source rectangle alignment
  214.     DWORD    dwAlignSizeSrc;        // source rectangle byte size
  215.     DWORD    dwAlignBoundaryDest;    // dest rectangle alignment
  216.     DWORD    dwAlignSizeDest;    // dest rectangle byte size
  217.     DWORD    dwAlignStrideAlign;    // stride alignment
  218.     DWORD    dwRops[DD_ROP_SPACE];    // ROPS supported
  219.     DDSCAPS    ddsCaps;        // DDSCAPS structure has all the general capabilities
  220.     DWORD    dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  221.     DWORD    dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  222.     DWORD    dwMinLiveVideoStretch;    // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  223.     DWORD    dwMaxLiveVideoStretch;    // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  224.     DWORD    dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  225.     DWORD    dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  226.     DWORD    dwReserved1;        // reserved
  227.     DWORD    dwReserved2;        // reserved
  228.     DWORD    dwReserved3;        // reserved
  229.     DWORD    dwSVBCaps;        // driver specific capabilities for System->Vmem blts
  230.     DWORD    dwSVBCKeyCaps;        // driver color key capabilities for System->Vmem blts
  231.     DWORD    dwSVBFXCaps;        // driver FX capabilities for System->Vmem blts
  232.     DWORD    dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  233.     DWORD    dwVSBCaps;        // driver specific capabilities for Vmem->System blts
  234.     DWORD    dwVSBCKeyCaps;        // driver color key capabilities for Vmem->System blts
  235.     DWORD    dwVSBFXCaps;        // driver FX capabilities for Vmem->System blts
  236.     DWORD    dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  237.     DWORD    dwSSBCaps;        // driver specific capabilities for System->System blts
  238.     DWORD    dwSSBCKeyCaps;        // driver color key capabilities for System->System blts
  239.     DWORD    dwSSBFXCaps;        // driver FX capabilities for System->System blts
  240.     DWORD    dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  241.     DWORD    dwReserved4;        // reserved
  242.     DWORD    dwReserved5;        // reserved
  243.     DWORD    dwReserved6;        // reserved
  244. } DDCAPS;
  245.  
  246. typedef DDCAPS FAR* LPDDCAPS;
  247.  
  248.  
  249.  
  250. /*
  251.  * DDPIXELFORMAT
  252.  */
  253. typedef struct _DDPIXELFORMAT
  254. {
  255.     DWORD    dwSize;            // size of structure
  256.     DWORD    dwFlags;        // pixel format flags
  257.     DWORD    dwFourCC;        // (FOURCC code)
  258.     union
  259.     {
  260.     DWORD    dwRGBBitCount;        // how many bits per pixel (BD_4,8,16,24,32)
  261.     DWORD    dwYUVBitCount;        // how many bits per pixel (BD_4,8,16,24,32)
  262.     DWORD    dwZBufferBitDepth;    // how many bits for z buffers (BD_8,16,24,32)
  263.     DWORD    dwAlphaBitDepth;    // how many bits for alpha channels (BD_1,2,4,8)
  264.     };
  265.     union
  266.     {
  267.     DWORD    dwRBitMask;        // mask for red bit
  268.     DWORD    dwYBitMask;        // mask for Y bits
  269.     };
  270.     union
  271.     {
  272.     DWORD    dwGBitMask;        // mask for green bits
  273.     DWORD    dwUBitMask;        // mask for U bits
  274.     };
  275.     union
  276.     {
  277.     DWORD    dwBBitMask;        // mask for blue bits
  278.     DWORD    dwVBitMask;        // mask for V bits
  279.     };
  280.     union
  281.     {
  282.     DWORD    dwRGBAlphaBitMask;    // mask for alpha channel
  283.     DWORD    dwYUVAlphaBitMask;    // mask for alpha channel
  284.     };
  285. } DDPIXELFORMAT;
  286.  
  287. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  288.  
  289. /*
  290.  * DDOVERLAYFX
  291.  */
  292. typedef struct _DDOVERLAYFX
  293. {
  294.     DWORD    dwSize;                // size of structure
  295.     DWORD    dwAlphaEdgeBlendBitDepth;    // Bit depth used to specify constant for alpha edge blend
  296.     DWORD    dwAlphaEdgeBlend;        // Constant to use as alpha for edge blend
  297.     DWORD    dwReserved;
  298.     DWORD    dwAlphaDestConstBitDepth;    // Bit depth used to specify alpha constant for destination
  299.     union
  300.     {
  301.     DWORD    dwAlphaDestConst;        // Constant to use as alpha channel for dest
  302.     LPDIRECTDRAWSURFACE lpDDSAlphaDest;    // Surface to use as alpha channel for dest
  303.     };
  304.     DWORD    dwAlphaSrcConstBitDepth;    // Bit depth used to specify alpha constant for source
  305.     union
  306.     {
  307.     DWORD    dwAlphaSrcConst;        // Constant to use as alpha channel for src
  308.     LPDIRECTDRAWSURFACE lpDDSAlphaSrc;    // Surface to use as alpha channel for src
  309.     };
  310.     DDCOLORKEY    dckDestColorkey;        // DestColorkey override
  311.     DDCOLORKEY    dckSrcColorkey;            // DestColorkey override
  312.     DWORD       dwDDFX;                         // Overlay FX
  313.     DWORD    dwFlags;            // flags
  314. } DDOVERLAYFX;
  315.  
  316. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  317.  
  318. /*
  319.  * DDBLTBATCH: BltBatch entry structure
  320.  */
  321. typedef struct _DDBLTBATCH
  322. {
  323.     LPRECT        lprDest;
  324.     LPDIRECTDRAWSURFACE    lpDDSSrc;
  325.     LPRECT        lprSrc;
  326.     DWORD        dwFlags;
  327.     LPDDBLTFX        lpDDBltFx;
  328. } DDBLTBATCH;
  329.  
  330. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  331.  
  332. /*
  333.  * callbacks
  334.  */
  335. typedef DWORD    (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  336. #ifdef STREAMING
  337. typedef DWORD    (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  338. #endif
  339.  
  340.  
  341. /*
  342.  * INTERACES FOLLOW:
  343.  *    IDirectDraw
  344.  *    IDirectDrawClipper
  345.  *    IDirectDrawPalette
  346.  *    IDirectDrawSurface
  347.  */
  348.  
  349. /*
  350.  * IDirectDraw 
  351.  */
  352. #if defined( _WIN32 ) && !defined( _NO_COM )
  353. #undef INTERFACE
  354. #define INTERFACE IDirectDraw
  355. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  356. {
  357.     /*** IUnknown methods ***/
  358.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  359.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  360.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  361.     /*** IDirectDraw methods ***/
  362.     STDMETHOD(Compact)(THIS) PURE;
  363.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  364.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  365.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  366.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  367.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  368.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  369.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  370.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  371.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  372.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  373.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  374.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  375.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  376.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  377.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  378.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  379.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  380.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  381.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  382. };
  383.  
  384. #if !defined(__cplusplus) || defined(CINTERFACE)
  385. #define IDirectDraw_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  386. #define IDirectDraw_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  387. #define IDirectDraw_Release(p)                      (p)->lpVtbl->Release(p)
  388. #define IDirectDraw_Compact(p)                      (p)->lpVtbl->Compact(p)
  389. #define IDirectDraw_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  390. #define IDirectDraw_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  391. #define IDirectDraw_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  392. #define IDirectDraw_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  393. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  394. #define IDirectDraw_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  395. #define IDirectDraw_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  396. #define IDirectDraw_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  397. #define IDirectDraw_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  398. #define IDirectDraw_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  399. #define IDirectDraw_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  400. #define IDirectDraw_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  401. #define IDirectDraw_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  402. #define IDirectDraw_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  403. #define IDirectDraw_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  404. #define IDirectDraw_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  405. #define IDirectDraw_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  406. #define IDirectDraw_SetDisplayMode(p, a, b, c)      (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  407. #define IDirectDraw_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  408. #endif
  409.  
  410. #endif
  411.  
  412. #if defined( _WIN32 ) && !defined( _NO_COM )
  413. #undef INTERFACE
  414. #define INTERFACE IDirectDraw2
  415. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  416. {
  417.     /*** IUnknown methods ***/
  418.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  419.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  420.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  421.     /*** IDirectDraw methods ***/
  422.     STDMETHOD(Compact)(THIS) PURE;
  423.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  424.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  425.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  426.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  427.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  428.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  429.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  430.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  431.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  432.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  433.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  434.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  435.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  436.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  437.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  438.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  439.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  440.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  441.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  442.     /*** Added in the v2 interface ***/
  443.     STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  444. };
  445. #if !defined(__cplusplus) || defined(CINTERFACE)
  446. #define IDirectDraw2_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  447. #define IDirectDraw2_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  448. #define IDirectDraw2_Release(p)                      (p)->lpVtbl->Release(p)
  449. #define IDirectDraw2_Compact(p)                      (p)->lpVtbl->Compact(p)
  450. #define IDirectDraw2_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  451. #define IDirectDraw2_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  452. #define IDirectDraw2_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  453. #define IDirectDraw2_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  454. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  455. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  456. #define IDirectDraw2_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  457. #define IDirectDraw2_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  458. #define IDirectDraw2_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  459. #define IDirectDraw2_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  460. #define IDirectDraw2_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  461. #define IDirectDraw2_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  462. #define IDirectDraw2_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  463. #define IDirectDraw2_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  464. #define IDirectDraw2_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  465. #define IDirectDraw2_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  466. #define IDirectDraw2_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  467. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d)   (p)->lpVtbl->SetDisplayMode(p, a, b, c, d)
  468. #define IDirectDraw2_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  469. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c)  (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  470. #endif
  471.  
  472. #endif
  473.  
  474. /*
  475.  * IDirectDrawPalette
  476.  */
  477. #if defined( _WIN32 ) && !defined( _NO_COM )
  478. #undef INTERFACE
  479. #define INTERFACE IDirectDrawPalette
  480. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  481. {
  482.     /*** IUnknown methods ***/
  483.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  484.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  485.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  486.     /*** IDirectDrawPalette methods ***/
  487.     STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  488.     STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  489.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  490.     STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  491. };
  492.  
  493. #if !defined(__cplusplus) || defined(CINTERFACE)
  494. #define IDirectDrawPalette_QueryInterface(p, a, b)      (p)->lpVtbl->QueryInterface(p, a, b)
  495. #define IDirectDrawPalette_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  496. #define IDirectDrawPalette_Release(p)                   (p)->lpVtbl->Release(p)
  497. #define IDirectDrawPalette_GetCaps(p, a)                (p)->lpVtbl->GetCaps(p, a)
  498. #define IDirectDrawPalette_GetEntries(p, a, b, c, d)    (p)->lpVtbl->GetEntries(p, a, b, c, d)
  499. #define IDirectDrawPalette_Initialize(p, a, b, c)       (p)->lpVtbl->Initialize(p, a, b, c)
  500. #define IDirectDrawPalette_SetEntries(p, a, b, c, d)    (p)->lpVtbl->SetEntries(p, a, b, c, d)
  501. #endif
  502.  
  503. #endif
  504.  
  505. /*
  506.  * IDirectDrawClipper
  507.  */
  508. #if defined( _WIN32 ) && !defined( _NO_COM )
  509. #undef INTERFACE
  510. #define INTERFACE IDirectDrawClipper
  511. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  512. {
  513.     /*** IUnknown methods ***/
  514.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  515.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  516.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  517.     /*** IDirectDrawClipper methods ***/
  518.     STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  519.     STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  520.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  521.     STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  522.     STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  523.     STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  524. };
  525.  
  526. #if !defined(__cplusplus) || defined(CINTERFACE)
  527. #define IDirectDrawClipper_QueryInterface(p, a, b)  (p)->lpVtbl->QueryInterface(p, a, b)
  528. #define IDirectDrawClipper_AddRef(p)                (p)->lpVtbl->AddRef(p)
  529. #define IDirectDrawClipper_Release(p)               (p)->lpVtbl->Release(p)
  530. #define IDirectDrawClipper_GetClipList(p, a, b, c)  (p)->lpVtbl->GetClipList(p, a, b, c)
  531. #define IDirectDrawClipper_GetHWnd(p, a)            (p)->lpVtbl->GetHWnd(p, a)
  532. #define IDirectDrawClipper_Initialize(p, a, b)      (p)->lpVtbl->Initialize(p, a, b)
  533. #define IDirectDrawClipper_IsClipListChanged(p, a)  (p)->lpVtbl->IsClipListChanged(p, a)
  534. #define IDirectDrawClipper_SetClipList(p, a, b)     (p)->lpVtbl->SetClipList(p, a, b)
  535. #define IDirectDrawClipper_SetHWnd(p, a, b)         (p)->lpVtbl->SetHWnd(p, a, b)
  536. #endif
  537.  
  538. #endif
  539.  
  540. /*
  541.  * IDirectDrawSurface and related interfaces
  542.  */
  543. #if defined( _WIN32 ) && !defined( _NO_COM )
  544. #undef INTERFACE
  545. #define INTERFACE IDirectDrawSurface
  546. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  547. {
  548.     /*** IUnknown methods ***/
  549.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  550.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  551.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  552.     /*** IDirectDrawSurface methods ***/
  553.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  554.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  555.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  556.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  557.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  558.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  559.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  560.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  561.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  562.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  563.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  564.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  565.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  566.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  567.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  568.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  569.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  570.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  571.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  572.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  573.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  574.     STDMETHOD(IsLost)(THIS) PURE;
  575.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  576.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  577.     STDMETHOD(Restore)(THIS) PURE;
  578.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  579.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  580.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  581.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  582.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  583.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  584.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  585.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  586. };
  587.  
  588. #if !defined(__cplusplus) || defined(CINTERFACE)
  589. #define IDirectDrawSurface_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  590. #define IDirectDrawSurface_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  591. #define IDirectDrawSurface_Release(p)                   (p)->lpVtbl->Release(p)
  592. #define IDirectDrawSurface_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  593. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  594. #define IDirectDrawSurface_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  595. #define IDirectDrawSurface_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  596. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  597. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  598. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  599. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  600. #define IDirectDrawSurface_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  601. #define IDirectDrawSurface_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  602. #define IDirectDrawSurface_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  603. #define IDirectDrawSurface_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  604. #define IDirectDrawSurface_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  605. #define IDirectDrawSurface_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  606. #define IDirectDrawSurface_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  607. #define IDirectDrawSurface_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  608. #define IDirectDrawSurface_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  609. #define IDirectDrawSurface_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  610. #define IDirectDrawSurface_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  611. #define IDirectDrawSurface_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  612. #define IDirectDrawSurface_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  613. #define IDirectDrawSurface_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  614. #define IDirectDrawSurface_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  615. #define IDirectDrawSurface_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  616. #define IDirectDrawSurface_Restore(p)                   (p)->lpVtbl->Restore(p)
  617. #define IDirectDrawSurface_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  618. #define IDirectDrawSurface_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  619. #define IDirectDrawSurface_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  620. #define IDirectDrawSurface_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  621. #define IDirectDrawSurface_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  622. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  623. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  624. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  625. #endif
  626.  
  627. /*
  628.  * IDirectDrawSurface2 and related interfaces
  629.  */
  630. #undef INTERFACE
  631. #define INTERFACE IDirectDrawSurface2
  632. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  633. {
  634.     /*** IUnknown methods ***/
  635.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  636.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  637.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  638.     /*** IDirectDrawSurface methods ***/
  639.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  640.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  641.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  642.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  643.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  644.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  645.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  646.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  647.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  648.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  649.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  650.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  651.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  652.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  653.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  654.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  655.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  656.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  657.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  658.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  659.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  660.     STDMETHOD(IsLost)(THIS) PURE;
  661.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  662.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  663.     STDMETHOD(Restore)(THIS) PURE;
  664.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  665.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  666.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  667.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  668.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  669.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  670.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  671.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  672.     /*** Added in the v2 interface ***/
  673.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  674.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  675.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  676. };
  677.  
  678. #if !defined(__cplusplus) || defined(CINTERFACE)
  679. #define IDirectDrawSurface2_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  680. #define IDirectDrawSurface2_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  681. #define IDirectDrawSurface2_Release(p)                   (p)->lpVtbl->Release(p)
  682. #define IDirectDrawSurface2_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  683. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  684. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  685. #define IDirectDrawSurface2_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  686. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  687. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  688. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  689. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  690. #define IDirectDrawSurface2_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  691. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  692. #define IDirectDrawSurface2_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  693. #define IDirectDrawSurface2_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  694. #define IDirectDrawSurface2_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  695. #define IDirectDrawSurface2_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  696. #define IDirectDrawSurface2_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  697. #define IDirectDrawSurface2_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  698. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  699. #define IDirectDrawSurface2_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  700. #define IDirectDrawSurface2_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  701. #define IDirectDrawSurface2_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  702. #define IDirectDrawSurface2_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  703. #define IDirectDrawSurface2_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  704. #define IDirectDrawSurface2_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  705. #define IDirectDrawSurface2_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  706. #define IDirectDrawSurface2_Restore(p)                   (p)->lpVtbl->Restore(p)
  707. #define IDirectDrawSurface2_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  708. #define IDirectDrawSurface2_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  709. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  710. #define IDirectDrawSurface2_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  711. #define IDirectDrawSurface2_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  712. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  713. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  714. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  715. #define IDirectDrawSurface2_GetDDInterface(p,a)         (p)->lpVtbl->GetDDInterface(p,a)
  716. #define IDirectDrawSurface2_PageLock(p,a)         (p)->lpVtbl->PageLock(p,a)
  717. #define IDirectDrawSurface2_PageUnlock(p,a)         (p)->lpVtbl->PageUnlock(p,a)
  718. #endif
  719.  
  720.  
  721. #endif
  722.  
  723.  
  724. /*
  725.  * DDSURFACEDESC
  726.  */
  727. typedef struct _DDSURFACEDESC
  728. {
  729.     DWORD        dwSize;            // size of the DDSURFACEDESC structure
  730.     DWORD        dwFlags;        // determines what fields are valid
  731.     DWORD        dwHeight;        // height of surface to be created
  732.     DWORD        dwWidth;        // width of input surface
  733.     LONG        lPitch;            // distance to start of next line (return value only)
  734.     DWORD        dwBackBufferCount;    // number of back buffers requested
  735.     union
  736.     {
  737.         DWORD           dwMipMapCount;          // number of mip-map levels requested
  738.     DWORD        dwZBufferBitDepth;    // depth of Z buffer requested
  739.     DWORD        dwRefreshRate;        // refresh rate (used when display mode is described)
  740.     };
  741.     DWORD        dwAlphaBitDepth;    // depth of alpha buffer requested
  742.     DWORD        dwReserved;        // reserved
  743.     LPVOID        lpSurface;        // pointer to the associated surface memory
  744.     DDCOLORKEY        ddckCKDestOverlay;    // color key for destination overlay use
  745.     DDCOLORKEY        ddckCKDestBlt;        // color key for destination blt use
  746.     DDCOLORKEY        ddckCKSrcOverlay;    // color key for source overlay use
  747.     DDCOLORKEY        ddckCKSrcBlt;        // color key for source blt use
  748.     DDPIXELFORMAT    ddpfPixelFormat;    // pixel format description of the surface
  749.     DDSCAPS        ddsCaps;        // direct draw surface capabilities
  750. } DDSURFACEDESC;
  751.  
  752. /*
  753.  * ddsCaps field is valid.
  754.  */
  755. #define DDSD_CAPS        0x00000001l    // default
  756.  
  757. /*
  758.  * dwHeight field is valid.
  759.  */
  760. #define DDSD_HEIGHT        0x00000002l
  761.  
  762. /*
  763.  * dwWidth field is valid.
  764.  */
  765. #define DDSD_WIDTH        0x00000004l
  766.  
  767. /*
  768.  * lPitch is valid.
  769.  */
  770. #define DDSD_PITCH        0x00000008l
  771.  
  772. /*
  773.  * dwBackBufferCount is valid.
  774.  */
  775. #define DDSD_BACKBUFFERCOUNT    0x00000020l
  776.  
  777. /*
  778.  * dwZBufferBitDepth is valid.
  779.  */
  780. #define DDSD_ZBUFFERBITDEPTH    0x00000040l
  781.  
  782. /*
  783.  * dwAlphaBitDepth is valid.
  784.  */
  785. #define DDSD_ALPHABITDEPTH    0x00000080l
  786.  
  787.  
  788.  
  789. /*
  790.  * ddpfPixelFormat is valid.
  791.  */
  792. #define DDSD_PIXELFORMAT    0x00001000l
  793.  
  794. /*
  795.  * ddckCKDestOverlay is valid.
  796.  */
  797. #define DDSD_CKDESTOVERLAY    0x00002000l
  798.  
  799. /*
  800.  * ddckCKDestBlt is valid.
  801.  */
  802. #define DDSD_CKDESTBLT        0x00004000l
  803.  
  804. /*
  805.  * ddckCKSrcOverlay is valid.
  806.  */
  807. #define DDSD_CKSRCOVERLAY    0x00008000l
  808.  
  809. /*
  810.  * ddckCKSrcBlt is valid.
  811.  */
  812. #define DDSD_CKSRCBLT        0x00010000l
  813.  
  814. /*
  815.  * dwMipMapCount is valid.
  816.  */
  817. #define DDSD_MIPMAPCOUNT        0x00020000l
  818.  
  819.  /*
  820.   * dwRefreshRate is valid
  821.   */
  822. #define DDSD_REFRESHRATE    0x00040000l
  823.  
  824.  
  825. /*
  826.  * All input fields are valid. 
  827.  */
  828. #define DDSD_ALL        0x0007f9eel
  829.  
  830.  
  831. /*============================================================================
  832.  *
  833.  * Direct Draw Capability Flags
  834.  *
  835.  * These flags are used to describe the capabilities of a given Surface.
  836.  * All flags are bit flags. 
  837.  *
  838.  *==========================================================================*/
  839.  
  840. /****************************************************************************
  841.  *
  842.  * DIRECTDRAWSURFACE CAPABILITY FLAGS
  843.  *
  844.  ****************************************************************************/
  845. /*
  846.  * This bit currently has no meaning.
  847.  */
  848. #define DDSCAPS_3D                0x00000001l
  849.  
  850. /*
  851.  * Indicates that this surface contains alpha information.  The pixel
  852.  * format must be interrogated to determine whether this surface
  853.  * contains only alpha information or alpha information interlaced
  854.  * with pixel color data (e.g. RGBA or YUVA).
  855.  */
  856. #define DDSCAPS_ALPHA                0x00000002l
  857.  
  858. /*
  859.  * Indicates that this surface is a backbuffer.     It is generally
  860.  * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  861.  * It indicates that this surface is THE back buffer of a surface
  862.  * flipping structure.    DirectDraw supports N surfaces in a
  863.  * surface flipping structure.    Only the surface that immediately
  864.  * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  865.  * The other surfaces are identified as back buffers by the presence
  866.  * of the DDSCAPS_FLIP capability, their attachment order, and the
  867.  * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  868.  * capabilities.  The bit is sent to CreateSurface when a standalone
  869.  * back buffer is being created.  This surface could be attached to
  870.  * a front buffer and/or back buffers to form a flipping surface
  871.  * structure after the CreateSurface call.  See AddAttachments for
  872.  * a detailed description of the behaviors in this case.
  873.  */
  874. #define DDSCAPS_BACKBUFFER            0x00000004l
  875.  
  876. /*
  877.  * Indicates a complex surface structure is being described.  A
  878.  * complex surface structure results in the creation of more than
  879.  * one surface.     The additional surfaces are attached to the root
  880.  * surface.  The complex structure can only be destroyed by
  881.  * destroying the root.
  882.  */
  883. #define DDSCAPS_COMPLEX                0x00000008l
  884.  
  885. /*
  886.  * Indicates that this surface is a part of a surface flipping structure.
  887.  * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  888.  * DDSCAP_BACKBUFFER bits are not set.    They are set by CreateSurface
  889.  * on the resulting creations.    The dwBackBufferCount field in the
  890.  * DDSURFACEDESC structure must be set to at least 1 in order for
  891.  * the CreateSurface call to succeed.  The DDSCAPS_COMPLEX capability
  892.  * must always be set with creating multiple surfaces through CreateSurface.
  893.  */
  894. #define DDSCAPS_FLIP                0x00000010l
  895.  
  896. /*
  897.  * Indicates that this surface is THE front buffer of a surface flipping
  898.  * structure.  It is generally set by CreateSurface when the DDSCAPS_FLIP
  899.  * capability bit is set.
  900.  * If this capability is sent to CreateSurface then a standalonw front buffer
  901.  * is created.    This surface will not have the DDSCAPS_FLIP capability.
  902.  * It can be attached to other back buffers to form a flipping structure.
  903.  * See AddAttachments for a detailed description of the behaviors in this
  904.  * case.
  905.  */
  906. #define DDSCAPS_FRONTBUFFER            0x00000020l
  907.  
  908. /*
  909.  * Indicates that this surface is any offscreen surface that is not an overlay,
  910.  * texture, zbuffer, front buffer, back buffer, or alpha surface.  It is used
  911.  * to identify plain vanilla surfaces.
  912.  */
  913. #define DDSCAPS_OFFSCREENPLAIN            0x00000040l
  914.  
  915. /*
  916.  * Indicates that this surface is an overlay.  It may or may not be directly visible
  917.  * depending on whether or not it is currently being overlayed onto the primary 
  918.  * surface.  DDSCAPS_VISIBLE can be used to determine whether or not it is being 
  919.  * overlayed at the moment. 
  920.  */
  921. #define DDSCAPS_OVERLAY                0x00000080l
  922.  
  923. /*
  924.  * Indicates that unique DirectDrawPalette objects can be created and
  925.  * attached to this surface.
  926.  */
  927. #define DDSCAPS_PALETTE                0x00000100l
  928.  
  929. /*
  930.  * Indicates that this surface is the primary surface.    The primary
  931.  * surface represents what the user is seeing at the moment.
  932.  */
  933. #define DDSCAPS_PRIMARYSURFACE            0x00000200l
  934.  
  935. /*
  936.  * Indicates that this surface is the primary surface for the left eye.
  937.  * The primary surface for the left eye represents what the user is seeing
  938.  * at the moment with the users left eye.  When this surface is created the
  939.  * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
  940.  * right eye.
  941.  */
  942. #define DDSCAPS_PRIMARYSURFACELEFT        0x00000400l
  943.  
  944. /*
  945.  * Indicates that this surface memory was allocated in system memory
  946.  */
  947. #define DDSCAPS_SYSTEMMEMORY            0x00000800l
  948.  
  949. /*
  950.  * Indicates that this surface can be used as a 3D texture.  It does not
  951.  * indicate whether or not the surface is being used for that purpose.
  952.  */
  953. #define DDSCAPS_TEXTURE                    0x00001000l
  954.  
  955. /*
  956.  * Indicates that a surface may be a destination for 3D rendering.  This
  957.  * bit must be set in order to query for a Direct3D Device Interface 
  958.  * from this surface.
  959.  */
  960. #define DDSCAPS_3DDEVICE                        0x00002000l
  961.  
  962. /*
  963.  * Indicates that this surface exists in video memory.
  964.  */
  965. #define DDSCAPS_VIDEOMEMORY            0x00004000l
  966.  
  967. /*
  968.  * Indicates that changes made to this surface are immediately visible.     
  969.  * It is always set for the primary surface and is set for overlays while
  970.  * they are being overlayed and texture maps while they are being textured.
  971.  */
  972. #define DDSCAPS_VISIBLE                0x00008000l
  973.  
  974. /*
  975.  * Indicates that only writes are permitted to the surface.  Read accesses 
  976.  * from the surface may or may not generate a protection fault, but the 
  977.  * results of a read from this surface will not be meaningful.    READ ONLY.
  978.  */
  979. #define DDSCAPS_WRITEONLY            0x00010000l
  980.  
  981. /*
  982.  * Indicates that this surface is a z buffer. A z buffer does not contain
  983.  * displayable information.  Instead it contains bit depth information that is
  984.  * used to determine which pixels are visible and which are obscured. 
  985.  */
  986. #define DDSCAPS_ZBUFFER                0x00020000l
  987.  
  988. /*
  989.  * Indicates surface will have a DC associated long term
  990.  */
  991. #define DDSCAPS_OWNDC                0x00040000l
  992.  
  993. /*
  994.  * Indicates surface should be able to receive live video
  995.  */
  996. #define DDSCAPS_LIVEVIDEO            0x00080000l
  997.  
  998. /*
  999.  * Indicates surface should be able to have a stream decompressed
  1000.  * to it by the hardware.
  1001.  */
  1002. #define DDSCAPS_HWCODEC                0x00100000l
  1003.  
  1004. /*
  1005.  * Surface is a 320x200 or 320x240 ModeX surface
  1006.  */
  1007. #define DDSCAPS_MODEX                0x00200000l
  1008.  
  1009. /*
  1010.  * Indicates surface is one level of a mip-map. This surface will
  1011.  * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  1012.  * This can be done explicitly, by creating a number of surfaces and
  1013.  * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  1014.  * If this bit is set then DDSCAPS_TEXTURE must also be set.
  1015.  */
  1016. #define DDSCAPS_MIPMAP                          0x00400000l
  1017.  
  1018.  
  1019.  
  1020. /*
  1021.  * Indicates that memory for the surface is not allocated until the surface
  1022.  * is loaded (via the Direct3D texture Load() function).
  1023.  */
  1024. #define DDSCAPS_ALLOCONLOAD                     0x04000000l
  1025.  
  1026.  
  1027.  
  1028.  /****************************************************************************
  1029.  *
  1030.  * DIRECTDRAW DRIVER CAPABILITY FLAGS
  1031.  *
  1032.  ****************************************************************************/
  1033.  
  1034. /*
  1035.  * Display hardware has 3D acceleration.
  1036.  */
  1037. #define DDCAPS_3D            0x00000001l
  1038.  
  1039. /*
  1040.  * Indicates that DirectDraw will support only dest rectangles that are aligned
  1041.  * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  1042.  * READ ONLY.
  1043.  */
  1044. #define DDCAPS_ALIGNBOUNDARYDEST    0x00000002l
  1045.  
  1046. /*
  1047.  * Indicates that DirectDraw will support only source rectangles  whose sizes in 
  1048.  * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively.  READ ONLY.
  1049.  */
  1050. #define DDCAPS_ALIGNSIZEDEST        0x00000004l
  1051. /*
  1052.  * Indicates that DirectDraw will support only source rectangles that are aligned
  1053.  * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  1054.  * READ ONLY.
  1055.  */
  1056. #define DDCAPS_ALIGNBOUNDARYSRC        0x00000008l
  1057.  
  1058. /*
  1059.  * Indicates that DirectDraw will support only source rectangles  whose sizes in 
  1060.  * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively.  READ ONLY.
  1061.  */
  1062. #define DDCAPS_ALIGNSIZESRC        0x00000010l
  1063.  
  1064. /*
  1065.  * Indicates that DirectDraw will create video memory surfaces that have a stride 
  1066.  * alignment equal to DIRECTDRAWCAPS.dwAlignStride.  READ ONLY.
  1067.  */
  1068. #define DDCAPS_ALIGNSTRIDE        0x00000020l
  1069.  
  1070. /*
  1071.  * Display hardware is capable of blt operations.
  1072.  */
  1073. #define DDCAPS_BLT            0x00000040l
  1074.  
  1075. /*
  1076.  * Display hardware is capable of asynchronous blt operations.
  1077.  */
  1078. #define DDCAPS_BLTQUEUE            0x00000080l
  1079.  
  1080. /*
  1081.  * Display hardware is capable of color space conversions during the blt operation.
  1082.  */
  1083. #define DDCAPS_BLTFOURCC        0x00000100l
  1084.  
  1085. /*
  1086.  * Display hardware is capable of stretching during blt operations.
  1087.  */
  1088. #define DDCAPS_BLTSTRETCH        0x00000200l
  1089.  
  1090. /*
  1091.  * Display hardware is shared with GDI.
  1092.  */
  1093. #define DDCAPS_GDI            0x00000400l
  1094.  
  1095. /*
  1096.  * Display hardware can overlay.
  1097.  */
  1098. #define DDCAPS_OVERLAY            0x00000800l
  1099.  
  1100. /*
  1101.  * Set if display hardware supports overlays but can not clip them.
  1102.  */
  1103. #define DDCAPS_OVERLAYCANTCLIP        0x00001000l
  1104.  
  1105. /*
  1106.  * Indicates that overlay hardware is capable of color space conversions during
  1107.  * the overlay operation.
  1108.  */
  1109. #define DDCAPS_OVERLAYFOURCC        0x00002000l
  1110.  
  1111. /*
  1112.  * Indicates that stretching can be done by the overlay hardware.
  1113.  */
  1114. #define DDCAPS_OVERLAYSTRETCH        0x00004000l
  1115.  
  1116. /*
  1117.  * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  1118.  * other than the primary surface.
  1119.  */
  1120. #define DDCAPS_PALETTE            0x00008000l
  1121.  
  1122. /*
  1123.  * Indicates that palette changes can be syncd with the veritcal refresh.
  1124.  */
  1125. #define DDCAPS_PALETTEVSYNC        0x00010000l
  1126.  
  1127. /*
  1128.  * Display hardware can return the current scan line.
  1129.  */
  1130. #define DDCAPS_READSCANLINE        0x00020000l
  1131.  
  1132. /*
  1133.  * Display hardware has stereo vision capabilities.  DDSCAPS_PRIMARYSURFACELEFT 
  1134.  * can be created.
  1135.  */
  1136. #define DDCAPS_STEREOVIEW        0x00040000l
  1137.  
  1138. /*
  1139.  * Display hardware is capable of generating a vertical blank interrupt.
  1140.  */
  1141. #define DDCAPS_VBI            0x00080000l
  1142.  
  1143. /*
  1144.  * Supports the use of z buffers with blt operations.
  1145.  */
  1146. #define DDCAPS_ZBLTS            0x00100000l
  1147.  
  1148. /*
  1149.  * Supports Z Ordering of overlays.
  1150.  */
  1151. #define DDCAPS_ZOVERLAYS        0x00200000l
  1152.  
  1153. /*
  1154.  * Supports color key
  1155.  */
  1156. #define DDCAPS_COLORKEY            0x00400000l
  1157.  
  1158. /*
  1159.  * Supports alpha surfaces
  1160.  */
  1161. #define DDCAPS_ALPHA            0x00800000l
  1162.  
  1163. /*
  1164.  * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  1165.  */
  1166. #define DDCAPS_COLORKEYHWASSIST        0x01000000l
  1167.  
  1168. /*
  1169.  * no hardware support at all
  1170.  */
  1171. #define DDCAPS_NOHARDWARE        0x02000000l
  1172.  
  1173. /*
  1174.  * Display hardware is capable of color fill with bltter
  1175.  */
  1176. #define DDCAPS_BLTCOLORFILL        0x04000000l
  1177.  
  1178. /*
  1179.  * Display hardware is bank switched, and potentially very slow at
  1180.  * random access to VRAM.
  1181.  */
  1182. #define DDCAPS_BANKSWITCHED        0x08000000l
  1183.  
  1184. /*
  1185.  * Display hardware is capable of depth filling Z-buffers with bltter
  1186.  */
  1187. #define DDCAPS_BLTDEPTHFILL        0x10000000l
  1188.  
  1189. /*
  1190.  * Display hardware is capable of clipping while bltting.
  1191.  */
  1192. #define DDCAPS_CANCLIP            0x20000000l
  1193.  
  1194. /*
  1195.  * Display hardware is capable of clipping while stretch bltting.
  1196.  */
  1197. #define DDCAPS_CANCLIPSTRETCHED        0x40000000l
  1198.  
  1199. /*
  1200.  * Display hardware is capable of bltting to or from system memory
  1201.  */
  1202. #define DDCAPS_CANBLTSYSMEM        0x80000000l
  1203.  
  1204.  
  1205.  /****************************************************************************
  1206.  *
  1207.  * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  1208.  *
  1209.  ****************************************************************************/
  1210.  
  1211. /*
  1212.  * Display hardware is certified
  1213.  */
  1214. #define DDCAPS2_CERTIFIED        0x00000001l
  1215.  
  1216. /*
  1217.  * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  1218.  * Direct3D rendering operations between calls to BeginScene() and EndScene()
  1219.  */
  1220. #define DDCAPS2_NO2DDURING3DSCENE       0x00000002l
  1221.  
  1222. /****************************************************************************
  1223.  *
  1224.  * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  1225.  *
  1226.  ****************************************************************************/
  1227.  
  1228. /*
  1229.  * Supports alpha blending around the edge of a source color keyed surface.
  1230.  * For Blt.
  1231.  */
  1232. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND        0x00000001l
  1233.  
  1234. /*
  1235.  * Supports alpha information in the pixel format.  The bit depth of alpha 
  1236.  * information in the pixel format can be 1,2,4, or 8.    The alpha value becomes
  1237.  * more opaque as the alpha value increases.  (0 is transparent.)
  1238.  * For Blt.
  1239.  */
  1240. #define DDFXALPHACAPS_BLTALPHAPIXELS        0x00000002l
  1241.  
  1242. /*
  1243.  * Supports alpha information in the pixel format.  The bit depth of alpha 
  1244.  * information in the pixel format can be 1,2,4, or 8.    The alpha value 
  1245.  * becomes more transparent as the alpha value increases.  (0 is opaque.) 
  1246.  * This flag can only be set if DDCAPS_ALPHA is set.
  1247.  * For Blt.
  1248.  */
  1249. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG        0x00000004l
  1250.  
  1251. /*
  1252.  * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
  1253.  * 1,2,4, or 8.     The alpha value becomes more opaque as the alpha value increases.
  1254.  * (0 is transparent.)
  1255.  * For Blt.
  1256.  */
  1257. #define DDFXALPHACAPS_BLTALPHASURFACES        0x00000008l
  1258.  
  1259. /*
  1260.  * The depth of the alpha channel data can range can be 1,2,4, or 8.  
  1261.  * The NEG suffix indicates that this alpha channel becomes more transparent
  1262.  * as the alpha value increases. (0 is opaque.)     This flag can only be set if
  1263.  * DDCAPS_ALPHA is set.
  1264.  * For Blt.
  1265.  */
  1266. #define DDFXALPHACAPS_BLTALPHASURFACESNEG    0x00000010l
  1267.  
  1268. /*
  1269.  * Supports alpha blending around the edge of a source color keyed surface.
  1270.  * For Overlays.
  1271.  */
  1272. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND    0x00000020l
  1273.  
  1274. /*
  1275.  * Supports alpha information in the pixel format.  The bit depth of alpha 
  1276.  * information in the pixel format can be 1,2,4, or 8.    The alpha value becomes
  1277.  * more opaque as the alpha value increases.  (0 is transparent.)
  1278.  * For Overlays.
  1279.  */
  1280. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS    0x00000040l
  1281.  
  1282. /*
  1283.  * Supports alpha information in the pixel format.  The bit depth of alpha 
  1284.  * information in the pixel format can be 1,2,4, or 8.    The alpha value 
  1285.  * becomes more transparent as the alpha value increases.  (0 is opaque.) 
  1286.  * This flag can only be set if DDCAPS_ALPHA is set.
  1287.  * For Overlays.
  1288.  */
  1289. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG    0x00000080l
  1290.  
  1291. /*
  1292.  * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
  1293.  * 1,2,4, or 8.     The alpha value becomes more opaque as the alpha value increases.
  1294.  * (0 is transparent.)
  1295.  * For Overlays.
  1296.  */
  1297. #define DDFXALPHACAPS_OVERLAYALPHASURFACES    0x00000100l
  1298.  
  1299. /*
  1300.  * The depth of the alpha channel data can range can be 1,2,4, or 8.  
  1301.  * The NEG suffix indicates that this alpha channel becomes more transparent
  1302.  * as the alpha value increases. (0 is opaque.)     This flag can only be set if
  1303.  * DDCAPS_ALPHA is set.
  1304.  * For Overlays.
  1305.  */
  1306. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG    0x00000200l
  1307.  
  1308. /****************************************************************************
  1309.  *
  1310.  * DIRECTDRAW FX CAPABILITY FLAGS
  1311.  *
  1312.  ****************************************************************************/
  1313.  
  1314. /*
  1315.  * Uses arithmetic operations to stretch and shrink surfaces during blt
  1316.  * rather than pixel doubling techniques.  Along the Y axis.
  1317.  */
  1318. #define DDFXCAPS_BLTARITHSTRETCHY    0x00000020l
  1319.  
  1320. /*
  1321.  * Uses arithmetic operations to stretch during blt
  1322.  * rather than pixel doubling techniques.  Along the Y axis. Only
  1323.  * works for x1, x2, etc.
  1324.  */
  1325. #define DDFXCAPS_BLTARITHSTRETCHYN    0x00000010l
  1326.  
  1327. /*
  1328.  * Supports mirroring left to right in blt.
  1329.  */
  1330. #define DDFXCAPS_BLTMIRRORLEFTRIGHT    0x00000040l
  1331.  
  1332. /*
  1333.  * Supports mirroring top to bottom in blt.
  1334.  */
  1335. #define DDFXCAPS_BLTMIRRORUPDOWN    0x00000080l
  1336.  
  1337. /*
  1338.  * Supports arbitrary rotation for blts.
  1339.  */
  1340. #define DDFXCAPS_BLTROTATION        0x00000100l
  1341.  
  1342. /*
  1343.  * Supports 90 degree rotations for blts.
  1344.  */
  1345. #define DDFXCAPS_BLTROTATION90        0x00000200l
  1346.  
  1347. /*
  1348.  * DirectDraw supports arbitrary shrinking of a surface along the
  1349.  * x axis (horizontal direction) for blts.
  1350.  */
  1351. #define DDFXCAPS_BLTSHRINKX        0x00000400l
  1352.  
  1353. /*
  1354.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1355.  * along the x axis (horizontal direction) for blts.
  1356.  */
  1357. #define DDFXCAPS_BLTSHRINKXN        0x00000800l
  1358.  
  1359. /*
  1360.  * DirectDraw supports arbitrary shrinking of a surface along the
  1361.  * y axis (horizontal direction) for blts.  
  1362.  */
  1363. #define DDFXCAPS_BLTSHRINKY        0x00001000l
  1364.  
  1365. /*
  1366.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1367.  * along the y axis (vertical direction) for blts.  
  1368.  */
  1369. #define DDFXCAPS_BLTSHRINKYN        0x00002000l
  1370.  
  1371. /*
  1372.  * DirectDraw supports arbitrary stretching of a surface along the
  1373.  * x axis (horizontal direction) for blts.
  1374.  */
  1375. #define DDFXCAPS_BLTSTRETCHX        0x00004000l
  1376.  
  1377. /*
  1378.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  1379.  * along the x axis (horizontal direction) for blts.
  1380.  */
  1381. #define DDFXCAPS_BLTSTRETCHXN        0x00008000l
  1382.  
  1383. /*
  1384.  * DirectDraw supports arbitrary stretching of a surface along the
  1385.  * y axis (horizontal direction) for blts.  
  1386.  */
  1387. #define DDFXCAPS_BLTSTRETCHY        0x00010000l
  1388.  
  1389. /*
  1390.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  1391.  * along the y axis (vertical direction) for blts.  
  1392.  */
  1393. #define DDFXCAPS_BLTSTRETCHYN        0x00020000l
  1394.  
  1395. /*
  1396.  * Uses arithmetic operations to stretch and shrink surfaces during 
  1397.  * overlay rather than pixel doubling techniques.  Along the Y axis 
  1398.  * for overlays.
  1399.  */
  1400. #define DDFXCAPS_OVERLAYARITHSTRETCHY    0x00040000l
  1401.  
  1402. /*
  1403.  * Uses arithmetic operations to stretch surfaces during 
  1404.  * overlay rather than pixel doubling techniques.  Along the Y axis 
  1405.  * for overlays. Only works for x1, x2, etc.
  1406.  */
  1407. #define DDFXCAPS_OVERLAYARITHSTRETCHYN    0x00000008l
  1408.  
  1409. /*
  1410.  * DirectDraw supports arbitrary shrinking of a surface along the
  1411.  * x axis (horizontal direction) for overlays.
  1412.  */
  1413. #define DDFXCAPS_OVERLAYSHRINKX        0x00080000l
  1414.  
  1415. /*
  1416.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1417.  * along the x axis (horizontal direction) for overlays.
  1418.  */
  1419. #define DDFXCAPS_OVERLAYSHRINKXN    0x00100000l
  1420.  
  1421. /*
  1422.  * DirectDraw supports arbitrary shrinking of a surface along the
  1423.  * y axis (horizontal direction) for overlays.    
  1424.  */
  1425. #define DDFXCAPS_OVERLAYSHRINKY        0x00200000l
  1426.  
  1427. /*
  1428.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1429.  * along the y axis (vertical direction) for overlays.    
  1430.  */
  1431. #define DDFXCAPS_OVERLAYSHRINKYN    0x00400000l
  1432.  
  1433. /*
  1434.  * DirectDraw supports arbitrary stretching of a surface along the
  1435.  * x axis (horizontal direction) for overlays.
  1436.  */
  1437. #define DDFXCAPS_OVERLAYSTRETCHX    0x00800000l
  1438.  
  1439. /*
  1440.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  1441.  * along the x axis (horizontal direction) for overlays.
  1442.  */
  1443. #define DDFXCAPS_OVERLAYSTRETCHXN    0x01000000l
  1444.  
  1445. /*
  1446.  * DirectDraw supports arbitrary stretching of a surface along the
  1447.  * y axis (horizontal direction) for overlays.    
  1448.  */
  1449. #define DDFXCAPS_OVERLAYSTRETCHY    0x02000000l
  1450.  
  1451. /*
  1452.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  1453.  * along the y axis (vertical direction) for overlays.    
  1454.  */
  1455. #define DDFXCAPS_OVERLAYSTRETCHYN    0x04000000l
  1456.  
  1457. /*
  1458.  * DirectDraw supports mirroring of overlays across the vertical axis
  1459.  */
  1460. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT    0x08000000l
  1461.  
  1462. /*
  1463.  * DirectDraw supports mirroring of overlays across the horizontal axis
  1464.  */
  1465. #define DDFXCAPS_OVERLAYMIRRORUPDOWN    0x10000000l
  1466.  
  1467. /****************************************************************************
  1468.  *
  1469.  * DIRECTDRAW STEREO VIEW CAPABILITIES
  1470.  *
  1471.  ****************************************************************************/
  1472.  
  1473. /*
  1474.  * The stereo view is accomplished via enigma encoding.
  1475.  */
  1476. #define DDSVCAPS_ENIGMA            0x00000001l
  1477.  
  1478. /*
  1479.  * The stereo view is accomplished via high frequency flickering.
  1480.  */
  1481. #define DDSVCAPS_FLICKER        0x00000002l
  1482.  
  1483. /*
  1484.  * The stereo view is accomplished via red and blue filters applied
  1485.  * to the left and right eyes.    All images must adapt their colorspaces
  1486.  * for this process.
  1487.  */
  1488. #define DDSVCAPS_REDBLUE        0x00000004l
  1489.  
  1490. /*
  1491.  * The stereo view is accomplished with split screen technology.
  1492.  */
  1493. #define DDSVCAPS_SPLIT            0x00000008l
  1494.  
  1495. /****************************************************************************
  1496.  *
  1497.  * DIRECTDRAWPALETTE CAPABILITIES
  1498.  *
  1499.  ****************************************************************************/
  1500.  
  1501. /*
  1502.  * Index is 4 bits.  There are sixteen color entries in the palette table.
  1503.  */
  1504. #define DDPCAPS_4BIT            0x00000001l
  1505.  
  1506. /*
  1507.  * Index is onto a 8 bit color index.  This field is only valid with the
  1508.  * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  1509.  * surface is in 8bpp. Each color entry is one byte long and is an index
  1510.  * into destination surface's 8bpp palette.
  1511.  */
  1512. #define DDPCAPS_8BITENTRIES        0x00000002l
  1513.  
  1514. /*
  1515.  * Index is 8 bits.  There are 256 color entries in the palette table.
  1516.  */
  1517. #define DDPCAPS_8BIT            0x00000004l
  1518.  
  1519. /*
  1520.  * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  1521.  * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  1522.  * object.
  1523.  */
  1524. #define DDPCAPS_INITIALIZE        0x00000008l
  1525.  
  1526. /*
  1527.  * This palette is the one attached to the primary surface.  Changing this
  1528.  * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  1529.  * and supported.
  1530.  */
  1531. #define DDPCAPS_PRIMARYSURFACE        0x00000010l
  1532.  
  1533. /*
  1534.  * This palette is the one attached to the primary surface left.  Changing
  1535.  * this table has immediate effect on the display for the left eye unless
  1536.  * DDPSETPAL_VSYNC is specified and supported.
  1537.  */
  1538. #define DDPCAPS_PRIMARYSURFACELEFT    0x00000020l
  1539.  
  1540. /*
  1541.  * This palette can have all 256 entries defined
  1542.  */
  1543. #define DDPCAPS_ALLOW256        0x00000040l
  1544.  
  1545. /*
  1546.  * This palette can have modifications to it synced with the monitors
  1547.  * refresh rate.
  1548.  */
  1549. #define DDPCAPS_VSYNC            0x00000080l
  1550.  
  1551. /*
  1552.  * Index is 1 bit.  There are two color entries in the palette table.
  1553.  */
  1554. #define DDPCAPS_1BIT            0x00000100l
  1555.  
  1556. /*
  1557.  * Index is 2 bit.  There are four color entries in the palette table.
  1558.  */
  1559. #define DDPCAPS_2BIT            0x00000200l
  1560.  
  1561.  
  1562. /****************************************************************************
  1563.  *
  1564.  * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  1565.  *
  1566.  ****************************************************************************/
  1567.  
  1568.  
  1569. /****************************************************************************
  1570.  *
  1571.  * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  1572.  *
  1573.  ****************************************************************************/
  1574.  
  1575. /* 0 is the only legal value */
  1576.  
  1577. /****************************************************************************
  1578.  *
  1579.  * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  1580.  *
  1581.  ****************************************************************************/
  1582.  
  1583.  
  1584. /****************************************************************************
  1585.  *
  1586.  * DIRECTDRAW BITDEPTH CONSTANTS
  1587.  *
  1588.  * NOTE:  These are only used to indicate supported bit depths.   These
  1589.  * are flags only, they are not to be used as an actual bit depth.   The
  1590.  * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  1591.  * bit depths in a surface or for changing the display mode.
  1592.  *
  1593.  ****************************************************************************/
  1594.  
  1595. /*
  1596.  * 1 bit per pixel.
  1597.  */
  1598. #define DDBD_1            0x00004000l
  1599.  
  1600. /*
  1601.  * 2 bits per pixel.
  1602.  */
  1603. #define DDBD_2            0x00002000l
  1604.  
  1605. /*
  1606.  * 4 bits per pixel.
  1607.  */
  1608. #define DDBD_4            0x00001000l
  1609.  
  1610. /*
  1611.  * 8 bits per pixel.
  1612.  */
  1613. #define DDBD_8            0x00000800l
  1614.  
  1615. /*
  1616.  * 16 bits per pixel.
  1617.  */
  1618. #define DDBD_16            0x00000400l
  1619.  
  1620. /*
  1621.  * 24 bits per pixel.
  1622.  */
  1623. #define DDBD_24            0X00000200l
  1624.  
  1625. /*
  1626.  * 32 bits per pixel.
  1627.  */
  1628. #define DDBD_32            0x00000100l
  1629.  
  1630. /****************************************************************************
  1631.  *
  1632.  * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  1633.  *
  1634.  ****************************************************************************/
  1635.  
  1636. /*
  1637.  * Set if the structure contains a color space.     Not set if the structure
  1638.  * contains a single color key.
  1639.  */
  1640. #define DDCKEY_COLORSPACE    0x00000001l
  1641.  
  1642. /*
  1643.  * Set if the structure specifies a color key or color space which is to be
  1644.  * used as a destination color key for blt operations.
  1645.  */
  1646. #define DDCKEY_DESTBLT        0x00000002l
  1647.  
  1648. /*
  1649.  * Set if the structure specifies a color key or color space which is to be
  1650.  * used as a destination color key for overlay operations.
  1651.  */
  1652. #define DDCKEY_DESTOVERLAY    0x00000004l
  1653.  
  1654. /*
  1655.  * Set if the structure specifies a color key or color space which is to be
  1656.  * used as a source color key for blt operations.
  1657.  */
  1658. #define DDCKEY_SRCBLT        0x00000008l
  1659.  
  1660. /*
  1661.  * Set if the structure specifies a color key or color space which is to be
  1662.  * used as a source color key for overlay operations.
  1663.  */
  1664. #define DDCKEY_SRCOVERLAY    0x00000010l
  1665.  
  1666.  
  1667. /****************************************************************************
  1668.  *
  1669.  * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  1670.  *
  1671.  ****************************************************************************/
  1672.  
  1673. /*
  1674.  * Supports transparent blting using a color key to identify the replaceable 
  1675.  * bits of the destination surface for RGB colors.
  1676.  */
  1677. #define DDCKEYCAPS_DESTBLT            0x00000001l
  1678.  
  1679. /*
  1680.  * Supports transparent blting using a color space to identify the replaceable
  1681.  * bits of the destination surface for RGB colors.
  1682.  */
  1683. #define DDCKEYCAPS_DESTBLTCLRSPACE        0x00000002l
  1684.  
  1685. /*
  1686.  * Supports transparent blting using a color space to identify the replaceable
  1687.  * bits of the destination surface for YUV colors.
  1688.  */
  1689. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV        0x00000004l
  1690.  
  1691. /*
  1692.  * Supports transparent blting using a color key to identify the replaceable 
  1693.  * bits of the destination surface for YUV colors.
  1694.  */
  1695. #define DDCKEYCAPS_DESTBLTYUV            0x00000008l
  1696.  
  1697. /*
  1698.  * Supports overlaying using colorkeying of the replaceable bits of the surface
  1699.  * being overlayed for RGB colors.
  1700.  */
  1701. #define DDCKEYCAPS_DESTOVERLAY            0x00000010l
  1702.  
  1703. /*
  1704.  * Supports a color space as the color key for the destination for RGB colors.
  1705.  */
  1706. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE        0x00000020l
  1707.  
  1708. /*
  1709.  * Supports a color space as the color key for the destination for YUV colors.
  1710.  */
  1711. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV    0x00000040l
  1712.  
  1713. /*
  1714.  * Supports only one active destination color key value for visible overlay
  1715.  * surfaces.
  1716.  */
  1717. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE        0x00000080l
  1718.  
  1719. /*
  1720.  * Supports overlaying using colorkeying of the replaceable bits of the 
  1721.  * surface being overlayed for YUV colors.
  1722.  */
  1723. #define DDCKEYCAPS_DESTOVERLAYYUV        0x00000100l
  1724.  
  1725. /*
  1726.  * Supports transparent blting using the color key for the source with
  1727.  * this surface for RGB colors.
  1728.  */
  1729. #define DDCKEYCAPS_SRCBLT            0x00000200l
  1730.  
  1731. /*
  1732.  * Supports transparent blting using a color space for the source with
  1733.  * this surface for RGB colors.
  1734.  */
  1735. #define DDCKEYCAPS_SRCBLTCLRSPACE        0x00000400l
  1736.  
  1737. /*
  1738.  * Supports transparent blting using a color space for the source with
  1739.  * this surface for YUV colors.
  1740.  */
  1741. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV        0x00000800l
  1742.  
  1743. /*
  1744.  * Supports transparent blting using the color key for the source with
  1745.  * this surface for YUV colors.
  1746.  */
  1747. #define DDCKEYCAPS_SRCBLTYUV            0x00001000l
  1748.  
  1749. /*
  1750.  * Supports overlays using the color key for the source with this
  1751.  * overlay surface for RGB colors.
  1752.  */
  1753. #define DDCKEYCAPS_SRCOVERLAY            0x00002000l
  1754.  
  1755. /*
  1756.  * Supports overlays using a color space as the source color key for
  1757.  * the overlay surface for RGB colors.
  1758.  */
  1759. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE        0x00004000l
  1760.  
  1761. /*
  1762.  * Supports overlays using a color space as the source color key for
  1763.  * the overlay surface for YUV colors.
  1764.  */
  1765. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV    0x00008000l
  1766.  
  1767. /*
  1768.  * Supports only one active source color key value for visible
  1769.  * overlay surfaces.
  1770.  */
  1771. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE        0x00010000l
  1772.  
  1773. /*
  1774.  * Supports overlays using the color key for the source with this
  1775.  * overlay surface for YUV colors.
  1776.  */
  1777. #define DDCKEYCAPS_SRCOVERLAYYUV        0x00020000l
  1778.  
  1779. /*
  1780.  * there are no bandwidth trade-offs for using colorkey with an overlay
  1781.  */
  1782. #define DDCKEYCAPS_NOCOSTOVERLAY        0x00040000l
  1783.  
  1784.  
  1785. /****************************************************************************
  1786.  *
  1787.  * DIRECTDRAW PIXELFORMAT FLAGS
  1788.  *
  1789.  ****************************************************************************/
  1790.  
  1791. /*
  1792.  * The surface has alpha channel information in the pixel format.
  1793.  */
  1794. #define DDPF_ALPHAPIXELS            0x00000001l
  1795.  
  1796. /*
  1797.  * The pixel format contains alpha only information
  1798.  */
  1799. #define DDPF_ALPHA                0x00000002l
  1800.  
  1801. /*
  1802.  * The FourCC code is valid.
  1803.  */
  1804. #define DDPF_FOURCC                0x00000004l
  1805.  
  1806. /*
  1807.  * The surface is 4-bit color indexed.
  1808.  */
  1809. #define DDPF_PALETTEINDEXED4            0x00000008l
  1810.  
  1811. /*
  1812.  * The surface is indexed into a palette which stores indices
  1813.  * into the destination surface's 8-bit palette.
  1814.  */
  1815. #define DDPF_PALETTEINDEXEDTO8            0x00000010l
  1816.  
  1817. /*
  1818.  * The surface is 8-bit color indexed.
  1819.  */
  1820. #define DDPF_PALETTEINDEXED8            0x00000020l
  1821.  
  1822. /*
  1823.  * The RGB data in the pixel format structure is valid.
  1824.  */
  1825. #define DDPF_RGB                0x00000040l
  1826.  
  1827. /*
  1828.  * The surface will accept pixel data in the format specified
  1829.  * and compress it during the write.
  1830.  */
  1831. #define DDPF_COMPRESSED                0x00000080l
  1832.  
  1833. /*
  1834.  * The surface will accept RGB data and translate it during
  1835.  * the write to YUV data.  The format of the data to be written
  1836.  * will be contained in the pixel format structure.  The DDPF_RGB
  1837.  * flag will be set. 
  1838.  */
  1839. #define DDPF_RGBTOYUV                0x00000100l
  1840.  
  1841. /*
  1842.  * pixel format is YUV - YUV data in pixel format struct is valid
  1843.  */
  1844. #define DDPF_YUV                0x00000200l
  1845.  
  1846. /*
  1847.  * pixel format is a z buffer only surface
  1848.  */
  1849. #define DDPF_ZBUFFER                0x00000400l
  1850.  
  1851. /*
  1852.  * The surface is 1-bit color indexed.
  1853.  */
  1854. #define DDPF_PALETTEINDEXED1            0x00000800l
  1855.  
  1856. /*
  1857.  * The surface is 2-bit color indexed.
  1858.  */
  1859. #define DDPF_PALETTEINDEXED2            0x00001000l
  1860.  
  1861. /*===========================================================================
  1862.  *
  1863.  *
  1864.  * DIRECTDRAW CALLBACK FLAGS
  1865.  *
  1866.  *
  1867.  *==========================================================================*/
  1868.  
  1869. /****************************************************************************
  1870.  *
  1871.  * DIRECTDRAW ENUMSURFACES FLAGS
  1872.  *
  1873.  ****************************************************************************/
  1874.  
  1875. /*
  1876.  * Enumerate all of the surfaces that meet the search criterion.
  1877.  */
  1878. #define DDENUMSURFACES_ALL            0x00000001l
  1879.  
  1880. /*
  1881.  * A search hit is a surface that matches the surface description.
  1882.  */
  1883. #define DDENUMSURFACES_MATCH            0x00000002l
  1884.  
  1885. /*
  1886.  * A search hit is a surface that does not match the surface description.
  1887.  */
  1888. #define DDENUMSURFACES_NOMATCH            0x00000004l
  1889.  
  1890. /*
  1891.  * Enumerate the first surface that can be created which meets the search criterion.
  1892.  */
  1893. #define DDENUMSURFACES_CANBECREATED        0x00000008l
  1894.  
  1895. /*
  1896.  * Enumerate the surfaces that already exist that meet the search criterion.
  1897.  */
  1898. #define DDENUMSURFACES_DOESEXIST        0x00000010l
  1899.  
  1900.  
  1901. /****************************************************************************
  1902.  *
  1903.  * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  1904.  *
  1905.  ****************************************************************************/
  1906.  
  1907. /*
  1908.  * Enumerate Modes with different refresh rates.  EnumDisplayModes guarantees
  1909.  * that a particular mode will be enumerated only once.  This flag specifies whether
  1910.  * the refresh rate is taken into account when determining if a mode is unique.
  1911.  */
  1912. #define DDEDM_REFRESHRATES            0x00000001l
  1913.  
  1914.  
  1915. /****************************************************************************
  1916.  *
  1917.  * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  1918.  *
  1919.  ****************************************************************************/
  1920.  
  1921. /*
  1922.  * Exclusive mode owner will be responsible for the entire primary surface.
  1923.  * GDI can be ignored. used with DD
  1924.  */
  1925. #define DDSCL_FULLSCREEN            0x00000001l
  1926.  
  1927. /*
  1928.  * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode 
  1929.  */
  1930. #define DDSCL_ALLOWREBOOT            0x00000002l
  1931.  
  1932. /*
  1933.  * prevents DDRAW from modifying the application window.
  1934.  * prevents DDRAW from minimize/restore the application window on activation.
  1935.  */
  1936. #define DDSCL_NOWINDOWCHANGES            0x00000004l
  1937.  
  1938. /*
  1939.  * app wants to work as a regular Windows application
  1940.  */
  1941. #define DDSCL_NORMAL                0x00000008l
  1942.  
  1943. /*
  1944.  * app wants exclusive access
  1945.  */
  1946. #define DDSCL_EXCLUSIVE                         0x00000010l
  1947.  
  1948.  
  1949. /*
  1950.  * app can deal with non-windows display modes
  1951.  */
  1952. #define DDSCL_ALLOWMODEX                        0x00000040l
  1953.  
  1954.  
  1955. /****************************************************************************
  1956.  *
  1957.  * DIRECTDRAW BLT FLAGS
  1958.  *
  1959.  ****************************************************************************/
  1960.  
  1961. /*
  1962.  * Use the alpha information in the pixel format or the alpha channel surface
  1963.  * attached to the destination surface as the alpha channel for this blt.
  1964.  */
  1965. #define DDBLT_ALPHADEST                0x00000001l
  1966.  
  1967. /*
  1968.  * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  1969.  * for the destination surface for this blt.
  1970.  */
  1971. #define DDBLT_ALPHADESTCONSTOVERRIDE        0x00000002l
  1972.  
  1973. /*
  1974.  * The NEG suffix indicates that the destination surface becomes more
  1975.  * transparent as the alpha value increases. (0 is opaque)
  1976.  */
  1977. #define DDBLT_ALPHADESTNEG            0x00000004l
  1978.  
  1979. /*
  1980.  * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  1981.  * channel for the destination for this blt.
  1982.  */
  1983. #define DDBLT_ALPHADESTSURFACEOVERRIDE        0x00000008l
  1984.  
  1985. /*
  1986.  * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  1987.  * for the edges of the image that border the color key colors.
  1988.  */
  1989. #define DDBLT_ALPHAEDGEBLEND            0x00000010l
  1990.  
  1991. /*
  1992.  * Use the alpha information in the pixel format or the alpha channel surface
  1993.  * attached to the source surface as the alpha channel for this blt.
  1994.  */
  1995. #define DDBLT_ALPHASRC                0x00000020l
  1996.  
  1997. /*
  1998.  * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  1999.  * for the source for this blt.
  2000.  */
  2001. #define DDBLT_ALPHASRCCONSTOVERRIDE        0x00000040l
  2002.  
  2003. /*
  2004.  * The NEG suffix indicates that the source surface becomes more transparent
  2005.  * as the alpha value increases. (0 is opaque)
  2006.  */
  2007. #define DDBLT_ALPHASRCNEG            0x00000080l
  2008.  
  2009. /*
  2010.  * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  2011.  * for the source for this blt. 
  2012.  */
  2013. #define DDBLT_ALPHASRCSURFACEOVERRIDE        0x00000100l
  2014.  
  2015. /*
  2016.  * Do this blt asynchronously through the FIFO in the order received.  If
  2017.  * there is no room in the hardware FIFO fail the call.
  2018.  */
  2019. #define DDBLT_ASYNC                0x00000200l
  2020.  
  2021. /*
  2022.  * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  2023.  * to fill the destination rectangle on the destination surface with.
  2024.  */
  2025. #define DDBLT_COLORFILL                0x00000400l
  2026.  
  2027. /*
  2028.  * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  2029.  * to use for the blt.
  2030.  */
  2031. #define DDBLT_DDFX                0x00000800l
  2032.  
  2033. /*
  2034.  * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  2035.  * that are not part of the Win32 API.
  2036.  */
  2037. #define DDBLT_DDROPS                0x00001000l
  2038.  
  2039. /*
  2040.  * Use the color key associated with the destination surface.
  2041.  */
  2042. #define DDBLT_KEYDEST                0x00002000l
  2043.  
  2044. /*
  2045.  * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  2046.  * for the destination surface.
  2047.  */
  2048. #define DDBLT_KEYDESTOVERRIDE            0x00004000l
  2049.  
  2050. /*
  2051.  * Use the color key associated with the source surface.
  2052.  */
  2053. #define DDBLT_KEYSRC                0x00008000l
  2054.  
  2055. /*
  2056.  * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  2057.  * for the source surface.
  2058.  */
  2059. #define DDBLT_KEYSRCOVERRIDE            0x00010000l
  2060.  
  2061. /*
  2062.  * Use the dwROP field in the DDBLTFX structure for the raster operation
  2063.  * for this blt.  These ROPs are the same as the ones defined in the Win32 API.
  2064.  */
  2065. #define DDBLT_ROP                0x00020000l
  2066.  
  2067. /*
  2068.  * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  2069.  * (specified in 1/100th of a degree) to rotate the surface.
  2070.  */
  2071. #define DDBLT_ROTATIONANGLE            0x00040000l
  2072.  
  2073. /*
  2074.  * Z-buffered blt using the z-buffers attached to the source and destination
  2075.  * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  2076.  * z-buffer opcode.
  2077.  */
  2078. #define DDBLT_ZBUFFER                0x00080000l
  2079.  
  2080. /*
  2081.  * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  2082.  * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  2083.  * for the destination.
  2084.  */
  2085. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE        0x00100000l
  2086.  
  2087. /*
  2088.  * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  2089.  * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  2090.  * respectively for the destination.
  2091.  */
  2092. #define DDBLT_ZBUFFERDESTOVERRIDE        0x00200000l
  2093.  
  2094. /*
  2095.  * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  2096.  * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  2097.  * for the source.
  2098.  */
  2099. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE        0x00400000l
  2100.  
  2101. /*
  2102.  * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  2103.  * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  2104.  * respectively for the source.
  2105.  */
  2106. #define DDBLT_ZBUFFERSRCOVERRIDE                0x00800000l
  2107.  
  2108. /*
  2109.  * wait until the device is ready to handle the blt
  2110.  * this will cause blt to not return DDERR_WASSTILLDRAWING
  2111.  */
  2112. #define DDBLT_WAIT                              0x01000000l
  2113.  
  2114. /*
  2115.  * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  2116.  * to fill the destination rectangle on the destination Z-buffer surface
  2117.  * with.
  2118.  */
  2119. #define DDBLT_DEPTHFILL                0x02000000l
  2120.  
  2121.  
  2122. /****************************************************************************
  2123.  *
  2124.  * BLTFAST FLAGS
  2125.  *
  2126.  ****************************************************************************/
  2127.  
  2128. #define DDBLTFAST_NOCOLORKEY                    0x00000000
  2129. #define DDBLTFAST_SRCCOLORKEY                   0x00000001
  2130. #define DDBLTFAST_DESTCOLORKEY                  0x00000002
  2131. #define DDBLTFAST_WAIT                          0x00000010
  2132.  
  2133. /****************************************************************************
  2134.  *
  2135.  * FLIP FLAGS
  2136.  *
  2137.  ****************************************************************************/
  2138.  
  2139. #define DDFLIP_WAIT                          0x00000001l
  2140.  
  2141.  
  2142. /****************************************************************************
  2143.  *
  2144.  * DIRECTDRAW SURFACE OVERLAY FLAGS
  2145.  *
  2146.  ****************************************************************************/
  2147.  
  2148. /*
  2149.  * Use the alpha information in the pixel format or the alpha channel surface
  2150.  * attached to the destination surface as the alpha channel for the
  2151.  * destination overlay.
  2152.  */
  2153. #define DDOVER_ALPHADEST            0x00000001l
  2154.  
  2155. /*
  2156.  * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  2157.  * destination alpha channel for this overlay.
  2158.  */
  2159. #define DDOVER_ALPHADESTCONSTOVERRIDE        0x00000002l
  2160.  
  2161. /*
  2162.  * The NEG suffix indicates that the destination surface becomes more
  2163.  * transparent as the alpha value increases. 
  2164.  */
  2165. #define DDOVER_ALPHADESTNEG            0x00000004l
  2166.  
  2167. /*
  2168.  * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  2169.  * channel destination for this overlay.
  2170.  */
  2171. #define DDOVER_ALPHADESTSURFACEOVERRIDE        0x00000008l
  2172.  
  2173. /*
  2174.  * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  2175.  * channel for the edges of the image that border the color key colors.
  2176.  */
  2177. #define DDOVER_ALPHAEDGEBLEND            0x00000010l
  2178.  
  2179. /*
  2180.  * Use the alpha information in the pixel format or the alpha channel surface
  2181.  * attached to the source surface as the source alpha channel for this overlay.
  2182.  */
  2183. #define DDOVER_ALPHASRC                0x00000020l
  2184.  
  2185. /*
  2186.  * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  2187.  * alpha channel for this overlay.
  2188.  */
  2189. #define DDOVER_ALPHASRCCONSTOVERRIDE        0x00000040l
  2190.  
  2191. /*
  2192.  * The NEG suffix indicates that the source surface becomes more transparent
  2193.  * as the alpha value increases.
  2194.  */
  2195. #define DDOVER_ALPHASRCNEG            0x00000080l
  2196.  
  2197. /*
  2198.  * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  2199.  * source for this overlay.
  2200.  */
  2201. #define DDOVER_ALPHASRCSURFACEOVERRIDE        0x00000100l
  2202.  
  2203. /*
  2204.  * Turn this overlay off.
  2205.  */
  2206. #define DDOVER_HIDE                0x00000200l
  2207.  
  2208. /*
  2209.  * Use the color key associated with the destination surface.
  2210.  */
  2211. #define DDOVER_KEYDEST                0x00000400l
  2212.  
  2213. /*
  2214.  * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  2215.  * for the destination surface
  2216.  */
  2217. #define DDOVER_KEYDESTOVERRIDE            0x00000800l
  2218.  
  2219. /*
  2220.  * Use the color key associated with the source surface.
  2221.  */
  2222. #define DDOVER_KEYSRC                0x00001000l
  2223.  
  2224. /*
  2225.  * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  2226.  * for the source surface.
  2227.  */
  2228. #define DDOVER_KEYSRCOVERRIDE            0x00002000l
  2229.  
  2230. /*
  2231.  * Turn this overlay on.
  2232.  */
  2233. #define DDOVER_SHOW                0x00004000l
  2234.  
  2235. /*
  2236.  * Add a dirty rect to an emulated overlayed surface.
  2237.  */
  2238. #define DDOVER_ADDDIRTYRECT                     0x00008000l
  2239.  
  2240. /*
  2241.  * Redraw all dirty rects on an emulated overlayed surface.
  2242.  */
  2243. #define DDOVER_REFRESHDIRTYRECTS        0x00010000l
  2244.  
  2245. /*
  2246.  * Redraw the entire surface on an emulated overlayed surface.
  2247.  */
  2248. #define DDOVER_REFRESHALL                      0x00020000l
  2249.  
  2250.  
  2251. /*
  2252.  * Use the overlay FX flags to define special overlay FX
  2253.  */
  2254. #define DDOVER_DDFX                           0x00080000l
  2255.  
  2256.  
  2257. /****************************************************************************
  2258.  *
  2259.  * DIRECTDRAWSURFACE LOCK FLAGS
  2260.  *
  2261.  ****************************************************************************/
  2262.  
  2263. /*
  2264.  * The default.     Set to indicate that Lock should return a valid memory pointer
  2265.  * to the top of the specified rectangle.  If no rectangle is specified then a
  2266.  * pointer to the top of the surface is returned.
  2267.  */
  2268. #define DDLOCK_SURFACEMEMORYPTR            0x00000000L    // default
  2269.  
  2270. /*
  2271.  * Set to indicate that Lock should wait until it can obtain a valid memory
  2272.  * pointer before returning.  If this bit is set, Lock will never return 
  2273.  * DDERR_WASSTILLDRAWING.
  2274.  */
  2275. #define DDLOCK_WAIT                0x00000001L
  2276.  
  2277. /*
  2278.  * Set if an event handle is being passed to Lock.  Lock will trigger the event
  2279.  * when it can return the surface memory pointer requested.
  2280.  */
  2281. #define DDLOCK_EVENT                0x00000002L
  2282.  
  2283. /*
  2284.  * Indicates that the surface being locked will only be read from.
  2285.  */
  2286. #define DDLOCK_READONLY                0x00000010L
  2287.  
  2288. /*
  2289.  * Indicates that the surface being locked will only be written to
  2290.  */
  2291. #define DDLOCK_WRITEONLY            0x00000020L
  2292.  
  2293.  
  2294. /****************************************************************************
  2295.  *
  2296.  * DIRECTDRAWSURFACE PAGELOCK FLAGS
  2297.  *
  2298.  ****************************************************************************/
  2299.  
  2300. /*
  2301.  * No flags defined at present
  2302.  */
  2303.  
  2304.  
  2305. /****************************************************************************
  2306.  *
  2307.  * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  2308.  *
  2309.  ****************************************************************************/
  2310.  
  2311. /*
  2312.  * No flags defined at present
  2313.  */
  2314.  
  2315.  
  2316. /****************************************************************************
  2317.  *
  2318.  * DIRECTDRAWSURFACE BLT FX FLAGS
  2319.  *
  2320.  ****************************************************************************/
  2321.  
  2322. /*
  2323.  * If stretching, use arithmetic stretching along the Y axis for this blt.
  2324.  */
  2325. #define DDBLTFX_ARITHSTRETCHY            0x00000001l
  2326.  
  2327. /*
  2328.  * Do this blt mirroring the surface left to right.  Spin the
  2329.  * surface around its y-axis.
  2330.  */
  2331. #define DDBLTFX_MIRRORLEFTRIGHT            0x00000002l
  2332.  
  2333. /*
  2334.  * Do this blt mirroring the surface up and down.  Spin the surface
  2335.  * around its x-axis.
  2336.  */
  2337. #define DDBLTFX_MIRRORUPDOWN            0x00000004l
  2338.  
  2339. /*
  2340.  * Schedule this blt to avoid tearing.
  2341.  */
  2342. #define DDBLTFX_NOTEARING            0x00000008l
  2343.  
  2344. /*
  2345.  * Do this blt rotating the surface one hundred and eighty degrees.
  2346.  */
  2347. #define DDBLTFX_ROTATE180            0x00000010l
  2348.  
  2349. /*
  2350.  * Do this blt rotating the surface two hundred and seventy degrees.
  2351.  */
  2352. #define DDBLTFX_ROTATE270            0x00000020l
  2353.  
  2354. /*
  2355.  * Do this blt rotating the surface ninety degrees.
  2356.  */
  2357. #define DDBLTFX_ROTATE90            0x00000040l
  2358.  
  2359. /*
  2360.  * Do this z blt using dwZBufferLow and dwZBufferHigh as  range values
  2361.  * specified to limit the bits copied from the source surface.
  2362.  */
  2363. #define DDBLTFX_ZBUFFERRANGE            0x00000080l
  2364.  
  2365. /*
  2366.  * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  2367.  * before comparing it with the desting z values.
  2368.  */
  2369. #define DDBLTFX_ZBUFFERBASEDEST            0x00000100l
  2370.  
  2371. /****************************************************************************
  2372.  *
  2373.  * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  2374.  *
  2375.  ****************************************************************************/
  2376.  
  2377. /*
  2378.  * If stretching, use arithmetic stretching along the Y axis for this overlay.
  2379.  */
  2380. #define DDOVERFX_ARITHSTRETCHY            0x00000001l
  2381.  
  2382. /*
  2383.  * Mirror the overlay across the vertical axis
  2384.  */
  2385. #define DDOVERFX_MIRRORLEFTRIGHT        0x00000002l
  2386.  
  2387. /*
  2388.  * Mirror the overlay across the horizontal axis
  2389.  */
  2390. #define DDOVERFX_MIRRORUPDOWN            0x00000004l
  2391.  
  2392. /****************************************************************************
  2393.  *
  2394.  * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  2395.  *
  2396.  ****************************************************************************/
  2397.  
  2398. /*
  2399.  * return when the vertical blank interval begins
  2400.  */
  2401. #define DDWAITVB_BLOCKBEGIN            0x00000001l
  2402.  
  2403. /*
  2404.  * set up an event to trigger when the vertical blank begins
  2405.  */
  2406. #define DDWAITVB_BLOCKBEGINEVENT        0x00000002l
  2407.  
  2408. /*
  2409.  * return when the vertical blank interval ends and display begins
  2410.  */
  2411. #define DDWAITVB_BLOCKEND            0x00000004l
  2412.  
  2413. /****************************************************************************
  2414.  *
  2415.  * DIRECTDRAW GETFLIPSTATUS FLAGS
  2416.  *
  2417.  ****************************************************************************/
  2418.  
  2419. /*
  2420.  * is it OK to flip now?
  2421.  */
  2422. #define DDGFS_CANFLIP            0x00000001l
  2423.  
  2424. /*
  2425.  * is the last flip finished?
  2426.  */
  2427. #define DDGFS_ISFLIPDONE        0x00000002l
  2428.  
  2429. /****************************************************************************
  2430.  *
  2431.  * DIRECTDRAW GETBLTSTATUS FLAGS
  2432.  *
  2433.  ****************************************************************************/
  2434.  
  2435. /*
  2436.  * is it OK to blt now?
  2437.  */
  2438. #define DDGBS_CANBLT            0x00000001l
  2439.  
  2440. /*
  2441.  * is the blt to the surface finished?
  2442.  */
  2443. #define DDGBS_ISBLTDONE            0x00000002l
  2444.  
  2445.  
  2446. /****************************************************************************
  2447.  *
  2448.  * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  2449.  *
  2450.  ****************************************************************************/
  2451.  
  2452. /*
  2453.  * Enumerate overlays back to front.
  2454.  */
  2455. #define DDENUMOVERLAYZ_BACKTOFRONT    0x00000000l
  2456.  
  2457. /*
  2458.  * Enumerate overlays front to back
  2459.  */
  2460. #define DDENUMOVERLAYZ_FRONTTOBACK    0x00000001l
  2461.  
  2462. /****************************************************************************
  2463.  *
  2464.  * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  2465.  *
  2466.  ****************************************************************************/
  2467.  
  2468. /*
  2469.  * Send overlay to front
  2470.  */
  2471. #define DDOVERZ_SENDTOFRONT        0x00000000l
  2472.  
  2473. /*
  2474.  * Send overlay to back
  2475.  */
  2476. #define DDOVERZ_SENDTOBACK        0x00000001l
  2477.  
  2478. /*
  2479.  * Move Overlay forward
  2480.  */
  2481. #define DDOVERZ_MOVEFORWARD        0x00000002l
  2482.  
  2483. /*
  2484.  * Move Overlay backward
  2485.  */
  2486. #define DDOVERZ_MOVEBACKWARD        0x00000003l
  2487.  
  2488. /*
  2489.  * Move Overlay in front of relative surface
  2490.  */
  2491. #define DDOVERZ_INSERTINFRONTOF        0x00000004l
  2492.  
  2493. /*
  2494.  * Move Overlay in back of relative surface
  2495.  */
  2496. #define DDOVERZ_INSERTINBACKOF        0x00000005l
  2497.  
  2498. /*===========================================================================
  2499.  *
  2500.  *
  2501.  * DIRECTDRAW RETURN CODES
  2502.  *
  2503.  * The return values from DirectDraw Commands and Surface that return an HRESULT
  2504.  * are codes from DirectDraw concerning the results of the action
  2505.  * requested by DirectDraw.
  2506.  *
  2507.  *==========================================================================*/
  2508.  
  2509. /*
  2510.  * Status is OK
  2511.  *
  2512.  * Issued by: DirectDraw Commands and all callbacks
  2513.  */
  2514. #define DD_OK                    0
  2515.  
  2516. /****************************************************************************
  2517.  *
  2518.  * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  2519.  *
  2520.  * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  2521.  * DIRECTDRAWSURFACE object enumerations.   They can only be returned by
  2522.  * enumeration callback routines.
  2523.  *
  2524.  ****************************************************************************/
  2525.  
  2526. /*
  2527.  * stop the enumeration
  2528.  */
  2529. #define DDENUMRET_CANCEL            0
  2530.  
  2531. /*
  2532.  * continue the enumeration
  2533.  */
  2534. #define DDENUMRET_OK                1
  2535.  
  2536. /****************************************************************************
  2537.  *
  2538.  * DIRECTDRAW ERRORS
  2539.  *
  2540.  * Errors are represented by negative values and cannot be combined.
  2541.  *
  2542.  ****************************************************************************/
  2543.  
  2544. /*
  2545.  * This object is already initialized
  2546.  */
  2547. #define DDERR_ALREADYINITIALIZED        MAKE_DDHRESULT( 5 )
  2548.  
  2549. /*
  2550.  * This surface can not be attached to the requested surface.
  2551.  */
  2552. #define DDERR_CANNOTATTACHSURFACE        MAKE_DDHRESULT( 10 )
  2553.  
  2554. /*
  2555.  * This surface can not be detached from the requested surface.
  2556.  */
  2557. #define DDERR_CANNOTDETACHSURFACE        MAKE_DDHRESULT( 20 )
  2558.  
  2559. /*
  2560.  * Support is currently not available.
  2561.  */
  2562. #define DDERR_CURRENTLYNOTAVAIL            MAKE_DDHRESULT( 40 )
  2563.  
  2564. /*
  2565.  * An exception was encountered while performing the requested operation
  2566.  */
  2567. #define DDERR_EXCEPTION                MAKE_DDHRESULT( 55 )
  2568.  
  2569. /*
  2570.  * Generic failure.
  2571.  */
  2572. #define DDERR_GENERIC                E_FAIL
  2573.  
  2574. /*
  2575.  * Height of rectangle provided is not a multiple of reqd alignment
  2576.  */
  2577. #define DDERR_HEIGHTALIGN            MAKE_DDHRESULT( 90 )
  2578.  
  2579. /*
  2580.  * Unable to match primary surface creation request with existing 
  2581.  * primary surface.
  2582.  */
  2583. #define DDERR_INCOMPATIBLEPRIMARY        MAKE_DDHRESULT( 95 )
  2584.  
  2585. /*
  2586.  * One or more of the caps bits passed to the callback are incorrect.
  2587.  */
  2588. #define DDERR_INVALIDCAPS            MAKE_DDHRESULT( 100 )
  2589.  
  2590. /*
  2591.  * DirectDraw does not support provided Cliplist.
  2592.  */
  2593. #define DDERR_INVALIDCLIPLIST            MAKE_DDHRESULT( 110 )
  2594.  
  2595. /*
  2596.  * DirectDraw does not support the requested mode
  2597.  */
  2598. #define DDERR_INVALIDMODE            MAKE_DDHRESULT( 120 )
  2599.  
  2600. /*
  2601.  * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  2602.  */
  2603. #define DDERR_INVALIDOBJECT            MAKE_DDHRESULT( 130 )
  2604.  
  2605. /*
  2606.  * One or more of the parameters passed to the callback function are
  2607.  * incorrect.
  2608.  */
  2609. #define DDERR_INVALIDPARAMS            E_INVALIDARG
  2610.  
  2611. /*
  2612.  * pixel format was invalid as specified
  2613.  */
  2614. #define DDERR_INVALIDPIXELFORMAT        MAKE_DDHRESULT( 145 )
  2615.  
  2616. /*
  2617.  * Rectangle provided was invalid.
  2618.  */
  2619. #define DDERR_INVALIDRECT            MAKE_DDHRESULT( 150 )
  2620.  
  2621. /*
  2622.  * Operation could not be carried out because one or more surfaces are locked
  2623.  */
  2624. #define DDERR_LOCKEDSURFACES            MAKE_DDHRESULT( 160 )
  2625.  
  2626. /*
  2627.  * There is no 3D present.
  2628.  */
  2629. #define DDERR_NO3D                MAKE_DDHRESULT( 170 )
  2630.  
  2631. /*
  2632.  * Operation could not be carried out because there is no alpha accleration
  2633.  * hardware present or available.
  2634.  */
  2635. #define DDERR_NOALPHAHW                MAKE_DDHRESULT( 180 )
  2636.  
  2637.  
  2638. /*
  2639.  * no clip list available
  2640.  */
  2641. #define DDERR_NOCLIPLIST            MAKE_DDHRESULT( 205 )
  2642.  
  2643. /*
  2644.  * Operation could not be carried out because there is no color conversion
  2645.  * hardware present or available.
  2646.  */
  2647. #define DDERR_NOCOLORCONVHW            MAKE_DDHRESULT( 210 )
  2648.  
  2649. /*
  2650.  * Create function called without DirectDraw object method SetCooperativeLevel
  2651.  * being called.
  2652.  */
  2653. #define DDERR_NOCOOPERATIVELEVELSET        MAKE_DDHRESULT( 212 )
  2654.  
  2655. /*
  2656.  * Surface doesn't currently have a color key
  2657.  */
  2658. #define DDERR_NOCOLORKEY            MAKE_DDHRESULT( 215 )
  2659.  
  2660. /*
  2661.  * Operation could not be carried out because there is no hardware support
  2662.  * of the dest color key.
  2663.  */
  2664. #define DDERR_NOCOLORKEYHW            MAKE_DDHRESULT( 220 )
  2665.  
  2666. /*
  2667.  * No DirectDraw support possible with current display driver
  2668.  */
  2669. #define DDERR_NODIRECTDRAWSUPPORT        MAKE_DDHRESULT( 222 )
  2670.  
  2671. /*
  2672.  * Operation requires the application to have exclusive mode but the
  2673.  * application does not have exclusive mode.
  2674.  */
  2675. #define DDERR_NOEXCLUSIVEMODE            MAKE_DDHRESULT( 225 )
  2676.  
  2677. /*
  2678.  * Flipping visible surfaces is not supported.
  2679.  */
  2680. #define DDERR_NOFLIPHW                MAKE_DDHRESULT( 230 )
  2681.  
  2682. /*
  2683.  * There is no GDI present.
  2684.  */
  2685. #define DDERR_NOGDI                MAKE_DDHRESULT( 240 )
  2686.  
  2687. /*
  2688.  * Operation could not be carried out because there is no hardware present
  2689.  * or available.
  2690.  */
  2691. #define DDERR_NOMIRRORHW            MAKE_DDHRESULT( 250 )
  2692.  
  2693. /*
  2694.  * Requested item was not found
  2695.  */
  2696. #define DDERR_NOTFOUND                MAKE_DDHRESULT( 255 )
  2697.  
  2698. /*
  2699.  * Operation could not be carried out because there is no overlay hardware
  2700.  * present or available.
  2701.  */
  2702. #define DDERR_NOOVERLAYHW            MAKE_DDHRESULT( 260 )
  2703.  
  2704. /*
  2705.  * Operation could not be carried out because there is no appropriate raster
  2706.  * op hardware present or available.
  2707.  */
  2708. #define DDERR_NORASTEROPHW            MAKE_DDHRESULT( 280 )
  2709.  
  2710. /*
  2711.  * Operation could not be carried out because there is no rotation hardware
  2712.  * present or available.
  2713.  */
  2714. #define DDERR_NOROTATIONHW            MAKE_DDHRESULT( 290 )
  2715.  
  2716. /*
  2717.  * Operation could not be carried out because there is no hardware support
  2718.  * for stretching
  2719.  */
  2720. #define DDERR_NOSTRETCHHW            MAKE_DDHRESULT( 310 )
  2721.  
  2722. /*
  2723.  * DirectDrawSurface is not in 4 bit color palette and the requested operation
  2724.  * requires 4 bit color palette.
  2725.  */
  2726. #define DDERR_NOT4BITCOLOR            MAKE_DDHRESULT( 316 )
  2727.  
  2728. /*
  2729.  * DirectDrawSurface is not in 4 bit color index palette and the requested
  2730.  * operation requires 4 bit color index palette.
  2731.  */
  2732. #define DDERR_NOT4BITCOLORINDEX            MAKE_DDHRESULT( 317 )
  2733.  
  2734. /*
  2735.  * DirectDraw Surface is not in 8 bit color mode and the requested operation
  2736.  * requires 8 bit color.
  2737.  */
  2738. #define DDERR_NOT8BITCOLOR            MAKE_DDHRESULT( 320 )
  2739.  
  2740. /*
  2741.  * Operation could not be carried out because there is no texture mapping
  2742.  * hardware present or available.
  2743.  */
  2744. #define DDERR_NOTEXTUREHW            MAKE_DDHRESULT( 330 )
  2745.  
  2746. /*
  2747.  * Operation could not be carried out because there is no hardware support
  2748.  * for vertical blank synchronized operations.
  2749.  */
  2750. #define DDERR_NOVSYNCHW                MAKE_DDHRESULT( 335 )
  2751.  
  2752. /*
  2753.  * Operation could not be carried out because there is no hardware support
  2754.  * for zbuffer blting.
  2755.  */
  2756. #define DDERR_NOZBUFFERHW            MAKE_DDHRESULT( 340 )
  2757.  
  2758. /*
  2759.  * Overlay surfaces could not be z layered based on their BltOrder because
  2760.  * the hardware does not support z layering of overlays.
  2761.  */
  2762. #define DDERR_NOZOVERLAYHW            MAKE_DDHRESULT( 350 )
  2763.  
  2764. /*
  2765.  * The hardware needed for the requested operation has already been
  2766.  * allocated.
  2767.  */
  2768. #define DDERR_OUTOFCAPS                MAKE_DDHRESULT( 360 )
  2769.  
  2770. /*
  2771.  * DirectDraw does not have enough memory to perform the operation.
  2772.  */
  2773. #define DDERR_OUTOFMEMORY            E_OUTOFMEMORY
  2774.  
  2775. /*
  2776.  * DirectDraw does not have enough memory to perform the operation.
  2777.  */
  2778. #define DDERR_OUTOFVIDEOMEMORY            MAKE_DDHRESULT( 380 )
  2779.  
  2780. /*
  2781.  * hardware does not support clipped overlays
  2782.  */
  2783. #define DDERR_OVERLAYCANTCLIP            MAKE_DDHRESULT( 382 )
  2784.  
  2785. /*
  2786.  * Can only have ony color key active at one time for overlays
  2787.  */
  2788. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE    MAKE_DDHRESULT( 384 )
  2789.  
  2790. /*
  2791.  * Access to this palette is being refused because the palette is already
  2792.  * locked by another thread.
  2793.  */
  2794. #define DDERR_PALETTEBUSY            MAKE_DDHRESULT( 387 )
  2795.  
  2796. /*
  2797.  * No src color key specified for this operation.
  2798.  */
  2799. #define DDERR_COLORKEYNOTSET            MAKE_DDHRESULT( 400 )
  2800.  
  2801. /*
  2802.  * This surface is already attached to the surface it is being attached to.
  2803.  */
  2804. #define DDERR_SURFACEALREADYATTACHED        MAKE_DDHRESULT( 410 )
  2805.  
  2806. /*
  2807.  * This surface is already a dependency of the surface it is being made a
  2808.  * dependency of.
  2809.  */
  2810. #define DDERR_SURFACEALREADYDEPENDENT        MAKE_DDHRESULT( 420 )
  2811.  
  2812. /*
  2813.  * Access to this surface is being refused because the surface is already
  2814.  * locked by another thread.
  2815.  */
  2816. #define DDERR_SURFACEBUSY            MAKE_DDHRESULT( 430 )
  2817.  
  2818. /*
  2819.  * Access to this surface is being refused because no driver exists
  2820.  * which can supply a pointer to the surface.
  2821.  * This is most likely to happen when attempting to lock the primary
  2822.  * surface when no DCI provider is present.
  2823.  */
  2824. #define DDERR_CANTLOCKSURFACE                   MAKE_DDHRESULT( 435 )
  2825.  
  2826. /*
  2827.  * Access to Surface refused because Surface is obscured.
  2828.  */
  2829. #define DDERR_SURFACEISOBSCURED            MAKE_DDHRESULT( 440 )
  2830.  
  2831. /*
  2832.  * Access to this surface is being refused because the surface is gone.
  2833.  * The DIRECTDRAWSURFACE object representing this surface should 
  2834.  * have Restore called on it.
  2835.  */
  2836. #define DDERR_SURFACELOST            MAKE_DDHRESULT( 450 )
  2837.  
  2838. /*
  2839.  * The requested surface is not attached.
  2840.  */
  2841. #define DDERR_SURFACENOTATTACHED        MAKE_DDHRESULT( 460 )
  2842.  
  2843. /*
  2844.  * Height requested by DirectDraw is too large.
  2845.  */
  2846. #define DDERR_TOOBIGHEIGHT            MAKE_DDHRESULT( 470 )
  2847.  
  2848. /*
  2849.  * Size requested by DirectDraw is too large --     The individual height and
  2850.  * width are OK.
  2851.  */
  2852. #define DDERR_TOOBIGSIZE            MAKE_DDHRESULT( 480 )
  2853.  
  2854. /*
  2855.  * Width requested by DirectDraw is too large.
  2856.  */
  2857. #define DDERR_TOOBIGWIDTH            MAKE_DDHRESULT( 490 )
  2858.  
  2859. /*
  2860.  * Action not supported.
  2861.  */
  2862. #define DDERR_UNSUPPORTED            E_NOTIMPL
  2863.  
  2864. /*
  2865.  * FOURCC format requested is unsupported by DirectDraw
  2866.  */
  2867. #define DDERR_UNSUPPORTEDFORMAT            MAKE_DDHRESULT( 510 )
  2868.  
  2869. /*
  2870.  * Bitmask in the pixel format requested is unsupported by DirectDraw
  2871.  */
  2872. #define DDERR_UNSUPPORTEDMASK            MAKE_DDHRESULT( 520 )
  2873.  
  2874. /*
  2875.  * vertical blank is in progress
  2876.  */
  2877. #define DDERR_VERTICALBLANKINPROGRESS        MAKE_DDHRESULT( 537 )
  2878.  
  2879. /*
  2880.  * Informs DirectDraw that the previous Blt which is transfering information
  2881.  * to or from this Surface is incomplete.
  2882.  */
  2883. #define DDERR_WASSTILLDRAWING            MAKE_DDHRESULT( 540 )
  2884.  
  2885.  
  2886. /*
  2887.  * Rectangle provided was not horizontally aligned on reqd. boundary
  2888.  */
  2889. #define DDERR_XALIGN                MAKE_DDHRESULT( 560 )
  2890.  
  2891. /*
  2892.  * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  2893.  * identifier.
  2894.  */
  2895. #define DDERR_INVALIDDIRECTDRAWGUID        MAKE_DDHRESULT( 561 )
  2896.  
  2897. /*
  2898.  * A DirectDraw object representing this driver has already been created
  2899.  * for this process.
  2900.  */
  2901. #define DDERR_DIRECTDRAWALREADYCREATED        MAKE_DDHRESULT( 562 )
  2902.  
  2903. /*
  2904.  * A hardware only DirectDraw object creation was attempted but the driver
  2905.  * did not support any hardware.
  2906.  */
  2907. #define DDERR_NODIRECTDRAWHW            MAKE_DDHRESULT( 563 )
  2908.  
  2909. /*
  2910.  * this process already has created a primary surface
  2911.  */
  2912. #define DDERR_PRIMARYSURFACEALREADYEXISTS    MAKE_DDHRESULT( 564 )
  2913.  
  2914. /*
  2915.  * software emulation not available.
  2916.  */
  2917. #define DDERR_NOEMULATION            MAKE_DDHRESULT( 565 )
  2918.  
  2919. /*
  2920.  * region passed to Clipper::GetClipList is too small.
  2921.  */
  2922. #define DDERR_REGIONTOOSMALL            MAKE_DDHRESULT( 566 )
  2923.  
  2924. /*
  2925.  * an attempt was made to set a clip list for a clipper objec that
  2926.  * is already monitoring an hwnd.
  2927.  */
  2928. #define DDERR_CLIPPERISUSINGHWND        MAKE_DDHRESULT( 567 )
  2929.  
  2930. /*
  2931.  * No clipper object attached to surface object
  2932.  */
  2933. #define DDERR_NOCLIPPERATTACHED            MAKE_DDHRESULT( 568 )
  2934.  
  2935. /*
  2936.  * Clipper notification requires an HWND or
  2937.  * no HWND has previously been set as the CooperativeLevel HWND.
  2938.  */
  2939. #define DDERR_NOHWND                MAKE_DDHRESULT( 569 )
  2940.  
  2941. /*
  2942.  * HWND used by DirectDraw CooperativeLevel has been subclassed,
  2943.  * this prevents DirectDraw from restoring state.
  2944.  */
  2945. #define DDERR_HWNDSUBCLASSED            MAKE_DDHRESULT( 570 )
  2946.  
  2947. /*
  2948.  * The CooperativeLevel HWND has already been set.
  2949.  * It can not be reset while the process has surfaces or palettes created.
  2950.  */
  2951. #define DDERR_HWNDALREADYSET            MAKE_DDHRESULT( 571 )
  2952.  
  2953. /*
  2954.  * No palette object attached to this surface.
  2955.  */
  2956. #define DDERR_NOPALETTEATTACHED            MAKE_DDHRESULT( 572 )
  2957.  
  2958. /*
  2959.  * No hardware support for 16 or 256 color palettes.
  2960.  */
  2961. #define DDERR_NOPALETTEHW            MAKE_DDHRESULT( 573 )
  2962.  
  2963. /*
  2964.  * If a clipper object is attached to the source surface passed into a
  2965.  * BltFast call.
  2966.  */
  2967. #define DDERR_BLTFASTCANTCLIP            MAKE_DDHRESULT( 574 )
  2968.  
  2969. /*
  2970.  * No blter.
  2971.  */
  2972. #define DDERR_NOBLTHW                MAKE_DDHRESULT( 575 )
  2973.  
  2974. /*
  2975.  * No DirectDraw ROP hardware.
  2976.  */
  2977. #define DDERR_NODDROPSHW            MAKE_DDHRESULT( 576 )
  2978.  
  2979. /*
  2980.  * returned when GetOverlayPosition is called on a hidden overlay
  2981.  */
  2982. #define DDERR_OVERLAYNOTVISIBLE            MAKE_DDHRESULT( 577 )
  2983.  
  2984. /*
  2985.  * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  2986.  * has never been called on to establish a destionation.
  2987.  */
  2988. #define DDERR_NOOVERLAYDEST            MAKE_DDHRESULT( 578 )
  2989.  
  2990. /*
  2991.  * returned when the position of the overlay on the destionation is no longer
  2992.  * legal for that destionation.
  2993.  */
  2994. #define DDERR_INVALIDPOSITION            MAKE_DDHRESULT( 579 )
  2995.  
  2996. /*
  2997.  * returned when an overlay member is called for a non-overlay surface
  2998.  */
  2999. #define DDERR_NOTAOVERLAYSURFACE        MAKE_DDHRESULT( 580 )
  3000.  
  3001. /*
  3002.  * An attempt was made to set the cooperative level when it was already
  3003.  * set to exclusive.
  3004.  */
  3005. #define DDERR_EXCLUSIVEMODEALREADYSET        MAKE_DDHRESULT( 581 )
  3006.  
  3007. /*
  3008.  * An attempt has been made to flip a surface that is not flippable.
  3009.  */
  3010. #define DDERR_NOTFLIPPABLE            MAKE_DDHRESULT( 582 )
  3011.  
  3012. /*
  3013.  * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  3014.  * created.
  3015.  */
  3016. #define DDERR_CANTDUPLICATE            MAKE_DDHRESULT( 583 )
  3017.  
  3018. /*
  3019.  * Surface was not locked.  An attempt to unlock a surface that was not
  3020.  * locked at all, or by this process, has been attempted.
  3021.  */
  3022. #define DDERR_NOTLOCKED                MAKE_DDHRESULT( 584 )
  3023.  
  3024. /*
  3025.  * Windows can not create any more DCs
  3026.  */
  3027. #define DDERR_CANTCREATEDC            MAKE_DDHRESULT( 585 )
  3028.  
  3029. /*
  3030.  * No DC was ever created for this surface.
  3031.  */
  3032. #define DDERR_NODC                MAKE_DDHRESULT( 586 )
  3033.  
  3034. /*
  3035.  * This surface can not be restored because it was created in a different
  3036.  * mode.
  3037.  */
  3038. #define DDERR_WRONGMODE                MAKE_DDHRESULT( 587 )
  3039.  
  3040. /*
  3041.  * This surface can not be restored because it is an implicitly created
  3042.  * surface.
  3043.  */
  3044. #define DDERR_IMPLICITLYCREATED            MAKE_DDHRESULT( 588 )
  3045.  
  3046. /*
  3047.  * The surface being used is not a palette-based surface
  3048.  */
  3049. #define DDERR_NOTPALETTIZED            MAKE_DDHRESULT( 589 )
  3050.  
  3051.  
  3052. /*
  3053.  * The display is currently in an unsupported mode
  3054.  */
  3055. #define DDERR_UNSUPPORTEDMODE            MAKE_DDHRESULT( 590 )
  3056.  
  3057. /*
  3058.  * Operation could not be carried out because there is no mip-map
  3059.  * texture mapping hardware present or available.
  3060.  */
  3061. #define DDERR_NOMIPMAPHW            MAKE_DDHRESULT( 591 )
  3062.  
  3063. /*
  3064.  * The requested action could not be performed because the surface was of
  3065.  * the wrong type.
  3066.  */
  3067. #define DDERR_INVALIDSURFACETYPE                MAKE_DDHRESULT( 592 )
  3068.  
  3069.  
  3070.  
  3071. /*
  3072.  * A DC has already been returned for this surface. Only one DC can be 
  3073.  * retrieved per surface.
  3074.  */
  3075. #define DDERR_DCALREADYCREATED            MAKE_DDHRESULT( 620 )
  3076.  
  3077. /*
  3078.  * The attempt to page lock a surface failed.
  3079.  */
  3080. #define DDERR_CANTPAGELOCK            MAKE_DDHRESULT( 640 )
  3081.  
  3082. /*
  3083.  * The attempt to page unlock a surface failed.
  3084.  */
  3085. #define DDERR_CANTPAGEUNLOCK            MAKE_DDHRESULT( 660 )
  3086.  
  3087. /*
  3088.  * An attempt was made to page unlock a surface with no outstanding page locks.
  3089.  */
  3090. #define DDERR_NOTPAGELOCKED            MAKE_DDHRESULT( 680 )
  3091.  
  3092. /*
  3093.  * An attempt was made to invoke an interface member of a DirectDraw object
  3094.  * created by CoCreateInstance() before it was initialized.
  3095.  */
  3096. #define DDERR_NOTINITIALIZED                    CO_E_NOTINITIALIZED
  3097.  
  3098. /* Alpha bit depth constants */
  3099.  
  3100.  
  3101. #ifdef __cplusplus
  3102. };
  3103. #endif
  3104.  
  3105. #endif
  3106.