home *** CD-ROM | disk | FTP | other *** search
/ Microsoft DirectX SDK 6.1 / Dx6_1_Gold.iso / dxf / include / ddraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-03  |  180.3 KB  |  4,846 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1994-1997 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.  
  13. /*
  14.  * If you wish an application built against the newest version of DirectDraw
  15.  * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION
  16.  * to be the earlies version of DirectDraw you wish to run against. For,
  17.  * example if you wish an application to run against a DX 3 runtime define
  18.  * DIRECTDRAW_VERSION to be 0x0300.
  19.  */
  20. #ifndef   DIRECTDRAW_VERSION
  21. #define   DIRECTDRAW_VERSION 0x0600
  22. #endif /* DIRECTDRAW_VERSION */
  23.  
  24. #if defined( _WIN32 )  && !defined( _NO_COM )
  25. #define COM_NO_WINDOWS_H
  26. #include <objbase.h>
  27. #else
  28. #define IUnknown        void
  29. #if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT)
  30.     #define CO_E_NOTINITIALIZED 0x800401F0L
  31. #endif
  32. #endif
  33.  
  34. #define _FACDD    0x876
  35. #define MAKE_DDHRESULT( code )    MAKE_HRESULT( 1, _FACDD, code )
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. //
  42. // For compilers that don't support nameless unions, do a
  43. //
  44. // #define NONAMELESSUNION
  45. //
  46. // before #include <ddraw.h>
  47. //
  48. #ifndef DUMMYUNIONNAMEN
  49. #if defined(__cplusplus) || !defined(NONAMELESSUNION)
  50. #define DUMMYUNIONNAMEN(n)
  51. #else
  52. #define DUMMYUNIONNAMEN(n)      u##n
  53. #endif
  54. #endif
  55.  
  56. #ifndef MAKEFOURCC
  57.     #define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \
  58.                 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) |   \
  59.                 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
  60. #endif //defined(MAKEFOURCC)
  61.  
  62. /*
  63.  * FOURCC codes for DX compressed-texture pixel formats
  64.  */
  65. #define FOURCC_DXT1  (MAKEFOURCC('D','X','T','1'))
  66. #define FOURCC_DXT2  (MAKEFOURCC('D','X','T','2'))
  67. #define FOURCC_DXT3  (MAKEFOURCC('D','X','T','3'))
  68. #define FOURCC_DXT4  (MAKEFOURCC('D','X','T','4'))
  69. #define FOURCC_DXT5  (MAKEFOURCC('D','X','T','5'))
  70.  
  71. /*
  72.  * GUIDS used by DirectDraw objects
  73.  */
  74. #if defined( _WIN32 ) && !defined( _NO_COM )
  75.  
  76. DEFINE_GUID( CLSID_DirectDraw,            0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  77. DEFINE_GUID( CLSID_DirectDrawClipper,           0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  78. DEFINE_GUID( IID_IDirectDraw,            0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  79. DEFINE_GUID( IID_IDirectDraw2,                  0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  80. DEFINE_GUID( IID_IDirectDraw4,                  0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  81. DEFINE_GUID( IID_IDirectDrawSurface,        0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  82. DEFINE_GUID( IID_IDirectDrawSurface2,        0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  83. DEFINE_GUID( IID_IDirectDrawSurface3,           0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
  84. DEFINE_GUID( IID_IDirectDrawSurface4,           0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
  85.  
  86. DEFINE_GUID( IID_IDirectDrawPalette,        0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  87. DEFINE_GUID( IID_IDirectDrawClipper,        0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  88. DEFINE_GUID( IID_IDirectDrawColorControl,     0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
  89. DEFINE_GUID( IID_IDirectDrawGammaControl,       0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
  90.  
  91. #endif
  92.  
  93. /*============================================================================
  94.  *
  95.  * DirectDraw Structures
  96.  *
  97.  * Various structures used to invoke DirectDraw.
  98.  *
  99.  *==========================================================================*/
  100.  
  101. struct IDirectDraw;
  102. struct IDirectDrawSurface;
  103. struct IDirectDrawPalette;
  104. struct IDirectDrawClipper;
  105.  
  106. typedef struct IDirectDraw              FAR *LPDIRECTDRAW;
  107. typedef struct IDirectDraw2             FAR *LPDIRECTDRAW2;
  108. typedef struct IDirectDraw4             FAR *LPDIRECTDRAW4;
  109. typedef struct IDirectDrawSurface       FAR *LPDIRECTDRAWSURFACE;
  110. typedef struct IDirectDrawSurface2      FAR *LPDIRECTDRAWSURFACE2;
  111. typedef struct IDirectDrawSurface3      FAR *LPDIRECTDRAWSURFACE3;
  112. typedef struct IDirectDrawSurface4      FAR *LPDIRECTDRAWSURFACE4;
  113.  
  114. typedef struct IDirectDrawPalette        FAR *LPDIRECTDRAWPALETTE;
  115. typedef struct IDirectDrawClipper        FAR *LPDIRECTDRAWCLIPPER;
  116. typedef struct IDirectDrawColorControl        FAR *LPDIRECTDRAWCOLORCONTROL;
  117. typedef struct IDirectDrawGammaControl          FAR *LPDIRECTDRAWGAMMACONTROL;
  118.  
  119. typedef struct _DDFXROP            FAR *LPDDFXROP;
  120. typedef struct _DDSURFACEDESC        FAR *LPDDSURFACEDESC;
  121. typedef struct _DDSURFACEDESC2        FAR *LPDDSURFACEDESC2;
  122. typedef struct _DDCOLORCONTROL         FAR *LPDDCOLORCONTROL;
  123.  
  124. /*
  125.  * API's
  126.  */
  127. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  128. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  129.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  130.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  131.     extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  132.     extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  133.     /*
  134.      * Protect against old SDKs
  135.      */
  136.     #ifndef SM_CMONITORS
  137.         #define HMONITOR    HANDLE
  138.     #endif
  139.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
  140.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
  141.     extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  142.     extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  143.     typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  144.     typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  145.  
  146.     #ifdef UNICODE
  147.     typedef LPDDENUMCALLBACKW         LPDDENUMCALLBACK;
  148.     #define DirectDrawEnumerate        DirectDrawEnumerateW
  149.     typedef LPDDENUMCALLBACKEXW         LPDDENUMCALLBACKEX;
  150.     typedef LPDIRECTDRAWENUMERATEEXW        LPDIRECTDRAWENUMERATEEX;
  151.     #define DirectDrawEnumerateEx        DirectDrawEnumerateExW
  152.     #else
  153.     typedef LPDDENUMCALLBACKA         LPDDENUMCALLBACK;
  154.     #define DirectDrawEnumerate        DirectDrawEnumerateA
  155.     typedef LPDDENUMCALLBACKEXA         LPDDENUMCALLBACKEX;
  156.         typedef LPDIRECTDRAWENUMERATEEXA        LPDIRECTDRAWENUMERATEEX;
  157.         #define DirectDrawEnumerateEx        DirectDrawEnumerateExA
  158.     #endif
  159.     extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  160.     extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  161. #endif
  162. /*
  163.  * Flags for DirectDrawEnumerateEx
  164.  * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
  165.  * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
  166.  * By default, only the primary display device is enumerated.
  167.  * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
  168.  */
  169.  
  170. /*
  171.  * This flag causes enumeration of any GDI display devices which are part of
  172.  * the Windows Desktop
  173.  */
  174. #define DDENUM_ATTACHEDSECONDARYDEVICES     0x00000001L
  175.  
  176. /*
  177.  * This flag causes enumeration of any GDI display devices which are not
  178.  * part of the Windows Desktop
  179.  */
  180. #define DDENUM_DETACHEDSECONDARYDEVICES     0x00000002L
  181.  
  182. /*
  183.  * This flag causes enumeration of non-display devices
  184.  */
  185. #define DDENUM_NONDISPLAYDEVICES            0x00000004L
  186.  
  187.  
  188. #define REGSTR_KEY_DDHW_DESCRIPTION    "Description"
  189. #define REGSTR_KEY_DDHW_DRIVERNAME    "DriverName"
  190. #define REGSTR_PATH_DDHW        "Hardware\\DirectDrawDrivers"
  191.  
  192. #define DDCREATE_HARDWAREONLY        0x00000001l
  193. #define DDCREATE_EMULATIONONLY        0x00000002l
  194.  
  195. #if defined(WINNT) || !defined(WIN32)
  196. typedef long HRESULT;
  197. #endif
  198.  
  199. //#ifndef WINNT
  200. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  201. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
  202. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  203. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
  204. //#endif
  205.  
  206. /*
  207.  * Generic pixel format with 8-bit RGB and alpha components
  208.  */
  209. typedef struct _DDRGBA
  210. {
  211.     BYTE red;
  212.     BYTE green;
  213.     BYTE blue;
  214.     BYTE alpha;
  215. } DDRGBA;
  216.  
  217. typedef DDRGBA FAR *LPDDRGBA;
  218.  
  219. /*
  220.  * DDCOLORKEY
  221.  */
  222. typedef struct _DDCOLORKEY
  223. {
  224.     DWORD    dwColorSpaceLowValue;    // low boundary of color space that is to
  225.                     // be treated as Color Key, inclusive
  226.     DWORD    dwColorSpaceHighValue;    // high boundary of color space that is
  227.                     // to be treated as Color Key, inclusive
  228. } DDCOLORKEY;
  229.  
  230. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  231.  
  232. /*
  233.  * DDBLTFX
  234.  * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  235.  */
  236. typedef struct _DDBLTFX
  237. {
  238.     DWORD    dwSize;                // size of structure
  239.     DWORD    dwDDFX;                // FX operations
  240.     DWORD    dwROP;                // Win32 raster operations
  241.     DWORD    dwDDROP;            // Raster operations new for DirectDraw
  242.     DWORD    dwRotationAngle;        // Rotation angle for blt
  243.     DWORD    dwZBufferOpCode;        // ZBuffer compares
  244.     DWORD    dwZBufferLow;            // Low limit of Z buffer
  245.     DWORD    dwZBufferHigh;            // High limit of Z buffer
  246.     DWORD    dwZBufferBaseDest;        // Destination base value
  247.     DWORD    dwZDestConstBitDepth;        // Bit depth used to specify Z constant for destination
  248.     union
  249.     {
  250.     DWORD    dwZDestConst;            // Constant to use as Z buffer for dest
  251.     LPDIRECTDRAWSURFACE lpDDSZBufferDest;    // Surface to use as Z buffer for dest
  252.     } DUMMYUNIONNAMEN(1);
  253.     DWORD    dwZSrcConstBitDepth;        // Bit depth used to specify Z constant for source
  254.     union
  255.     {
  256.     DWORD    dwZSrcConst;            // Constant to use as Z buffer for src
  257.     LPDIRECTDRAWSURFACE lpDDSZBufferSrc;    // Surface to use as Z buffer for src
  258.     } DUMMYUNIONNAMEN(2);
  259.     DWORD    dwAlphaEdgeBlendBitDepth;    // Bit depth used to specify constant for alpha edge blend
  260.     DWORD    dwAlphaEdgeBlend;        // Alpha for edge blending
  261.     DWORD    dwReserved;
  262.     DWORD    dwAlphaDestConstBitDepth;    // Bit depth used to specify alpha constant for destination
  263.     union
  264.     {
  265.     DWORD    dwAlphaDestConst;        // Constant to use as Alpha Channel
  266.     LPDIRECTDRAWSURFACE lpDDSAlphaDest;    // Surface to use as Alpha Channel
  267.     } DUMMYUNIONNAMEN(3);
  268.     DWORD    dwAlphaSrcConstBitDepth;    // Bit depth used to specify alpha constant for source
  269.     union
  270.     {
  271.     DWORD    dwAlphaSrcConst;        // Constant to use as Alpha Channel
  272.     LPDIRECTDRAWSURFACE lpDDSAlphaSrc;    // Surface to use as Alpha Channel
  273.     } DUMMYUNIONNAMEN(4);
  274.     union
  275.     {
  276.     DWORD    dwFillColor;            // color in RGB or Palettized
  277.     DWORD   dwFillDepth;                    // depth value for z-buffer
  278.     DWORD    dwFillPixel;            // pixel value for RGBA or RGBZ
  279.     LPDIRECTDRAWSURFACE lpDDSPattern;    // Surface to use as pattern
  280.     } DUMMYUNIONNAMEN(5);
  281.     DDCOLORKEY    ddckDestColorkey;        // DestColorkey override
  282.     DDCOLORKEY    ddckSrcColorkey;        // SrcColorkey override
  283. } DDBLTFX;
  284.  
  285. typedef DDBLTFX FAR* LPDDBLTFX;
  286.  
  287.  
  288. /*
  289.  * DDSCAPS
  290.  */
  291. typedef struct _DDSCAPS
  292. {
  293.     DWORD    dwCaps;        // capabilities of surface wanted
  294. } DDSCAPS;
  295.  
  296. typedef DDSCAPS FAR* LPDDSCAPS;
  297.  
  298.  
  299. /*
  300.  * DDOSCAPS
  301.  */
  302. typedef struct _DDOSCAPS
  303. {
  304.     DWORD    dwCaps;        // capabilities of surface wanted
  305. } DDOSCAPS;
  306.  
  307. typedef DDOSCAPS FAR* LPDDOSCAPS;
  308.  
  309. /*
  310.  * This structure is used internally by DirectDraw.
  311.  */
  312. typedef struct _DDSCAPSEX
  313. {
  314.     DWORD       dwCaps2;
  315.     DWORD       dwCaps3;
  316.     DWORD       dwCaps4;
  317. } DDSCAPSEX, FAR * LPDDSCAPSEX;
  318.  
  319. /*
  320.  * DDSCAPS2
  321.  */
  322. typedef struct _DDSCAPS2
  323. {
  324.     DWORD    dwCaps;        // capabilities of surface wanted
  325.     DWORD       dwCaps2;
  326.     DWORD       dwCaps3;
  327.     DWORD       dwCaps4;
  328. } DDSCAPS2;
  329.  
  330. typedef DDSCAPS2 FAR* LPDDSCAPS2;
  331.  
  332. /*
  333.  * DDCAPS
  334.  */
  335. #define DD_ROP_SPACE        (256/32)    // space required to store ROP array
  336.  
  337. /*
  338.  * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
  339.  * It is present for back compatability.
  340.  */
  341. typedef struct _DDCAPS_DX3
  342. {
  343.     DWORD    dwSize;            // size of the DDDRIVERCAPS structure
  344.     DWORD    dwCaps;            // driver specific capabilities
  345.     DWORD    dwCaps2;        // more driver specific capabilites
  346.     DWORD    dwCKeyCaps;        // color key capabilities of the surface
  347.     DWORD    dwFXCaps;        // driver specific stretching and effects capabilites
  348.     DWORD    dwFXAlphaCaps;        // alpha driver specific capabilities
  349.     DWORD    dwPalCaps;        // palette capabilities
  350.     DWORD    dwSVCaps;        // stereo vision capabilities
  351.     DWORD    dwAlphaBltConstBitDepths;    // DDBD_2,4,8
  352.     DWORD    dwAlphaBltPixelBitDepths;    // DDBD_1,2,4,8
  353.     DWORD    dwAlphaBltSurfaceBitDepths;    // DDBD_1,2,4,8
  354.     DWORD    dwAlphaOverlayConstBitDepths;    // DDBD_2,4,8
  355.     DWORD    dwAlphaOverlayPixelBitDepths;    // DDBD_1,2,4,8
  356.     DWORD    dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  357.     DWORD    dwZBufferBitDepths;        // DDBD_8,16,24,32
  358.     DWORD    dwVidMemTotal;        // total amount of video memory
  359.     DWORD    dwVidMemFree;        // amount of free video memory
  360.     DWORD    dwMaxVisibleOverlays;    // maximum number of visible overlays
  361.     DWORD    dwCurrVisibleOverlays;    // current number of visible overlays
  362.     DWORD    dwNumFourCCCodes;    // number of four cc codes
  363.     DWORD    dwAlignBoundarySrc;    // source rectangle alignment
  364.     DWORD    dwAlignSizeSrc;        // source rectangle byte size
  365.     DWORD    dwAlignBoundaryDest;    // dest rectangle alignment
  366.     DWORD    dwAlignSizeDest;    // dest rectangle byte size
  367.     DWORD    dwAlignStrideAlign;    // stride alignment
  368.     DWORD    dwRops[DD_ROP_SPACE];    // ROPS supported
  369.     DDSCAPS    ddsCaps;        // DDSCAPS structure has all the general capabilities
  370.     DWORD    dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  371.     DWORD    dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  372.     DWORD    dwMinLiveVideoStretch;    // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  373.     DWORD    dwMaxLiveVideoStretch;    // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  374.     DWORD    dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  375.     DWORD    dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  376.     DWORD    dwReserved1;        // reserved
  377.     DWORD    dwReserved2;        // reserved
  378.     DWORD    dwReserved3;        // reserved
  379.     DWORD    dwSVBCaps;        // driver specific capabilities for System->Vmem blts
  380.     DWORD    dwSVBCKeyCaps;        // driver color key capabilities for System->Vmem blts
  381.     DWORD    dwSVBFXCaps;        // driver FX capabilities for System->Vmem blts
  382.     DWORD    dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  383.     DWORD    dwVSBCaps;        // driver specific capabilities for Vmem->System blts
  384.     DWORD    dwVSBCKeyCaps;        // driver color key capabilities for Vmem->System blts
  385.     DWORD    dwVSBFXCaps;        // driver FX capabilities for Vmem->System blts
  386.     DWORD    dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  387.     DWORD    dwSSBCaps;        // driver specific capabilities for System->System blts
  388.     DWORD    dwSSBCKeyCaps;        // driver color key capabilities for System->System blts
  389.     DWORD    dwSSBFXCaps;        // driver FX capabilities for System->System blts
  390.     DWORD    dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  391.     DWORD    dwReserved4;        // reserved
  392.     DWORD    dwReserved5;        // reserved
  393.     DWORD    dwReserved6;        // reserved
  394. } DDCAPS_DX3;
  395. typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3;
  396.  
  397. /*
  398.  * This structure is the DDCAPS structure as it was in version 5 of Direct X.
  399.  * It is present for back compatability.
  400.  */
  401. typedef struct _DDCAPS_DX5
  402. {
  403. /*  0*/ DWORD    dwSize;            // size of the DDDRIVERCAPS structure
  404. /*  4*/ DWORD    dwCaps;            // driver specific capabilities
  405. /*  8*/ DWORD    dwCaps2;        // more driver specific capabilites
  406. /*  c*/ DWORD    dwCKeyCaps;        // color key capabilities of the surface
  407. /* 10*/ DWORD    dwFXCaps;        // driver specific stretching and effects capabilites
  408. /* 14*/ DWORD    dwFXAlphaCaps;        // alpha driver specific capabilities
  409. /* 18*/ DWORD    dwPalCaps;        // palette capabilities
  410. /* 1c*/ DWORD    dwSVCaps;        // stereo vision capabilities
  411. /* 20*/ DWORD    dwAlphaBltConstBitDepths;    // DDBD_2,4,8
  412. /* 24*/ DWORD    dwAlphaBltPixelBitDepths;    // DDBD_1,2,4,8
  413. /* 28*/ DWORD    dwAlphaBltSurfaceBitDepths;    // DDBD_1,2,4,8
  414. /* 2c*/ DWORD    dwAlphaOverlayConstBitDepths;    // DDBD_2,4,8
  415. /* 30*/ DWORD    dwAlphaOverlayPixelBitDepths;    // DDBD_1,2,4,8
  416. /* 34*/ DWORD    dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  417. /* 38*/ DWORD    dwZBufferBitDepths;        // DDBD_8,16,24,32
  418. /* 3c*/ DWORD    dwVidMemTotal;        // total amount of video memory
  419. /* 40*/ DWORD    dwVidMemFree;        // amount of free video memory
  420. /* 44*/ DWORD    dwMaxVisibleOverlays;    // maximum number of visible overlays
  421. /* 48*/ DWORD    dwCurrVisibleOverlays;    // current number of visible overlays
  422. /* 4c*/ DWORD    dwNumFourCCCodes;    // number of four cc codes
  423. /* 50*/ DWORD    dwAlignBoundarySrc;    // source rectangle alignment
  424. /* 54*/ DWORD    dwAlignSizeSrc;        // source rectangle byte size
  425. /* 58*/ DWORD    dwAlignBoundaryDest;    // dest rectangle alignment
  426. /* 5c*/ DWORD    dwAlignSizeDest;    // dest rectangle byte size
  427. /* 60*/ DWORD    dwAlignStrideAlign;    // stride alignment
  428. /* 64*/ DWORD    dwRops[DD_ROP_SPACE];    // ROPS supported
  429. /* 84*/ DDSCAPS    ddsCaps;        // DDSCAPS structure has all the general capabilities
  430. /* 88*/ DWORD    dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  431. /* 8c*/ DWORD    dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  432. /* 90*/ DWORD    dwMinLiveVideoStretch;    // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  433. /* 94*/ DWORD    dwMaxLiveVideoStretch;    // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  434. /* 98*/ DWORD    dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  435. /* 9c*/ DWORD    dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  436. /* a0*/ DWORD    dwReserved1;        // reserved
  437. /* a4*/ DWORD    dwReserved2;        // reserved
  438. /* a8*/ DWORD    dwReserved3;        // reserved
  439. /* ac*/ DWORD    dwSVBCaps;        // driver specific capabilities for System->Vmem blts
  440. /* b0*/ DWORD    dwSVBCKeyCaps;        // driver color key capabilities for System->Vmem blts
  441. /* b4*/ DWORD    dwSVBFXCaps;        // driver FX capabilities for System->Vmem blts
  442. /* b8*/ DWORD    dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  443. /* d8*/ DWORD    dwVSBCaps;        // driver specific capabilities for Vmem->System blts
  444. /* dc*/ DWORD    dwVSBCKeyCaps;        // driver color key capabilities for Vmem->System blts
  445. /* e0*/ DWORD    dwVSBFXCaps;        // driver FX capabilities for Vmem->System blts
  446. /* e4*/ DWORD    dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  447. /*104*/ DWORD    dwSSBCaps;        // driver specific capabilities for System->System blts
  448. /*108*/ DWORD    dwSSBCKeyCaps;        // driver color key capabilities for System->System blts
  449. /*10c*/ DWORD    dwSSBFXCaps;        // driver FX capabilities for System->System blts
  450. /*110*/ DWORD    dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  451. // Members added for DX5:
  452. /*130*/ DWORD    dwMaxVideoPorts;    // maximum number of usable video ports
  453. /*134*/ DWORD    dwCurrVideoPorts;    // current number of video ports used
  454. /*138*/ DWORD    dwSVBCaps2;        // more driver specific capabilities for System->Vmem blts
  455. /*13c*/ DWORD    dwNLVBCaps;          // driver specific capabilities for non-local->local vidmem blts
  456. /*140*/ DWORD    dwNLVBCaps2;          // more driver specific capabilities non-local->local vidmem blts
  457. /*144*/ DWORD    dwNLVBCKeyCaps;          // driver color key capabilities for non-local->local vidmem blts
  458. /*148*/ DWORD    dwNLVBFXCaps;          // driver FX capabilities for non-local->local blts
  459. /*14c*/ DWORD    dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  460. } DDCAPS_DX5;
  461. typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5;
  462.  
  463. typedef struct _DDCAPS_DX6
  464. {
  465. /*  0*/ DWORD    dwSize;            // size of the DDDRIVERCAPS structure
  466. /*  4*/ DWORD    dwCaps;            // driver specific capabilities
  467. /*  8*/ DWORD    dwCaps2;        // more driver specific capabilites
  468. /*  c*/ DWORD    dwCKeyCaps;        // color key capabilities of the surface
  469. /* 10*/ DWORD    dwFXCaps;        // driver specific stretching and effects capabilites
  470. /* 14*/ DWORD    dwFXAlphaCaps;        // alpha caps
  471. /* 18*/ DWORD    dwPalCaps;        // palette capabilities
  472. /* 1c*/ DWORD    dwSVCaps;        // stereo vision capabilities
  473. /* 20*/ DWORD    dwAlphaBltConstBitDepths;    // DDBD_2,4,8
  474. /* 24*/ DWORD    dwAlphaBltPixelBitDepths;    // DDBD_1,2,4,8
  475. /* 28*/ DWORD    dwAlphaBltSurfaceBitDepths;    // DDBD_1,2,4,8
  476. /* 2c*/ DWORD    dwAlphaOverlayConstBitDepths;    // DDBD_2,4,8
  477. /* 30*/ DWORD    dwAlphaOverlayPixelBitDepths;    // DDBD_1,2,4,8
  478. /* 34*/ DWORD    dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  479. /* 38*/ DWORD    dwZBufferBitDepths;        // DDBD_8,16,24,32
  480. /* 3c*/ DWORD    dwVidMemTotal;        // total amount of video memory
  481. /* 40*/ DWORD    dwVidMemFree;        // amount of free video memory
  482. /* 44*/ DWORD    dwMaxVisibleOverlays;    // maximum number of visible overlays
  483. /* 48*/ DWORD    dwCurrVisibleOverlays;    // current number of visible overlays
  484. /* 4c*/ DWORD    dwNumFourCCCodes;    // number of four cc codes
  485. /* 50*/ DWORD    dwAlignBoundarySrc;    // source rectangle alignment
  486. /* 54*/ DWORD    dwAlignSizeSrc;        // source rectangle byte size
  487. /* 58*/ DWORD    dwAlignBoundaryDest;    // dest rectangle alignment
  488. /* 5c*/ DWORD    dwAlignSizeDest;    // dest rectangle byte size
  489. /* 60*/ DWORD    dwAlignStrideAlign;    // stride alignment
  490. /* 64*/ DWORD    dwRops[DD_ROP_SPACE];    // ROPS supported
  491. /* 84*/ DDSCAPS    ddsOldCaps;             // Was DDSCAPS    ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  492. /* 88*/ DWORD    dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  493. /* 8c*/ DWORD    dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  494. /* 90*/ DWORD    dwMinLiveVideoStretch;    // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  495. /* 94*/ DWORD    dwMaxLiveVideoStretch;    // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  496. /* 98*/ DWORD    dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  497. /* 9c*/ DWORD    dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  498. /* a0*/ DWORD    dwReserved1;        // reserved
  499. /* a4*/ DWORD    dwReserved2;        // reserved
  500. /* a8*/ DWORD    dwReserved3;        // reserved
  501. /* ac*/ DWORD    dwSVBCaps;        // driver specific capabilities for System->Vmem blts
  502. /* b0*/ DWORD    dwSVBCKeyCaps;        // driver color key capabilities for System->Vmem blts
  503. /* b4*/ DWORD    dwSVBFXCaps;        // driver FX capabilities for System->Vmem blts
  504. /* b8*/ DWORD    dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  505. /* d8*/ DWORD    dwVSBCaps;        // driver specific capabilities for Vmem->System blts
  506. /* dc*/ DWORD    dwVSBCKeyCaps;        // driver color key capabilities for Vmem->System blts
  507. /* e0*/ DWORD    dwVSBFXCaps;        // driver FX capabilities for Vmem->System blts
  508. /* e4*/ DWORD    dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  509. /*104*/ DWORD    dwSSBCaps;        // driver specific capabilities for System->System blts
  510. /*108*/ DWORD    dwSSBCKeyCaps;        // driver color key capabilities for System->System blts
  511. /*10c*/ DWORD    dwSSBFXCaps;        // driver FX capabilities for System->System blts
  512. /*110*/ DWORD    dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  513. /*130*/ DWORD    dwMaxVideoPorts;    // maximum number of usable video ports
  514. /*134*/ DWORD    dwCurrVideoPorts;    // current number of video ports used
  515. /*138*/ DWORD    dwSVBCaps2;        // more driver specific capabilities for System->Vmem blts
  516. /*13c*/ DWORD    dwNLVBCaps;          // driver specific capabilities for non-local->local vidmem blts
  517. /*140*/ DWORD    dwNLVBCaps2;          // more driver specific capabilities non-local->local vidmem blts
  518. /*144*/ DWORD    dwNLVBCKeyCaps;          // driver color key capabilities for non-local->local vidmem blts
  519. /*148*/ DWORD    dwNLVBFXCaps;          // driver FX capabilities for non-local->local blts
  520. /*14c*/ DWORD    dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  521. // Members added for DX6 release
  522. /*16c*/ DDSCAPS2 ddsCaps;               // Surface Caps
  523. } DDCAPS_DX6;
  524. typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6;
  525.  
  526.  
  527. #if DIRECTDRAW_VERSION <= 0x300
  528.     typedef DDCAPS_DX3 DDCAPS;
  529. #elif DIRECTDRAW_VERSION <= 0x500
  530.     typedef DDCAPS_DX5 DDCAPS;
  531. #else
  532.     typedef DDCAPS_DX6 DDCAPS;
  533. #endif
  534.  
  535. typedef DDCAPS FAR* LPDDCAPS;
  536.  
  537.  
  538.  
  539. /*
  540.  * DDPIXELFORMAT
  541.  */
  542. typedef struct _DDPIXELFORMAT
  543. {
  544.     DWORD    dwSize;            // size of structure
  545.     DWORD    dwFlags;        // pixel format flags
  546.     DWORD    dwFourCC;        // (FOURCC code)
  547.     union
  548.     {
  549.     DWORD    dwRGBBitCount;        // how many bits per pixel
  550.     DWORD    dwYUVBitCount;        // how many bits per pixel
  551.     DWORD    dwZBufferBitDepth;    // how many total bits/pixel in z buffer (including any stencil bits)
  552.     DWORD    dwAlphaBitDepth;    // how many bits for alpha channels
  553.     DWORD   dwLuminanceBitCount;    // how many bits per pixel
  554.         DWORD   dwBumpBitCount;         // how many bits per "buxel", total
  555.     } DUMMYUNIONNAMEN(1);
  556.     union
  557.     {
  558.     DWORD    dwRBitMask;        // mask for red bit
  559.     DWORD    dwYBitMask;        // mask for Y bits
  560.     DWORD   dwStencilBitDepth;    // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
  561.     DWORD   dwLuminanceBitMask;    // mask for luminance bits
  562.         DWORD   dwBumpDuBitMask;        // mask for bump map U delta bits
  563.     } DUMMYUNIONNAMEN(2);
  564.     union
  565.     {
  566.     DWORD    dwGBitMask;        // mask for green bits
  567.     DWORD    dwUBitMask;        // mask for U bits
  568.     DWORD   dwZBitMask;        // mask for Z bits
  569.         DWORD   dwBumpDvBitMask;        // mask for bump map V delta bits
  570.     } DUMMYUNIONNAMEN(3);
  571.     union
  572.     {
  573.     DWORD    dwBBitMask;        // mask for blue bits
  574.     DWORD    dwVBitMask;        // mask for V bits
  575.     DWORD   dwStencilBitMask;    // mask for stencil bits
  576.         DWORD   dwBumpLuminanceBitMask; // mask for luminance in bump map
  577.     } DUMMYUNIONNAMEN(4);
  578.     union
  579.     {
  580.     DWORD    dwRGBAlphaBitMask;    // mask for alpha channel
  581.     DWORD    dwYUVAlphaBitMask;    // mask for alpha channel
  582.         DWORD   dwLuminanceAlphaBitMask;// mask for alpha channel
  583.     DWORD    dwRGBZBitMask;        // mask for Z channel
  584.     DWORD    dwYUVZBitMask;        // mask for Z channel
  585.     } DUMMYUNIONNAMEN(5);
  586. } DDPIXELFORMAT;
  587.  
  588. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  589.  
  590. /*
  591.  * DDOVERLAYFX
  592.  */
  593. typedef struct _DDOVERLAYFX
  594. {
  595.     DWORD    dwSize;                // size of structure
  596.     DWORD    dwAlphaEdgeBlendBitDepth;    // Bit depth used to specify constant for alpha edge blend
  597.     DWORD    dwAlphaEdgeBlend;        // Constant to use as alpha for edge blend
  598.     DWORD    dwReserved;
  599.     DWORD    dwAlphaDestConstBitDepth;    // Bit depth used to specify alpha constant for destination
  600.     union
  601.     {
  602.     DWORD    dwAlphaDestConst;        // Constant to use as alpha channel for dest
  603.     LPDIRECTDRAWSURFACE lpDDSAlphaDest;    // Surface to use as alpha channel for dest
  604.     } DUMMYUNIONNAMEN(1);
  605.     DWORD    dwAlphaSrcConstBitDepth;    // Bit depth used to specify alpha constant for source
  606.     union
  607.     {
  608.     DWORD    dwAlphaSrcConst;        // Constant to use as alpha channel for src
  609.     LPDIRECTDRAWSURFACE lpDDSAlphaSrc;    // Surface to use as alpha channel for src
  610.     } DUMMYUNIONNAMEN(2);
  611.     DDCOLORKEY    dckDestColorkey;        // DestColorkey override
  612.     DDCOLORKEY    dckSrcColorkey;            // DestColorkey override
  613.     DWORD       dwDDFX;                         // Overlay FX
  614.     DWORD    dwFlags;            // flags
  615. } DDOVERLAYFX;
  616.  
  617. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  618.  
  619.  
  620. /*
  621.  * DDBLTBATCH: BltBatch entry structure
  622.  */
  623. typedef struct _DDBLTBATCH
  624. {
  625.     LPRECT        lprDest;
  626.     LPDIRECTDRAWSURFACE    lpDDSSrc;
  627.     LPRECT        lprSrc;
  628.     DWORD        dwFlags;
  629.     LPDDBLTFX        lpDDBltFx;
  630. } DDBLTBATCH;
  631.  
  632. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  633.  
  634.  
  635. /*
  636.  * DDGAMMARAMP
  637.  */
  638. typedef struct _DDGAMMARAMP
  639. {
  640.     WORD                red[256];
  641.     WORD                green[256];
  642.     WORD                blue[256];
  643. } DDGAMMARAMP;
  644. typedef DDGAMMARAMP FAR * LPDDGAMMARAMP;
  645.  
  646. /*
  647.  *  This is the structure within which DirectDraw returns data about the current graphics driver and chipset
  648.  */
  649.  
  650. #define MAX_DDDEVICEID_STRING        512
  651.  
  652. typedef struct tagDDDEVICEIDENTIFIER
  653. {
  654.     /*
  655.      * These elements are for presentation to the user only. They should not be used to identify particular
  656.      * drivers, since this is unreliable and many different strings may be associated with the same
  657.      * device, and the same driver from different vendors.
  658.      */
  659.     char    szDriver[MAX_DDDEVICEID_STRING];
  660.     char    szDescription[MAX_DDDEVICEID_STRING];
  661.  
  662.     /*
  663.      * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  664.      * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  665.      * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  666.      *
  667.      * This version has the form:
  668.      *  wProduct = HIWORD(liDriverVersion.HighPart)
  669.      *  wVersion = LOWORD(liDriverVersion.HighPart)
  670.      *  wSubVersion = HIWORD(liDriverVersion.LowPart)
  671.      *  wBuild = LOWORD(liDriverVersion.LowPart)
  672.      */
  673. #ifdef _WIN32
  674.     LARGE_INTEGER liDriverVersion;      /* Defined for applications and other 32 bit components */
  675. #else
  676.     DWORD   dwDriverVersionLowPart;     /* Defined for 16 bit driver components */
  677.     DWORD   dwDriverVersionHighPart;
  678. #endif
  679.  
  680.  
  681.     /*
  682.      * These elements can be used to identify particular chipsets. Use with extreme caution. 
  683.      *   dwVendorId     Identifies the manufacturer. May be zero if unknown.
  684.      *   dwDeviceId     Identifies the type of chipset. May be zero if unknown.
  685.      *   dwSubSysId     Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  686.      *   dwRevision     Identifies the revision level of the chipset. May be zero if unknown.
  687.      */
  688.     DWORD   dwVendorId;
  689.     DWORD   dwDeviceId;
  690.     DWORD   dwSubSysId;
  691.     DWORD   dwRevision;
  692.  
  693.     /*
  694.      * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  695.      * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  696.      * reprofile the graphics subsystem.
  697.      * This element can also be used to identify particular problematic drivers.
  698.      */
  699.     GUID    guidDeviceIdentifier;
  700. } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
  701.  
  702. /*
  703.  * Flags for the IDirectDraw4::GetDeviceIdentifier method
  704.  */
  705.  
  706. /*
  707.  * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
  708.  * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
  709.  * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
  710.  * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
  711.  * of the DirectDraw object involved.
  712.  */
  713. #define DDGDI_GETHOSTIDENTIFIER         0x00000001L
  714.  
  715.  
  716.  
  717. /*
  718.  * callbacks
  719.  */
  720. typedef DWORD    (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  721. #ifdef STREAMING
  722. typedef DWORD    (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  723. #endif
  724.  
  725.  
  726. /*
  727.  * INTERACES FOLLOW:
  728.  *    IDirectDraw
  729.  *    IDirectDrawClipper
  730.  *    IDirectDrawPalette
  731.  *    IDirectDrawSurface
  732.  */
  733.  
  734. /*
  735.  * IDirectDraw
  736.  */
  737. #if defined( _WIN32 ) && !defined( _NO_COM )
  738. #undef INTERFACE
  739. #define INTERFACE IDirectDraw
  740. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  741. {
  742.     /*** IUnknown methods ***/
  743.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  744.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  745.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  746.     /*** IDirectDraw methods ***/
  747.     STDMETHOD(Compact)(THIS) PURE;
  748.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  749.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  750.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  751.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  752.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  753.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  754.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  755.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  756.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  757.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  758.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  759.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  760.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  761.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  762.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  763.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  764.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  765.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  766.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  767. };
  768.  
  769. #if !defined(__cplusplus) || defined(CINTERFACE)
  770. #define IDirectDraw_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  771. #define IDirectDraw_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  772. #define IDirectDraw_Release(p)                      (p)->lpVtbl->Release(p)
  773. #define IDirectDraw_Compact(p)                      (p)->lpVtbl->Compact(p)
  774. #define IDirectDraw_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  775. #define IDirectDraw_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  776. #define IDirectDraw_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  777. #define IDirectDraw_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  778. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  779. #define IDirectDraw_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  780. #define IDirectDraw_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  781. #define IDirectDraw_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  782. #define IDirectDraw_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  783. #define IDirectDraw_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  784. #define IDirectDraw_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  785. #define IDirectDraw_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  786. #define IDirectDraw_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  787. #define IDirectDraw_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  788. #define IDirectDraw_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  789. #define IDirectDraw_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  790. #define IDirectDraw_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  791. #define IDirectDraw_SetDisplayMode(p, a, b, c)      (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  792. #define IDirectDraw_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  793. #else
  794. #define IDirectDraw_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  795. #define IDirectDraw_AddRef(p)                       (p)->AddRef()
  796. #define IDirectDraw_Release(p)                      (p)->Release()
  797. #define IDirectDraw_Compact(p)                      (p)->Compact()
  798. #define IDirectDraw_CreateClipper(p, a, b, c)       (p)->CreateClipper(a, b, c)
  799. #define IDirectDraw_CreatePalette(p, a, b, c, d)    (p)->CreatePalette(a, b, c, d)
  800. #define IDirectDraw_CreateSurface(p, a, b, c)       (p)->CreateSurface(a, b, c)
  801. #define IDirectDraw_DuplicateSurface(p, a, b)       (p)->DuplicateSurface(a, b)
  802. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  803. #define IDirectDraw_EnumSurfaces(p, a, b, c, d)     (p)->EnumSurfaces(a, b, c, d)
  804. #define IDirectDraw_FlipToGDISurface(p)             (p)->FlipToGDISurface()
  805. #define IDirectDraw_GetCaps(p, a, b)                (p)->GetCaps(a, b)
  806. #define IDirectDraw_GetDisplayMode(p, a)            (p)->GetDisplayMode(a)
  807. #define IDirectDraw_GetFourCCCodes(p, a, b)         (p)->GetFourCCCodes(a, b)
  808. #define IDirectDraw_GetGDISurface(p, a)             (p)->GetGDISurface(a)
  809. #define IDirectDraw_GetMonitorFrequency(p, a)       (p)->GetMonitorFrequency(a)
  810. #define IDirectDraw_GetScanLine(p, a)               (p)->GetScanLine(a)
  811. #define IDirectDraw_GetVerticalBlankStatus(p, a)    (p)->GetVerticalBlankStatus(a)
  812. #define IDirectDraw_Initialize(p, a)                (p)->Initialize(a)
  813. #define IDirectDraw_RestoreDisplayMode(p)           (p)->RestoreDisplayMode()
  814. #define IDirectDraw_SetCooperativeLevel(p, a, b)    (p)->SetCooperativeLevel(a, b)
  815. #define IDirectDraw_SetDisplayMode(p, a, b, c)      (p)->SetDisplayMode(a, b, c)
  816. #define IDirectDraw_WaitForVerticalBlank(p, a, b)   (p)->WaitForVerticalBlank(a, b)
  817. #endif
  818.  
  819. #endif
  820.  
  821. #if defined( _WIN32 ) && !defined( _NO_COM )
  822. #undef INTERFACE
  823. #define INTERFACE IDirectDraw2
  824. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  825. {
  826.     /*** IUnknown methods ***/
  827.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  828.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  829.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  830.     /*** IDirectDraw methods ***/
  831.     STDMETHOD(Compact)(THIS) PURE;
  832.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  833.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  834.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  835.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  836.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  837.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  838.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  839.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  840.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  841.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  842.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  843.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  844.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  845.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  846.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  847.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  848.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  849.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  850.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  851.     /*** Added in the v2 interface ***/
  852.     STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  853. };
  854. #if !defined(__cplusplus) || defined(CINTERFACE)
  855. #define IDirectDraw2_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  856. #define IDirectDraw2_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  857. #define IDirectDraw2_Release(p)                      (p)->lpVtbl->Release(p)
  858. #define IDirectDraw2_Compact(p)                      (p)->lpVtbl->Compact(p)
  859. #define IDirectDraw2_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  860. #define IDirectDraw2_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  861. #define IDirectDraw2_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  862. #define IDirectDraw2_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  863. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  864. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  865. #define IDirectDraw2_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  866. #define IDirectDraw2_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  867. #define IDirectDraw2_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  868. #define IDirectDraw2_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  869. #define IDirectDraw2_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  870. #define IDirectDraw2_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  871. #define IDirectDraw2_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  872. #define IDirectDraw2_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  873. #define IDirectDraw2_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  874. #define IDirectDraw2_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  875. #define IDirectDraw2_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  876. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  877. #define IDirectDraw2_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  878. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c)  (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  879. #else
  880. #define IDirectDraw2_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  881. #define IDirectDraw2_AddRef(p)                       (p)->AddRef()
  882. #define IDirectDraw2_Release(p)                      (p)->Release()
  883. #define IDirectDraw2_Compact(p)                      (p)->Compact()
  884. #define IDirectDraw2_CreateClipper(p, a, b, c)       (p)->CreateClipper(a, b, c)
  885. #define IDirectDraw2_CreatePalette(p, a, b, c, d)    (p)->CreatePalette(a, b, c, d)
  886. #define IDirectDraw2_CreateSurface(p, a, b, c)       (p)->CreateSurface(a, b, c)
  887. #define IDirectDraw2_DuplicateSurface(p, a, b)       (p)->DuplicateSurface(a, b)
  888. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  889. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d)     (p)->EnumSurfaces(a, b, c, d)
  890. #define IDirectDraw2_FlipToGDISurface(p)             (p)->FlipToGDISurface()
  891. #define IDirectDraw2_GetCaps(p, a, b)                (p)->GetCaps(a, b)
  892. #define IDirectDraw2_GetDisplayMode(p, a)            (p)->GetDisplayMode(a)
  893. #define IDirectDraw2_GetFourCCCodes(p, a, b)         (p)->GetFourCCCodes(a, b)
  894. #define IDirectDraw2_GetGDISurface(p, a)             (p)->GetGDISurface(a)
  895. #define IDirectDraw2_GetMonitorFrequency(p, a)       (p)->GetMonitorFrequency(a)
  896. #define IDirectDraw2_GetScanLine(p, a)               (p)->GetScanLine(a)
  897. #define IDirectDraw2_GetVerticalBlankStatus(p, a)    (p)->GetVerticalBlankStatus(a)
  898. #define IDirectDraw2_Initialize(p, a)                (p)->Initialize(a)
  899. #define IDirectDraw2_RestoreDisplayMode(p)           (p)->RestoreDisplayMode()
  900. #define IDirectDraw2_SetCooperativeLevel(p, a, b)    (p)->SetCooperativeLevel(a, b)
  901. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  902. #define IDirectDraw2_WaitForVerticalBlank(p, a, b)   (p)->WaitForVerticalBlank(a, b)
  903. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c)  (p)->GetAvailableVidMem(a, b, c)
  904. #endif
  905.  
  906. #endif
  907.  
  908. #if defined( _WIN32 ) && !defined( _NO_COM )
  909. #undef INTERFACE
  910. #define INTERFACE IDirectDraw4
  911. DECLARE_INTERFACE_( IDirectDraw4, IUnknown )
  912. {
  913.     /*** IUnknown methods ***/
  914.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  915.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  916.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  917.     /*** IDirectDraw methods ***/
  918.     STDMETHOD(Compact)(THIS) PURE;
  919.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  920.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  921.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *) PURE;
  922.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4 FAR * ) PURE;
  923.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
  924.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK2 ) PURE;
  925.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  926.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  927.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
  928.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  929.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 FAR *) PURE;
  930.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  931.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  932.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  933.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  934.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  935.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  936.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  937.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  938.     /*** Added in the v2 interface ***/
  939.     STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
  940.     /*** Added in the V4 Interface ***/
  941.     STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE;
  942.     STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  943.     STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  944.     STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER, DWORD ) PURE;
  945. };
  946. #if !defined(__cplusplus) || defined(CINTERFACE)
  947. #define IDirectDraw4_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  948. #define IDirectDraw4_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  949. #define IDirectDraw4_Release(p)                      (p)->lpVtbl->Release(p)
  950. #define IDirectDraw4_Compact(p)                      (p)->lpVtbl->Compact(p)
  951. #define IDirectDraw4_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  952. #define IDirectDraw4_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  953. #define IDirectDraw4_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  954. #define IDirectDraw4_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  955. #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  956. #define IDirectDraw4_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  957. #define IDirectDraw4_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  958. #define IDirectDraw4_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  959. #define IDirectDraw4_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  960. #define IDirectDraw4_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  961. #define IDirectDraw4_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  962. #define IDirectDraw4_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  963. #define IDirectDraw4_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  964. #define IDirectDraw4_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  965. #define IDirectDraw4_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  966. #define IDirectDraw4_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  967. #define IDirectDraw4_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  968. #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  969. #define IDirectDraw4_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  970. #define IDirectDraw4_GetAvailableVidMem(p, a, b, c)  (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  971. #define IDirectDraw4_GetSurfaceFromDC(p, a, b)       (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
  972. #define IDirectDraw4_RestoreAllSurfaces(p)           (p)->lpVtbl->RestoreAllSurfaces(p)
  973. #define IDirectDraw4_TestCooperativeLevel(p)         (p)->lpVtbl->TestCooperativeLevel(p)
  974. #define IDirectDraw4_GetDeviceIdentifier(p,a,b)      (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  975. #else
  976. #define IDirectDraw4_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  977. #define IDirectDraw4_AddRef(p)                       (p)->AddRef()
  978. #define IDirectDraw4_Release(p)                      (p)->Release()
  979. #define IDirectDraw4_Compact(p)                      (p)->Compact()
  980. #define IDirectDraw4_CreateClipper(p, a, b, c)       (p)->CreateClipper(a, b, c)
  981. #define IDirectDraw4_CreatePalette(p, a, b, c, d)    (p)->CreatePalette(a, b, c, d)
  982. #define IDirectDraw4_CreateSurface(p, a, b, c)       (p)->CreateSurface(a, b, c)
  983. #define IDirectDraw4_DuplicateSurface(p, a, b)       (p)->DuplicateSurface(a, b)
  984. #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  985. #define IDirectDraw4_EnumSurfaces(p, a, b, c, d)     (p)->EnumSurfaces(a, b, c, d)
  986. #define IDirectDraw4_FlipToGDISurface(p)             (p)->FlipToGDISurface()
  987. #define IDirectDraw4_GetCaps(p, a, b)                (p)->GetCaps(a, b)
  988. #define IDirectDraw4_GetDisplayMode(p, a)            (p)->GetDisplayMode(a)
  989. #define IDirectDraw4_GetFourCCCodes(p, a, b)         (p)->GetFourCCCodes(a, b)
  990. #define IDirectDraw4_GetGDISurface(p, a)             (p)->GetGDISurface(a)
  991. #define IDirectDraw4_GetMonitorFrequency(p, a)       (p)->GetMonitorFrequency(a)
  992. #define IDirectDraw4_GetScanLine(p, a)               (p)->GetScanLine(a)
  993. #define IDirectDraw4_GetVerticalBlankStatus(p, a)    (p)->GetVerticalBlankStatus(a)
  994. #define IDirectDraw4_Initialize(p, a)                (p)->Initialize(a)
  995. #define IDirectDraw4_RestoreDisplayMode(p)           (p)->RestoreDisplayMode()
  996. #define IDirectDraw4_SetCooperativeLevel(p, a, b)    (p)->SetCooperativeLevel(a, b)
  997. #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  998. #define IDirectDraw4_WaitForVerticalBlank(p, a, b)   (p)->WaitForVerticalBlank(a, b)
  999. #define IDirectDraw4_GetAvailableVidMem(p, a, b, c)  (p)->GetAvailableVidMem(a, b, c)
  1000. #define IDirectDraw4_GetSurfaceFromDC(p, a, b)       (p)->GetSurfaceFromDC(a, b)
  1001. #define IDirectDraw4_RestoreAllSurfaces(p)           (p)->RestoreAllSurfaces()
  1002. #define IDirectDraw4_TestCooperativeLevel(p)         (p)->TestCooperativeLevel()
  1003. #define IDirectDraw4_GetDeviceIdentifier(p,a,b)      (p)->GetDeviceIdentifier(a,b)
  1004. #endif
  1005.  
  1006. #endif
  1007.  
  1008.  
  1009. /*
  1010.  * IDirectDrawPalette
  1011.  */
  1012. #if defined( _WIN32 ) && !defined( _NO_COM )
  1013. #undef INTERFACE
  1014. #define INTERFACE IDirectDrawPalette
  1015. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  1016. {
  1017.     /*** IUnknown methods ***/
  1018.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1019.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1020.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1021.     /*** IDirectDrawPalette methods ***/
  1022.     STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  1023.     STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1024.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  1025.     STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1026. };
  1027.  
  1028. #if !defined(__cplusplus) || defined(CINTERFACE)
  1029. #define IDirectDrawPalette_QueryInterface(p, a, b)      (p)->lpVtbl->QueryInterface(p, a, b)
  1030. #define IDirectDrawPalette_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1031. #define IDirectDrawPalette_Release(p)                   (p)->lpVtbl->Release(p)
  1032. #define IDirectDrawPalette_GetCaps(p, a)                (p)->lpVtbl->GetCaps(p, a)
  1033. #define IDirectDrawPalette_GetEntries(p, a, b, c, d)    (p)->lpVtbl->GetEntries(p, a, b, c, d)
  1034. #define IDirectDrawPalette_Initialize(p, a, b, c)       (p)->lpVtbl->Initialize(p, a, b, c)
  1035. #define IDirectDrawPalette_SetEntries(p, a, b, c, d)    (p)->lpVtbl->SetEntries(p, a, b, c, d)
  1036. #else
  1037. #define IDirectDrawPalette_QueryInterface(p, a, b)      (p)->QueryInterface(a, b)
  1038. #define IDirectDrawPalette_AddRef(p)                    (p)->AddRef()
  1039. #define IDirectDrawPalette_Release(p)                   (p)->Release()
  1040. #define IDirectDrawPalette_GetCaps(p, a)                (p)->GetCaps(a)
  1041. #define IDirectDrawPalette_GetEntries(p, a, b, c, d)    (p)->GetEntries(a, b, c, d)
  1042. #define IDirectDrawPalette_Initialize(p, a, b, c)       (p)->Initialize(a, b, c)
  1043. #define IDirectDrawPalette_SetEntries(p, a, b, c, d)    (p)->SetEntries(a, b, c, d)
  1044. #endif
  1045.  
  1046. #endif
  1047.  
  1048.  
  1049.  
  1050. /*
  1051.  * IDirectDrawClipper
  1052.  */
  1053. #if defined( _WIN32 ) && !defined( _NO_COM )
  1054. #undef INTERFACE
  1055. #define INTERFACE IDirectDrawClipper
  1056. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  1057. {
  1058.     /*** IUnknown methods ***/
  1059.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1060.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1061.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1062.     /*** IDirectDrawClipper methods ***/
  1063.     STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  1064.     STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  1065.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  1066.     STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  1067.     STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  1068.     STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  1069. };
  1070.  
  1071. #if !defined(__cplusplus) || defined(CINTERFACE)
  1072. #define IDirectDrawClipper_QueryInterface(p, a, b)  (p)->lpVtbl->QueryInterface(p, a, b)
  1073. #define IDirectDrawClipper_AddRef(p)                (p)->lpVtbl->AddRef(p)
  1074. #define IDirectDrawClipper_Release(p)               (p)->lpVtbl->Release(p)
  1075. #define IDirectDrawClipper_GetClipList(p, a, b, c)  (p)->lpVtbl->GetClipList(p, a, b, c)
  1076. #define IDirectDrawClipper_GetHWnd(p, a)            (p)->lpVtbl->GetHWnd(p, a)
  1077. #define IDirectDrawClipper_Initialize(p, a, b)      (p)->lpVtbl->Initialize(p, a, b)
  1078. #define IDirectDrawClipper_IsClipListChanged(p, a)  (p)->lpVtbl->IsClipListChanged(p, a)
  1079. #define IDirectDrawClipper_SetClipList(p, a, b)     (p)->lpVtbl->SetClipList(p, a, b)
  1080. #define IDirectDrawClipper_SetHWnd(p, a, b)         (p)->lpVtbl->SetHWnd(p, a, b)
  1081. #else
  1082. #define IDirectDrawClipper_QueryInterface(p, a, b)  (p)->QueryInterface(a, b)
  1083. #define IDirectDrawClipper_AddRef(p)                (p)->AddRef()
  1084. #define IDirectDrawClipper_Release(p)               (p)->Release()
  1085. #define IDirectDrawClipper_GetClipList(p, a, b, c)  (p)->GetClipList(a, b, c)
  1086. #define IDirectDrawClipper_GetHWnd(p, a)            (p)->GetHWnd(a)
  1087. #define IDirectDrawClipper_Initialize(p, a, b)      (p)->Initialize(a, b)
  1088. #define IDirectDrawClipper_IsClipListChanged(p, a)  (p)->IsClipListChanged(a)
  1089. #define IDirectDrawClipper_SetClipList(p, a, b)     (p)->SetClipList(a, b)
  1090. #define IDirectDrawClipper_SetHWnd(p, a, b)         (p)->SetHWnd(a, b)
  1091. #endif
  1092.  
  1093. #endif
  1094.  
  1095. /*
  1096.  * IDirectDrawSurface and related interfaces
  1097.  */
  1098. #if defined( _WIN32 ) && !defined( _NO_COM )
  1099. #undef INTERFACE
  1100. #define INTERFACE IDirectDrawSurface
  1101. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  1102. {
  1103.     /*** IUnknown methods ***/
  1104.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1105.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1106.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1107.     /*** IDirectDrawSurface methods ***/
  1108.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1109.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1110.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  1111.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1112.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  1113.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  1114.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1115.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1116.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  1117.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  1118.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1119.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1120.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1121.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1122.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1123.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1124.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1125.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1126.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1127.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1128.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1129.     STDMETHOD(IsLost)(THIS) PURE;
  1130.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1131.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1132.     STDMETHOD(Restore)(THIS) PURE;
  1133.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1134.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1135.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1136.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1137.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1138.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1139.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1140.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  1141. };
  1142.  
  1143. #if !defined(__cplusplus) || defined(CINTERFACE)
  1144. #define IDirectDrawSurface_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  1145. #define IDirectDrawSurface_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1146. #define IDirectDrawSurface_Release(p)                   (p)->lpVtbl->Release(p)
  1147. #define IDirectDrawSurface_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  1148. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1149. #define IDirectDrawSurface_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1150. #define IDirectDrawSurface_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  1151. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1152. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1153. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1154. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1155. #define IDirectDrawSurface_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  1156. #define IDirectDrawSurface_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1157. #define IDirectDrawSurface_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  1158. #define IDirectDrawSurface_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  1159. #define IDirectDrawSurface_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  1160. #define IDirectDrawSurface_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  1161. #define IDirectDrawSurface_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  1162. #define IDirectDrawSurface_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  1163. #define IDirectDrawSurface_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1164. #define IDirectDrawSurface_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  1165. #define IDirectDrawSurface_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  1166. #define IDirectDrawSurface_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  1167. #define IDirectDrawSurface_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  1168. #define IDirectDrawSurface_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  1169. #define IDirectDrawSurface_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  1170. #define IDirectDrawSurface_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  1171. #define IDirectDrawSurface_Restore(p)                   (p)->lpVtbl->Restore(p)
  1172. #define IDirectDrawSurface_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  1173. #define IDirectDrawSurface_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  1174. #define IDirectDrawSurface_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1175. #define IDirectDrawSurface_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  1176. #define IDirectDrawSurface_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  1177. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1178. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1179. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1180. #else
  1181. #define IDirectDrawSurface_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  1182. #define IDirectDrawSurface_AddRef(p)                    (p)->AddRef()
  1183. #define IDirectDrawSurface_Release(p)                   (p)->Release()
  1184. #define IDirectDrawSurface_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  1185. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  1186. #define IDirectDrawSurface_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  1187. #define IDirectDrawSurface_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  1188. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  1189. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1190. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  1191. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  1192. #define IDirectDrawSurface_Flip(p,a,b)                  (p)->Flip(a,b)
  1193. #define IDirectDrawSurface_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  1194. #define IDirectDrawSurface_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  1195. #define IDirectDrawSurface_GetCaps(p,b)                 (p)->GetCaps(b)
  1196. #define IDirectDrawSurface_GetClipper(p,a)              (p)->GetClipper(a)
  1197. #define IDirectDrawSurface_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  1198. #define IDirectDrawSurface_GetDC(p,a)                   (p)->GetDC(a)
  1199. #define IDirectDrawSurface_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  1200. #define IDirectDrawSurface_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  1201. #define IDirectDrawSurface_GetPalette(p,a)              (p)->GetPalette(a)
  1202. #define IDirectDrawSurface_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  1203. #define IDirectDrawSurface_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  1204. #define IDirectDrawSurface_Initialize(p,a,b)            (p)->Initialize(a,b)
  1205. #define IDirectDrawSurface_IsLost(p)                    (p)->IsLost()
  1206. #define IDirectDrawSurface_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  1207. #define IDirectDrawSurface_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  1208. #define IDirectDrawSurface_Restore(p)                   (p)->Restore()
  1209. #define IDirectDrawSurface_SetClipper(p,a)              (p)->SetClipper(a)
  1210. #define IDirectDrawSurface_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  1211. #define IDirectDrawSurface_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  1212. #define IDirectDrawSurface_SetPalette(p,a)              (p)->SetPalette(a)
  1213. #define IDirectDrawSurface_Unlock(p,b)                  (p)->Unlock(b)
  1214. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  1215. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  1216. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  1217. #endif
  1218.  
  1219. /*
  1220.  * IDirectDrawSurface2 and related interfaces
  1221.  */
  1222. #undef INTERFACE
  1223. #define INTERFACE IDirectDrawSurface2
  1224. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  1225. {
  1226.     /*** IUnknown methods ***/
  1227.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1228.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1229.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1230.     /*** IDirectDrawSurface methods ***/
  1231.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  1232.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1233.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  1234.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1235.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  1236.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  1237.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1238.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1239.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  1240.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  1241.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1242.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1243.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1244.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1245.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1246.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1247.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1248.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1249.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1250.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1251.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1252.     STDMETHOD(IsLost)(THIS) PURE;
  1253.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1254.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1255.     STDMETHOD(Restore)(THIS) PURE;
  1256.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1257.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1258.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1259.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1260.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1261.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1262.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1263.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  1264.     /*** Added in the v2 interface ***/
  1265.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1266.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1267.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1268. };
  1269.  
  1270. #if !defined(__cplusplus) || defined(CINTERFACE)
  1271. #define IDirectDrawSurface2_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  1272. #define IDirectDrawSurface2_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1273. #define IDirectDrawSurface2_Release(p)                   (p)->lpVtbl->Release(p)
  1274. #define IDirectDrawSurface2_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  1275. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1276. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1277. #define IDirectDrawSurface2_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  1278. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1279. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1280. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1281. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1282. #define IDirectDrawSurface2_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  1283. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1284. #define IDirectDrawSurface2_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  1285. #define IDirectDrawSurface2_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  1286. #define IDirectDrawSurface2_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  1287. #define IDirectDrawSurface2_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  1288. #define IDirectDrawSurface2_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  1289. #define IDirectDrawSurface2_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  1290. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1291. #define IDirectDrawSurface2_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  1292. #define IDirectDrawSurface2_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  1293. #define IDirectDrawSurface2_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  1294. #define IDirectDrawSurface2_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  1295. #define IDirectDrawSurface2_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  1296. #define IDirectDrawSurface2_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  1297. #define IDirectDrawSurface2_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  1298. #define IDirectDrawSurface2_Restore(p)                   (p)->lpVtbl->Restore(p)
  1299. #define IDirectDrawSurface2_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  1300. #define IDirectDrawSurface2_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  1301. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1302. #define IDirectDrawSurface2_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  1303. #define IDirectDrawSurface2_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  1304. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1305. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1306. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1307. #define IDirectDrawSurface2_GetDDInterface(p,a)         (p)->lpVtbl->GetDDInterface(p,a)
  1308. #define IDirectDrawSurface2_PageLock(p,a)         (p)->lpVtbl->PageLock(p,a)
  1309. #define IDirectDrawSurface2_PageUnlock(p,a)         (p)->lpVtbl->PageUnlock(p,a)
  1310. #else
  1311. #define IDirectDrawSurface2_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  1312. #define IDirectDrawSurface2_AddRef(p)                    (p)->AddRef()
  1313. #define IDirectDrawSurface2_Release(p)                   (p)->Release()
  1314. #define IDirectDrawSurface2_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  1315. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  1316. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  1317. #define IDirectDrawSurface2_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  1318. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  1319. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1320. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  1321. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  1322. #define IDirectDrawSurface2_Flip(p,a,b)                  (p)->Flip(a,b)
  1323. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  1324. #define IDirectDrawSurface2_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  1325. #define IDirectDrawSurface2_GetCaps(p,b)                 (p)->GetCaps(b)
  1326. #define IDirectDrawSurface2_GetClipper(p,a)              (p)->GetClipper(a)
  1327. #define IDirectDrawSurface2_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  1328. #define IDirectDrawSurface2_GetDC(p,a)                   (p)->GetDC(a)
  1329. #define IDirectDrawSurface2_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  1330. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  1331. #define IDirectDrawSurface2_GetPalette(p,a)              (p)->GetPalette(a)
  1332. #define IDirectDrawSurface2_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  1333. #define IDirectDrawSurface2_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  1334. #define IDirectDrawSurface2_Initialize(p,a,b)            (p)->Initialize(a,b)
  1335. #define IDirectDrawSurface2_IsLost(p)                    (p)->IsLost()
  1336. #define IDirectDrawSurface2_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  1337. #define IDirectDrawSurface2_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  1338. #define IDirectDrawSurface2_Restore(p)                   (p)->Restore()
  1339. #define IDirectDrawSurface2_SetClipper(p,a)              (p)->SetClipper(a)
  1340. #define IDirectDrawSurface2_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  1341. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  1342. #define IDirectDrawSurface2_SetPalette(p,a)              (p)->SetPalette(a)
  1343. #define IDirectDrawSurface2_Unlock(p,b)                  (p)->Unlock(b)
  1344. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  1345. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  1346. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  1347. #define IDirectDrawSurface2_GetDDInterface(p,a)         (p)->GetDDInterface(a)
  1348. #define IDirectDrawSurface2_PageLock(p,a)         (p)->PageLock(a)
  1349. #define IDirectDrawSurface2_PageUnlock(p,a)         (p)->PageUnlock(a)
  1350. #endif
  1351.  
  1352. /*
  1353.  * IDirectDrawSurface3 and related interfaces
  1354.  */
  1355. #undef INTERFACE
  1356. #define INTERFACE IDirectDrawSurface3
  1357. DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
  1358. {
  1359.     /*** IUnknown methods ***/
  1360.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1361.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1362.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1363.     /*** IDirectDrawSurface methods ***/
  1364.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
  1365.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1366.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
  1367.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1368.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
  1369.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
  1370.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1371.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1372.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
  1373.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
  1374.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1375.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1376.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1377.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1378.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1379.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1380.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1381.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1382.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1383.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1384.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1385.     STDMETHOD(IsLost)(THIS) PURE;
  1386.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1387.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1388.     STDMETHOD(Restore)(THIS) PURE;
  1389.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1390.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1391.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1392.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1393.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1394.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1395.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1396.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
  1397.     /*** Added in the v2 interface ***/
  1398.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1399.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1400.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1401.     /*** Added in the V3 interface ***/
  1402.     STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
  1403. };
  1404.  
  1405. #if !defined(__cplusplus) || defined(CINTERFACE)
  1406. #define IDirectDrawSurface3_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  1407. #define IDirectDrawSurface3_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1408. #define IDirectDrawSurface3_Release(p)                   (p)->lpVtbl->Release(p)
  1409. #define IDirectDrawSurface3_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  1410. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1411. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1412. #define IDirectDrawSurface3_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  1413. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1414. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1415. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1416. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1417. #define IDirectDrawSurface3_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  1418. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1419. #define IDirectDrawSurface3_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  1420. #define IDirectDrawSurface3_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  1421. #define IDirectDrawSurface3_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  1422. #define IDirectDrawSurface3_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  1423. #define IDirectDrawSurface3_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  1424. #define IDirectDrawSurface3_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  1425. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1426. #define IDirectDrawSurface3_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  1427. #define IDirectDrawSurface3_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  1428. #define IDirectDrawSurface3_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  1429. #define IDirectDrawSurface3_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  1430. #define IDirectDrawSurface3_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  1431. #define IDirectDrawSurface3_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  1432. #define IDirectDrawSurface3_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  1433. #define IDirectDrawSurface3_Restore(p)                   (p)->lpVtbl->Restore(p)
  1434. #define IDirectDrawSurface3_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  1435. #define IDirectDrawSurface3_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  1436. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1437. #define IDirectDrawSurface3_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  1438. #define IDirectDrawSurface3_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  1439. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1440. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1441. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1442. #define IDirectDrawSurface3_GetDDInterface(p,a)         (p)->lpVtbl->GetDDInterface(p,a)
  1443. #define IDirectDrawSurface3_PageLock(p,a)         (p)->lpVtbl->PageLock(p,a)
  1444. #define IDirectDrawSurface3_PageUnlock(p,a)         (p)->lpVtbl->PageUnlock(p,a)
  1445. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b)     (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  1446. #else
  1447. #define IDirectDrawSurface3_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  1448. #define IDirectDrawSurface3_AddRef(p)                    (p)->AddRef()
  1449. #define IDirectDrawSurface3_Release(p)                   (p)->Release()
  1450. #define IDirectDrawSurface3_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  1451. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  1452. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  1453. #define IDirectDrawSurface3_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  1454. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  1455. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1456. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  1457. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  1458. #define IDirectDrawSurface3_Flip(p,a,b)                  (p)->Flip(a,b)
  1459. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  1460. #define IDirectDrawSurface3_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  1461. #define IDirectDrawSurface3_GetCaps(p,b)                 (p)->GetCaps(b)
  1462. #define IDirectDrawSurface3_GetClipper(p,a)              (p)->GetClipper(a)
  1463. #define IDirectDrawSurface3_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  1464. #define IDirectDrawSurface3_GetDC(p,a)                   (p)->GetDC(a)
  1465. #define IDirectDrawSurface3_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  1466. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  1467. #define IDirectDrawSurface3_GetPalette(p,a)              (p)->GetPalette(a)
  1468. #define IDirectDrawSurface3_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  1469. #define IDirectDrawSurface3_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  1470. #define IDirectDrawSurface3_Initialize(p,a,b)            (p)->Initialize(a,b)
  1471. #define IDirectDrawSurface3_IsLost(p)                    (p)->IsLost()
  1472. #define IDirectDrawSurface3_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  1473. #define IDirectDrawSurface3_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  1474. #define IDirectDrawSurface3_Restore(p)                   (p)->Restore()
  1475. #define IDirectDrawSurface3_SetClipper(p,a)              (p)->SetClipper(a)
  1476. #define IDirectDrawSurface3_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  1477. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  1478. #define IDirectDrawSurface3_SetPalette(p,a)              (p)->SetPalette(a)
  1479. #define IDirectDrawSurface3_Unlock(p,b)                  (p)->Unlock(b)
  1480. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  1481. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  1482. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  1483. #define IDirectDrawSurface3_GetDDInterface(p,a)         (p)->GetDDInterface(a)
  1484. #define IDirectDrawSurface3_PageLock(p,a)         (p)->PageLock(a)
  1485. #define IDirectDrawSurface3_PageUnlock(p,a)         (p)->PageUnlock(a)
  1486. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b)     (p)->SetSurfaceDesc(a,b)
  1487. #endif
  1488.  
  1489. /*
  1490.  * IDirectDrawSurface4 and related interfaces
  1491.  */
  1492. #undef INTERFACE
  1493. #define INTERFACE IDirectDrawSurface4
  1494. DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown )
  1495. {
  1496.     /*** IUnknown methods ***/
  1497.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1498.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1499.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1500.     /*** IDirectDrawSurface methods ***/
  1501.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
  1502.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1503.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE4, LPRECT,DWORD, LPDDBLTFX) PURE;
  1504.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1505.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE4, LPRECT,DWORD) PURE;
  1506.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE4) PURE;
  1507.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
  1508.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
  1509.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4, DWORD) PURE;
  1510.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *) PURE;
  1511.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1512.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
  1513.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1514.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1515.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1516.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1517.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1518.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1519.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1520.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
  1521.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
  1522.     STDMETHOD(IsLost)(THIS) PURE;
  1523.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
  1524.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1525.     STDMETHOD(Restore)(THIS) PURE;
  1526.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1527.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1528.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1529.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1530.     STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
  1531.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE4,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1532.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1533.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE4) PURE;
  1534.     /*** Added in the v2 interface ***/
  1535.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1536.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1537.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1538.     /*** Added in the v3 interface ***/
  1539.     STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
  1540.     /*** Added in the v4 interface ***/
  1541.     STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
  1542.     STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
  1543.     STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
  1544.     STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
  1545.     STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  1546. };
  1547.  
  1548. #if !defined(__cplusplus) || defined(CINTERFACE)
  1549. #define IDirectDrawSurface4_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  1550. #define IDirectDrawSurface4_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1551. #define IDirectDrawSurface4_Release(p)                   (p)->lpVtbl->Release(p)
  1552. #define IDirectDrawSurface4_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  1553. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1554. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1555. #define IDirectDrawSurface4_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  1556. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1557. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1558. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1559. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1560. #define IDirectDrawSurface4_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  1561. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1562. #define IDirectDrawSurface4_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  1563. #define IDirectDrawSurface4_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  1564. #define IDirectDrawSurface4_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  1565. #define IDirectDrawSurface4_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  1566. #define IDirectDrawSurface4_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  1567. #define IDirectDrawSurface4_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  1568. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1569. #define IDirectDrawSurface4_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  1570. #define IDirectDrawSurface4_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  1571. #define IDirectDrawSurface4_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  1572. #define IDirectDrawSurface4_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  1573. #define IDirectDrawSurface4_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  1574. #define IDirectDrawSurface4_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  1575. #define IDirectDrawSurface4_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  1576. #define IDirectDrawSurface4_Restore(p)                   (p)->lpVtbl->Restore(p)
  1577. #define IDirectDrawSurface4_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  1578. #define IDirectDrawSurface4_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  1579. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1580. #define IDirectDrawSurface4_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  1581. #define IDirectDrawSurface4_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  1582. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1583. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1584. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1585. #define IDirectDrawSurface4_GetDDInterface(p,a)         (p)->lpVtbl->GetDDInterface(p,a)
  1586. #define IDirectDrawSurface4_PageLock(p,a)         (p)->lpVtbl->PageLock(p,a)
  1587. #define IDirectDrawSurface4_PageUnlock(p,a)         (p)->lpVtbl->PageUnlock(p,a)
  1588. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b)     (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  1589. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d)     (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  1590. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c)     (p)->lpVtbl->GetPrivateData(p,a,b,c)
  1591. #define IDirectDrawSurface4_FreePrivateData(p,a)     (p)->lpVtbl->FreePrivateData(p,a)
  1592. #define IDirectDrawSurface4_GetUniquenessValue(p, a)     (p)->lpVtbl->GetUniquenessValue(p, a)
  1593. #define IDirectDrawSurface4_ChangeUniquenessValue(p)     (p)->lpVtbl->ChangeUniquenessValue(p)
  1594. #else
  1595. #define IDirectDrawSurface4_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  1596. #define IDirectDrawSurface4_AddRef(p)                    (p)->AddRef()
  1597. #define IDirectDrawSurface4_Release(p)                   (p)->Release()
  1598. #define IDirectDrawSurface4_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  1599. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  1600. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  1601. #define IDirectDrawSurface4_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  1602. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  1603. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1604. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  1605. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  1606. #define IDirectDrawSurface4_Flip(p,a,b)                  (p)->Flip(a,b)
  1607. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  1608. #define IDirectDrawSurface4_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  1609. #define IDirectDrawSurface4_GetCaps(p,b)                 (p)->GetCaps(b)
  1610. #define IDirectDrawSurface4_GetClipper(p,a)              (p)->GetClipper(a)
  1611. #define IDirectDrawSurface4_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  1612. #define IDirectDrawSurface4_GetDC(p,a)                   (p)->GetDC(a)
  1613. #define IDirectDrawSurface4_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  1614. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  1615. #define IDirectDrawSurface4_GetPalette(p,a)              (p)->GetPalette(a)
  1616. #define IDirectDrawSurface4_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  1617. #define IDirectDrawSurface4_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  1618. #define IDirectDrawSurface4_Initialize(p,a,b)            (p)->Initialize(a,b)
  1619. #define IDirectDrawSurface4_IsLost(p)                    (p)->IsLost()
  1620. #define IDirectDrawSurface4_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  1621. #define IDirectDrawSurface4_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  1622. #define IDirectDrawSurface4_Restore(p)                   (p)->Restore()
  1623. #define IDirectDrawSurface4_SetClipper(p,a)              (p)->SetClipper(a)
  1624. #define IDirectDrawSurface4_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  1625. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  1626. #define IDirectDrawSurface4_SetPalette(p,a)              (p)->SetPalette(a)
  1627. #define IDirectDrawSurface4_Unlock(p,b)                  (p)->Unlock(b)
  1628. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  1629. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  1630. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  1631. #define IDirectDrawSurface4_GetDDInterface(p,a)         (p)->GetDDInterface(a)
  1632. #define IDirectDrawSurface4_PageLock(p,a)         (p)->PageLock(a)
  1633. #define IDirectDrawSurface4_PageUnlock(p,a)         (p)->PageUnlock(a)
  1634. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b)     (p)->SetSurfaceDesc(a,b)
  1635. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d)     (p)->SetPrivateData(a,b,c,d)
  1636. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c)     (p)->GetPrivateData(a,b,c)
  1637. #define IDirectDrawSurface4_FreePrivateData(p,a)     (p)->FreePrivateData(a)
  1638. #define IDirectDrawSurface4_GetUniquenessValue(p, a)     (p)->GetUniquenessValue(a)
  1639. #define IDirectDrawSurface4_ChangeUniquenessValue(p)     (p)->ChangeUniquenessValue()
  1640. #endif
  1641.  
  1642.  
  1643.  
  1644. /*
  1645.  * IDirectDrawColorControl
  1646.  */
  1647. #if defined( _WIN32 ) && !defined( _NO_COM )
  1648. #undef INTERFACE
  1649. #define INTERFACE IDirectDrawColorControl
  1650. DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
  1651. {
  1652.     /*** IUnknown methods ***/
  1653.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1654.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1655.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1656.     /*** IDirectDrawColorControl methods ***/
  1657.     STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  1658.     STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  1659. };
  1660.  
  1661. #if !defined(__cplusplus) || defined(CINTERFACE)
  1662. #define IDirectDrawColorControl_QueryInterface(p, a, b)  (p)->lpVtbl->QueryInterface(p, a, b)
  1663. #define IDirectDrawColorControl_AddRef(p)                (p)->lpVtbl->AddRef(p)
  1664. #define IDirectDrawColorControl_Release(p)               (p)->lpVtbl->Release(p)
  1665. #define IDirectDrawColorControl_GetColorControls(p, a)   (p)->lpVtbl->GetColorControls(p, a)
  1666. #define IDirectDrawColorControl_SetColorControls(p, a)   (p)->lpVtbl->SetColorControls(p, a)
  1667. #else
  1668. #define IDirectDrawColorControl_QueryInterface(p, a, b)  (p)->QueryInterface(a, b)
  1669. #define IDirectDrawColorControl_AddRef(p)                (p)->AddRef()
  1670. #define IDirectDrawColorControl_Release(p)               (p)->Release()
  1671. #define IDirectDrawColorControl_GetColorControls(p, a)   (p)->GetColorControls(a)
  1672. #define IDirectDrawColorControl_SetColorControls(p, a)   (p)->SetColorControls(a)
  1673. #endif
  1674.  
  1675. #endif
  1676.  
  1677.  
  1678. /*
  1679.  * IDirectDrawGammaControl
  1680.  */
  1681. #if defined( _WIN32 ) && !defined( _NO_COM )
  1682. #undef INTERFACE
  1683. #define INTERFACE IDirectDrawGammaControl
  1684. DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown )
  1685. {
  1686.     /*** IUnknown methods ***/
  1687.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1688.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1689.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1690.     /*** IDirectDrawColorControl methods ***/
  1691.     STDMETHOD(GetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
  1692.     STDMETHOD(SetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
  1693. };
  1694.  
  1695. #if !defined(__cplusplus) || defined(CINTERFACE)
  1696. #define IDirectDrawGammaControl_QueryInterface(p, a, b)  (p)->lpVtbl->QueryInterface(p, a, b)
  1697. #define IDirectDrawGammaControl_AddRef(p)                (p)->lpVtbl->AddRef(p)
  1698. #define IDirectDrawGammaControl_Release(p)               (p)->lpVtbl->Release(p)
  1699. #define IDirectDrawGammaControl_GetGammaRamp(p, a, b)    (p)->lpVtbl->GetGammaRamp(p, a, b)
  1700. #define IDirectDrawGammaControl_SetGammaRamp(p, a, b)    (p)->lpVtbl->SetGammaRamp(p, a, b)
  1701. #else
  1702. #define IDirectDrawGammaControl_QueryInterface(p, a, b)  (p)->QueryInterface(a, b)
  1703. #define IDirectDrawGammaControl_AddRef(p)                (p)->AddRef()
  1704. #define IDirectDrawGammaControl_Release(p)               (p)->Release()
  1705. #define IDirectDrawGammaControl_GetGammaRamp(p, a, b)    (p)->GetGammaRamp(a, b)
  1706. #define IDirectDrawGammaControl_SetGammaRamp(p, a, b)    (p)->SetGammaRamp(a, b)
  1707. #endif
  1708.  
  1709. #endif
  1710.  
  1711.  
  1712.  
  1713. #endif
  1714.  
  1715.  
  1716. /*
  1717.  * DDSURFACEDESC
  1718.  */
  1719. typedef struct _DDSURFACEDESC
  1720. {
  1721.     DWORD        dwSize;            // size of the DDSURFACEDESC structure
  1722.     DWORD        dwFlags;        // determines what fields are valid
  1723.     DWORD        dwHeight;        // height of surface to be created
  1724.     DWORD        dwWidth;        // width of input surface
  1725.     union
  1726.     {
  1727.         LONG        lPitch;            // distance to start of next line (return value only)
  1728.         DWORD           dwLinearSize;           // Formless late-allocated optimized surface size
  1729.     } DUMMYUNIONNAMEN(1);
  1730.     DWORD        dwBackBufferCount;    // number of back buffers requested
  1731.     union
  1732.     {
  1733.         DWORD           dwMipMapCount;          // number of mip-map levels requested
  1734.     DWORD        dwZBufferBitDepth;    // depth of Z buffer requested
  1735.     DWORD        dwRefreshRate;        // refresh rate (used when display mode is described)
  1736.     } DUMMYUNIONNAMEN(2);
  1737.     DWORD        dwAlphaBitDepth;    // depth of alpha buffer requested
  1738.     DWORD        dwReserved;        // reserved
  1739.     LPVOID        lpSurface;        // pointer to the associated surface memory
  1740.     DDCOLORKEY        ddckCKDestOverlay;    // color key for destination overlay use
  1741.     DDCOLORKEY        ddckCKDestBlt;        // color key for destination blt use
  1742.     DDCOLORKEY        ddckCKSrcOverlay;    // color key for source overlay use
  1743.     DDCOLORKEY        ddckCKSrcBlt;        // color key for source blt use
  1744.     DDPIXELFORMAT    ddpfPixelFormat;    // pixel format description of the surface
  1745.     DDSCAPS        ddsCaps;        // direct draw surface capabilities
  1746. } DDSURFACEDESC;
  1747.  
  1748. /*
  1749.  * DDSURFACEDESC2
  1750.  */
  1751. typedef struct _DDSURFACEDESC2
  1752. {
  1753.     DWORD        dwSize;            // size of the DDSURFACEDESC structure
  1754.     DWORD        dwFlags;        // determines what fields are valid
  1755.     DWORD        dwHeight;        // height of surface to be created
  1756.     DWORD        dwWidth;        // width of input surface
  1757.     union
  1758.     {
  1759.         LONG        lPitch;            // distance to start of next line (return value only)
  1760.         DWORD           dwLinearSize;           // Formless late-allocated optimized surface size
  1761.     } DUMMYUNIONNAMEN(1);
  1762.     DWORD        dwBackBufferCount;    // number of back buffers requested
  1763.     union
  1764.     {
  1765.         DWORD           dwMipMapCount;          // number of mip-map levels requestde
  1766.                                                 // dwZBufferBitDepth removed, use ddpfPixelFormat one instead
  1767.     DWORD        dwRefreshRate;        // refresh rate (used when display mode is described)
  1768.     } DUMMYUNIONNAMEN(2);
  1769.     DWORD        dwAlphaBitDepth;    // depth of alpha buffer requested
  1770.     DWORD        dwReserved;        // reserved
  1771.     LPVOID        lpSurface;        // pointer to the associated surface memory
  1772.     DDCOLORKEY        ddckCKDestOverlay;    // color key for destination overlay use
  1773.     DDCOLORKEY        ddckCKDestBlt;        // color key for destination blt use
  1774.     DDCOLORKEY        ddckCKSrcOverlay;    // color key for source overlay use
  1775.     DDCOLORKEY        ddckCKSrcBlt;        // color key for source blt use
  1776.     DDPIXELFORMAT    ddpfPixelFormat;    // pixel format description of the surface
  1777.     DDSCAPS2        ddsCaps;        // direct draw surface capabilities
  1778.     DWORD               dwTextureStage;         // stage in multitexture cascade
  1779. } DDSURFACEDESC2;
  1780.  
  1781. /*
  1782.  * ddsCaps field is valid.
  1783.  */
  1784. #define DDSD_CAPS        0x00000001l    // default
  1785.  
  1786. /*
  1787.  * dwHeight field is valid.
  1788.  */
  1789. #define DDSD_HEIGHT        0x00000002l
  1790.  
  1791. /*
  1792.  * dwWidth field is valid.
  1793.  */
  1794. #define DDSD_WIDTH        0x00000004l
  1795.  
  1796. /*
  1797.  * lPitch is valid.
  1798.  */
  1799. #define DDSD_PITCH        0x00000008l
  1800.  
  1801. /*
  1802.  * dwBackBufferCount is valid.
  1803.  */
  1804. #define DDSD_BACKBUFFERCOUNT    0x00000020l
  1805.  
  1806. /*
  1807.  * dwZBufferBitDepth is valid.  (shouldnt be used in DDSURFACEDESC2)
  1808.  */
  1809. #define DDSD_ZBUFFERBITDEPTH    0x00000040l
  1810.  
  1811. /*
  1812.  * dwAlphaBitDepth is valid.
  1813.  */
  1814. #define DDSD_ALPHABITDEPTH    0x00000080l
  1815.  
  1816.  
  1817. /*
  1818.  * lpSurface is valid.
  1819.  */
  1820. #define DDSD_LPSURFACE        0x00000800l
  1821.  
  1822. /*
  1823.  * ddpfPixelFormat is valid.
  1824.  */
  1825. #define DDSD_PIXELFORMAT    0x00001000l
  1826.  
  1827. /*
  1828.  * ddckCKDestOverlay is valid.
  1829.  */
  1830. #define DDSD_CKDESTOVERLAY    0x00002000l
  1831.  
  1832. /*
  1833.  * ddckCKDestBlt is valid.
  1834.  */
  1835. #define DDSD_CKDESTBLT        0x00004000l
  1836.  
  1837. /*
  1838.  * ddckCKSrcOverlay is valid.
  1839.  */
  1840. #define DDSD_CKSRCOVERLAY    0x00008000l
  1841.  
  1842. /*
  1843.  * ddckCKSrcBlt is valid.
  1844.  */
  1845. #define DDSD_CKSRCBLT        0x00010000l
  1846.  
  1847. /*
  1848.  * dwMipMapCount is valid.
  1849.  */
  1850. #define DDSD_MIPMAPCOUNT        0x00020000l
  1851.  
  1852.  /*
  1853.   * dwRefreshRate is valid
  1854.   */
  1855. #define DDSD_REFRESHRATE    0x00040000l
  1856.  
  1857. /*
  1858.  * dwLinearSize is valid
  1859.  */
  1860. #define DDSD_LINEARSIZE        0x00080000l
  1861.  
  1862. /*
  1863.  * dwTextureStage is valid
  1864.  */
  1865. #define DDSD_TEXTURESTAGE       0x00100000l
  1866. /*
  1867.  * All input fields are valid.
  1868.  */
  1869. #define DDSD_ALL        0x001ff9eel
  1870.  
  1871.  
  1872. /*
  1873.  * DDOPTSURFACEDESC
  1874.  */
  1875. typedef struct _DDOPTSURFACEDESC
  1876. {
  1877.     DWORD       dwSize;             // size of the DDOPTSURFACEDESC structure
  1878.     DWORD       dwFlags;            // determines what fields are valid
  1879.     DDSCAPS2    ddSCaps;            // Common caps like: Memory type
  1880.     DDOSCAPS    ddOSCaps;           // Common caps like: Memory type
  1881.     GUID        guid;               // Compression technique GUID
  1882.     DWORD       dwCompressionRatio; // Compression ratio
  1883. } DDOPTSURFACEDESC;
  1884.  
  1885. /*
  1886.  * guid field is valid.
  1887.  */
  1888. #define DDOSD_GUID                  0x00000001l
  1889.  
  1890. /*
  1891.  * dwCompressionRatio field is valid.
  1892.  */
  1893. #define DDOSD_COMPRESSION_RATIO     0x00000002l
  1894.  
  1895. /*
  1896.  * ddSCaps field is valid.
  1897.  */
  1898. #define DDOSD_SCAPS                 0x00000004l
  1899.  
  1900. /*
  1901.  * ddOSCaps field is valid.
  1902.  */
  1903. #define DDOSD_OSCAPS                0x00000008l
  1904.  
  1905. /*
  1906.  * All input fields are valid.
  1907.  */
  1908. #define DDOSD_ALL                   0x0000000fl
  1909.  
  1910. /*
  1911.  * The surface's optimized pixelformat is compressed
  1912.  */
  1913. #define DDOSDCAPS_OPTCOMPRESSED            0x00000001l
  1914.  
  1915. /*
  1916.  * The surface's optimized pixelformat is reordered
  1917.  */
  1918. #define DDOSDCAPS_OPTREORDERED            0x00000002l
  1919.  
  1920. /*
  1921.  * The opt surface is a monolithic mipmap
  1922.  */
  1923. #define DDOSDCAPS_MONOLITHICMIPMAP        0x00000004l
  1924.  
  1925. /*
  1926.  * The valid Surf caps:
  1927.  * #define DDSCAPS_SYSTEMMEMORY            0x00000800l
  1928.  * #define DDSCAPS_VIDEOMEMORY            0x00004000l
  1929.  * #define DDSCAPS_LOCALVIDMEM          0x10000000l
  1930.  * #define DDSCAPS_NONLOCALVIDMEM       0x20000000l
  1931.  */
  1932. #define DDOSDCAPS_VALIDSCAPS             0x30004800l
  1933.  
  1934. /*
  1935.  * The valid OptSurf caps
  1936.  */
  1937. #define DDOSDCAPS_VALIDOSCAPS             0x00000007l
  1938.  
  1939.  
  1940. /*
  1941.  * DDCOLORCONTROL
  1942.  */
  1943. typedef struct _DDCOLORCONTROL
  1944. {
  1945.     DWORD         dwSize;
  1946.     DWORD        dwFlags;
  1947.     LONG        lBrightness;
  1948.     LONG        lContrast;
  1949.     LONG        lHue;
  1950.     LONG         lSaturation;
  1951.     LONG        lSharpness;
  1952.     LONG        lGamma;
  1953.     LONG        lColorEnable;
  1954.     DWORD        dwReserved1;
  1955. } DDCOLORCONTROL;
  1956.  
  1957.  
  1958. /*
  1959.  * lBrightness field is valid.
  1960.  */
  1961. #define DDCOLOR_BRIGHTNESS        0x00000001l
  1962.  
  1963. /*
  1964.  * lContrast field is valid.
  1965.  */
  1966. #define DDCOLOR_CONTRAST        0x00000002l
  1967.  
  1968. /*
  1969.  * lHue field is valid.
  1970.  */
  1971. #define DDCOLOR_HUE            0x00000004l
  1972.  
  1973. /*
  1974.  * lSaturation field is valid.
  1975.  */
  1976. #define DDCOLOR_SATURATION        0x00000008l
  1977.  
  1978. /*
  1979.  * lSharpness field is valid.
  1980.  */
  1981. #define DDCOLOR_SHARPNESS        0x00000010l
  1982.  
  1983. /*
  1984.  * lGamma field is valid.
  1985.  */
  1986. #define DDCOLOR_GAMMA            0x00000020l
  1987.  
  1988. /*
  1989.  * lColorEnable field is valid.
  1990.  */
  1991. #define DDCOLOR_COLORENABLE        0x00000040l
  1992.  
  1993.  
  1994.  
  1995. /*============================================================================
  1996.  *
  1997.  * Direct Draw Capability Flags
  1998.  *
  1999.  * These flags are used to describe the capabilities of a given Surface.
  2000.  * All flags are bit flags.
  2001.  *
  2002.  *==========================================================================*/
  2003.  
  2004. /****************************************************************************
  2005.  *
  2006.  * DIRECTDRAWSURFACE CAPABILITY FLAGS
  2007.  *
  2008.  ****************************************************************************/
  2009.  
  2010. /*
  2011.  * This bit is reserved. It should not be specified.
  2012.  */
  2013. #define DDSCAPS_RESERVED1            0x00000001l
  2014.  
  2015. /*
  2016.  * Indicates that this surface contains alpha-only information.
  2017.  * (To determine if a surface is RGBA/YUVA, the pixel format must be
  2018.  * interrogated.)
  2019.  */
  2020. #define DDSCAPS_ALPHA                0x00000002l
  2021.  
  2022. /*
  2023.  * Indicates that this surface is a backbuffer.     It is generally
  2024.  * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  2025.  * It indicates that this surface is THE back buffer of a surface
  2026.  * flipping structure.    DirectDraw supports N surfaces in a
  2027.  * surface flipping structure.    Only the surface that immediately
  2028.  * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  2029.  * The other surfaces are identified as back buffers by the presence
  2030.  * of the DDSCAPS_FLIP capability, their attachment order, and the
  2031.  * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  2032.  * capabilities.  The bit is sent to CreateSurface when a standalone
  2033.  * back buffer is being created.  This surface could be attached to
  2034.  * a front buffer and/or back buffers to form a flipping surface
  2035.  * structure after the CreateSurface call.  See AddAttachments for
  2036.  * a detailed description of the behaviors in this case.
  2037.  */
  2038. #define DDSCAPS_BACKBUFFER            0x00000004l
  2039.  
  2040. /*
  2041.  * Indicates a complex surface structure is being described.  A
  2042.  * complex surface structure results in the creation of more than
  2043.  * one surface.     The additional surfaces are attached to the root
  2044.  * surface.  The complex structure can only be destroyed by
  2045.  * destroying the root.
  2046.  */
  2047. #define DDSCAPS_COMPLEX                0x00000008l
  2048.  
  2049. /*
  2050.  * Indicates that this surface is a part of a surface flipping structure.
  2051.  * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  2052.  * DDSCAP_BACKBUFFER bits are not set.    They are set by CreateSurface
  2053.  * on the resulting creations.    The dwBackBufferCount field in the
  2054.  * DDSURFACEDESC structure must be set to at least 1 in order for
  2055.  * the CreateSurface call to succeed.  The DDSCAPS_COMPLEX capability
  2056.  * must always be set with creating multiple surfaces through CreateSurface.
  2057.  */
  2058. #define DDSCAPS_FLIP                0x00000010l
  2059.  
  2060. /*
  2061.  * Indicates that this surface is THE front buffer of a surface flipping
  2062.  * structure.  It is generally set by CreateSurface when the DDSCAPS_FLIP
  2063.  * capability bit is set.
  2064.  * If this capability is sent to CreateSurface then a standalonw front buffer
  2065.  * is created.    This surface will not have the DDSCAPS_FLIP capability.
  2066.  * It can be attached to other back buffers to form a flipping structure.
  2067.  * See AddAttachments for a detailed description of the behaviors in this
  2068.  * case.
  2069.  */
  2070. #define DDSCAPS_FRONTBUFFER            0x00000020l
  2071.  
  2072. /*
  2073.  * Indicates that this surface is any offscreen surface that is not an overlay,
  2074.  * texture, zbuffer, front buffer, back buffer, or alpha surface.  It is used
  2075.  * to identify plain vanilla surfaces.
  2076.  */
  2077. #define DDSCAPS_OFFSCREENPLAIN            0x00000040l
  2078.  
  2079. /*
  2080.  * Indicates that this surface is an overlay.  It may or may not be directly visible
  2081.  * depending on whether or not it is currently being overlayed onto the primary
  2082.  * surface.  DDSCAPS_VISIBLE can be used to determine whether or not it is being
  2083.  * overlayed at the moment.
  2084.  */
  2085. #define DDSCAPS_OVERLAY                0x00000080l
  2086.  
  2087. /*
  2088.  * Indicates that unique DirectDrawPalette objects can be created and
  2089.  * attached to this surface.
  2090.  */
  2091. #define DDSCAPS_PALETTE                0x00000100l
  2092.  
  2093. /*
  2094.  * Indicates that this surface is the primary surface.    The primary
  2095.  * surface represents what the user is seeing at the moment.
  2096.  */
  2097. #define DDSCAPS_PRIMARYSURFACE            0x00000200l
  2098.  
  2099. /*
  2100.  * Indicates that this surface is the primary surface for the left eye.
  2101.  * The primary surface for the left eye represents what the user is seeing
  2102.  * at the moment with the users left eye.  When this surface is created the
  2103.  * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
  2104.  * right eye.
  2105.  */
  2106. #define DDSCAPS_PRIMARYSURFACELEFT        0x00000400l
  2107.  
  2108. /*
  2109.  * Indicates that this surface memory was allocated in system memory
  2110.  */
  2111. #define DDSCAPS_SYSTEMMEMORY            0x00000800l
  2112.  
  2113. /*
  2114.  * Indicates that this surface can be used as a 3D texture.  It does not
  2115.  * indicate whether or not the surface is being used for that purpose.
  2116.  */
  2117. #define DDSCAPS_TEXTURE                    0x00001000l
  2118.  
  2119. /*
  2120.  * Indicates that a surface may be a destination for 3D rendering.  This
  2121.  * bit must be set in order to query for a Direct3D Device Interface
  2122.  * from this surface.
  2123.  */
  2124. #define DDSCAPS_3DDEVICE                        0x00002000l
  2125.  
  2126. /*
  2127.  * Indicates that this surface exists in video memory.
  2128.  */
  2129. #define DDSCAPS_VIDEOMEMORY            0x00004000l
  2130.  
  2131. /*
  2132.  * Indicates that changes made to this surface are immediately visible.
  2133.  * It is always set for the primary surface and is set for overlays while
  2134.  * they are being overlayed and texture maps while they are being textured.
  2135.  */
  2136. #define DDSCAPS_VISIBLE                0x00008000l
  2137.  
  2138. /*
  2139.  * Indicates that only writes are permitted to the surface.  Read accesses
  2140.  * from the surface may or may not generate a protection fault, but the
  2141.  * results of a read from this surface will not be meaningful.    READ ONLY.
  2142.  */
  2143. #define DDSCAPS_WRITEONLY            0x00010000l
  2144.  
  2145. /*
  2146.  * Indicates that this surface is a z buffer. A z buffer does not contain
  2147.  * displayable information.  Instead it contains bit depth information that is
  2148.  * used to determine which pixels are visible and which are obscured.
  2149.  */
  2150. #define DDSCAPS_ZBUFFER                0x00020000l
  2151.  
  2152. /*
  2153.  * Indicates surface will have a DC associated long term
  2154.  */
  2155. #define DDSCAPS_OWNDC                0x00040000l
  2156.  
  2157. /*
  2158.  * Indicates surface should be able to receive live video
  2159.  */
  2160. #define DDSCAPS_LIVEVIDEO            0x00080000l
  2161.  
  2162. /*
  2163.  * Indicates surface should be able to have a stream decompressed
  2164.  * to it by the hardware.
  2165.  */
  2166. #define DDSCAPS_HWCODEC                0x00100000l
  2167.  
  2168. /*
  2169.  * Surface is a ModeX surface.
  2170.  *
  2171.  */
  2172. #define DDSCAPS_MODEX                0x00200000l
  2173.  
  2174. /*
  2175.  * Indicates surface is one level of a mip-map. This surface will
  2176.  * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  2177.  * This can be done explicitly, by creating a number of surfaces and
  2178.  * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  2179.  * If this bit is set then DDSCAPS_TEXTURE must also be set.
  2180.  */
  2181. #define DDSCAPS_MIPMAP                          0x00400000l
  2182.  
  2183. /*
  2184.  * This bit is reserved. It should not be specified.
  2185.  */
  2186. #define DDSCAPS_RESERVED2                       0x00800000l
  2187.  
  2188.  
  2189. /*
  2190.  * Indicates that memory for the surface is not allocated until the surface
  2191.  * is loaded (via the Direct3D texture Load() function).
  2192.  */
  2193. #define DDSCAPS_ALLOCONLOAD                     0x04000000l
  2194.  
  2195. /*
  2196.  * Indicates that the surface will recieve data from a video port.
  2197.  */
  2198. #define DDSCAPS_VIDEOPORT            0x08000000l
  2199.  
  2200. /*
  2201.  * Indicates that a video memory surface is resident in true, local video
  2202.  * memory rather than non-local video memory. If this flag is specified then
  2203.  * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  2204.  * DDSCAPS_NONLOCALVIDMEM.
  2205.  */
  2206. #define DDSCAPS_LOCALVIDMEM                     0x10000000l
  2207.  
  2208. /*
  2209.  * Indicates that a video memory surface is resident in non-local video
  2210.  * memory rather than true, local video memory. If this flag is specified
  2211.  * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  2212.  * DDSCAPS_LOCALVIDMEM.
  2213.  */
  2214. #define DDSCAPS_NONLOCALVIDMEM                  0x20000000l
  2215.  
  2216. /*
  2217.  * Indicates that this surface is a standard VGA mode surface, and not a
  2218.  * ModeX surface. (This flag will never be set in combination with the
  2219.  * DDSCAPS_MODEX flag).
  2220.  */
  2221. #define DDSCAPS_STANDARDVGAMODE                 0x40000000l
  2222.  
  2223. /*
  2224.  * Indicates that this surface will be an optimized surface. This flag is
  2225.  * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
  2226.  * will be created without any underlying video memory until loaded.
  2227.  */
  2228. #define DDSCAPS_OPTIMIZED                       0x80000000l
  2229.  
  2230.  
  2231.  
  2232.  
  2233. /*
  2234.  * Indicates that this surface will receive data from a video port using
  2235.  * the de-interlacing hardware.  This allows the driver to allocate memory
  2236.  * for any extra buffers that may be required.  The DDSCAPS_VIDEOPORT and
  2237.  * DDSCAPS_OVERLAY flags must also be set.
  2238.  */
  2239. #define DDSCAPS2_HARDWAREDEINTERLACE            0x00000002L
  2240.  
  2241. /*
  2242.  * Indicates to the driver that this surface will be locked very frequently
  2243.  * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
  2244.  * set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  2245.  * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
  2246.  */
  2247. #define DDSCAPS2_HINTDYNAMIC             0x00000004L
  2248.  
  2249. /*
  2250.  * Indicates to the driver that this surface can be re-ordered/retiled on
  2251.  * load. This operation will not change the size of the texture. It is
  2252.  * relatively fast and symmetrical, since the application may lock these
  2253.  * bits (although it will take a performance hit when doing so). Surfaces
  2254.  * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
  2255.  * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
  2256.  */
  2257. #define DDSCAPS2_HINTSTATIC             0x00000008L
  2258.  
  2259. /*
  2260.  * Indicates that the client would like this texture surface to be managed by the
  2261.  * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
  2262.  * DDSCAPS_TEXTURE set.
  2263.  */
  2264. #define DDSCAPS2_TEXTUREMANAGE                  0x00000010L
  2265.  
  2266. /*
  2267.  * These bits are reserved for internal use */
  2268. #define DDSCAPS2_RESERVED1                      0x00000020L
  2269. #define DDSCAPS2_RESERVED2                      0x00000040L
  2270.  
  2271. /*
  2272.  * Indicates to the driver that this surface will never be locked again.
  2273.  * The driver is free to optimize this surface via retiling and actual compression.
  2274.  * All calls to Lock() or Blts from this surface will fail. Surfaces with this
  2275.  * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  2276.  * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
  2277.  */
  2278. #define DDSCAPS2_OPAQUE                         0x00000080L
  2279.  
  2280. /*
  2281.  * Applications should set this bit at CreateSurface time to indicate that they
  2282.  * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
  2283.  */
  2284. #define DDSCAPS2_HINTANTIALIASING               0x00000100L
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  /****************************************************************************
  2290.  *
  2291.  * DIRECTDRAW DRIVER CAPABILITY FLAGS
  2292.  *
  2293.  ****************************************************************************/
  2294.  
  2295. /*
  2296.  * Display hardware has 3D acceleration.
  2297.  */
  2298. #define DDCAPS_3D            0x00000001l
  2299.  
  2300. /*
  2301.  * Indicates that DirectDraw will support only dest rectangles that are aligned
  2302.  * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  2303.  * READ ONLY.
  2304.  */
  2305. #define DDCAPS_ALIGNBOUNDARYDEST    0x00000002l
  2306.  
  2307. /*
  2308.  * Indicates that DirectDraw will support only source rectangles  whose sizes in
  2309.  * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively.  READ ONLY.
  2310.  */
  2311. #define DDCAPS_ALIGNSIZEDEST        0x00000004l
  2312. /*
  2313.  * Indicates that DirectDraw will support only source rectangles that are aligned
  2314.  * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  2315.  * READ ONLY.
  2316.  */
  2317. #define DDCAPS_ALIGNBOUNDARYSRC        0x00000008l
  2318.  
  2319. /*
  2320.  * Indicates that DirectDraw will support only source rectangles  whose sizes in
  2321.  * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively.  READ ONLY.
  2322.  */
  2323. #define DDCAPS_ALIGNSIZESRC        0x00000010l
  2324.  
  2325. /*
  2326.  * Indicates that DirectDraw will create video memory surfaces that have a stride
  2327.  * alignment equal to DIRECTDRAWCAPS.dwAlignStride.  READ ONLY.
  2328.  */
  2329. #define DDCAPS_ALIGNSTRIDE        0x00000020l
  2330.  
  2331. /*
  2332.  * Display hardware is capable of blt operations.
  2333.  */
  2334. #define DDCAPS_BLT            0x00000040l
  2335.  
  2336. /*
  2337.  * Display hardware is capable of asynchronous blt operations.
  2338.  */
  2339. #define DDCAPS_BLTQUEUE            0x00000080l
  2340.  
  2341. /*
  2342.  * Display hardware is capable of color space conversions during the blt operation.
  2343.  */
  2344. #define DDCAPS_BLTFOURCC        0x00000100l
  2345.  
  2346. /*
  2347.  * Display hardware is capable of stretching during blt operations.
  2348.  */
  2349. #define DDCAPS_BLTSTRETCH        0x00000200l
  2350.  
  2351. /*
  2352.  * Display hardware is shared with GDI.
  2353.  */
  2354. #define DDCAPS_GDI            0x00000400l
  2355.  
  2356. /*
  2357.  * Display hardware can overlay.
  2358.  */
  2359. #define DDCAPS_OVERLAY            0x00000800l
  2360.  
  2361. /*
  2362.  * Set if display hardware supports overlays but can not clip them.
  2363.  */
  2364. #define DDCAPS_OVERLAYCANTCLIP        0x00001000l
  2365.  
  2366. /*
  2367.  * Indicates that overlay hardware is capable of color space conversions during
  2368.  * the overlay operation.
  2369.  */
  2370. #define DDCAPS_OVERLAYFOURCC        0x00002000l
  2371.  
  2372. /*
  2373.  * Indicates that stretching can be done by the overlay hardware.
  2374.  */
  2375. #define DDCAPS_OVERLAYSTRETCH        0x00004000l
  2376.  
  2377. /*
  2378.  * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  2379.  * other than the primary surface.
  2380.  */
  2381. #define DDCAPS_PALETTE            0x00008000l
  2382.  
  2383. /*
  2384.  * Indicates that palette changes can be syncd with the veritcal refresh.
  2385.  */
  2386. #define DDCAPS_PALETTEVSYNC        0x00010000l
  2387.  
  2388. /*
  2389.  * Display hardware can return the current scan line.
  2390.  */
  2391. #define DDCAPS_READSCANLINE        0x00020000l
  2392.  
  2393. /*
  2394.  * Display hardware has stereo vision capabilities.  DDSCAPS_PRIMARYSURFACELEFT
  2395.  * can be created.
  2396.  */
  2397. #define DDCAPS_STEREOVIEW        0x00040000l
  2398.  
  2399. /*
  2400.  * Display hardware is capable of generating a vertical blank interrupt.
  2401.  */
  2402. #define DDCAPS_VBI            0x00080000l
  2403.  
  2404. /*
  2405.  * Supports the use of z buffers with blt operations.
  2406.  */
  2407. #define DDCAPS_ZBLTS            0x00100000l
  2408.  
  2409. /*
  2410.  * Supports Z Ordering of overlays.
  2411.  */
  2412. #define DDCAPS_ZOVERLAYS        0x00200000l
  2413.  
  2414. /*
  2415.  * Supports color key
  2416.  */
  2417. #define DDCAPS_COLORKEY            0x00400000l
  2418.  
  2419. /*
  2420.  * Supports alpha surfaces
  2421.  */
  2422. #define DDCAPS_ALPHA            0x00800000l
  2423.  
  2424. /*
  2425.  * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  2426.  */
  2427. #define DDCAPS_COLORKEYHWASSIST        0x01000000l
  2428.  
  2429. /*
  2430.  * no hardware support at all
  2431.  */
  2432. #define DDCAPS_NOHARDWARE        0x02000000l
  2433.  
  2434. /*
  2435.  * Display hardware is capable of color fill with bltter
  2436.  */
  2437. #define DDCAPS_BLTCOLORFILL        0x04000000l
  2438.  
  2439. /*
  2440.  * Display hardware is bank switched, and potentially very slow at
  2441.  * random access to VRAM.
  2442.  */
  2443. #define DDCAPS_BANKSWITCHED        0x08000000l
  2444.  
  2445. /*
  2446.  * Display hardware is capable of depth filling Z-buffers with bltter
  2447.  */
  2448. #define DDCAPS_BLTDEPTHFILL        0x10000000l
  2449.  
  2450. /*
  2451.  * Display hardware is capable of clipping while bltting.
  2452.  */
  2453. #define DDCAPS_CANCLIP            0x20000000l
  2454.  
  2455. /*
  2456.  * Display hardware is capable of clipping while stretch bltting.
  2457.  */
  2458. #define DDCAPS_CANCLIPSTRETCHED        0x40000000l
  2459.  
  2460. /*
  2461.  * Display hardware is capable of bltting to or from system memory
  2462.  */
  2463. #define DDCAPS_CANBLTSYSMEM        0x80000000l
  2464.  
  2465.  
  2466.  /****************************************************************************
  2467.  *
  2468.  * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  2469.  *
  2470.  ****************************************************************************/
  2471.  
  2472. /*
  2473.  * Display hardware is certified
  2474.  */
  2475. #define DDCAPS2_CERTIFIED              0x00000001l
  2476.  
  2477. /*
  2478.  * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  2479.  * Direct3D rendering operations between calls to BeginScene() and EndScene()
  2480.  */
  2481. #define DDCAPS2_NO2DDURING3DSCENE       0x00000002l
  2482.  
  2483. /*
  2484.  * Display hardware contains a video port
  2485.  */
  2486. #define DDCAPS2_VIDEOPORT               0x00000004l
  2487.  
  2488. /*
  2489.  * The overlay can be automatically flipped according to the video port
  2490.  * VSYNCs, providing automatic doubled buffered display of video port
  2491.  * data using an overlay
  2492.  */
  2493. #define DDCAPS2_AUTOFLIPOVERLAY         0x00000008l
  2494.  
  2495. /*
  2496.  * Overlay can display each field of interlaced data individually while
  2497.  * it is interleaved in memory without causing jittery artifacts.
  2498.  */
  2499. #define DDCAPS2_CANBOBINTERLEAVED       0x00000010l
  2500.  
  2501. /*
  2502.  * Overlay can display each field of interlaced data individually while
  2503.  * it is not interleaved in memory without causing jittery artifacts.
  2504.  */
  2505. #define DDCAPS2_CANBOBNONINTERLEAVED    0x00000020l
  2506.  
  2507. /*
  2508.  * The overlay surface contains color controls (brightness, sharpness, etc.)
  2509.  */
  2510. #define DDCAPS2_COLORCONTROLOVERLAY     0x00000040l
  2511.  
  2512. /*
  2513.  * The primary surface contains color controls (gamma, etc.)
  2514.  */
  2515. #define DDCAPS2_COLORCONTROLPRIMARY     0x00000080l
  2516.  
  2517. /*
  2518.  * RGBZ -> RGB supported for 16:16 RGB:Z
  2519.  */
  2520. #define DDCAPS2_CANDROPZ16BIT           0x00000100l
  2521.  
  2522. /*
  2523.  * Driver supports non-local video memory.
  2524.  */
  2525. #define DDCAPS2_NONLOCALVIDMEM          0x00000200l
  2526.  
  2527. /*
  2528.  * Dirver supports non-local video memory but has different capabilities for
  2529.  * non-local video memory surfaces. If this bit is set then so must
  2530.  * DDCAPS2_NONLOCALVIDMEM.
  2531.  */
  2532. #define DDCAPS2_NONLOCALVIDMEMCAPS      0x00000400l
  2533.  
  2534. /*
  2535.  * Driver neither requires nor prefers surfaces to be pagelocked when performing
  2536.  * blts involving system memory surfaces
  2537.  */
  2538. #define DDCAPS2_NOPAGELOCKREQUIRED      0x00000800l
  2539.  
  2540. /*
  2541.  * Driver can create surfaces which are wider than the primary surface
  2542.  */
  2543. #define DDCAPS2_WIDESURFACES            0x00001000l
  2544.  
  2545. /*
  2546.  * Driver supports bob without using a video port by handling the
  2547.  * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
  2548.  */
  2549. #define DDCAPS2_CANFLIPODDEVEN          0x00002000l
  2550.  
  2551. /*
  2552.  * Driver supports bob using hardware
  2553.  */
  2554. #define DDCAPS2_CANBOBHARDWARE          0x00004000l
  2555.  
  2556. /*
  2557.  * Driver supports bltting any FOURCC surface to another surface of the same FOURCC
  2558.  */
  2559. #define DDCAPS2_COPYFOURCC              0x00008000l
  2560.  
  2561.  
  2562. /*
  2563.  * Driver supports loadable gamma ramps for the primary surface
  2564.  */
  2565. #define DDCAPS2_PRIMARYGAMMA            0x00020000l
  2566.  
  2567. /*
  2568.  * Driver can render in windowed mode.
  2569.  */
  2570. #define DDCAPS2_CANRENDERWINDOWED       0x00080000l
  2571.  
  2572. /*
  2573.  * A calibrator is available to adjust the gamma ramp according to the
  2574.  * physical display properties so that the result will be identical on
  2575.  * all calibrated systems.
  2576.  */
  2577. #define DDCAPS2_CANCALIBRATEGAMMA       0x00100000l
  2578.  
  2579. /*
  2580.  * Indicates that the driver will respond to DDFLIP_INTERVALn flags
  2581.  */
  2582. #define DDCAPS2_FLIPINTERVAL            0x00200000l
  2583.  
  2584. /*
  2585.  * Indicates that the driver will respond to DDFLIP_NOVSYNC
  2586.  */
  2587. #define DDCAPS2_FLIPNOVSYNC             0x00400000l
  2588.  
  2589.  
  2590. /****************************************************************************
  2591.  *
  2592.  * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  2593.  *
  2594.  ****************************************************************************/
  2595.  
  2596. /*
  2597.  * Supports alpha blending around the edge of a source color keyed surface.
  2598.  * For Blt.
  2599.  */
  2600. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND        0x00000001l
  2601.  
  2602. /*
  2603.  * Supports alpha information in the pixel format.  The bit depth of alpha
  2604.  * information in the pixel format can be 1,2,4, or 8.    The alpha value becomes
  2605.  * more opaque as the alpha value increases.  (0 is transparent.)
  2606.  * For Blt.
  2607.  */
  2608. #define DDFXALPHACAPS_BLTALPHAPIXELS        0x00000002l
  2609.  
  2610. /*
  2611.  * Supports alpha information in the pixel format.  The bit depth of alpha
  2612.  * information in the pixel format can be 1,2,4, or 8.    The alpha value
  2613.  * becomes more transparent as the alpha value increases.  (0 is opaque.)
  2614.  * This flag can only be set if DDCAPS_ALPHA is set.
  2615.  * For Blt.
  2616.  */
  2617. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG        0x00000004l
  2618.  
  2619. /*
  2620.  * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
  2621.  * 1,2,4, or 8.     The alpha value becomes more opaque as the alpha value increases.
  2622.  * (0 is transparent.)
  2623.  * For Blt.
  2624.  */
  2625. #define DDFXALPHACAPS_BLTALPHASURFACES        0x00000008l
  2626.  
  2627. /*
  2628.  * The depth of the alpha channel data can range can be 1,2,4, or 8.
  2629.  * The NEG suffix indicates that this alpha channel becomes more transparent
  2630.  * as the alpha value increases. (0 is opaque.)     This flag can only be set if
  2631.  * DDCAPS_ALPHA is set.
  2632.  * For Blt.
  2633.  */
  2634. #define DDFXALPHACAPS_BLTALPHASURFACESNEG    0x00000010l
  2635.  
  2636. /*
  2637.  * Supports alpha blending around the edge of a source color keyed surface.
  2638.  * For Overlays.
  2639.  */
  2640. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND    0x00000020l
  2641.  
  2642. /*
  2643.  * Supports alpha information in the pixel format.  The bit depth of alpha
  2644.  * information in the pixel format can be 1,2,4, or 8.    The alpha value becomes
  2645.  * more opaque as the alpha value increases.  (0 is transparent.)
  2646.  * For Overlays.
  2647.  */
  2648. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS    0x00000040l
  2649.  
  2650. /*
  2651.  * Supports alpha information in the pixel format.  The bit depth of alpha
  2652.  * information in the pixel format can be 1,2,4, or 8.    The alpha value
  2653.  * becomes more transparent as the alpha value increases.  (0 is opaque.)
  2654.  * This flag can only be set if DDCAPS_ALPHA is set.
  2655.  * For Overlays.
  2656.  */
  2657. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG    0x00000080l
  2658.  
  2659. /*
  2660.  * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
  2661.  * 1,2,4, or 8.     The alpha value becomes more opaque as the alpha value increases.
  2662.  * (0 is transparent.)
  2663.  * For Overlays.
  2664.  */
  2665. #define DDFXALPHACAPS_OVERLAYALPHASURFACES    0x00000100l
  2666.  
  2667. /*
  2668.  * The depth of the alpha channel data can range can be 1,2,4, or 8.
  2669.  * The NEG suffix indicates that this alpha channel becomes more transparent
  2670.  * as the alpha value increases. (0 is opaque.)     This flag can only be set if
  2671.  * DDCAPS_ALPHA is set.
  2672.  * For Overlays.
  2673.  */
  2674. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG    0x00000200l
  2675.  
  2676. #if DIRECTDRAW_VERSION < 0x0600
  2677. #endif  //DIRECTDRAW_VERSION
  2678.  
  2679.  
  2680.  
  2681.  
  2682. /****************************************************************************
  2683.  *
  2684.  * DIRECTDRAW FX CAPABILITY FLAGS
  2685.  *
  2686.  ****************************************************************************/
  2687.  
  2688. /*
  2689.  * Uses arithmetic operations to stretch and shrink surfaces during blt
  2690.  * rather than pixel doubling techniques.  Along the Y axis.
  2691.  */
  2692. #define DDFXCAPS_BLTARITHSTRETCHY    0x00000020l
  2693.  
  2694. /*
  2695.  * Uses arithmetic operations to stretch during blt
  2696.  * rather than pixel doubling techniques.  Along the Y axis. Only
  2697.  * works for x1, x2, etc.
  2698.  */
  2699. #define DDFXCAPS_BLTARITHSTRETCHYN    0x00000010l
  2700.  
  2701. /*
  2702.  * Supports mirroring left to right in blt.
  2703.  */
  2704. #define DDFXCAPS_BLTMIRRORLEFTRIGHT    0x00000040l
  2705.  
  2706. /*
  2707.  * Supports mirroring top to bottom in blt.
  2708.  */
  2709. #define DDFXCAPS_BLTMIRRORUPDOWN    0x00000080l
  2710.  
  2711. /*
  2712.  * Supports arbitrary rotation for blts.
  2713.  */
  2714. #define DDFXCAPS_BLTROTATION        0x00000100l
  2715.  
  2716. /*
  2717.  * Supports 90 degree rotations for blts.
  2718.  */
  2719. #define DDFXCAPS_BLTROTATION90        0x00000200l
  2720.  
  2721. /*
  2722.  * DirectDraw supports arbitrary shrinking of a surface along the
  2723.  * x axis (horizontal direction) for blts.
  2724.  */
  2725. #define DDFXCAPS_BLTSHRINKX        0x00000400l
  2726.  
  2727. /*
  2728.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  2729.  * along the x axis (horizontal direction) for blts.
  2730.  */
  2731. #define DDFXCAPS_BLTSHRINKXN        0x00000800l
  2732.  
  2733. /*
  2734.  * DirectDraw supports arbitrary shrinking of a surface along the
  2735.  * y axis (horizontal direction) for blts.
  2736.  */
  2737. #define DDFXCAPS_BLTSHRINKY        0x00001000l
  2738.  
  2739. /*
  2740.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  2741.  * along the y axis (vertical direction) for blts.
  2742.  */
  2743. #define DDFXCAPS_BLTSHRINKYN        0x00002000l
  2744.  
  2745. /*
  2746.  * DirectDraw supports arbitrary stretching of a surface along the
  2747.  * x axis (horizontal direction) for blts.
  2748.  */
  2749. #define DDFXCAPS_BLTSTRETCHX        0x00004000l
  2750.  
  2751. /*
  2752.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  2753.  * along the x axis (horizontal direction) for blts.
  2754.  */
  2755. #define DDFXCAPS_BLTSTRETCHXN        0x00008000l
  2756.  
  2757. /*
  2758.  * DirectDraw supports arbitrary stretching of a surface along the
  2759.  * y axis (horizontal direction) for blts.
  2760.  */
  2761. #define DDFXCAPS_BLTSTRETCHY        0x00010000l
  2762.  
  2763. /*
  2764.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  2765.  * along the y axis (vertical direction) for blts.
  2766.  */
  2767. #define DDFXCAPS_BLTSTRETCHYN        0x00020000l
  2768.  
  2769. /*
  2770.  * Uses arithmetic operations to stretch and shrink surfaces during
  2771.  * overlay rather than pixel doubling techniques.  Along the Y axis
  2772.  * for overlays.
  2773.  */
  2774. #define DDFXCAPS_OVERLAYARITHSTRETCHY    0x00040000l
  2775.  
  2776. /*
  2777.  * Uses arithmetic operations to stretch surfaces during
  2778.  * overlay rather than pixel doubling techniques.  Along the Y axis
  2779.  * for overlays. Only works for x1, x2, etc.
  2780.  */
  2781. #define DDFXCAPS_OVERLAYARITHSTRETCHYN    0x00000008l
  2782.  
  2783. /*
  2784.  * DirectDraw supports arbitrary shrinking of a surface along the
  2785.  * x axis (horizontal direction) for overlays.
  2786.  */
  2787. #define DDFXCAPS_OVERLAYSHRINKX        0x00080000l
  2788.  
  2789. /*
  2790.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  2791.  * along the x axis (horizontal direction) for overlays.
  2792.  */
  2793. #define DDFXCAPS_OVERLAYSHRINKXN    0x00100000l
  2794.  
  2795. /*
  2796.  * DirectDraw supports arbitrary shrinking of a surface along the
  2797.  * y axis (horizontal direction) for overlays.
  2798.  */
  2799. #define DDFXCAPS_OVERLAYSHRINKY        0x00200000l
  2800.  
  2801. /*
  2802.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  2803.  * along the y axis (vertical direction) for overlays.
  2804.  */
  2805. #define DDFXCAPS_OVERLAYSHRINKYN    0x00400000l
  2806.  
  2807. /*
  2808.  * DirectDraw supports arbitrary stretching of a surface along the
  2809.  * x axis (horizontal direction) for overlays.
  2810.  */
  2811. #define DDFXCAPS_OVERLAYSTRETCHX    0x00800000l
  2812.  
  2813. /*
  2814.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  2815.  * along the x axis (horizontal direction) for overlays.
  2816.  */
  2817. #define DDFXCAPS_OVERLAYSTRETCHXN    0x01000000l
  2818.  
  2819. /*
  2820.  * DirectDraw supports arbitrary stretching of a surface along the
  2821.  * y axis (horizontal direction) for overlays.
  2822.  */
  2823. #define DDFXCAPS_OVERLAYSTRETCHY    0x02000000l
  2824.  
  2825. /*
  2826.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  2827.  * along the y axis (vertical direction) for overlays.
  2828.  */
  2829. #define DDFXCAPS_OVERLAYSTRETCHYN    0x04000000l
  2830.  
  2831. /*
  2832.  * DirectDraw supports mirroring of overlays across the vertical axis
  2833.  */
  2834. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT    0x08000000l
  2835.  
  2836. /*
  2837.  * DirectDraw supports mirroring of overlays across the horizontal axis
  2838.  */
  2839. #define DDFXCAPS_OVERLAYMIRRORUPDOWN    0x10000000l
  2840.  
  2841. /*
  2842.  * Driver can do alpha blending for blits.
  2843.  */
  2844. #define DDFXCAPS_BLTALPHA         0x00000001l
  2845.  
  2846. /*
  2847.  * Driver can do geometric transformations (or warps) for blits.
  2848.  */
  2849. #define DDFXCAPS_BLTTRANSFORM        0x00000002l
  2850.  
  2851. /*
  2852.  * Driver can do surface-reconstruction filtering for warped blits.
  2853.  */
  2854. #define DDFXCAPS_BLTFILTER         DDFXCAPS_BLTARITHSTRETCHY
  2855.  
  2856. /*
  2857.  * Driver can do alpha blending for overlays.
  2858.  */
  2859. #define DDFXCAPS_OVERLAYALPHA         0x00000004l
  2860.  
  2861. /*
  2862.  * Driver can do geometric transformations (or warps) for overlays.
  2863.  */
  2864. #define DDFXCAPS_OVERLAYTRANSFORM     0x20000000l
  2865.  
  2866. /*
  2867.  * Driver can do surface-reconstruction filtering for warped overlays.
  2868.  */
  2869. #define DDFXCAPS_OVERLAYFILTER         DDFXCAPS_OVERLAYARITHSTRETCHY
  2870.  
  2871.  
  2872. /****************************************************************************
  2873.  *
  2874.  * DIRECTDRAW STEREO VIEW CAPABILITIES
  2875.  *
  2876.  ****************************************************************************/
  2877.  
  2878. /*
  2879.  * The stereo view is accomplished via enigma encoding.
  2880.  */
  2881. #define DDSVCAPS_ENIGMA            0x00000001l
  2882.  
  2883. /*
  2884.  * The stereo view is accomplished via high frequency flickering.
  2885.  */
  2886. #define DDSVCAPS_FLICKER        0x00000002l
  2887.  
  2888. /*
  2889.  * The stereo view is accomplished via red and blue filters applied
  2890.  * to the left and right eyes.    All images must adapt their colorspaces
  2891.  * for this process.
  2892.  */
  2893. #define DDSVCAPS_REDBLUE        0x00000004l
  2894.  
  2895. /*
  2896.  * The stereo view is accomplished with split screen technology.
  2897.  */
  2898. #define DDSVCAPS_SPLIT            0x00000008l
  2899.  
  2900. /****************************************************************************
  2901.  *
  2902.  * DIRECTDRAWPALETTE CAPABILITIES
  2903.  *
  2904.  ****************************************************************************/
  2905.  
  2906. /*
  2907.  * Index is 4 bits.  There are sixteen color entries in the palette table.
  2908.  */
  2909. #define DDPCAPS_4BIT            0x00000001l
  2910.  
  2911. /*
  2912.  * Index is onto a 8 bit color index.  This field is only valid with the
  2913.  * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  2914.  * surface is in 8bpp. Each color entry is one byte long and is an index
  2915.  * into destination surface's 8bpp palette.
  2916.  */
  2917. #define DDPCAPS_8BITENTRIES        0x00000002l
  2918.  
  2919. /*
  2920.  * Index is 8 bits.  There are 256 color entries in the palette table.
  2921.  */
  2922. #define DDPCAPS_8BIT            0x00000004l
  2923.  
  2924. /*
  2925.  * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  2926.  * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  2927.  * object.
  2928.  */
  2929. #define DDPCAPS_INITIALIZE        0x00000008l
  2930.  
  2931. /*
  2932.  * This palette is the one attached to the primary surface.  Changing this
  2933.  * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  2934.  * and supported.
  2935.  */
  2936. #define DDPCAPS_PRIMARYSURFACE        0x00000010l
  2937.  
  2938. /*
  2939.  * This palette is the one attached to the primary surface left.  Changing
  2940.  * this table has immediate effect on the display for the left eye unless
  2941.  * DDPSETPAL_VSYNC is specified and supported.
  2942.  */
  2943. #define DDPCAPS_PRIMARYSURFACELEFT    0x00000020l
  2944.  
  2945. /*
  2946.  * This palette can have all 256 entries defined
  2947.  */
  2948. #define DDPCAPS_ALLOW256        0x00000040l
  2949.  
  2950. /*
  2951.  * This palette can have modifications to it synced with the monitors
  2952.  * refresh rate.
  2953.  */
  2954. #define DDPCAPS_VSYNC            0x00000080l
  2955.  
  2956. /*
  2957.  * Index is 1 bit.  There are two color entries in the palette table.
  2958.  */
  2959. #define DDPCAPS_1BIT            0x00000100l
  2960.  
  2961. /*
  2962.  * Index is 2 bit.  There are four color entries in the palette table.
  2963.  */
  2964. #define DDPCAPS_2BIT            0x00000200l
  2965.  
  2966. /*
  2967.  * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value
  2968.  */
  2969. #define DDPCAPS_ALPHA            0x00000400l
  2970.  
  2971.  
  2972. /****************************************************************************
  2973.  *
  2974.  * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  2975.  *
  2976.  ****************************************************************************/
  2977.  
  2978.  
  2979. /****************************************************************************
  2980.  *
  2981.  * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  2982.  *
  2983.  ****************************************************************************/
  2984.  
  2985. /* 0 is the only legal value */
  2986.  
  2987. /****************************************************************************
  2988.  *
  2989.  * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS
  2990.  *
  2991.  ****************************************************************************/
  2992.  
  2993. /*
  2994.  * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData
  2995.  * must be set to sizeof(IUnknown*). DirectDraw will call AddRef through this
  2996.  * pointer and Release when the private data is destroyed. This includes when
  2997.  * the surface or palette is destroyed before such priovate data is destroyed.
  2998.  */
  2999. #define DDSPD_IUNKNOWNPOINTER           0x00000001L
  3000.  
  3001. /*
  3002.  * Private data is only valid for the current state of the object,
  3003.  * as determined by the uniqueness value.
  3004.  */
  3005. #define DDSPD_VOLATILE                  0x00000002L
  3006.  
  3007.  
  3008. /****************************************************************************
  3009.  *
  3010.  * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  3011.  *
  3012.  ****************************************************************************/
  3013.  
  3014.  
  3015. /****************************************************************************
  3016.  *
  3017.  * DIRECTDRAW BITDEPTH CONSTANTS
  3018.  *
  3019.  * NOTE:  These are only used to indicate supported bit depths.   These
  3020.  * are flags only, they are not to be used as an actual bit depth.   The
  3021.  * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  3022.  * bit depths in a surface or for changing the display mode.
  3023.  *
  3024.  ****************************************************************************/
  3025.  
  3026. /*
  3027.  * 1 bit per pixel.
  3028.  */
  3029. #define DDBD_1            0x00004000l
  3030.  
  3031. /*
  3032.  * 2 bits per pixel.
  3033.  */
  3034. #define DDBD_2            0x00002000l
  3035.  
  3036. /*
  3037.  * 4 bits per pixel.
  3038.  */
  3039. #define DDBD_4            0x00001000l
  3040.  
  3041. /*
  3042.  * 8 bits per pixel.
  3043.  */
  3044. #define DDBD_8            0x00000800l
  3045.  
  3046. /*
  3047.  * 16 bits per pixel.
  3048.  */
  3049. #define DDBD_16            0x00000400l
  3050.  
  3051. /*
  3052.  * 24 bits per pixel.
  3053.  */
  3054. #define DDBD_24            0X00000200l
  3055.  
  3056. /*
  3057.  * 32 bits per pixel.
  3058.  */
  3059. #define DDBD_32            0x00000100l
  3060.  
  3061. /****************************************************************************
  3062.  *
  3063.  * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  3064.  *
  3065.  ****************************************************************************/
  3066.  
  3067. /*
  3068.  * Set if the structure contains a color space.     Not set if the structure
  3069.  * contains a single color key.
  3070.  */
  3071. #define DDCKEY_COLORSPACE    0x00000001l
  3072.  
  3073. /*
  3074.  * Set if the structure specifies a color key or color space which is to be
  3075.  * used as a destination color key for blt operations.
  3076.  */
  3077. #define DDCKEY_DESTBLT        0x00000002l
  3078.  
  3079. /*
  3080.  * Set if the structure specifies a color key or color space which is to be
  3081.  * used as a destination color key for overlay operations.
  3082.  */
  3083. #define DDCKEY_DESTOVERLAY    0x00000004l
  3084.  
  3085. /*
  3086.  * Set if the structure specifies a color key or color space which is to be
  3087.  * used as a source color key for blt operations.
  3088.  */
  3089. #define DDCKEY_SRCBLT        0x00000008l
  3090.  
  3091. /*
  3092.  * Set if the structure specifies a color key or color space which is to be
  3093.  * used as a source color key for overlay operations.
  3094.  */
  3095. #define DDCKEY_SRCOVERLAY    0x00000010l
  3096.  
  3097.  
  3098. /****************************************************************************
  3099.  *
  3100.  * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  3101.  *
  3102.  ****************************************************************************/
  3103.  
  3104. /*
  3105.  * Supports transparent blting using a color key to identify the replaceable
  3106.  * bits of the destination surface for RGB colors.
  3107.  */
  3108. #define DDCKEYCAPS_DESTBLT            0x00000001l
  3109.  
  3110. /*
  3111.  * Supports transparent blting using a color space to identify the replaceable
  3112.  * bits of the destination surface for RGB colors.
  3113.  */
  3114. #define DDCKEYCAPS_DESTBLTCLRSPACE        0x00000002l
  3115.  
  3116. /*
  3117.  * Supports transparent blting using a color space to identify the replaceable
  3118.  * bits of the destination surface for YUV colors.
  3119.  */
  3120. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV        0x00000004l
  3121.  
  3122. /*
  3123.  * Supports transparent blting using a color key to identify the replaceable
  3124.  * bits of the destination surface for YUV colors.
  3125.  */
  3126. #define DDCKEYCAPS_DESTBLTYUV            0x00000008l
  3127.  
  3128. /*
  3129.  * Supports overlaying using colorkeying of the replaceable bits of the surface
  3130.  * being overlayed for RGB colors.
  3131.  */
  3132. #define DDCKEYCAPS_DESTOVERLAY            0x00000010l
  3133.  
  3134. /*
  3135.  * Supports a color space as the color key for the destination for RGB colors.
  3136.  */
  3137. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE        0x00000020l
  3138.  
  3139. /*
  3140.  * Supports a color space as the color key for the destination for YUV colors.
  3141.  */
  3142. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV    0x00000040l
  3143.  
  3144. /*
  3145.  * Supports only one active destination color key value for visible overlay
  3146.  * surfaces.
  3147.  */
  3148. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE        0x00000080l
  3149.  
  3150. /*
  3151.  * Supports overlaying using colorkeying of the replaceable bits of the
  3152.  * surface being overlayed for YUV colors.
  3153.  */
  3154. #define DDCKEYCAPS_DESTOVERLAYYUV        0x00000100l
  3155.  
  3156. /*
  3157.  * Supports transparent blting using the color key for the source with
  3158.  * this surface for RGB colors.
  3159.  */
  3160. #define DDCKEYCAPS_SRCBLT            0x00000200l
  3161.  
  3162. /*
  3163.  * Supports transparent blting using a color space for the source with
  3164.  * this surface for RGB colors.
  3165.  */
  3166. #define DDCKEYCAPS_SRCBLTCLRSPACE        0x00000400l
  3167.  
  3168. /*
  3169.  * Supports transparent blting using a color space for the source with
  3170.  * this surface for YUV colors.
  3171.  */
  3172. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV        0x00000800l
  3173.  
  3174. /*
  3175.  * Supports transparent blting using the color key for the source with
  3176.  * this surface for YUV colors.
  3177.  */
  3178. #define DDCKEYCAPS_SRCBLTYUV            0x00001000l
  3179.  
  3180. /*
  3181.  * Supports overlays using the color key for the source with this
  3182.  * overlay surface for RGB colors.
  3183.  */
  3184. #define DDCKEYCAPS_SRCOVERLAY            0x00002000l
  3185.  
  3186. /*
  3187.  * Supports overlays using a color space as the source color key for
  3188.  * the overlay surface for RGB colors.
  3189.  */
  3190. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE        0x00004000l
  3191.  
  3192. /*
  3193.  * Supports overlays using a color space as the source color key for
  3194.  * the overlay surface for YUV colors.
  3195.  */
  3196. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV    0x00008000l
  3197.  
  3198. /*
  3199.  * Supports only one active source color key value for visible
  3200.  * overlay surfaces.
  3201.  */
  3202. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE        0x00010000l
  3203.  
  3204. /*
  3205.  * Supports overlays using the color key for the source with this
  3206.  * overlay surface for YUV colors.
  3207.  */
  3208. #define DDCKEYCAPS_SRCOVERLAYYUV        0x00020000l
  3209.  
  3210. /*
  3211.  * there are no bandwidth trade-offs for using colorkey with an overlay
  3212.  */
  3213. #define DDCKEYCAPS_NOCOSTOVERLAY        0x00040000l
  3214.  
  3215.  
  3216. /****************************************************************************
  3217.  *
  3218.  * DIRECTDRAW PIXELFORMAT FLAGS
  3219.  *
  3220.  ****************************************************************************/
  3221.  
  3222. /*
  3223.  * The surface has alpha channel information in the pixel format.
  3224.  */
  3225. #define DDPF_ALPHAPIXELS            0x00000001l
  3226.  
  3227. /*
  3228.  * The pixel format contains alpha only information
  3229.  */
  3230. #define DDPF_ALPHA                0x00000002l
  3231.  
  3232. /*
  3233.  * The FourCC code is valid.
  3234.  */
  3235. #define DDPF_FOURCC                0x00000004l
  3236.  
  3237. /*
  3238.  * The surface is 4-bit color indexed.
  3239.  */
  3240. #define DDPF_PALETTEINDEXED4            0x00000008l
  3241.  
  3242. /*
  3243.  * The surface is indexed into a palette which stores indices
  3244.  * into the destination surface's 8-bit palette.
  3245.  */
  3246. #define DDPF_PALETTEINDEXEDTO8            0x00000010l
  3247.  
  3248. /*
  3249.  * The surface is 8-bit color indexed.
  3250.  */
  3251. #define DDPF_PALETTEINDEXED8            0x00000020l
  3252.  
  3253. /*
  3254.  * The RGB data in the pixel format structure is valid.
  3255.  */
  3256. #define DDPF_RGB                0x00000040l
  3257.  
  3258. /*
  3259.  * The surface will accept pixel data in the format specified
  3260.  * and compress it during the write.
  3261.  */
  3262. #define DDPF_COMPRESSED                0x00000080l
  3263.  
  3264. /*
  3265.  * The surface will accept RGB data and translate it during
  3266.  * the write to YUV data.  The format of the data to be written
  3267.  * will be contained in the pixel format structure.  The DDPF_RGB
  3268.  * flag will be set.
  3269.  */
  3270. #define DDPF_RGBTOYUV                0x00000100l
  3271.  
  3272. /*
  3273.  * pixel format is YUV - YUV data in pixel format struct is valid
  3274.  */
  3275. #define DDPF_YUV                0x00000200l
  3276.  
  3277. /*
  3278.  * pixel format is a z buffer only surface
  3279.  */
  3280. #define DDPF_ZBUFFER                0x00000400l
  3281.  
  3282. /*
  3283.  * The surface is 1-bit color indexed.
  3284.  */
  3285. #define DDPF_PALETTEINDEXED1            0x00000800l
  3286.  
  3287. /*
  3288.  * The surface is 2-bit color indexed.
  3289.  */
  3290. #define DDPF_PALETTEINDEXED2            0x00001000l
  3291.  
  3292. /*
  3293.  * The surface contains Z information in the pixels
  3294.  */
  3295. #define DDPF_ZPIXELS                0x00002000l
  3296.  
  3297. /*
  3298.  * The surface contains stencil information along with Z
  3299.  */
  3300. #define DDPF_STENCILBUFFER            0x00004000l
  3301.  
  3302. /*
  3303.  * Premultiplied alpha format -- the color components have been
  3304.  * premultiplied by the alpha component.
  3305.  */
  3306. #define DDPF_ALPHAPREMULT             0x00008000l
  3307.  
  3308.  
  3309. /*
  3310.  * Luminance data in the pixel format is valid.
  3311.  * Use this flag for luminance-only or luminance+alpha surfaces,
  3312.  * the bit depth is then ddpf.dwLuminanceBitCount.
  3313.  */
  3314. #define DDPF_LUMINANCE                          0x00020000l
  3315.  
  3316. /*
  3317.  * Luminance data in the pixel format is valid.
  3318.  * Use this flag when hanging luminance off bumpmap surfaces,
  3319.  * the bit mask for the luminance portion of the pixel is then
  3320.  * ddpf.dwBumpLuminanceBitMask
  3321.  */
  3322. #define DDPF_BUMPLUMINANCE                      0x00040000l
  3323.  
  3324. /*
  3325.  * Bump map dUdV data in the pixel format is valid.
  3326.  */
  3327. #define DDPF_BUMPDUDV                           0x00080000l
  3328.  
  3329.  
  3330. /*===========================================================================
  3331.  *
  3332.  *
  3333.  * DIRECTDRAW CALLBACK FLAGS
  3334.  *
  3335.  *
  3336.  *==========================================================================*/
  3337.  
  3338. /****************************************************************************
  3339.  *
  3340.  * DIRECTDRAW ENUMSURFACES FLAGS
  3341.  *
  3342.  ****************************************************************************/
  3343.  
  3344. /*
  3345.  * Enumerate all of the surfaces that meet the search criterion.
  3346.  */
  3347. #define DDENUMSURFACES_ALL            0x00000001l
  3348.  
  3349. /*
  3350.  * A search hit is a surface that matches the surface description.
  3351.  */
  3352. #define DDENUMSURFACES_MATCH            0x00000002l
  3353.  
  3354. /*
  3355.  * A search hit is a surface that does not match the surface description.
  3356.  */
  3357. #define DDENUMSURFACES_NOMATCH            0x00000004l
  3358.  
  3359. /*
  3360.  * Enumerate the first surface that can be created which meets the search criterion.
  3361.  */
  3362. #define DDENUMSURFACES_CANBECREATED        0x00000008l
  3363.  
  3364. /*
  3365.  * Enumerate the surfaces that already exist that meet the search criterion.
  3366.  */
  3367. #define DDENUMSURFACES_DOESEXIST        0x00000010l
  3368.  
  3369.  
  3370. /****************************************************************************
  3371.  *
  3372.  * DIRECTDRAW SETDISPLAYMODE FLAGS
  3373.  *
  3374.  ****************************************************************************/
  3375.  
  3376. /*
  3377.  * The desired mode is a standard VGA mode
  3378.  */
  3379. #define DDSDM_STANDARDVGAMODE                   0x00000001l
  3380.  
  3381.  
  3382.  
  3383. /****************************************************************************
  3384.  *
  3385.  * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  3386.  *
  3387.  ****************************************************************************/
  3388.  
  3389. /*
  3390.  * Enumerate Modes with different refresh rates.  EnumDisplayModes guarantees
  3391.  * that a particular mode will be enumerated only once.  This flag specifies whether
  3392.  * the refresh rate is taken into account when determining if a mode is unique.
  3393.  */
  3394. #define DDEDM_REFRESHRATES            0x00000001l
  3395.  
  3396. /*
  3397.  * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
  3398.  * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
  3399.  * enumerated if the application has previously called SetCooperativeLevel with the
  3400.  * DDSCL_ALLOWMODEX flag set).
  3401.  */
  3402. #define DDEDM_STANDARDVGAMODES                  0x00000002L
  3403.  
  3404.  
  3405. /****************************************************************************
  3406.  *
  3407.  * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  3408.  *
  3409.  ****************************************************************************/
  3410.  
  3411. /*
  3412.  * Exclusive mode owner will be responsible for the entire primary surface.
  3413.  * GDI can be ignored. used with DD
  3414.  */
  3415. #define DDSCL_FULLSCREEN            0x00000001l
  3416.  
  3417. /*
  3418.  * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  3419.  */
  3420. #define DDSCL_ALLOWREBOOT            0x00000002l
  3421.  
  3422. /*
  3423.  * prevents DDRAW from modifying the application window.
  3424.  * prevents DDRAW from minimize/restore the application window on activation.
  3425.  */
  3426. #define DDSCL_NOWINDOWCHANGES            0x00000004l
  3427.  
  3428. /*
  3429.  * app wants to work as a regular Windows application
  3430.  */
  3431. #define DDSCL_NORMAL                0x00000008l
  3432.  
  3433. /*
  3434.  * app wants exclusive access
  3435.  */
  3436. #define DDSCL_EXCLUSIVE                         0x00000010l
  3437.  
  3438.  
  3439. /*
  3440.  * app can deal with non-windows display modes
  3441.  */
  3442. #define DDSCL_ALLOWMODEX                        0x00000040l
  3443.  
  3444. /*
  3445.  * this window will receive the focus messages
  3446.  */
  3447. #define DDSCL_SETFOCUSWINDOW                    0x00000080l
  3448.  
  3449. /*
  3450.  * this window is associated with the DDRAW object and will
  3451.  * cover the screen in fullscreen mode
  3452.  */
  3453. #define DDSCL_SETDEVICEWINDOW                   0x00000100l
  3454.  
  3455. /*
  3456.  * app wants DDRAW to create a window to be associated with the
  3457.  * DDRAW object
  3458.  */
  3459. #define DDSCL_CREATEDEVICEWINDOW                0x00000200l
  3460.  
  3461. /*
  3462.  * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D
  3463.  * take the global crtisec more frequently.
  3464.  */
  3465. #define DDSCL_MULTITHREADED                     0x00000400l
  3466.  
  3467. /*
  3468.  * App hints that it would like to keep the FPU set up for optimal Direct3D
  3469.  * performance (single precision and exceptions disabled) so Direct3D
  3470.  * does not need to explicitly set the FPU each time
  3471.  */
  3472. #define DDSCL_FPUSETUP                          0x00000800l
  3473.  
  3474.  
  3475. /****************************************************************************
  3476.  *
  3477.  * DIRECTDRAW BLT FLAGS
  3478.  *
  3479.  ****************************************************************************/
  3480.  
  3481. /*
  3482.  * Use the alpha information in the pixel format or the alpha channel surface
  3483.  * attached to the destination surface as the alpha channel for this blt.
  3484.  */
  3485. #define DDBLT_ALPHADEST                0x00000001l
  3486.  
  3487. /*
  3488.  * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  3489.  * for the destination surface for this blt.
  3490.  */
  3491. #define DDBLT_ALPHADESTCONSTOVERRIDE        0x00000002l
  3492.  
  3493. /*
  3494.  * The NEG suffix indicates that the destination surface becomes more
  3495.  * transparent as the alpha value increases. (0 is opaque)
  3496.  */
  3497. #define DDBLT_ALPHADESTNEG            0x00000004l
  3498.  
  3499. /*
  3500.  * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  3501.  * channel for the destination for this blt.
  3502.  */
  3503. #define DDBLT_ALPHADESTSURFACEOVERRIDE        0x00000008l
  3504.  
  3505. /*
  3506.  * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  3507.  * for the edges of the image that border the color key colors.
  3508.  */
  3509. #define DDBLT_ALPHAEDGEBLEND            0x00000010l
  3510.  
  3511. /*
  3512.  * Use the alpha information in the pixel format or the alpha channel surface
  3513.  * attached to the source surface as the alpha channel for this blt.
  3514.  */
  3515. #define DDBLT_ALPHASRC                0x00000020l
  3516.  
  3517. /*
  3518.  * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  3519.  * for the source for this blt.
  3520.  */
  3521. #define DDBLT_ALPHASRCCONSTOVERRIDE        0x00000040l
  3522.  
  3523. /*
  3524.  * The NEG suffix indicates that the source surface becomes more transparent
  3525.  * as the alpha value increases. (0 is opaque)
  3526.  */
  3527. #define DDBLT_ALPHASRCNEG            0x00000080l
  3528.  
  3529. /*
  3530.  * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  3531.  * for the source for this blt.
  3532.  */
  3533. #define DDBLT_ALPHASRCSURFACEOVERRIDE        0x00000100l
  3534.  
  3535. /*
  3536.  * Do this blt asynchronously through the FIFO in the order received.  If
  3537.  * there is no room in the hardware FIFO fail the call.
  3538.  */
  3539. #define DDBLT_ASYNC                0x00000200l
  3540.  
  3541. /*
  3542.  * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  3543.  * to fill the destination rectangle on the destination surface with.
  3544.  */
  3545. #define DDBLT_COLORFILL                0x00000400l
  3546.  
  3547. /*
  3548.  * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  3549.  * to use for the blt.
  3550.  */
  3551. #define DDBLT_DDFX                0x00000800l
  3552.  
  3553. /*
  3554.  * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  3555.  * that are not part of the Win32 API.
  3556.  */
  3557. #define DDBLT_DDROPS                0x00001000l
  3558.  
  3559. /*
  3560.  * Use the color key associated with the destination surface.
  3561.  */
  3562. #define DDBLT_KEYDEST                0x00002000l
  3563.  
  3564. /*
  3565.  * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  3566.  * for the destination surface.
  3567.  */
  3568. #define DDBLT_KEYDESTOVERRIDE            0x00004000l
  3569.  
  3570. /*
  3571.  * Use the color key associated with the source surface.
  3572.  */
  3573. #define DDBLT_KEYSRC                0x00008000l
  3574.  
  3575. /*
  3576.  * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  3577.  * for the source surface.
  3578.  */
  3579. #define DDBLT_KEYSRCOVERRIDE            0x00010000l
  3580.  
  3581. /*
  3582.  * Use the dwROP field in the DDBLTFX structure for the raster operation
  3583.  * for this blt.  These ROPs are the same as the ones defined in the Win32 API.
  3584.  */
  3585. #define DDBLT_ROP                0x00020000l
  3586.  
  3587. /*
  3588.  * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  3589.  * (specified in 1/100th of a degree) to rotate the surface.
  3590.  */
  3591. #define DDBLT_ROTATIONANGLE            0x00040000l
  3592.  
  3593. /*
  3594.  * Z-buffered blt using the z-buffers attached to the source and destination
  3595.  * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  3596.  * z-buffer opcode.
  3597.  */
  3598. #define DDBLT_ZBUFFER                0x00080000l
  3599.  
  3600. /*
  3601.  * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  3602.  * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  3603.  * for the destination.
  3604.  */
  3605. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE        0x00100000l
  3606.  
  3607. /*
  3608.  * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  3609.  * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  3610.  * respectively for the destination.
  3611.  */
  3612. #define DDBLT_ZBUFFERDESTOVERRIDE        0x00200000l
  3613.  
  3614. /*
  3615.  * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  3616.  * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  3617.  * for the source.
  3618.  */
  3619. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE        0x00400000l
  3620.  
  3621. /*
  3622.  * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  3623.  * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  3624.  * respectively for the source.
  3625.  */
  3626. #define DDBLT_ZBUFFERSRCOVERRIDE                0x00800000l
  3627.  
  3628. /*
  3629.  * wait until the device is ready to handle the blt
  3630.  * this will cause blt to not return DDERR_WASSTILLDRAWING
  3631.  */
  3632. #define DDBLT_WAIT                              0x01000000l
  3633.  
  3634. /*
  3635.  * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  3636.  * to fill the destination rectangle on the destination Z-buffer surface
  3637.  * with.
  3638.  */
  3639. #define DDBLT_DEPTHFILL                0x02000000l
  3640.  
  3641.  
  3642. /****************************************************************************
  3643.  *
  3644.  * BLTFAST FLAGS
  3645.  *
  3646.  ****************************************************************************/
  3647.  
  3648. #define DDBLTFAST_NOCOLORKEY                    0x00000000
  3649. #define DDBLTFAST_SRCCOLORKEY                   0x00000001
  3650. #define DDBLTFAST_DESTCOLORKEY                  0x00000002
  3651. #define DDBLTFAST_WAIT                          0x00000010
  3652.  
  3653.  
  3654.  
  3655.  
  3656. /****************************************************************************
  3657.  *
  3658.  * FLIP FLAGS
  3659.  *
  3660.  ****************************************************************************/
  3661.  
  3662. #define DDFLIP_WAIT                          0x00000001L
  3663.  
  3664. /*
  3665.  * Indicates that the target surface contains the even field of video data.
  3666.  * This flag is only valid with an overlay surface.
  3667.  */
  3668. #define DDFLIP_EVEN                          0x00000002L
  3669.  
  3670. /*
  3671.  * Indicates that the target surface contains the odd field of video data.
  3672.  * This flag is only valid with an overlay surface.
  3673.  */
  3674. #define DDFLIP_ODD                           0x00000004L
  3675.  
  3676. /*
  3677.  * Causes DirectDraw to perform the physical flip immediately and return
  3678.  * to the application. Typically, what was the front buffer but is now the back
  3679.  * buffer will still be visible (depending on timing) until the next vertical 
  3680.  * retrace. Subsequent operations involving the two flipped surfaces will
  3681.  * not check to see if the physical flip has finished (i.e. will not return
  3682.  * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)).
  3683.  * This allows an application to perform Flips at a higher frequency than the
  3684.  * monitor refresh rate, but may introduce visible artifacts.
  3685.  * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set, 
  3686.  * DDFLIP_NOVSYNC has no effect.
  3687.  */
  3688. #define DDFLIP_NOVSYNC                       0x00000008L
  3689.  
  3690.  
  3691. /*
  3692.  * Flip Interval Flags. These flags indicate how many vertical retraces to wait between
  3693.  * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each
  3694.  * surface involved in the flip until the specified number of vertical retraces has
  3695.  * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set, 
  3696.  * DDFLIP_INTERVALn has no effect.
  3697.  */
  3698.  
  3699. /*
  3700.  * DirectDraw will flip on every other vertical sync
  3701.  */
  3702. #define DDFLIP_INTERVAL2                     0x02000000L
  3703.  
  3704.  
  3705. /*
  3706.  * DirectDraw will flip on every third vertical sync
  3707.  */
  3708. #define DDFLIP_INTERVAL3                     0x03000000L
  3709.  
  3710.  
  3711. /*
  3712.  * DirectDraw will flip on every fourth vertical sync
  3713.  */
  3714. #define DDFLIP_INTERVAL4                     0x04000000L
  3715.  
  3716.  
  3717.  
  3718. /****************************************************************************
  3719.  *
  3720.  * DIRECTDRAW SURFACE OVERLAY FLAGS
  3721.  *
  3722.  ****************************************************************************/
  3723.  
  3724. /*
  3725.  * Use the alpha information in the pixel format or the alpha channel surface
  3726.  * attached to the destination surface as the alpha channel for the
  3727.  * destination overlay.
  3728.  */
  3729. #define DDOVER_ALPHADEST            0x00000001l
  3730.  
  3731. /*
  3732.  * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  3733.  * destination alpha channel for this overlay.
  3734.  */
  3735. #define DDOVER_ALPHADESTCONSTOVERRIDE        0x00000002l
  3736.  
  3737. /*
  3738.  * The NEG suffix indicates that the destination surface becomes more
  3739.  * transparent as the alpha value increases.
  3740.  */
  3741. #define DDOVER_ALPHADESTNEG            0x00000004l
  3742.  
  3743. /*
  3744.  * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  3745.  * channel destination for this overlay.
  3746.  */
  3747. #define DDOVER_ALPHADESTSURFACEOVERRIDE        0x00000008l
  3748.  
  3749. /*
  3750.  * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  3751.  * channel for the edges of the image that border the color key colors.
  3752.  */
  3753. #define DDOVER_ALPHAEDGEBLEND            0x00000010l
  3754.  
  3755. /*
  3756.  * Use the alpha information in the pixel format or the alpha channel surface
  3757.  * attached to the source surface as the source alpha channel for this overlay.
  3758.  */
  3759. #define DDOVER_ALPHASRC                0x00000020l
  3760.  
  3761. /*
  3762.  * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  3763.  * alpha channel for this overlay.
  3764.  */
  3765. #define DDOVER_ALPHASRCCONSTOVERRIDE        0x00000040l
  3766.  
  3767. /*
  3768.  * The NEG suffix indicates that the source surface becomes more transparent
  3769.  * as the alpha value increases.
  3770.  */
  3771. #define DDOVER_ALPHASRCNEG            0x00000080l
  3772.  
  3773. /*
  3774.  * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  3775.  * source for this overlay.
  3776.  */
  3777. #define DDOVER_ALPHASRCSURFACEOVERRIDE        0x00000100l
  3778.  
  3779. /*
  3780.  * Turn this overlay off.
  3781.  */
  3782. #define DDOVER_HIDE                0x00000200l
  3783.  
  3784. /*
  3785.  * Use the color key associated with the destination surface.
  3786.  */
  3787. #define DDOVER_KEYDEST                0x00000400l
  3788.  
  3789. /*
  3790.  * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  3791.  * for the destination surface
  3792.  */
  3793. #define DDOVER_KEYDESTOVERRIDE            0x00000800l
  3794.  
  3795. /*
  3796.  * Use the color key associated with the source surface.
  3797.  */
  3798. #define DDOVER_KEYSRC                0x00001000l
  3799.  
  3800. /*
  3801.  * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  3802.  * for the source surface.
  3803.  */
  3804. #define DDOVER_KEYSRCOVERRIDE            0x00002000l
  3805.  
  3806. /*
  3807.  * Turn this overlay on.
  3808.  */
  3809. #define DDOVER_SHOW                0x00004000l
  3810.  
  3811. /*
  3812.  * Add a dirty rect to an emulated overlayed surface.
  3813.  */
  3814. #define DDOVER_ADDDIRTYRECT                     0x00008000l
  3815.  
  3816. /*
  3817.  * Redraw all dirty rects on an emulated overlayed surface.
  3818.  */
  3819. #define DDOVER_REFRESHDIRTYRECTS        0x00010000l
  3820.  
  3821. /*
  3822.  * Redraw the entire surface on an emulated overlayed surface.
  3823.  */
  3824. #define DDOVER_REFRESHALL                      0x00020000l
  3825.  
  3826.  
  3827. /*
  3828.  * Use the overlay FX flags to define special overlay FX
  3829.  */
  3830. #define DDOVER_DDFX                           0x00080000l
  3831.  
  3832. /*
  3833.  * Autoflip the overlay when ever the video port autoflips
  3834.  */
  3835. #define DDOVER_AUTOFLIP                           0x00100000l
  3836.  
  3837. /*
  3838.  * Display each field of video port data individually without
  3839.  * causing any jittery artifacts
  3840.  */
  3841. #define DDOVER_BOB                           0x00200000l
  3842.  
  3843. /*
  3844.  * Indicates that bob/weave decisions should not be overridden by other
  3845.  * interfaces.
  3846.  */
  3847. #define DDOVER_OVERRIDEBOBWEAVE            0x00400000l
  3848.  
  3849. /*
  3850.  * Indicates that the surface memory is composed of interleaved fields.
  3851.  */
  3852. #define DDOVER_INTERLEAVED            0x00800000l
  3853.  
  3854. /*
  3855.  * Indicates that bob will be performed using hardware rather than
  3856.  * software or emulated.
  3857.  */
  3858. #define DDOVER_BOBHARDWARE            0x01000000l
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867. /****************************************************************************
  3868.  *
  3869.  * DIRECTDRAWSURFACE LOCK FLAGS
  3870.  *
  3871.  ****************************************************************************/
  3872.  
  3873. /*
  3874.  * The default.     Set to indicate that Lock should return a valid memory pointer
  3875.  * to the top of the specified rectangle.  If no rectangle is specified then a
  3876.  * pointer to the top of the surface is returned.
  3877.  */
  3878. #define DDLOCK_SURFACEMEMORYPTR            0x00000000L    // default
  3879.  
  3880. /*
  3881.  * Set to indicate that Lock should wait until it can obtain a valid memory
  3882.  * pointer before returning.  If this bit is set, Lock will never return
  3883.  * DDERR_WASSTILLDRAWING.
  3884.  */
  3885. #define DDLOCK_WAIT                0x00000001L
  3886.  
  3887. /*
  3888.  * Set if an event handle is being passed to Lock.  Lock will trigger the event
  3889.  * when it can return the surface memory pointer requested.
  3890.  */
  3891. #define DDLOCK_EVENT                0x00000002L
  3892.  
  3893. /*
  3894.  * Indicates that the surface being locked will only be read from.
  3895.  */
  3896. #define DDLOCK_READONLY                0x00000010L
  3897.  
  3898. /*
  3899.  * Indicates that the surface being locked will only be written to
  3900.  */
  3901. #define DDLOCK_WRITEONLY            0x00000020L
  3902.  
  3903.  
  3904. /*
  3905.  * Indicates that a system wide lock should not be taken when this surface
  3906.  * is locked. This has several advantages (cursor responsiveness, ability
  3907.  * to call more Windows functions, easier debugging) when locking video
  3908.  * memory surfaces. However, an application specifying this flag must
  3909.  * comply with a number of conditions documented in the help file.
  3910.  * Furthermore, this flag cannot be specified when locking the primary.
  3911.  */
  3912. #define DDLOCK_NOSYSLOCK                        0x00000800L
  3913.  
  3914.  
  3915. /****************************************************************************
  3916.  *
  3917.  * DIRECTDRAWSURFACE PAGELOCK FLAGS
  3918.  *
  3919.  ****************************************************************************/
  3920.  
  3921. /*
  3922.  * No flags defined at present
  3923.  */
  3924.  
  3925.  
  3926. /****************************************************************************
  3927.  *
  3928.  * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  3929.  *
  3930.  ****************************************************************************/
  3931.  
  3932. /*
  3933.  * No flags defined at present
  3934.  */
  3935.  
  3936.  
  3937. /****************************************************************************
  3938.  *
  3939.  * DIRECTDRAWSURFACE BLT FX FLAGS
  3940.  *
  3941.  ****************************************************************************/
  3942.  
  3943. /*
  3944.  * If stretching, use arithmetic stretching along the Y axis for this blt.
  3945.  */
  3946. #define DDBLTFX_ARITHSTRETCHY            0x00000001l
  3947.  
  3948. /*
  3949.  * Do this blt mirroring the surface left to right.  Spin the
  3950.  * surface around its y-axis.
  3951.  */
  3952. #define DDBLTFX_MIRRORLEFTRIGHT            0x00000002l
  3953.  
  3954. /*
  3955.  * Do this blt mirroring the surface up and down.  Spin the surface
  3956.  * around its x-axis.
  3957.  */
  3958. #define DDBLTFX_MIRRORUPDOWN            0x00000004l
  3959.  
  3960. /*
  3961.  * Schedule this blt to avoid tearing.
  3962.  */
  3963. #define DDBLTFX_NOTEARING            0x00000008l
  3964.  
  3965. /*
  3966.  * Do this blt rotating the surface one hundred and eighty degrees.
  3967.  */
  3968. #define DDBLTFX_ROTATE180            0x00000010l
  3969.  
  3970. /*
  3971.  * Do this blt rotating the surface two hundred and seventy degrees.
  3972.  */
  3973. #define DDBLTFX_ROTATE270            0x00000020l
  3974.  
  3975. /*
  3976.  * Do this blt rotating the surface ninety degrees.
  3977.  */
  3978. #define DDBLTFX_ROTATE90            0x00000040l
  3979.  
  3980. /*
  3981.  * Do this z blt using dwZBufferLow and dwZBufferHigh as  range values
  3982.  * specified to limit the bits copied from the source surface.
  3983.  */
  3984. #define DDBLTFX_ZBUFFERRANGE            0x00000080l
  3985.  
  3986. /*
  3987.  * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  3988.  * before comparing it with the desting z values.
  3989.  */
  3990. #define DDBLTFX_ZBUFFERBASEDEST            0x00000100l
  3991.  
  3992. /****************************************************************************
  3993.  *
  3994.  * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  3995.  *
  3996.  ****************************************************************************/
  3997.  
  3998. /*
  3999.  * If stretching, use arithmetic stretching along the Y axis for this overlay.
  4000.  */
  4001. #define DDOVERFX_ARITHSTRETCHY            0x00000001l
  4002.  
  4003. /*
  4004.  * Mirror the overlay across the vertical axis
  4005.  */
  4006. #define DDOVERFX_MIRRORLEFTRIGHT        0x00000002l
  4007.  
  4008. /*
  4009.  * Mirror the overlay across the horizontal axis
  4010.  */
  4011. #define DDOVERFX_MIRRORUPDOWN            0x00000004l
  4012.  
  4013. /****************************************************************************
  4014.  *
  4015.  * Flags for dwDDFX member of DDSPRITEFX structure
  4016.  *
  4017.  ****************************************************************************/
  4018. /*
  4019.  * Use affine transformation matrix in fTransform member.
  4020.  */
  4021. #define DDSPRITEFX_AFFINETRANSFORM        0x00000001l
  4022.  
  4023. /*
  4024.  * Use RGBA scaling factors in ddrgbaScaleFactors member.
  4025.  */
  4026. #define DDSPRITEFX_RGBASCALING            0x00000002l
  4027.  
  4028. /*
  4029.  * Degrade RGBA scaling factors to accommodate driver's capabilities.
  4030.  */
  4031. #define DDSPRITEFX_DEGRADERGBASCALING        0x00000004l
  4032.  
  4033. /*
  4034.  * Do bilinear filtering of stretched or warped sprite.
  4035.  */
  4036. #define DDSPRITEFX_BILINEARFILTER               0x00000008l
  4037.  
  4038. /*
  4039.  * Do "blur" filtering of stretched or warped sprite.
  4040.  */
  4041. #define DDSPRITEFX_BLURFILTER                    0x00000010l
  4042.  
  4043. /*
  4044.  * Do "flat" filtering of stretched or warped sprite.
  4045.  */
  4046. #define DDSPRITEFX_FLATFILTER                   0x00000020l
  4047.  
  4048. /*
  4049.  * Degrade filtering operation to accommodate driver's capabilities.
  4050.  */
  4051. #define DDSPRITEFX_DEGRADEFILTER               0x00000040l
  4052.  
  4053.  
  4054. /****************************************************************************
  4055.  *
  4056.  * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  4057.  *
  4058.  ****************************************************************************/
  4059.  
  4060. /*
  4061.  * return when the vertical blank interval begins
  4062.  */
  4063. #define DDWAITVB_BLOCKBEGIN            0x00000001l
  4064.  
  4065. /*
  4066.  * set up an event to trigger when the vertical blank begins
  4067.  */
  4068. #define DDWAITVB_BLOCKBEGINEVENT        0x00000002l
  4069.  
  4070. /*
  4071.  * return when the vertical blank interval ends and display begins
  4072.  */
  4073. #define DDWAITVB_BLOCKEND            0x00000004l
  4074.  
  4075. /****************************************************************************
  4076.  *
  4077.  * DIRECTDRAW GETFLIPSTATUS FLAGS
  4078.  *
  4079.  ****************************************************************************/
  4080.  
  4081. /*
  4082.  * is it OK to flip now?
  4083.  */
  4084. #define DDGFS_CANFLIP            0x00000001l
  4085.  
  4086. /*
  4087.  * is the last flip finished?
  4088.  */
  4089. #define DDGFS_ISFLIPDONE        0x00000002l
  4090.  
  4091. /****************************************************************************
  4092.  *
  4093.  * DIRECTDRAW GETBLTSTATUS FLAGS
  4094.  *
  4095.  ****************************************************************************/
  4096.  
  4097. /*
  4098.  * is it OK to blt now?
  4099.  */
  4100. #define DDGBS_CANBLT            0x00000001l
  4101.  
  4102. /*
  4103.  * is the blt to the surface finished?
  4104.  */
  4105. #define DDGBS_ISBLTDONE            0x00000002l
  4106.  
  4107.  
  4108. /****************************************************************************
  4109.  *
  4110.  * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  4111.  *
  4112.  ****************************************************************************/
  4113.  
  4114. /*
  4115.  * Enumerate overlays back to front.
  4116.  */
  4117. #define DDENUMOVERLAYZ_BACKTOFRONT    0x00000000l
  4118.  
  4119. /*
  4120.  * Enumerate overlays front to back
  4121.  */
  4122. #define DDENUMOVERLAYZ_FRONTTOBACK    0x00000001l
  4123.  
  4124. /****************************************************************************
  4125.  *
  4126.  * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  4127.  *
  4128.  ****************************************************************************/
  4129.  
  4130. /*
  4131.  * Send overlay to front
  4132.  */
  4133. #define DDOVERZ_SENDTOFRONT        0x00000000l
  4134.  
  4135. /*
  4136.  * Send overlay to back
  4137.  */
  4138. #define DDOVERZ_SENDTOBACK        0x00000001l
  4139.  
  4140. /*
  4141.  * Move Overlay forward
  4142.  */
  4143. #define DDOVERZ_MOVEFORWARD        0x00000002l
  4144.  
  4145. /*
  4146.  * Move Overlay backward
  4147.  */
  4148. #define DDOVERZ_MOVEBACKWARD        0x00000003l
  4149.  
  4150. /*
  4151.  * Move Overlay in front of relative surface
  4152.  */
  4153. #define DDOVERZ_INSERTINFRONTOF        0x00000004l
  4154.  
  4155. /*
  4156.  * Move Overlay in back of relative surface
  4157.  */
  4158. #define DDOVERZ_INSERTINBACKOF        0x00000005l
  4159.  
  4160.  
  4161.  
  4162. /****************************************************************************
  4163.  *
  4164.  * DIRECTDRAW SETGAMMARAMP FLAGS
  4165.  *
  4166.  ****************************************************************************/
  4167.  
  4168. /*
  4169.  * Request calibrator to adjust the gamma ramp according to the physical
  4170.  * properties of the display so that the result should appear identical
  4171.  * on all systems.
  4172.  */
  4173. #define DDSGR_CALIBRATE                        0x00000001L
  4174.  
  4175.  
  4176. /*===========================================================================
  4177.  *
  4178.  *
  4179.  * DIRECTDRAW RETURN CODES
  4180.  *
  4181.  * The return values from DirectDraw Commands and Surface that return an HRESULT
  4182.  * are codes from DirectDraw concerning the results of the action
  4183.  * requested by DirectDraw.
  4184.  *
  4185.  *==========================================================================*/
  4186.  
  4187. /*
  4188.  * Status is OK
  4189.  *
  4190.  * Issued by: DirectDraw Commands and all callbacks
  4191.  */
  4192. #define DD_OK                    0
  4193. #define DD_FALSE                                S_FALSE
  4194.  
  4195. /****************************************************************************
  4196.  *
  4197.  * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  4198.  *
  4199.  * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  4200.  * DIRECTDRAWSURFACE object enumerations.   They can only be returned by
  4201.  * enumeration callback routines.
  4202.  *
  4203.  ****************************************************************************/
  4204.  
  4205. /*
  4206.  * stop the enumeration
  4207.  */
  4208. #define DDENUMRET_CANCEL            0
  4209.  
  4210. /*
  4211.  * continue the enumeration
  4212.  */
  4213. #define DDENUMRET_OK                1
  4214.  
  4215. /****************************************************************************
  4216.  *
  4217.  * DIRECTDRAW ERRORS
  4218.  *
  4219.  * Errors are represented by negative values and cannot be combined.
  4220.  *
  4221.  ****************************************************************************/
  4222.  
  4223. /*
  4224.  * This object is already initialized
  4225.  */
  4226. #define DDERR_ALREADYINITIALIZED        MAKE_DDHRESULT( 5 )
  4227.  
  4228. /*
  4229.  * This surface can not be attached to the requested surface.
  4230.  */
  4231. #define DDERR_CANNOTATTACHSURFACE        MAKE_DDHRESULT( 10 )
  4232.  
  4233. /*
  4234.  * This surface can not be detached from the requested surface.
  4235.  */
  4236. #define DDERR_CANNOTDETACHSURFACE        MAKE_DDHRESULT( 20 )
  4237.  
  4238. /*
  4239.  * Support is currently not available.
  4240.  */
  4241. #define DDERR_CURRENTLYNOTAVAIL            MAKE_DDHRESULT( 40 )
  4242.  
  4243. /*
  4244.  * An exception was encountered while performing the requested operation
  4245.  */
  4246. #define DDERR_EXCEPTION                MAKE_DDHRESULT( 55 )
  4247.  
  4248. /*
  4249.  * Generic failure.
  4250.  */
  4251. #define DDERR_GENERIC                E_FAIL
  4252.  
  4253. /*
  4254.  * Height of rectangle provided is not a multiple of reqd alignment
  4255.  */
  4256. #define DDERR_HEIGHTALIGN            MAKE_DDHRESULT( 90 )
  4257.  
  4258. /*
  4259.  * Unable to match primary surface creation request with existing
  4260.  * primary surface.
  4261.  */
  4262. #define DDERR_INCOMPATIBLEPRIMARY        MAKE_DDHRESULT( 95 )
  4263.  
  4264. /*
  4265.  * One or more of the caps bits passed to the callback are incorrect.
  4266.  */
  4267. #define DDERR_INVALIDCAPS            MAKE_DDHRESULT( 100 )
  4268.  
  4269. /*
  4270.  * DirectDraw does not support provided Cliplist.
  4271.  */
  4272. #define DDERR_INVALIDCLIPLIST            MAKE_DDHRESULT( 110 )
  4273.  
  4274. /*
  4275.  * DirectDraw does not support the requested mode
  4276.  */
  4277. #define DDERR_INVALIDMODE            MAKE_DDHRESULT( 120 )
  4278.  
  4279. /*
  4280.  * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  4281.  */
  4282. #define DDERR_INVALIDOBJECT            MAKE_DDHRESULT( 130 )
  4283.  
  4284. /*
  4285.  * One or more of the parameters passed to the callback function are
  4286.  * incorrect.
  4287.  */
  4288. #define DDERR_INVALIDPARAMS            E_INVALIDARG
  4289.  
  4290. /*
  4291.  * pixel format was invalid as specified
  4292.  */
  4293. #define DDERR_INVALIDPIXELFORMAT        MAKE_DDHRESULT( 145 )
  4294.  
  4295. /*
  4296.  * Rectangle provided was invalid.
  4297.  */
  4298. #define DDERR_INVALIDRECT            MAKE_DDHRESULT( 150 )
  4299.  
  4300. /*
  4301.  * Operation could not be carried out because one or more surfaces are locked
  4302.  */
  4303. #define DDERR_LOCKEDSURFACES            MAKE_DDHRESULT( 160 )
  4304.  
  4305. /*
  4306.  * There is no 3D present.
  4307.  */
  4308. #define DDERR_NO3D                MAKE_DDHRESULT( 170 )
  4309.  
  4310. /*
  4311.  * Operation could not be carried out because there is no alpha accleration
  4312.  * hardware present or available.
  4313.  */
  4314. #define DDERR_NOALPHAHW                MAKE_DDHRESULT( 180 )
  4315.  
  4316.  
  4317. /*
  4318.  * no clip list available
  4319.  */
  4320. #define DDERR_NOCLIPLIST            MAKE_DDHRESULT( 205 )
  4321.  
  4322. /*
  4323.  * Operation could not be carried out because there is no color conversion
  4324.  * hardware present or available.
  4325.  */
  4326. #define DDERR_NOCOLORCONVHW            MAKE_DDHRESULT( 210 )
  4327.  
  4328. /*
  4329.  * Create function called without DirectDraw object method SetCooperativeLevel
  4330.  * being called.
  4331.  */
  4332. #define DDERR_NOCOOPERATIVELEVELSET        MAKE_DDHRESULT( 212 )
  4333.  
  4334. /*
  4335.  * Surface doesn't currently have a color key
  4336.  */
  4337. #define DDERR_NOCOLORKEY            MAKE_DDHRESULT( 215 )
  4338.  
  4339. /*
  4340.  * Operation could not be carried out because there is no hardware support
  4341.  * of the dest color key.
  4342.  */
  4343. #define DDERR_NOCOLORKEYHW            MAKE_DDHRESULT( 220 )
  4344.  
  4345. /*
  4346.  * No DirectDraw support possible with current display driver
  4347.  */
  4348. #define DDERR_NODIRECTDRAWSUPPORT        MAKE_DDHRESULT( 222 )
  4349.  
  4350. /*
  4351.  * Operation requires the application to have exclusive mode but the
  4352.  * application does not have exclusive mode.
  4353.  */
  4354. #define DDERR_NOEXCLUSIVEMODE            MAKE_DDHRESULT( 225 )
  4355.  
  4356. /*
  4357.  * Flipping visible surfaces is not supported.
  4358.  */
  4359. #define DDERR_NOFLIPHW                MAKE_DDHRESULT( 230 )
  4360.  
  4361. /*
  4362.  * There is no GDI present.
  4363.  */
  4364. #define DDERR_NOGDI                MAKE_DDHRESULT( 240 )
  4365.  
  4366. /*
  4367.  * Operation could not be carried out because there is no hardware present
  4368.  * or available.
  4369.  */
  4370. #define DDERR_NOMIRRORHW            MAKE_DDHRESULT( 250 )
  4371.  
  4372. /*
  4373.  * Requested item was not found
  4374.  */
  4375. #define DDERR_NOTFOUND                MAKE_DDHRESULT( 255 )
  4376.  
  4377. /*
  4378.  * Operation could not be carried out because there is no overlay hardware
  4379.  * present or available.
  4380.  */
  4381. #define DDERR_NOOVERLAYHW            MAKE_DDHRESULT( 260 )
  4382.  
  4383. /*
  4384.  * Operation could not be carried out because the source and destination
  4385.  * rectangles are on the same surface and overlap each other.
  4386.  */
  4387. #define DDERR_OVERLAPPINGRECTS            MAKE_DDHRESULT( 270 )
  4388.  
  4389. /*
  4390.  * Operation could not be carried out because there is no appropriate raster
  4391.  * op hardware present or available.
  4392.  */
  4393. #define DDERR_NORASTEROPHW            MAKE_DDHRESULT( 280 )
  4394.  
  4395. /*
  4396.  * Operation could not be carried out because there is no rotation hardware
  4397.  * present or available.
  4398.  */
  4399. #define DDERR_NOROTATIONHW            MAKE_DDHRESULT( 290 )
  4400.  
  4401. /*
  4402.  * Operation could not be carried out because there is no hardware support
  4403.  * for stretching
  4404.  */
  4405. #define DDERR_NOSTRETCHHW            MAKE_DDHRESULT( 310 )
  4406.  
  4407. /*
  4408.  * DirectDrawSurface is not in 4 bit color palette and the requested operation
  4409.  * requires 4 bit color palette.
  4410.  */
  4411. #define DDERR_NOT4BITCOLOR            MAKE_DDHRESULT( 316 )
  4412.  
  4413. /*
  4414.  * DirectDrawSurface is not in 4 bit color index palette and the requested
  4415.  * operation requires 4 bit color index palette.
  4416.  */
  4417. #define DDERR_NOT4BITCOLORINDEX            MAKE_DDHRESULT( 317 )
  4418.  
  4419. /*
  4420.  * DirectDraw Surface is not in 8 bit color mode and the requested operation
  4421.  * requires 8 bit color.
  4422.  */
  4423. #define DDERR_NOT8BITCOLOR            MAKE_DDHRESULT( 320 )
  4424.  
  4425. /*
  4426.  * Operation could not be carried out because there is no texture mapping
  4427.  * hardware present or available.
  4428.  */
  4429. #define DDERR_NOTEXTUREHW            MAKE_DDHRESULT( 330 )
  4430.  
  4431. /*
  4432.  * Operation could not be carried out because there is no hardware support
  4433.  * for vertical blank synchronized operations.
  4434.  */
  4435. #define DDERR_NOVSYNCHW                MAKE_DDHRESULT( 335 )
  4436.  
  4437. /*
  4438.  * Operation could not be carried out because there is no hardware support
  4439.  * for zbuffer blting.
  4440.  */
  4441. #define DDERR_NOZBUFFERHW            MAKE_DDHRESULT( 340 )
  4442.  
  4443. /*
  4444.  * Overlay surfaces could not be z layered based on their BltOrder because
  4445.  * the hardware does not support z layering of overlays.
  4446.  */
  4447. #define DDERR_NOZOVERLAYHW            MAKE_DDHRESULT( 350 )
  4448.  
  4449. /*
  4450.  * The hardware needed for the requested operation has already been
  4451.  * allocated.
  4452.  */
  4453. #define DDERR_OUTOFCAPS                MAKE_DDHRESULT( 360 )
  4454.  
  4455. /*
  4456.  * DirectDraw does not have enough memory to perform the operation.
  4457.  */
  4458. #define DDERR_OUTOFMEMORY            E_OUTOFMEMORY
  4459.  
  4460. /*
  4461.  * DirectDraw does not have enough memory to perform the operation.
  4462.  */
  4463. #define DDERR_OUTOFVIDEOMEMORY            MAKE_DDHRESULT( 380 )
  4464.  
  4465. /*
  4466.  * hardware does not support clipped overlays
  4467.  */
  4468. #define DDERR_OVERLAYCANTCLIP            MAKE_DDHRESULT( 382 )
  4469.  
  4470. /*
  4471.  * Can only have ony color key active at one time for overlays
  4472.  */
  4473. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE    MAKE_DDHRESULT( 384 )
  4474.  
  4475. /*
  4476.  * Access to this palette is being refused because the palette is already
  4477.  * locked by another thread.
  4478.  */
  4479. #define DDERR_PALETTEBUSY            MAKE_DDHRESULT( 387 )
  4480.  
  4481. /*
  4482.  * No src color key specified for this operation.
  4483.  */
  4484. #define DDERR_COLORKEYNOTSET            MAKE_DDHRESULT( 400 )
  4485.  
  4486. /*
  4487.  * This surface is already attached to the surface it is being attached to.
  4488.  */
  4489. #define DDERR_SURFACEALREADYATTACHED        MAKE_DDHRESULT( 410 )
  4490.  
  4491. /*
  4492.  * This surface is already a dependency of the surface it is being made a
  4493.  * dependency of.
  4494.  */
  4495. #define DDERR_SURFACEALREADYDEPENDENT        MAKE_DDHRESULT( 420 )
  4496.  
  4497. /*
  4498.  * Access to this surface is being refused because the surface is already
  4499.  * locked by another thread.
  4500.  */
  4501. #define DDERR_SURFACEBUSY            MAKE_DDHRESULT( 430 )
  4502.  
  4503. /*
  4504.  * Access to this surface is being refused because no driver exists
  4505.  * which can supply a pointer to the surface.
  4506.  * This is most likely to happen when attempting to lock the primary
  4507.  * surface when no DCI provider is present.
  4508.  * Will also happen on attempts to lock an optimized surface.
  4509.  */
  4510. #define DDERR_CANTLOCKSURFACE                   MAKE_DDHRESULT( 435 )
  4511.  
  4512. /*
  4513.  * Access to Surface refused because Surface is obscured.
  4514.  */
  4515. #define DDERR_SURFACEISOBSCURED            MAKE_DDHRESULT( 440 )
  4516.  
  4517. /*
  4518.  * Access to this surface is being refused because the surface is gone.
  4519.  * The DIRECTDRAWSURFACE object representing this surface should
  4520.  * have Restore called on it.
  4521.  */
  4522. #define DDERR_SURFACELOST            MAKE_DDHRESULT( 450 )
  4523.  
  4524. /*
  4525.  * The requested surface is not attached.
  4526.  */
  4527. #define DDERR_SURFACENOTATTACHED        MAKE_DDHRESULT( 460 )
  4528.  
  4529. /*
  4530.  * Height requested by DirectDraw is too large.
  4531.  */
  4532. #define DDERR_TOOBIGHEIGHT            MAKE_DDHRESULT( 470 )
  4533.  
  4534. /*
  4535.  * Size requested by DirectDraw is too large --     The individual height and
  4536.  * width are OK.
  4537.  */
  4538. #define DDERR_TOOBIGSIZE            MAKE_DDHRESULT( 480 )
  4539.  
  4540. /*
  4541.  * Width requested by DirectDraw is too large.
  4542.  */
  4543. #define DDERR_TOOBIGWIDTH            MAKE_DDHRESULT( 490 )
  4544.  
  4545. /*
  4546.  * Action not supported.
  4547.  */
  4548. #define DDERR_UNSUPPORTED            E_NOTIMPL
  4549.  
  4550. /*
  4551.  * FOURCC format requested is unsupported by DirectDraw
  4552.  */
  4553. #define DDERR_UNSUPPORTEDFORMAT            MAKE_DDHRESULT( 510 )
  4554.  
  4555. /*
  4556.  * Bitmask in the pixel format requested is unsupported by DirectDraw
  4557.  */
  4558. #define DDERR_UNSUPPORTEDMASK            MAKE_DDHRESULT( 520 )
  4559.  
  4560. /*
  4561.  * The specified stream contains invalid data
  4562.  */
  4563. #define DDERR_INVALIDSTREAM                     MAKE_DDHRESULT( 521 )
  4564.  
  4565. /*
  4566.  * vertical blank is in progress
  4567.  */
  4568. #define DDERR_VERTICALBLANKINPROGRESS        MAKE_DDHRESULT( 537 )
  4569.  
  4570. /*
  4571.  * Informs DirectDraw that the previous Blt which is transfering information
  4572.  * to or from this Surface is incomplete.
  4573.  */
  4574. #define DDERR_WASSTILLDRAWING            MAKE_DDHRESULT( 540 )
  4575.  
  4576.  
  4577. /*
  4578.  * Rectangle provided was not horizontally aligned on reqd. boundary
  4579.  */
  4580. #define DDERR_XALIGN                MAKE_DDHRESULT( 560 )
  4581.  
  4582. /*
  4583.  * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  4584.  * identifier.
  4585.  */
  4586. #define DDERR_INVALIDDIRECTDRAWGUID        MAKE_DDHRESULT( 561 )
  4587.  
  4588. /*
  4589.  * A DirectDraw object representing this driver has already been created
  4590.  * for this process.
  4591.  */
  4592. #define DDERR_DIRECTDRAWALREADYCREATED        MAKE_DDHRESULT( 562 )
  4593.  
  4594. /*
  4595.  * A hardware only DirectDraw object creation was attempted but the driver
  4596.  * did not support any hardware.
  4597.  */
  4598. #define DDERR_NODIRECTDRAWHW            MAKE_DDHRESULT( 563 )
  4599.  
  4600. /*
  4601.  * this process already has created a primary surface
  4602.  */
  4603. #define DDERR_PRIMARYSURFACEALREADYEXISTS    MAKE_DDHRESULT( 564 )
  4604.  
  4605. /*
  4606.  * software emulation not available.
  4607.  */
  4608. #define DDERR_NOEMULATION            MAKE_DDHRESULT( 565 )
  4609.  
  4610. /*
  4611.  * region passed to Clipper::GetClipList is too small.
  4612.  */
  4613. #define DDERR_REGIONTOOSMALL            MAKE_DDHRESULT( 566 )
  4614.  
  4615. /*
  4616.  * an attempt was made to set a clip list for a clipper objec that
  4617.  * is already monitoring an hwnd.
  4618.  */
  4619. #define DDERR_CLIPPERISUSINGHWND        MAKE_DDHRESULT( 567 )
  4620.  
  4621. /*
  4622.  * No clipper object attached to surface object
  4623.  */
  4624. #define DDERR_NOCLIPPERATTACHED            MAKE_DDHRESULT( 568 )
  4625.  
  4626. /*
  4627.  * Clipper notification requires an HWND or
  4628.  * no HWND has previously been set as the CooperativeLevel HWND.
  4629.  */
  4630. #define DDERR_NOHWND                MAKE_DDHRESULT( 569 )
  4631.  
  4632. /*
  4633.  * HWND used by DirectDraw CooperativeLevel has been subclassed,
  4634.  * this prevents DirectDraw from restoring state.
  4635.  */
  4636. #define DDERR_HWNDSUBCLASSED            MAKE_DDHRESULT( 570 )
  4637.  
  4638. /*
  4639.  * The CooperativeLevel HWND has already been set.
  4640.  * It can not be reset while the process has surfaces or palettes created.
  4641.  */
  4642. #define DDERR_HWNDALREADYSET            MAKE_DDHRESULT( 571 )
  4643.  
  4644. /*
  4645.  * No palette object attached to this surface.
  4646.  */
  4647. #define DDERR_NOPALETTEATTACHED            MAKE_DDHRESULT( 572 )
  4648.  
  4649. /*
  4650.  * No hardware support for 16 or 256 color palettes.
  4651.  */
  4652. #define DDERR_NOPALETTEHW            MAKE_DDHRESULT( 573 )
  4653.  
  4654. /*
  4655.  * If a clipper object is attached to the source surface passed into a
  4656.  * BltFast call.
  4657.  */
  4658. #define DDERR_BLTFASTCANTCLIP            MAKE_DDHRESULT( 574 )
  4659.  
  4660. /*
  4661.  * No blter.
  4662.  */
  4663. #define DDERR_NOBLTHW                MAKE_DDHRESULT( 575 )
  4664.  
  4665. /*
  4666.  * No DirectDraw ROP hardware.
  4667.  */
  4668. #define DDERR_NODDROPSHW            MAKE_DDHRESULT( 576 )
  4669.  
  4670. /*
  4671.  * returned when GetOverlayPosition is called on a hidden overlay
  4672.  */
  4673. #define DDERR_OVERLAYNOTVISIBLE            MAKE_DDHRESULT( 577 )
  4674.  
  4675. /*
  4676.  * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  4677.  * has never been called on to establish a destionation.
  4678.  */
  4679. #define DDERR_NOOVERLAYDEST            MAKE_DDHRESULT( 578 )
  4680.  
  4681. /*
  4682.  * returned when the position of the overlay on the destionation is no longer
  4683.  * legal for that destionation.
  4684.  */
  4685. #define DDERR_INVALIDPOSITION            MAKE_DDHRESULT( 579 )
  4686.  
  4687. /*
  4688.  * returned when an overlay member is called for a non-overlay surface
  4689.  */
  4690. #define DDERR_NOTAOVERLAYSURFACE        MAKE_DDHRESULT( 580 )
  4691.  
  4692. /*
  4693.  * An attempt was made to set the cooperative level when it was already
  4694.  * set to exclusive.
  4695.  */
  4696. #define DDERR_EXCLUSIVEMODEALREADYSET        MAKE_DDHRESULT( 581 )
  4697.  
  4698. /*
  4699.  * An attempt has been made to flip a surface that is not flippable.
  4700.  */
  4701. #define DDERR_NOTFLIPPABLE            MAKE_DDHRESULT( 582 )
  4702.  
  4703. /*
  4704.  * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  4705.  * created.
  4706.  */
  4707. #define DDERR_CANTDUPLICATE            MAKE_DDHRESULT( 583 )
  4708.  
  4709. /*
  4710.  * Surface was not locked.  An attempt to unlock a surface that was not
  4711.  * locked at all, or by this process, has been attempted.
  4712.  */
  4713. #define DDERR_NOTLOCKED                MAKE_DDHRESULT( 584 )
  4714.  
  4715. /*
  4716.  * Windows can not create any more DCs, or a DC was requested for a paltte-indexed
  4717.  * surface when the surface had no palette AND the display mode was not palette-indexed
  4718.  * (in this case DirectDraw cannot select a proper palette into the DC)
  4719.  */
  4720. #define DDERR_CANTCREATEDC            MAKE_DDHRESULT( 585 )
  4721.  
  4722. /*
  4723.  * No DC was ever created for this surface.
  4724.  */
  4725. #define DDERR_NODC                MAKE_DDHRESULT( 586 )
  4726.  
  4727. /*
  4728.  * This surface can not be restored because it was created in a different
  4729.  * mode.
  4730.  */
  4731. #define DDERR_WRONGMODE                MAKE_DDHRESULT( 587 )
  4732.  
  4733. /*
  4734.  * This surface can not be restored because it is an implicitly created
  4735.  * surface.
  4736.  */
  4737. #define DDERR_IMPLICITLYCREATED            MAKE_DDHRESULT( 588 )
  4738.  
  4739. /*
  4740.  * The surface being used is not a palette-based surface
  4741.  */
  4742. #define DDERR_NOTPALETTIZED            MAKE_DDHRESULT( 589 )
  4743.  
  4744.  
  4745. /*
  4746.  * The display is currently in an unsupported mode
  4747.  */
  4748. #define DDERR_UNSUPPORTEDMODE            MAKE_DDHRESULT( 590 )
  4749.  
  4750. /*
  4751.  * Operation could not be carried out because there is no mip-map
  4752.  * texture mapping hardware present or available.
  4753.  */
  4754. #define DDERR_NOMIPMAPHW            MAKE_DDHRESULT( 591 )
  4755.  
  4756. /*
  4757.  * The requested action could not be performed because the surface was of
  4758.  * the wrong type.
  4759.  */
  4760. #define DDERR_INVALIDSURFACETYPE                MAKE_DDHRESULT( 592 )
  4761.  
  4762.  
  4763.  
  4764. /*
  4765.  * Device does not support optimized surfaces, therefore no video memory optimized surfaces
  4766.  */
  4767. #define DDERR_NOOPTIMIZEHW                      MAKE_DDHRESULT( 600 )
  4768.  
  4769. /*
  4770.  * Surface is an optimized surface, but has not yet been allocated any memory
  4771.  */
  4772. #define DDERR_NOTLOADED                         MAKE_DDHRESULT( 601 )
  4773.  
  4774. /*
  4775.  * Attempt was made to create or set a device window without first setting
  4776.  * the focus window
  4777.  */
  4778. #define DDERR_NOFOCUSWINDOW                     MAKE_DDHRESULT( 602 )
  4779.  
  4780. /*
  4781.  * A DC has already been returned for this surface. Only one DC can be
  4782.  * retrieved per surface.
  4783.  */
  4784. #define DDERR_DCALREADYCREATED            MAKE_DDHRESULT( 620 )
  4785.  
  4786. /*
  4787.  * An attempt was made to allocate non-local video memory from a device
  4788.  * that does not support non-local video memory.
  4789.  */
  4790. #define DDERR_NONONLOCALVIDMEM                  MAKE_DDHRESULT( 630 )
  4791.  
  4792. /*
  4793.  * The attempt to page lock a surface failed.
  4794.  */
  4795. #define DDERR_CANTPAGELOCK            MAKE_DDHRESULT( 640 )
  4796.  
  4797.  
  4798. /*
  4799.  * The attempt to page unlock a surface failed.
  4800.  */
  4801. #define DDERR_CANTPAGEUNLOCK            MAKE_DDHRESULT( 660 )
  4802.  
  4803. /*
  4804.  * An attempt was made to page unlock a surface with no outstanding page locks.
  4805.  */
  4806. #define DDERR_NOTPAGELOCKED            MAKE_DDHRESULT( 680 )
  4807.  
  4808. /*
  4809.  * There is more data available than the specified buffer size could hold
  4810.  */
  4811. #define DDERR_MOREDATA                     MAKE_DDHRESULT( 690 )
  4812.  
  4813. /*
  4814.  * The data has expired and is therefore no longer valid.
  4815.  */
  4816. #define DDERR_EXPIRED                           MAKE_DDHRESULT( 691 )
  4817.  
  4818. /*
  4819.  * The video port is not active
  4820.  */
  4821. #define DDERR_VIDEONOTACTIVE               MAKE_DDHRESULT( 695 )
  4822.  
  4823. /*
  4824.  * Surfaces created by one direct draw device cannot be used directly by
  4825.  * another direct draw device.
  4826.  */
  4827. #define DDERR_DEVICEDOESNTOWNSURFACE           MAKE_DDHRESULT( 699 )
  4828.  
  4829.  
  4830. /*
  4831.  * An attempt was made to invoke an interface member of a DirectDraw object
  4832.  * created by CoCreateInstance() before it was initialized.
  4833.  */
  4834. #define DDERR_NOTINITIALIZED                    CO_E_NOTINITIALIZED
  4835.  
  4836.  
  4837. /* Alpha bit depth constants */
  4838.  
  4839.  
  4840. #ifdef __cplusplus
  4841. };
  4842. #endif
  4843.  
  4844. #endif
  4845.  
  4846.