home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / ddraw.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  141KB  |  3,879 lines

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