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