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