1 /*==========================================================================;
3 * Copyright (C) 1994-1997 Microsoft Corporation. All Rights Reserved.
6 * Content: DirectDraw include file
8 ***************************************************************************/
10 #ifndef __DDRAW_INCLUDED__
11 #define __DDRAW_INCLUDED__
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.
20 #ifndef DIRECTDRAW_VERSION
21 #define DIRECTDRAW_VERSION 0x0600
22 #endif /* DIRECTDRAW_VERSION */
24 #if defined( _WIN32 ) && !defined( _NO_COM )
25 #define COM_NO_WINDOWS_H
29 #if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT)
30 #define CO_E_NOTINITIALIZED 0x800401F0L
35 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
42 // For compilers that don't support nameless unions, do a
44 // #define NONAMELESSUNION
46 // before #include <ddraw.h>
48 #ifndef DUMMYUNIONNAMEN
49 #if defined(__cplusplus) || !defined(NONAMELESSUNION)
50 #define DUMMYUNIONNAMEN(n)
52 #define DUMMYUNIONNAMEN(n) u##n
57 #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
58 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
59 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
60 #endif //defined(MAKEFOURCC)
63 * FOURCC codes for DX compressed-texture pixel formats
65 #define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
66 #define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
67 #define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
68 #define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
69 #define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))
72 * GUIDS used by DirectDraw objects
74 #if defined( _WIN32 ) && !defined( _NO_COM )
76 DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
77 DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
78 DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
79 DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
80 DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
81 DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
82 DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
83 DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
84 DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
86 DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
87 DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
88 DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
89 DEFINE_GUID( IID_IDirectDrawGammaControl, 0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
93 /*============================================================================
95 * DirectDraw Structures
97 * Various structures used to invoke DirectDraw.
99 *==========================================================================*/
102 struct IDirectDrawSurface;
103 struct IDirectDrawPalette;
104 struct IDirectDrawClipper;
106 typedef struct IDirectDraw FAR *LPDIRECTDRAW;
107 typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
108 typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4;
109 typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
110 typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
111 typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
112 typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4;
114 typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
115 typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
116 typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL;
117 typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL;
119 typedef struct _DDFXROP FAR *LPDDFXROP;
120 typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
121 typedef struct _DDSURFACEDESC2 FAR *LPDDSURFACEDESC2;
122 typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;
127 #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
128 //#if defined( _WIN32 ) && !defined( _NO_ENUM )
129 typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
130 typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
131 extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
132 extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
134 * Protect against old SDKs
137 #define HMONITOR HANDLE
139 typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
140 typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
141 extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
142 extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
143 typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
144 typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
147 typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
148 #define DirectDrawEnumerate DirectDrawEnumerateW
149 typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX;
150 typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX;
151 #define DirectDrawEnumerateEx DirectDrawEnumerateExW
153 typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
154 #define DirectDrawEnumerate DirectDrawEnumerateA
155 typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX;
156 typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX;
157 #define DirectDrawEnumerateEx DirectDrawEnumerateExA
159 extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
160 extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
163 * Flags for DirectDrawEnumerateEx
164 * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
165 * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
166 * By default, only the primary display device is enumerated.
167 * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
171 * This flag causes enumeration of any GDI display devices which are part of
172 * the Windows Desktop
174 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001L
177 * This flag causes enumeration of any GDI display devices which are not
178 * part of the Windows Desktop
180 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002L
183 * This flag causes enumeration of non-display devices
185 #define DDENUM_NONDISPLAYDEVICES 0x00000004L
188 #define REGSTR_KEY_DDHW_DESCRIPTION "Description"
189 #define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
190 #define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
192 #define DDCREATE_HARDWAREONLY 0x00000001l
193 #define DDCREATE_EMULATIONONLY 0x00000002l
195 #if defined(WINNT) || !defined(WIN32)
196 typedef long HRESULT;
200 typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
201 typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
202 typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
203 typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
207 * Generic pixel format with 8-bit RGB and alpha components
209 typedef struct _DDRGBA
217 typedef DDRGBA FAR *LPDDRGBA;
222 typedef struct _DDCOLORKEY
224 DWORD dwColorSpaceLowValue; // low boundary of color space that is to
225 // be treated as Color Key, inclusive
226 DWORD dwColorSpaceHighValue; // high boundary of color space that is
227 // to be treated as Color Key, inclusive
230 typedef DDCOLORKEY FAR* LPDDCOLORKEY;
234 * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
236 typedef struct _DDBLTFX
238 DWORD dwSize; // size of structure
239 DWORD dwDDFX; // FX operations
240 DWORD dwROP; // Win32 raster operations
241 DWORD dwDDROP; // Raster operations new for DirectDraw
242 DWORD dwRotationAngle; // Rotation angle for blt
243 DWORD dwZBufferOpCode; // ZBuffer compares
244 DWORD dwZBufferLow; // Low limit of Z buffer
245 DWORD dwZBufferHigh; // High limit of Z buffer
246 DWORD dwZBufferBaseDest; // Destination base value
247 DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
250 DWORD dwZDestConst; // Constant to use as Z buffer for dest
251 LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
252 } DUMMYUNIONNAMEN(1);
253 DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
256 DWORD dwZSrcConst; // Constant to use as Z buffer for src
257 LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
258 } DUMMYUNIONNAMEN(2);
259 DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
260 DWORD dwAlphaEdgeBlend; // Alpha for edge blending
262 DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
265 DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
266 LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
267 } DUMMYUNIONNAMEN(3);
268 DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
271 DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
272 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
273 } DUMMYUNIONNAMEN(4);
276 DWORD dwFillColor; // color in RGB or Palettized
277 DWORD dwFillDepth; // depth value for z-buffer
278 DWORD dwFillPixel; // pixel value for RGBA or RGBZ
279 LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
280 } DUMMYUNIONNAMEN(5);
281 DDCOLORKEY ddckDestColorkey; // DestColorkey override
282 DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
285 typedef DDBLTFX FAR* LPDDBLTFX;
291 typedef struct _DDSCAPS
293 DWORD dwCaps; // capabilities of surface wanted
296 typedef DDSCAPS FAR* LPDDSCAPS;
302 typedef struct _DDOSCAPS
304 DWORD dwCaps; // capabilities of surface wanted
307 typedef DDOSCAPS FAR* LPDDOSCAPS;
310 * This structure is used internally by DirectDraw.
312 typedef struct _DDSCAPSEX
317 } DDSCAPSEX, FAR * LPDDSCAPSEX;
322 typedef struct _DDSCAPS2
324 DWORD dwCaps; // capabilities of surface wanted
330 typedef DDSCAPS2 FAR* LPDDSCAPS2;
335 #define DD_ROP_SPACE (256/32) // space required to store ROP array
338 * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
339 * It is present for back compatability.
341 typedef struct _DDCAPS_DX3
343 DWORD dwSize; // size of the DDDRIVERCAPS structure
344 DWORD dwCaps; // driver specific capabilities
345 DWORD dwCaps2; // more driver specific capabilites
346 DWORD dwCKeyCaps; // color key capabilities of the surface
347 DWORD dwFXCaps; // driver specific stretching and effects capabilites
348 DWORD dwFXAlphaCaps; // alpha driver specific capabilities
349 DWORD dwPalCaps; // palette capabilities
350 DWORD dwSVCaps; // stereo vision capabilities
351 DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
352 DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
353 DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
354 DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
355 DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
356 DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
357 DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
358 DWORD dwVidMemTotal; // total amount of video memory
359 DWORD dwVidMemFree; // amount of free video memory
360 DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
361 DWORD dwCurrVisibleOverlays; // current number of visible overlays
362 DWORD dwNumFourCCCodes; // number of four cc codes
363 DWORD dwAlignBoundarySrc; // source rectangle alignment
364 DWORD dwAlignSizeSrc; // source rectangle byte size
365 DWORD dwAlignBoundaryDest; // dest rectangle alignment
366 DWORD dwAlignSizeDest; // dest rectangle byte size
367 DWORD dwAlignStrideAlign; // stride alignment
368 DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
369 DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
370 DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
371 DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
372 DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
373 DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
374 DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
375 DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
376 DWORD dwReserved1; // reserved
377 DWORD dwReserved2; // reserved
378 DWORD dwReserved3; // reserved
379 DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
380 DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
381 DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
382 DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
383 DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
384 DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
385 DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
386 DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
387 DWORD dwSSBCaps; // driver specific capabilities for System->System blts
388 DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
389 DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
390 DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
391 DWORD dwReserved4; // reserved
392 DWORD dwReserved5; // reserved
393 DWORD dwReserved6; // reserved
395 typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3;
398 * This structure is the DDCAPS structure as it was in version 5 of Direct X.
399 * It is present for back compatability.
401 typedef struct _DDCAPS_DX5
403 /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
404 /* 4*/ DWORD dwCaps; // driver specific capabilities
405 /* 8*/ DWORD dwCaps2; // more driver specific capabilites
406 /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
407 /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
408 /* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
409 /* 18*/ DWORD dwPalCaps; // palette capabilities
410 /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
411 /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
412 /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
413 /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
414 /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
415 /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
416 /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
417 /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
418 /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
419 /* 40*/ DWORD dwVidMemFree; // amount of free video memory
420 /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
421 /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
422 /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
423 /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
424 /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
425 /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
426 /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
427 /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
428 /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
429 /* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
430 /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
431 /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
432 /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
433 /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
434 /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
435 /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
436 /* a0*/ DWORD dwReserved1; // reserved
437 /* a4*/ DWORD dwReserved2; // reserved
438 /* a8*/ DWORD dwReserved3; // reserved
439 /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
440 /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
441 /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
442 /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
443 /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
444 /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
445 /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
446 /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
447 /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
448 /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
449 /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
450 /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
451 // Members added for DX5:
452 /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
453 /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
454 /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
455 /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
456 /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
457 /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
458 /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
459 /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
461 typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5;
463 typedef struct _DDCAPS_DX6
465 /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
466 /* 4*/ DWORD dwCaps; // driver specific capabilities
467 /* 8*/ DWORD dwCaps2; // more driver specific capabilites
468 /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
469 /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
470 /* 14*/ DWORD dwFXAlphaCaps; // alpha caps
471 /* 18*/ DWORD dwPalCaps; // palette capabilities
472 /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
473 /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
474 /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
475 /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
476 /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
477 /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
478 /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
479 /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
480 /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
481 /* 40*/ DWORD dwVidMemFree; // amount of free video memory
482 /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
483 /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
484 /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
485 /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
486 /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
487 /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
488 /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
489 /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
490 /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
491 /* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
492 /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
493 /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
494 /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
495 /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
496 /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
497 /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
498 /* a0*/ DWORD dwReserved1; // reserved
499 /* a4*/ DWORD dwReserved2; // reserved
500 /* a8*/ DWORD dwReserved3; // reserved
501 /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
502 /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
503 /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
504 /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
505 /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
506 /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
507 /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
508 /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
509 /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
510 /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
511 /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
512 /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
513 /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
514 /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
515 /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
516 /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
517 /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
518 /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
519 /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
520 /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
521 // Members added for DX6 release
522 /*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
524 typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6;
527 #if DIRECTDRAW_VERSION <= 0x300
528 typedef DDCAPS_DX3 DDCAPS;
529 #elif DIRECTDRAW_VERSION <= 0x500
530 typedef DDCAPS_DX5 DDCAPS;
532 typedef DDCAPS_DX6 DDCAPS;
535 typedef DDCAPS FAR* LPDDCAPS;
542 typedef struct _DDPIXELFORMAT
544 DWORD dwSize; // size of structure
545 DWORD dwFlags; // pixel format flags
546 DWORD dwFourCC; // (FOURCC code)
549 DWORD dwRGBBitCount; // how many bits per pixel
550 DWORD dwYUVBitCount; // how many bits per pixel
551 DWORD dwZBufferBitDepth; // how many total bits/pixel in z buffer (including any stencil bits)
552 DWORD dwAlphaBitDepth; // how many bits for alpha channels
553 DWORD dwLuminanceBitCount; // how many bits per pixel
554 DWORD dwBumpBitCount; // how many bits per "buxel", total
555 } DUMMYUNIONNAMEN(1);
558 DWORD dwRBitMask; // mask for red bit
559 DWORD dwYBitMask; // mask for Y bits
560 DWORD dwStencilBitDepth; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
561 DWORD dwLuminanceBitMask; // mask for luminance bits
562 DWORD dwBumpDuBitMask; // mask for bump map U delta bits
563 } DUMMYUNIONNAMEN(2);
566 DWORD dwGBitMask; // mask for green bits
567 DWORD dwUBitMask; // mask for U bits
568 DWORD dwZBitMask; // mask for Z bits
569 DWORD dwBumpDvBitMask; // mask for bump map V delta bits
570 } DUMMYUNIONNAMEN(3);
573 DWORD dwBBitMask; // mask for blue bits
574 DWORD dwVBitMask; // mask for V bits
575 DWORD dwStencilBitMask; // mask for stencil bits
576 DWORD dwBumpLuminanceBitMask; // mask for luminance in bump map
577 } DUMMYUNIONNAMEN(4);
580 DWORD dwRGBAlphaBitMask; // mask for alpha channel
581 DWORD dwYUVAlphaBitMask; // mask for alpha channel
582 DWORD dwLuminanceAlphaBitMask;// mask for alpha channel
583 DWORD dwRGBZBitMask; // mask for Z channel
584 DWORD dwYUVZBitMask; // mask for Z channel
585 } DUMMYUNIONNAMEN(5);
588 typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
593 typedef struct _DDOVERLAYFX
595 DWORD dwSize; // size of structure
596 DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
597 DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
599 DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
602 DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
603 LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
604 } DUMMYUNIONNAMEN(1);
605 DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
608 DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
609 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
610 } DUMMYUNIONNAMEN(2);
611 DDCOLORKEY dckDestColorkey; // DestColorkey override
612 DDCOLORKEY dckSrcColorkey; // DestColorkey override
613 DWORD dwDDFX; // Overlay FX
614 DWORD dwFlags; // flags
617 typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
621 * DDBLTBATCH: BltBatch entry structure
623 typedef struct _DDBLTBATCH
626 LPDIRECTDRAWSURFACE lpDDSSrc;
632 typedef DDBLTBATCH FAR * LPDDBLTBATCH;
638 typedef struct _DDGAMMARAMP
644 typedef DDGAMMARAMP FAR * LPDDGAMMARAMP;
647 * This is the structure within which DirectDraw returns data about the current graphics driver and chipset
650 #define MAX_DDDEVICEID_STRING 512
652 typedef struct tagDDDEVICEIDENTIFIER
655 * These elements are for presentation to the user only. They should not be used to identify particular
656 * drivers, since this is unreliable and many different strings may be associated with the same
657 * device, and the same driver from different vendors.
659 char szDriver[MAX_DDDEVICEID_STRING];
660 char szDescription[MAX_DDDEVICEID_STRING];
663 * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
664 * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
665 * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
667 * This version has the form:
668 * wProduct = HIWORD(liDriverVersion.HighPart)
669 * wVersion = LOWORD(liDriverVersion.HighPart)
670 * wSubVersion = HIWORD(liDriverVersion.LowPart)
671 * wBuild = LOWORD(liDriverVersion.LowPart)
674 LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
676 DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
677 DWORD dwDriverVersionHighPart;
682 * These elements can be used to identify particular chipsets. Use with extreme caution.
683 * dwVendorId Identifies the manufacturer. May be zero if unknown.
684 * dwDeviceId Identifies the type of chipset. May be zero if unknown.
685 * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
686 * dwRevision Identifies the revision level of the chipset. May be zero if unknown.
694 * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
695 * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
696 * reprofile the graphics subsystem.
697 * This element can also be used to identify particular problematic drivers.
699 GUID guidDeviceIdentifier;
700 } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
703 * Flags for the IDirectDraw4::GetDeviceIdentifier method
707 * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
708 * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
709 * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
710 * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
711 * of the DirectDraw object involved.
713 #define DDGDI_GETHOSTIDENTIFIER 0x00000001L
720 typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
722 typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
737 #if defined( _WIN32 ) && !defined( _NO_COM )
739 #define INTERFACE IDirectDraw
740 DECLARE_INTERFACE_( IDirectDraw, IUnknown )
742 /*** IUnknown methods ***/
743 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
744 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
745 STDMETHOD_(ULONG,Release) (THIS) PURE;
746 /*** IDirectDraw methods ***/
747 STDMETHOD(Compact)(THIS) PURE;
748 STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
749 STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
750 STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
751 STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
752 STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
753 STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
754 STDMETHOD(FlipToGDISurface)(THIS) PURE;
755 STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
756 STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
757 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
758 STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
759 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
760 STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
761 STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
762 STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
763 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
764 STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
765 STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
766 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
769 #if !defined(__cplusplus) || defined(CINTERFACE)
770 #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
771 #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
772 #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
773 #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
774 #define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
775 #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
776 #define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
777 #define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
778 #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
779 #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
780 #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
781 #define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
782 #define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
783 #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
784 #define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
785 #define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
786 #define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
787 #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
788 #define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
789 #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
790 #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
791 #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
792 #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
794 #define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
795 #define IDirectDraw_AddRef(p) (p)->AddRef()
796 #define IDirectDraw_Release(p) (p)->Release()
797 #define IDirectDraw_Compact(p) (p)->Compact()
798 #define IDirectDraw_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
799 #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
800 #define IDirectDraw_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
801 #define IDirectDraw_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
802 #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
803 #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
804 #define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
805 #define IDirectDraw_GetCaps(p, a, b) (p)->GetCaps(a, b)
806 #define IDirectDraw_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
807 #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
808 #define IDirectDraw_GetGDISurface(p, a) (p)->GetGDISurface(a)
809 #define IDirectDraw_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
810 #define IDirectDraw_GetScanLine(p, a) (p)->GetScanLine(a)
811 #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
812 #define IDirectDraw_Initialize(p, a) (p)->Initialize(a)
813 #define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
814 #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
815 #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->SetDisplayMode(a, b, c)
816 #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
821 #if defined( _WIN32 ) && !defined( _NO_COM )
823 #define INTERFACE IDirectDraw2
824 DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
826 /*** IUnknown methods ***/
827 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
828 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
829 STDMETHOD_(ULONG,Release) (THIS) PURE;
830 /*** IDirectDraw methods ***/
831 STDMETHOD(Compact)(THIS) PURE;
832 STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
833 STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
834 STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
835 STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
836 STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
837 STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
838 STDMETHOD(FlipToGDISurface)(THIS) PURE;
839 STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
840 STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
841 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
842 STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
843 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
844 STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
845 STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
846 STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
847 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
848 STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
849 STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
850 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
851 /*** Added in the v2 interface ***/
852 STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
854 #if !defined(__cplusplus) || defined(CINTERFACE)
855 #define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
856 #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
857 #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
858 #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
859 #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
860 #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
861 #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
862 #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
863 #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
864 #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
865 #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
866 #define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
867 #define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
868 #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
869 #define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
870 #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
871 #define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
872 #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
873 #define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
874 #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
875 #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
876 #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
877 #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
878 #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
880 #define IDirectDraw2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
881 #define IDirectDraw2_AddRef(p) (p)->AddRef()
882 #define IDirectDraw2_Release(p) (p)->Release()
883 #define IDirectDraw2_Compact(p) (p)->Compact()
884 #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
885 #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
886 #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
887 #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
888 #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
889 #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
890 #define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
891 #define IDirectDraw2_GetCaps(p, a, b) (p)->GetCaps(a, b)
892 #define IDirectDraw2_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
893 #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
894 #define IDirectDraw2_GetGDISurface(p, a) (p)->GetGDISurface(a)
895 #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
896 #define IDirectDraw2_GetScanLine(p, a) (p)->GetScanLine(a)
897 #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
898 #define IDirectDraw2_Initialize(p, a) (p)->Initialize(a)
899 #define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
900 #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
901 #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
902 #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
903 #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
908 #if defined( _WIN32 ) && !defined( _NO_COM )
910 #define INTERFACE IDirectDraw4
911 DECLARE_INTERFACE_( IDirectDraw4, IUnknown )
913 /*** IUnknown methods ***/
914 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
915 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
916 STDMETHOD_(ULONG,Release) (THIS) PURE;
917 /*** IDirectDraw methods ***/
918 STDMETHOD(Compact)(THIS) PURE;
919 STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
920 STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
921 STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *) PURE;
922 STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4 FAR * ) PURE;
923 STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
924 STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK2 ) PURE;
925 STDMETHOD(FlipToGDISurface)(THIS) PURE;
926 STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
927 STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
928 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
929 STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 FAR *) PURE;
930 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
931 STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
932 STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
933 STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
934 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
935 STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
936 STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
937 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
938 /*** Added in the v2 interface ***/
939 STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
940 /*** Added in the V4 Interface ***/
941 STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE;
942 STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
943 STDMETHOD(TestCooperativeLevel)(THIS) PURE;
944 STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER, DWORD ) PURE;
946 #if !defined(__cplusplus) || defined(CINTERFACE)
947 #define IDirectDraw4_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
948 #define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p)
949 #define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p)
950 #define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p)
951 #define IDirectDraw4_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
952 #define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
953 #define IDirectDraw4_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
954 #define IDirectDraw4_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
955 #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
956 #define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
957 #define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
958 #define IDirectDraw4_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
959 #define IDirectDraw4_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
960 #define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
961 #define IDirectDraw4_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
962 #define IDirectDraw4_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
963 #define IDirectDraw4_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
964 #define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
965 #define IDirectDraw4_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
966 #define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
967 #define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
968 #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
969 #define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
970 #define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
971 #define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
972 #define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
973 #define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
974 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
976 #define IDirectDraw4_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
977 #define IDirectDraw4_AddRef(p) (p)->AddRef()
978 #define IDirectDraw4_Release(p) (p)->Release()
979 #define IDirectDraw4_Compact(p) (p)->Compact()
980 #define IDirectDraw4_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
981 #define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
982 #define IDirectDraw4_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
983 #define IDirectDraw4_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
984 #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
985 #define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
986 #define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface()
987 #define IDirectDraw4_GetCaps(p, a, b) (p)->GetCaps(a, b)
988 #define IDirectDraw4_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
989 #define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
990 #define IDirectDraw4_GetGDISurface(p, a) (p)->GetGDISurface(a)
991 #define IDirectDraw4_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
992 #define IDirectDraw4_GetScanLine(p, a) (p)->GetScanLine(a)
993 #define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
994 #define IDirectDraw4_Initialize(p, a) (p)->Initialize(a)
995 #define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
996 #define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
997 #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
998 #define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
999 #define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
1000 #define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b)
1001 #define IDirectDraw4_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
1002 #define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
1003 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
1010 * IDirectDrawPalette
1012 #if defined( _WIN32 ) && !defined( _NO_COM )
1014 #define INTERFACE IDirectDrawPalette
1015 DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
1017 /*** IUnknown methods ***/
1018 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1019 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1020 STDMETHOD_(ULONG,Release) (THIS) PURE;
1021 /*** IDirectDrawPalette methods ***/
1022 STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
1023 STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
1024 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
1025 STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
1028 #if !defined(__cplusplus) || defined(CINTERFACE)
1029 #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
1030 #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
1031 #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
1032 #define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
1033 #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
1034 #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
1035 #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
1037 #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
1038 #define IDirectDrawPalette_AddRef(p) (p)->AddRef()
1039 #define IDirectDrawPalette_Release(p) (p)->Release()
1040 #define IDirectDrawPalette_GetCaps(p, a) (p)->GetCaps(a)
1041 #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d)
1042 #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
1043 #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d)
1051 * IDirectDrawClipper
1053 #if defined( _WIN32 ) && !defined( _NO_COM )
1055 #define INTERFACE IDirectDrawClipper
1056 DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
1058 /*** IUnknown methods ***/
1059 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1060 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1061 STDMETHOD_(ULONG,Release) (THIS) PURE;
1062 /*** IDirectDrawClipper methods ***/
1063 STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
1064 STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
1065 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
1066 STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
1067 STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
1068 STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
1071 #if !defined(__cplusplus) || defined(CINTERFACE)
1072 #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
1073 #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
1074 #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
1075 #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
1076 #define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
1077 #define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
1078 #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
1079 #define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
1080 #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
1082 #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
1083 #define IDirectDrawClipper_AddRef(p) (p)->AddRef()
1084 #define IDirectDrawClipper_Release(p) (p)->Release()
1085 #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->GetClipList(a, b, c)
1086 #define IDirectDrawClipper_GetHWnd(p, a) (p)->GetHWnd(a)
1087 #define IDirectDrawClipper_Initialize(p, a, b) (p)->Initialize(a, b)
1088 #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->IsClipListChanged(a)
1089 #define IDirectDrawClipper_SetClipList(p, a, b) (p)->SetClipList(a, b)
1090 #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->SetHWnd(a, b)
1096 * IDirectDrawSurface and related interfaces
1098 #if defined( _WIN32 ) && !defined( _NO_COM )
1100 #define INTERFACE IDirectDrawSurface
1101 DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
1103 /*** IUnknown methods ***/
1104 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1105 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1106 STDMETHOD_(ULONG,Release) (THIS) PURE;
1107 /*** IDirectDrawSurface methods ***/
1108 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
1109 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
1110 STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
1111 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
1112 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
1113 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
1114 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1115 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1116 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
1117 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
1118 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
1119 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
1120 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
1121 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1122 STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
1123 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
1124 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
1125 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
1126 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
1127 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
1128 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
1129 STDMETHOD(IsLost)(THIS) PURE;
1130 STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
1131 STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
1132 STDMETHOD(Restore)(THIS) PURE;
1133 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
1134 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1135 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
1136 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
1137 STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
1138 STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
1139 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
1140 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
1143 #if !defined(__cplusplus) || defined(CINTERFACE)
1144 #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1145 #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
1146 #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
1147 #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
1148 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
1149 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
1150 #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
1151 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
1152 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
1153 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
1154 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
1155 #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
1156 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
1157 #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
1158 #define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
1159 #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
1160 #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
1161 #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
1162 #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
1163 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
1164 #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
1165 #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
1166 #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
1167 #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1168 #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
1169 #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
1170 #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
1171 #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
1172 #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
1173 #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
1174 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
1175 #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
1176 #define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
1177 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
1178 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
1179 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
1181 #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1182 #define IDirectDrawSurface_AddRef(p) (p)->AddRef()
1183 #define IDirectDrawSurface_Release(p) (p)->Release()
1184 #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
1185 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
1186 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
1187 #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
1188 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
1189 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
1190 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
1191 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
1192 #define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
1193 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
1194 #define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
1195 #define IDirectDrawSurface_GetCaps(p,b) (p)->GetCaps(b)
1196 #define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
1197 #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
1198 #define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
1199 #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
1200 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
1201 #define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
1202 #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
1203 #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
1204 #define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
1205 #define IDirectDrawSurface_IsLost(p) (p)->IsLost()
1206 #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
1207 #define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
1208 #define IDirectDrawSurface_Restore(p) (p)->Restore()
1209 #define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
1210 #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
1211 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
1212 #define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
1213 #define IDirectDrawSurface_Unlock(p,b) (p)->Unlock(b)
1214 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
1215 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
1216 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
1220 * IDirectDrawSurface2 and related interfaces
1223 #define INTERFACE IDirectDrawSurface2
1224 DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
1226 /*** IUnknown methods ***/
1227 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1228 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1229 STDMETHOD_(ULONG,Release) (THIS) PURE;
1230 /*** IDirectDrawSurface methods ***/
1231 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
1232 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
1233 STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
1234 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
1235 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
1236 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
1237 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1238 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1239 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
1240 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
1241 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
1242 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
1243 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
1244 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1245 STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
1246 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
1247 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
1248 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
1249 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
1250 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
1251 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
1252 STDMETHOD(IsLost)(THIS) PURE;
1253 STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
1254 STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
1255 STDMETHOD(Restore)(THIS) PURE;
1256 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
1257 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1258 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
1259 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
1260 STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
1261 STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
1262 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
1263 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
1264 /*** Added in the v2 interface ***/
1265 STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
1266 STDMETHOD(PageLock)(THIS_ DWORD) PURE;
1267 STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
1270 #if !defined(__cplusplus) || defined(CINTERFACE)
1271 #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1272 #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
1273 #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
1274 #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
1275 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
1276 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
1277 #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
1278 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
1279 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
1280 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
1281 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
1282 #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
1283 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
1284 #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
1285 #define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
1286 #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
1287 #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
1288 #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
1289 #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
1290 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
1291 #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
1292 #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
1293 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
1294 #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1295 #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
1296 #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
1297 #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
1298 #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
1299 #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
1300 #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
1301 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
1302 #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
1303 #define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
1304 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
1305 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
1306 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
1307 #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
1308 #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
1309 #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
1311 #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1312 #define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
1313 #define IDirectDrawSurface2_Release(p) (p)->Release()
1314 #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
1315 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
1316 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
1317 #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
1318 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
1319 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
1320 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
1321 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
1322 #define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
1323 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
1324 #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
1325 #define IDirectDrawSurface2_GetCaps(p,b) (p)->GetCaps(b)
1326 #define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
1327 #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
1328 #define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
1329 #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
1330 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
1331 #define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
1332 #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
1333 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
1334 #define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
1335 #define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
1336 #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
1337 #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
1338 #define IDirectDrawSurface2_Restore(p) (p)->Restore()
1339 #define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
1340 #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
1341 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
1342 #define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
1343 #define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b)
1344 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
1345 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
1346 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
1347 #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
1348 #define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
1349 #define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
1353 * IDirectDrawSurface3 and related interfaces
1356 #define INTERFACE IDirectDrawSurface3
1357 DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
1359 /*** IUnknown methods ***/
1360 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1361 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1362 STDMETHOD_(ULONG,Release) (THIS) PURE;
1363 /*** IDirectDrawSurface methods ***/
1364 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
1365 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
1366 STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
1367 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
1368 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
1369 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
1370 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1371 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1372 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
1373 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
1374 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
1375 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
1376 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
1377 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1378 STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
1379 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
1380 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
1381 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
1382 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
1383 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
1384 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
1385 STDMETHOD(IsLost)(THIS) PURE;
1386 STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
1387 STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
1388 STDMETHOD(Restore)(THIS) PURE;
1389 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
1390 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1391 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
1392 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
1393 STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
1394 STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
1395 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
1396 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
1397 /*** Added in the v2 interface ***/
1398 STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
1399 STDMETHOD(PageLock)(THIS_ DWORD) PURE;
1400 STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
1401 /*** Added in the V3 interface ***/
1402 STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
1405 #if !defined(__cplusplus) || defined(CINTERFACE)
1406 #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1407 #define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
1408 #define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
1409 #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
1410 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
1411 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
1412 #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
1413 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
1414 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
1415 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
1416 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
1417 #define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
1418 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
1419 #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
1420 #define IDirectDrawSurface3_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
1421 #define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
1422 #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
1423 #define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
1424 #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
1425 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
1426 #define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
1427 #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
1428 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
1429 #define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1430 #define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
1431 #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
1432 #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
1433 #define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
1434 #define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
1435 #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
1436 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
1437 #define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
1438 #define IDirectDrawSurface3_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
1439 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
1440 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
1441 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
1442 #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
1443 #define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
1444 #define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
1445 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
1447 #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1448 #define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
1449 #define IDirectDrawSurface3_Release(p) (p)->Release()
1450 #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
1451 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
1452 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
1453 #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
1454 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
1455 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
1456 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
1457 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
1458 #define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
1459 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
1460 #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
1461 #define IDirectDrawSurface3_GetCaps(p,b) (p)->GetCaps(b)
1462 #define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
1463 #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
1464 #define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
1465 #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
1466 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
1467 #define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
1468 #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
1469 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
1470 #define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
1471 #define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
1472 #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
1473 #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
1474 #define IDirectDrawSurface3_Restore(p) (p)->Restore()
1475 #define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
1476 #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
1477 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
1478 #define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
1479 #define IDirectDrawSurface3_Unlock(p,b) (p)->Unlock(b)
1480 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
1481 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
1482 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
1483 #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
1484 #define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
1485 #define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
1486 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
1490 * IDirectDrawSurface4 and related interfaces
1493 #define INTERFACE IDirectDrawSurface4
1494 DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown )
1496 /*** IUnknown methods ***/
1497 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1498 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1499 STDMETHOD_(ULONG,Release) (THIS) PURE;
1500 /*** IDirectDrawSurface methods ***/
1501 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
1502 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
1503 STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE4, LPRECT,DWORD, LPDDBLTFX) PURE;
1504 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
1505 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE4, LPRECT,DWORD) PURE;
1506 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE4) PURE;
1507 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
1508 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
1509 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4, DWORD) PURE;
1510 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *) PURE;
1511 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
1512 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
1513 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
1514 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1515 STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
1516 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
1517 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
1518 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
1519 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
1520 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
1521 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
1522 STDMETHOD(IsLost)(THIS) PURE;
1523 STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
1524 STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
1525 STDMETHOD(Restore)(THIS) PURE;
1526 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
1527 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1528 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
1529 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
1530 STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
1531 STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE4,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
1532 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
1533 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE4) PURE;
1534 /*** Added in the v2 interface ***/
1535 STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
1536 STDMETHOD(PageLock)(THIS_ DWORD) PURE;
1537 STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
1538 /*** Added in the v3 interface ***/
1539 STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
1540 /*** Added in the v4 interface ***/
1541 STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
1542 STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
1543 STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
1544 STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
1545 STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
1548 #if !defined(__cplusplus) || defined(CINTERFACE)
1549 #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1550 #define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p)
1551 #define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p)
1552 #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
1553 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
1554 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
1555 #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
1556 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
1557 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
1558 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
1559 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
1560 #define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
1561 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
1562 #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
1563 #define IDirectDrawSurface4_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
1564 #define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
1565 #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
1566 #define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
1567 #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
1568 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
1569 #define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
1570 #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
1571 #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
1572 #define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1573 #define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p)
1574 #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
1575 #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
1576 #define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p)
1577 #define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
1578 #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
1579 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
1580 #define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
1581 #define IDirectDrawSurface4_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
1582 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
1583 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
1584 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
1585 #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
1586 #define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
1587 #define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
1588 #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
1589 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
1590 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
1591 #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
1592 #define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a)
1593 #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
1595 #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1596 #define IDirectDrawSurface4_AddRef(p) (p)->AddRef()
1597 #define IDirectDrawSurface4_Release(p) (p)->Release()
1598 #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
1599 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
1600 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
1601 #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
1602 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
1603 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
1604 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
1605 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
1606 #define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b)
1607 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
1608 #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a)
1609 #define IDirectDrawSurface4_GetCaps(p,b) (p)->GetCaps(b)
1610 #define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a)
1611 #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
1612 #define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a)
1613 #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
1614 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
1615 #define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a)
1616 #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
1617 #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
1618 #define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b)
1619 #define IDirectDrawSurface4_IsLost(p) (p)->IsLost()
1620 #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
1621 #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a)
1622 #define IDirectDrawSurface4_Restore(p) (p)->Restore()
1623 #define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a)
1624 #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
1625 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
1626 #define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a)
1627 #define IDirectDrawSurface4_Unlock(p,b) (p)->Unlock(b)
1628 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
1629 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
1630 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
1631 #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a)
1632 #define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a)
1633 #define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a)
1634 #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
1635 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
1636 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
1637 #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a)
1638 #define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a)
1639 #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
1645 * IDirectDrawColorControl
1647 #if defined( _WIN32 ) && !defined( _NO_COM )
1649 #define INTERFACE IDirectDrawColorControl
1650 DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
1652 /*** IUnknown methods ***/
1653 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1654 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1655 STDMETHOD_(ULONG,Release) (THIS) PURE;
1656 /*** IDirectDrawColorControl methods ***/
1657 STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
1658 STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
1661 #if !defined(__cplusplus) || defined(CINTERFACE)
1662 #define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
1663 #define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
1664 #define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
1665 #define IDirectDrawColorControl_GetColorControls(p, a) (p)->lpVtbl->GetColorControls(p, a)
1666 #define IDirectDrawColorControl_SetColorControls(p, a) (p)->lpVtbl->SetColorControls(p, a)
1668 #define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
1669 #define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
1670 #define IDirectDrawColorControl_Release(p) (p)->Release()
1671 #define IDirectDrawColorControl_GetColorControls(p, a) (p)->GetColorControls(a)
1672 #define IDirectDrawColorControl_SetColorControls(p, a) (p)->SetColorControls(a)
1679 * IDirectDrawGammaControl
1681 #if defined( _WIN32 ) && !defined( _NO_COM )
1683 #define INTERFACE IDirectDrawGammaControl
1684 DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown )
1686 /*** IUnknown methods ***/
1687 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1688 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1689 STDMETHOD_(ULONG,Release) (THIS) PURE;
1690 /*** IDirectDrawColorControl methods ***/
1691 STDMETHOD(GetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
1692 STDMETHOD(SetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
1695 #if !defined(__cplusplus) || defined(CINTERFACE)
1696 #define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
1697 #define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p)
1698 #define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p)
1699 #define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->lpVtbl->GetGammaRamp(p, a, b)
1700 #define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->lpVtbl->SetGammaRamp(p, a, b)
1702 #define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
1703 #define IDirectDrawGammaControl_AddRef(p) (p)->AddRef()
1704 #define IDirectDrawGammaControl_Release(p) (p)->Release()
1705 #define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->GetGammaRamp(a, b)
1706 #define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->SetGammaRamp(a, b)
1719 typedef struct _DDSURFACEDESC
1721 DWORD dwSize; // size of the DDSURFACEDESC structure
1722 DWORD dwFlags; // determines what fields are valid
1723 DWORD dwHeight; // height of surface to be created
1724 DWORD dwWidth; // width of input surface
1727 LONG lPitch; // distance to start of next line (return value only)
1728 DWORD dwLinearSize; // Formless late-allocated optimized surface size
1729 } DUMMYUNIONNAMEN(1);
1730 DWORD dwBackBufferCount; // number of back buffers requested
1733 DWORD dwMipMapCount; // number of mip-map levels requested
1734 DWORD dwZBufferBitDepth; // depth of Z buffer requested
1735 DWORD dwRefreshRate; // refresh rate (used when display mode is described)
1736 } DUMMYUNIONNAMEN(2);
1737 DWORD dwAlphaBitDepth; // depth of alpha buffer requested
1738 DWORD dwReserved; // reserved
1739 LPVOID lpSurface; // pointer to the associated surface memory
1740 DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
1741 DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
1742 DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
1743 DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
1744 DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
1745 DDSCAPS ddsCaps; // direct draw surface capabilities
1751 typedef struct _DDSURFACEDESC2
1753 DWORD dwSize; // size of the DDSURFACEDESC structure
1754 DWORD dwFlags; // determines what fields are valid
1755 DWORD dwHeight; // height of surface to be created
1756 DWORD dwWidth; // width of input surface
1759 LONG lPitch; // distance to start of next line (return value only)
1760 DWORD dwLinearSize; // Formless late-allocated optimized surface size
1761 } DUMMYUNIONNAMEN(1);
1762 DWORD dwBackBufferCount; // number of back buffers requested
1765 DWORD dwMipMapCount; // number of mip-map levels requestde
1766 // dwZBufferBitDepth removed, use ddpfPixelFormat one instead
1767 DWORD dwRefreshRate; // refresh rate (used when display mode is described)
1768 } DUMMYUNIONNAMEN(2);
1769 DWORD dwAlphaBitDepth; // depth of alpha buffer requested
1770 DWORD dwReserved; // reserved
1771 LPVOID lpSurface; // pointer to the associated surface memory
1772 DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
1773 DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
1774 DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
1775 DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
1776 DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
1777 DDSCAPS2 ddsCaps; // direct draw surface capabilities
1778 DWORD dwTextureStage; // stage in multitexture cascade
1782 * ddsCaps field is valid.
1784 #define DDSD_CAPS 0x00000001l // default
1787 * dwHeight field is valid.
1789 #define DDSD_HEIGHT 0x00000002l
1792 * dwWidth field is valid.
1794 #define DDSD_WIDTH 0x00000004l
1799 #define DDSD_PITCH 0x00000008l
1802 * dwBackBufferCount is valid.
1804 #define DDSD_BACKBUFFERCOUNT 0x00000020l
1807 * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2)
1809 #define DDSD_ZBUFFERBITDEPTH 0x00000040l
1812 * dwAlphaBitDepth is valid.
1814 #define DDSD_ALPHABITDEPTH 0x00000080l
1818 * lpSurface is valid.
1820 #define DDSD_LPSURFACE 0x00000800l
1823 * ddpfPixelFormat is valid.
1825 #define DDSD_PIXELFORMAT 0x00001000l
1828 * ddckCKDestOverlay is valid.
1830 #define DDSD_CKDESTOVERLAY 0x00002000l
1833 * ddckCKDestBlt is valid.
1835 #define DDSD_CKDESTBLT 0x00004000l
1838 * ddckCKSrcOverlay is valid.
1840 #define DDSD_CKSRCOVERLAY 0x00008000l
1843 * ddckCKSrcBlt is valid.
1845 #define DDSD_CKSRCBLT 0x00010000l
1848 * dwMipMapCount is valid.
1850 #define DDSD_MIPMAPCOUNT 0x00020000l
1853 * dwRefreshRate is valid
1855 #define DDSD_REFRESHRATE 0x00040000l
1858 * dwLinearSize is valid
1860 #define DDSD_LINEARSIZE 0x00080000l
1863 * dwTextureStage is valid
1865 #define DDSD_TEXTURESTAGE 0x00100000l
1867 * All input fields are valid.
1869 #define DDSD_ALL 0x001ff9eel
1875 typedef struct _DDOPTSURFACEDESC
1877 DWORD dwSize; // size of the DDOPTSURFACEDESC structure
1878 DWORD dwFlags; // determines what fields are valid
1879 DDSCAPS2 ddSCaps; // Common caps like: Memory type
1880 DDOSCAPS ddOSCaps; // Common caps like: Memory type
1881 GUID guid; // Compression technique GUID
1882 DWORD dwCompressionRatio; // Compression ratio
1886 * guid field is valid.
1888 #define DDOSD_GUID 0x00000001l
1891 * dwCompressionRatio field is valid.
1893 #define DDOSD_COMPRESSION_RATIO 0x00000002l
1896 * ddSCaps field is valid.
1898 #define DDOSD_SCAPS 0x00000004l
1901 * ddOSCaps field is valid.
1903 #define DDOSD_OSCAPS 0x00000008l
1906 * All input fields are valid.
1908 #define DDOSD_ALL 0x0000000fl
1911 * The surface's optimized pixelformat is compressed
1913 #define DDOSDCAPS_OPTCOMPRESSED 0x00000001l
1916 * The surface's optimized pixelformat is reordered
1918 #define DDOSDCAPS_OPTREORDERED 0x00000002l
1921 * The opt surface is a monolithic mipmap
1923 #define DDOSDCAPS_MONOLITHICMIPMAP 0x00000004l
1926 * The valid Surf caps:
1927 * #define DDSCAPS_SYSTEMMEMORY 0x00000800l
1928 * #define DDSCAPS_VIDEOMEMORY 0x00004000l
1929 * #define DDSCAPS_LOCALVIDMEM 0x10000000l
1930 * #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
1932 #define DDOSDCAPS_VALIDSCAPS 0x30004800l
1935 * The valid OptSurf caps
1937 #define DDOSDCAPS_VALIDOSCAPS 0x00000007l
1943 typedef struct _DDCOLORCONTROL
1959 * lBrightness field is valid.
1961 #define DDCOLOR_BRIGHTNESS 0x00000001l
1964 * lContrast field is valid.
1966 #define DDCOLOR_CONTRAST 0x00000002l
1969 * lHue field is valid.
1971 #define DDCOLOR_HUE 0x00000004l
1974 * lSaturation field is valid.
1976 #define DDCOLOR_SATURATION 0x00000008l
1979 * lSharpness field is valid.
1981 #define DDCOLOR_SHARPNESS 0x00000010l
1984 * lGamma field is valid.
1986 #define DDCOLOR_GAMMA 0x00000020l
1989 * lColorEnable field is valid.
1991 #define DDCOLOR_COLORENABLE 0x00000040l
1995 /*============================================================================
1997 * Direct Draw Capability Flags
1999 * These flags are used to describe the capabilities of a given Surface.
2000 * All flags are bit flags.
2002 *==========================================================================*/
2004 /****************************************************************************
2006 * DIRECTDRAWSURFACE CAPABILITY FLAGS
2008 ****************************************************************************/
2011 * This bit is reserved. It should not be specified.
2013 #define DDSCAPS_RESERVED1 0x00000001l
2016 * Indicates that this surface contains alpha-only information.
2017 * (To determine if a surface is RGBA/YUVA, the pixel format must be
2020 #define DDSCAPS_ALPHA 0x00000002l
2023 * Indicates that this surface is a backbuffer. It is generally
2024 * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
2025 * It indicates that this surface is THE back buffer of a surface
2026 * flipping structure. DirectDraw supports N surfaces in a
2027 * surface flipping structure. Only the surface that immediately
2028 * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
2029 * The other surfaces are identified as back buffers by the presence
2030 * of the DDSCAPS_FLIP capability, their attachment order, and the
2031 * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
2032 * capabilities. The bit is sent to CreateSurface when a standalone
2033 * back buffer is being created. This surface could be attached to
2034 * a front buffer and/or back buffers to form a flipping surface
2035 * structure after the CreateSurface call. See AddAttachments for
2036 * a detailed description of the behaviors in this case.
2038 #define DDSCAPS_BACKBUFFER 0x00000004l
2041 * Indicates a complex surface structure is being described. A
2042 * complex surface structure results in the creation of more than
2043 * one surface. The additional surfaces are attached to the root
2044 * surface. The complex structure can only be destroyed by
2045 * destroying the root.
2047 #define DDSCAPS_COMPLEX 0x00000008l
2050 * Indicates that this surface is a part of a surface flipping structure.
2051 * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
2052 * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
2053 * on the resulting creations. The dwBackBufferCount field in the
2054 * DDSURFACEDESC structure must be set to at least 1 in order for
2055 * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
2056 * must always be set with creating multiple surfaces through CreateSurface.
2058 #define DDSCAPS_FLIP 0x00000010l
2061 * Indicates that this surface is THE front buffer of a surface flipping
2062 * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
2063 * capability bit is set.
2064 * If this capability is sent to CreateSurface then a standalonw front buffer
2065 * is created. This surface will not have the DDSCAPS_FLIP capability.
2066 * It can be attached to other back buffers to form a flipping structure.
2067 * See AddAttachments for a detailed description of the behaviors in this
2070 #define DDSCAPS_FRONTBUFFER 0x00000020l
2073 * Indicates that this surface is any offscreen surface that is not an overlay,
2074 * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
2075 * to identify plain vanilla surfaces.
2077 #define DDSCAPS_OFFSCREENPLAIN 0x00000040l
2080 * Indicates that this surface is an overlay. It may or may not be directly visible
2081 * depending on whether or not it is currently being overlayed onto the primary
2082 * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
2083 * overlayed at the moment.
2085 #define DDSCAPS_OVERLAY 0x00000080l
2088 * Indicates that unique DirectDrawPalette objects can be created and
2089 * attached to this surface.
2091 #define DDSCAPS_PALETTE 0x00000100l
2094 * Indicates that this surface is the primary surface. The primary
2095 * surface represents what the user is seeing at the moment.
2097 #define DDSCAPS_PRIMARYSURFACE 0x00000200l
2100 * Indicates that this surface is the primary surface for the left eye.
2101 * The primary surface for the left eye represents what the user is seeing
2102 * at the moment with the users left eye. When this surface is created the
2103 * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
2106 #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400l
2109 * Indicates that this surface memory was allocated in system memory
2111 #define DDSCAPS_SYSTEMMEMORY 0x00000800l
2114 * Indicates that this surface can be used as a 3D texture. It does not
2115 * indicate whether or not the surface is being used for that purpose.
2117 #define DDSCAPS_TEXTURE 0x00001000l
2120 * Indicates that a surface may be a destination for 3D rendering. This
2121 * bit must be set in order to query for a Direct3D Device Interface
2122 * from this surface.
2124 #define DDSCAPS_3DDEVICE 0x00002000l
2127 * Indicates that this surface exists in video memory.
2129 #define DDSCAPS_VIDEOMEMORY 0x00004000l
2132 * Indicates that changes made to this surface are immediately visible.
2133 * It is always set for the primary surface and is set for overlays while
2134 * they are being overlayed and texture maps while they are being textured.
2136 #define DDSCAPS_VISIBLE 0x00008000l
2139 * Indicates that only writes are permitted to the surface. Read accesses
2140 * from the surface may or may not generate a protection fault, but the
2141 * results of a read from this surface will not be meaningful. READ ONLY.
2143 #define DDSCAPS_WRITEONLY 0x00010000l
2146 * Indicates that this surface is a z buffer. A z buffer does not contain
2147 * displayable information. Instead it contains bit depth information that is
2148 * used to determine which pixels are visible and which are obscured.
2150 #define DDSCAPS_ZBUFFER 0x00020000l
2153 * Indicates surface will have a DC associated long term
2155 #define DDSCAPS_OWNDC 0x00040000l
2158 * Indicates surface should be able to receive live video
2160 #define DDSCAPS_LIVEVIDEO 0x00080000l
2163 * Indicates surface should be able to have a stream decompressed
2164 * to it by the hardware.
2166 #define DDSCAPS_HWCODEC 0x00100000l
2169 * Surface is a ModeX surface.
2172 #define DDSCAPS_MODEX 0x00200000l
2175 * Indicates surface is one level of a mip-map. This surface will
2176 * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
2177 * This can be done explicitly, by creating a number of surfaces and
2178 * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
2179 * If this bit is set then DDSCAPS_TEXTURE must also be set.
2181 #define DDSCAPS_MIPMAP 0x00400000l
2184 * This bit is reserved. It should not be specified.
2186 #define DDSCAPS_RESERVED2 0x00800000l
2190 * Indicates that memory for the surface is not allocated until the surface
2191 * is loaded (via the Direct3D texture Load() function).
2193 #define DDSCAPS_ALLOCONLOAD 0x04000000l
2196 * Indicates that the surface will recieve data from a video port.
2198 #define DDSCAPS_VIDEOPORT 0x08000000l
2201 * Indicates that a video memory surface is resident in true, local video
2202 * memory rather than non-local video memory. If this flag is specified then
2203 * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
2204 * DDSCAPS_NONLOCALVIDMEM.
2206 #define DDSCAPS_LOCALVIDMEM 0x10000000l
2209 * Indicates that a video memory surface is resident in non-local video
2210 * memory rather than true, local video memory. If this flag is specified
2211 * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
2212 * DDSCAPS_LOCALVIDMEM.
2214 #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
2217 * Indicates that this surface is a standard VGA mode surface, and not a
2218 * ModeX surface. (This flag will never be set in combination with the
2219 * DDSCAPS_MODEX flag).
2221 #define DDSCAPS_STANDARDVGAMODE 0x40000000l
2224 * Indicates that this surface will be an optimized surface. This flag is
2225 * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
2226 * will be created without any underlying video memory until loaded.
2228 #define DDSCAPS_OPTIMIZED 0x80000000l
2234 * Indicates that this surface will receive data from a video port using
2235 * the de-interlacing hardware. This allows the driver to allocate memory
2236 * for any extra buffers that may be required. The DDSCAPS_VIDEOPORT and
2237 * DDSCAPS_OVERLAY flags must also be set.
2239 #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002L
2242 * Indicates to the driver that this surface will be locked very frequently
2243 * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
2244 * set must also have DDSCAPS_TEXTURE. This cap cannot be used with
2245 * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
2247 #define DDSCAPS2_HINTDYNAMIC 0x00000004L
2250 * Indicates to the driver that this surface can be re-ordered/retiled on
2251 * load. This operation will not change the size of the texture. It is
2252 * relatively fast and symmetrical, since the application may lock these
2253 * bits (although it will take a performance hit when doing so). Surfaces
2254 * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
2255 * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
2257 #define DDSCAPS2_HINTSTATIC 0x00000008L
2260 * Indicates that the client would like this texture surface to be managed by the
2261 * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
2262 * DDSCAPS_TEXTURE set.
2264 #define DDSCAPS2_TEXTUREMANAGE 0x00000010L
2267 * These bits are reserved for internal use */
2268 #define DDSCAPS2_RESERVED1 0x00000020L
2269 #define DDSCAPS2_RESERVED2 0x00000040L
2272 * Indicates to the driver that this surface will never be locked again.
2273 * The driver is free to optimize this surface via retiling and actual compression.
2274 * All calls to Lock() or Blts from this surface will fail. Surfaces with this
2275 * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
2276 * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
2278 #define DDSCAPS2_OPAQUE 0x00000080L
2281 * Applications should set this bit at CreateSurface time to indicate that they
2282 * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
2284 #define DDSCAPS2_HINTANTIALIASING 0x00000100L
2289 /****************************************************************************
2291 * DIRECTDRAW DRIVER CAPABILITY FLAGS
2293 ****************************************************************************/
2296 * Display hardware has 3D acceleration.
2298 #define DDCAPS_3D 0x00000001l
2301 * Indicates that DirectDraw will support only dest rectangles that are aligned
2302 * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
2305 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
2308 * Indicates that DirectDraw will support only source rectangles whose sizes in
2309 * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
2311 #define DDCAPS_ALIGNSIZEDEST 0x00000004l
2313 * Indicates that DirectDraw will support only source rectangles that are aligned
2314 * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
2317 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
2320 * Indicates that DirectDraw will support only source rectangles whose sizes in
2321 * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
2323 #define DDCAPS_ALIGNSIZESRC 0x00000010l
2326 * Indicates that DirectDraw will create video memory surfaces that have a stride
2327 * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
2329 #define DDCAPS_ALIGNSTRIDE 0x00000020l
2332 * Display hardware is capable of blt operations.
2334 #define DDCAPS_BLT 0x00000040l
2337 * Display hardware is capable of asynchronous blt operations.
2339 #define DDCAPS_BLTQUEUE 0x00000080l
2342 * Display hardware is capable of color space conversions during the blt operation.
2344 #define DDCAPS_BLTFOURCC 0x00000100l
2347 * Display hardware is capable of stretching during blt operations.
2349 #define DDCAPS_BLTSTRETCH 0x00000200l
2352 * Display hardware is shared with GDI.
2354 #define DDCAPS_GDI 0x00000400l
2357 * Display hardware can overlay.
2359 #define DDCAPS_OVERLAY 0x00000800l
2362 * Set if display hardware supports overlays but can not clip them.
2364 #define DDCAPS_OVERLAYCANTCLIP 0x00001000l
2367 * Indicates that overlay hardware is capable of color space conversions during
2368 * the overlay operation.
2370 #define DDCAPS_OVERLAYFOURCC 0x00002000l
2373 * Indicates that stretching can be done by the overlay hardware.
2375 #define DDCAPS_OVERLAYSTRETCH 0x00004000l
2378 * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
2379 * other than the primary surface.
2381 #define DDCAPS_PALETTE 0x00008000l
2384 * Indicates that palette changes can be syncd with the veritcal refresh.
2386 #define DDCAPS_PALETTEVSYNC 0x00010000l
2389 * Display hardware can return the current scan line.
2391 #define DDCAPS_READSCANLINE 0x00020000l
2394 * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
2397 #define DDCAPS_STEREOVIEW 0x00040000l
2400 * Display hardware is capable of generating a vertical blank interrupt.
2402 #define DDCAPS_VBI 0x00080000l
2405 * Supports the use of z buffers with blt operations.
2407 #define DDCAPS_ZBLTS 0x00100000l
2410 * Supports Z Ordering of overlays.
2412 #define DDCAPS_ZOVERLAYS 0x00200000l
2415 * Supports color key
2417 #define DDCAPS_COLORKEY 0x00400000l
2420 * Supports alpha surfaces
2422 #define DDCAPS_ALPHA 0x00800000l
2425 * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
2427 #define DDCAPS_COLORKEYHWASSIST 0x01000000l
2430 * no hardware support at all
2432 #define DDCAPS_NOHARDWARE 0x02000000l
2435 * Display hardware is capable of color fill with bltter
2437 #define DDCAPS_BLTCOLORFILL 0x04000000l
2440 * Display hardware is bank switched, and potentially very slow at
2441 * random access to VRAM.
2443 #define DDCAPS_BANKSWITCHED 0x08000000l
2446 * Display hardware is capable of depth filling Z-buffers with bltter
2448 #define DDCAPS_BLTDEPTHFILL 0x10000000l
2451 * Display hardware is capable of clipping while bltting.
2453 #define DDCAPS_CANCLIP 0x20000000l
2456 * Display hardware is capable of clipping while stretch bltting.
2458 #define DDCAPS_CANCLIPSTRETCHED 0x40000000l
2461 * Display hardware is capable of bltting to or from system memory
2463 #define DDCAPS_CANBLTSYSMEM 0x80000000l
2466 /****************************************************************************
2468 * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
2470 ****************************************************************************/
2473 * Display hardware is certified
2475 #define DDCAPS2_CERTIFIED 0x00000001l
2478 * Driver cannot interleave 2D operations (lock and blt) to surfaces with
2479 * Direct3D rendering operations between calls to BeginScene() and EndScene()
2481 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
2484 * Display hardware contains a video port
2486 #define DDCAPS2_VIDEOPORT 0x00000004l
2489 * The overlay can be automatically flipped according to the video port
2490 * VSYNCs, providing automatic doubled buffered display of video port
2491 * data using an overlay
2493 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008l
2496 * Overlay can display each field of interlaced data individually while
2497 * it is interleaved in memory without causing jittery artifacts.
2499 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010l
2502 * Overlay can display each field of interlaced data individually while
2503 * it is not interleaved in memory without causing jittery artifacts.
2505 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020l
2508 * The overlay surface contains color controls (brightness, sharpness, etc.)
2510 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040l
2513 * The primary surface contains color controls (gamma, etc.)
2515 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080l
2518 * RGBZ -> RGB supported for 16:16 RGB:Z
2520 #define DDCAPS2_CANDROPZ16BIT 0x00000100l
2523 * Driver supports non-local video memory.
2525 #define DDCAPS2_NONLOCALVIDMEM 0x00000200l
2528 * Dirver supports non-local video memory but has different capabilities for
2529 * non-local video memory surfaces. If this bit is set then so must
2530 * DDCAPS2_NONLOCALVIDMEM.
2532 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400l
2535 * Driver neither requires nor prefers surfaces to be pagelocked when performing
2536 * blts involving system memory surfaces
2538 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800l
2541 * Driver can create surfaces which are wider than the primary surface
2543 #define DDCAPS2_WIDESURFACES 0x00001000l
2546 * Driver supports bob without using a video port by handling the
2547 * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
2549 #define DDCAPS2_CANFLIPODDEVEN 0x00002000l
2552 * Driver supports bob using hardware
2554 #define DDCAPS2_CANBOBHARDWARE 0x00004000l
2557 * Driver supports bltting any FOURCC surface to another surface of the same FOURCC
2559 #define DDCAPS2_COPYFOURCC 0x00008000l
2563 * Driver supports loadable gamma ramps for the primary surface
2565 #define DDCAPS2_PRIMARYGAMMA 0x00020000l
2568 * Driver can render in windowed mode.
2570 #define DDCAPS2_CANRENDERWINDOWED 0x00080000l
2573 * A calibrator is available to adjust the gamma ramp according to the
2574 * physical display properties so that the result will be identical on
2575 * all calibrated systems.
2577 #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000l
2580 * Indicates that the driver will respond to DDFLIP_INTERVALn flags
2582 #define DDCAPS2_FLIPINTERVAL 0x00200000l
2585 * Indicates that the driver will respond to DDFLIP_NOVSYNC
2587 #define DDCAPS2_FLIPNOVSYNC 0x00400000l
2590 /****************************************************************************
2592 * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
2594 ****************************************************************************/
2597 * Supports alpha blending around the edge of a source color keyed surface.
2600 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
2603 * Supports alpha information in the pixel format. The bit depth of alpha
2604 * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
2605 * more opaque as the alpha value increases. (0 is transparent.)
2608 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
2611 * Supports alpha information in the pixel format. The bit depth of alpha
2612 * information in the pixel format can be 1,2,4, or 8. The alpha value
2613 * becomes more transparent as the alpha value increases. (0 is opaque.)
2614 * This flag can only be set if DDCAPS_ALPHA is set.
2617 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
2620 * Supports alpha only surfaces. The bit depth of an alpha only surface can be
2621 * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
2622 * (0 is transparent.)
2625 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
2628 * The depth of the alpha channel data can range can be 1,2,4, or 8.
2629 * The NEG suffix indicates that this alpha channel becomes more transparent
2630 * as the alpha value increases. (0 is opaque.) This flag can only be set if
2631 * DDCAPS_ALPHA is set.
2634 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
2637 * Supports alpha blending around the edge of a source color keyed surface.
2640 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
2643 * Supports alpha information in the pixel format. The bit depth of alpha
2644 * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
2645 * more opaque as the alpha value increases. (0 is transparent.)
2648 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
2651 * Supports alpha information in the pixel format. The bit depth of alpha
2652 * information in the pixel format can be 1,2,4, or 8. The alpha value
2653 * becomes more transparent as the alpha value increases. (0 is opaque.)
2654 * This flag can only be set if DDCAPS_ALPHA is set.
2657 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
2660 * Supports alpha only surfaces. The bit depth of an alpha only surface can be
2661 * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
2662 * (0 is transparent.)
2665 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
2668 * The depth of the alpha channel data can range can be 1,2,4, or 8.
2669 * The NEG suffix indicates that this alpha channel becomes more transparent
2670 * as the alpha value increases. (0 is opaque.) This flag can only be set if
2671 * DDCAPS_ALPHA is set.
2674 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
2676 #if DIRECTDRAW_VERSION < 0x0600
2677 #endif //DIRECTDRAW_VERSION
2682 /****************************************************************************
2684 * DIRECTDRAW FX CAPABILITY FLAGS
2686 ****************************************************************************/
2689 * Uses arithmetic operations to stretch and shrink surfaces during blt
2690 * rather than pixel doubling techniques. Along the Y axis.
2692 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
2695 * Uses arithmetic operations to stretch during blt
2696 * rather than pixel doubling techniques. Along the Y axis. Only
2697 * works for x1, x2, etc.
2699 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
2702 * Supports mirroring left to right in blt.
2704 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
2707 * Supports mirroring top to bottom in blt.
2709 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
2712 * Supports arbitrary rotation for blts.
2714 #define DDFXCAPS_BLTROTATION 0x00000100l
2717 * Supports 90 degree rotations for blts.
2719 #define DDFXCAPS_BLTROTATION90 0x00000200l
2722 * DirectDraw supports arbitrary shrinking of a surface along the
2723 * x axis (horizontal direction) for blts.
2725 #define DDFXCAPS_BLTSHRINKX 0x00000400l
2728 * DirectDraw supports integer shrinking (1x,2x,) of a surface
2729 * along the x axis (horizontal direction) for blts.
2731 #define DDFXCAPS_BLTSHRINKXN 0x00000800l
2734 * DirectDraw supports arbitrary shrinking of a surface along the
2735 * y axis (horizontal direction) for blts.
2737 #define DDFXCAPS_BLTSHRINKY 0x00001000l
2740 * DirectDraw supports integer shrinking (1x,2x,) of a surface
2741 * along the y axis (vertical direction) for blts.
2743 #define DDFXCAPS_BLTSHRINKYN 0x00002000l
2746 * DirectDraw supports arbitrary stretching of a surface along the
2747 * x axis (horizontal direction) for blts.
2749 #define DDFXCAPS_BLTSTRETCHX 0x00004000l
2752 * DirectDraw supports integer stretching (1x,2x,) of a surface
2753 * along the x axis (horizontal direction) for blts.
2755 #define DDFXCAPS_BLTSTRETCHXN 0x00008000l
2758 * DirectDraw supports arbitrary stretching of a surface along the
2759 * y axis (horizontal direction) for blts.
2761 #define DDFXCAPS_BLTSTRETCHY 0x00010000l
2764 * DirectDraw supports integer stretching (1x,2x,) of a surface
2765 * along the y axis (vertical direction) for blts.
2767 #define DDFXCAPS_BLTSTRETCHYN 0x00020000l
2770 * Uses arithmetic operations to stretch and shrink surfaces during
2771 * overlay rather than pixel doubling techniques. Along the Y axis
2774 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
2777 * Uses arithmetic operations to stretch surfaces during
2778 * overlay rather than pixel doubling techniques. Along the Y axis
2779 * for overlays. Only works for x1, x2, etc.
2781 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
2784 * DirectDraw supports arbitrary shrinking of a surface along the
2785 * x axis (horizontal direction) for overlays.
2787 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
2790 * DirectDraw supports integer shrinking (1x,2x,) of a surface
2791 * along the x axis (horizontal direction) for overlays.
2793 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
2796 * DirectDraw supports arbitrary shrinking of a surface along the
2797 * y axis (horizontal direction) for overlays.
2799 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
2802 * DirectDraw supports integer shrinking (1x,2x,) of a surface
2803 * along the y axis (vertical direction) for overlays.
2805 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
2808 * DirectDraw supports arbitrary stretching of a surface along the
2809 * x axis (horizontal direction) for overlays.
2811 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
2814 * DirectDraw supports integer stretching (1x,2x,) of a surface
2815 * along the x axis (horizontal direction) for overlays.
2817 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
2820 * DirectDraw supports arbitrary stretching of a surface along the
2821 * y axis (horizontal direction) for overlays.
2823 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
2826 * DirectDraw supports integer stretching (1x,2x,) of a surface
2827 * along the y axis (vertical direction) for overlays.
2829 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
2832 * DirectDraw supports mirroring of overlays across the vertical axis
2834 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
2837 * DirectDraw supports mirroring of overlays across the horizontal axis
2839 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
2842 * Driver can do alpha blending for blits.
2844 #define DDFXCAPS_BLTALPHA 0x00000001l
2847 * Driver can do geometric transformations (or warps) for blits.
2849 #define DDFXCAPS_BLTTRANSFORM 0x00000002l
2852 * Driver can do surface-reconstruction filtering for warped blits.
2854 #define DDFXCAPS_BLTFILTER DDFXCAPS_BLTARITHSTRETCHY
2857 * Driver can do alpha blending for overlays.
2859 #define DDFXCAPS_OVERLAYALPHA 0x00000004l
2862 * Driver can do geometric transformations (or warps) for overlays.
2864 #define DDFXCAPS_OVERLAYTRANSFORM 0x20000000l
2867 * Driver can do surface-reconstruction filtering for warped overlays.
2869 #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
2872 /****************************************************************************
2874 * DIRECTDRAW STEREO VIEW CAPABILITIES
2876 ****************************************************************************/
2879 * The stereo view is accomplished via enigma encoding.
2881 #define DDSVCAPS_ENIGMA 0x00000001l
2884 * The stereo view is accomplished via high frequency flickering.
2886 #define DDSVCAPS_FLICKER 0x00000002l
2889 * The stereo view is accomplished via red and blue filters applied
2890 * to the left and right eyes. All images must adapt their colorspaces
2893 #define DDSVCAPS_REDBLUE 0x00000004l
2896 * The stereo view is accomplished with split screen technology.
2898 #define DDSVCAPS_SPLIT 0x00000008l
2900 /****************************************************************************
2902 * DIRECTDRAWPALETTE CAPABILITIES
2904 ****************************************************************************/
2907 * Index is 4 bits. There are sixteen color entries in the palette table.
2909 #define DDPCAPS_4BIT 0x00000001l
2912 * Index is onto a 8 bit color index. This field is only valid with the
2913 * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
2914 * surface is in 8bpp. Each color entry is one byte long and is an index
2915 * into destination surface's 8bpp palette.
2917 #define DDPCAPS_8BITENTRIES 0x00000002l
2920 * Index is 8 bits. There are 256 color entries in the palette table.
2922 #define DDPCAPS_8BIT 0x00000004l
2925 * Indicates that this DIRECTDRAWPALETTE should use the palette color array
2926 * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
2929 #define DDPCAPS_INITIALIZE 0x00000008l
2932 * This palette is the one attached to the primary surface. Changing this
2933 * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
2936 #define DDPCAPS_PRIMARYSURFACE 0x00000010l
2939 * This palette is the one attached to the primary surface left. Changing
2940 * this table has immediate effect on the display for the left eye unless
2941 * DDPSETPAL_VSYNC is specified and supported.
2943 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
2946 * This palette can have all 256 entries defined
2948 #define DDPCAPS_ALLOW256 0x00000040l
2951 * This palette can have modifications to it synced with the monitors
2954 #define DDPCAPS_VSYNC 0x00000080l
2957 * Index is 1 bit. There are two color entries in the palette table.
2959 #define DDPCAPS_1BIT 0x00000100l
2962 * Index is 2 bit. There are four color entries in the palette table.
2964 #define DDPCAPS_2BIT 0x00000200l
2967 * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value
2969 #define DDPCAPS_ALPHA 0x00000400l
2972 /****************************************************************************
2974 * DIRECTDRAWPALETTE SETENTRY CONSTANTS
2976 ****************************************************************************/
2979 /****************************************************************************
2981 * DIRECTDRAWPALETTE GETENTRY CONSTANTS
2983 ****************************************************************************/
2985 /* 0 is the only legal value */
2987 /****************************************************************************
2989 * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS
2991 ****************************************************************************/
2994 * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData
2995 * must be set to sizeof(IUnknown*). DirectDraw will call AddRef through this
2996 * pointer and Release when the private data is destroyed. This includes when
2997 * the surface or palette is destroyed before such priovate data is destroyed.
2999 #define DDSPD_IUNKNOWNPOINTER 0x00000001L
3002 * Private data is only valid for the current state of the object,
3003 * as determined by the uniqueness value.
3005 #define DDSPD_VOLATILE 0x00000002L
3008 /****************************************************************************
3010 * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
3012 ****************************************************************************/
3015 /****************************************************************************
3017 * DIRECTDRAW BITDEPTH CONSTANTS
3019 * NOTE: These are only used to indicate supported bit depths. These
3020 * are flags only, they are not to be used as an actual bit depth. The
3021 * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
3022 * bit depths in a surface or for changing the display mode.
3024 ****************************************************************************/
3029 #define DDBD_1 0x00004000l
3034 #define DDBD_2 0x00002000l
3039 #define DDBD_4 0x00001000l
3044 #define DDBD_8 0x00000800l
3047 * 16 bits per pixel.
3049 #define DDBD_16 0x00000400l
3052 * 24 bits per pixel.
3054 #define DDBD_24 0X00000200l
3057 * 32 bits per pixel.
3059 #define DDBD_32 0x00000100l
3061 /****************************************************************************
3063 * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
3065 ****************************************************************************/
3068 * Set if the structure contains a color space. Not set if the structure
3069 * contains a single color key.
3071 #define DDCKEY_COLORSPACE 0x00000001l
3074 * Set if the structure specifies a color key or color space which is to be
3075 * used as a destination color key for blt operations.
3077 #define DDCKEY_DESTBLT 0x00000002l
3080 * Set if the structure specifies a color key or color space which is to be
3081 * used as a destination color key for overlay operations.
3083 #define DDCKEY_DESTOVERLAY 0x00000004l
3086 * Set if the structure specifies a color key or color space which is to be
3087 * used as a source color key for blt operations.
3089 #define DDCKEY_SRCBLT 0x00000008l
3092 * Set if the structure specifies a color key or color space which is to be
3093 * used as a source color key for overlay operations.
3095 #define DDCKEY_SRCOVERLAY 0x00000010l
3098 /****************************************************************************
3100 * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
3102 ****************************************************************************/
3105 * Supports transparent blting using a color key to identify the replaceable
3106 * bits of the destination surface for RGB colors.
3108 #define DDCKEYCAPS_DESTBLT 0x00000001l
3111 * Supports transparent blting using a color space to identify the replaceable
3112 * bits of the destination surface for RGB colors.
3114 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
3117 * Supports transparent blting using a color space to identify the replaceable
3118 * bits of the destination surface for YUV colors.
3120 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
3123 * Supports transparent blting using a color key to identify the replaceable
3124 * bits of the destination surface for YUV colors.
3126 #define DDCKEYCAPS_DESTBLTYUV 0x00000008l
3129 * Supports overlaying using colorkeying of the replaceable bits of the surface
3130 * being overlayed for RGB colors.
3132 #define DDCKEYCAPS_DESTOVERLAY 0x00000010l
3135 * Supports a color space as the color key for the destination for RGB colors.
3137 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
3140 * Supports a color space as the color key for the destination for YUV colors.
3142 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
3145 * Supports only one active destination color key value for visible overlay
3148 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
3151 * Supports overlaying using colorkeying of the replaceable bits of the
3152 * surface being overlayed for YUV colors.
3154 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
3157 * Supports transparent blting using the color key for the source with
3158 * this surface for RGB colors.
3160 #define DDCKEYCAPS_SRCBLT 0x00000200l
3163 * Supports transparent blting using a color space for the source with
3164 * this surface for RGB colors.
3166 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
3169 * Supports transparent blting using a color space for the source with
3170 * this surface for YUV colors.
3172 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
3175 * Supports transparent blting using the color key for the source with
3176 * this surface for YUV colors.
3178 #define DDCKEYCAPS_SRCBLTYUV 0x00001000l
3181 * Supports overlays using the color key for the source with this
3182 * overlay surface for RGB colors.
3184 #define DDCKEYCAPS_SRCOVERLAY 0x00002000l
3187 * Supports overlays using a color space as the source color key for
3188 * the overlay surface for RGB colors.
3190 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
3193 * Supports overlays using a color space as the source color key for
3194 * the overlay surface for YUV colors.
3196 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
3199 * Supports only one active source color key value for visible
3202 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
3205 * Supports overlays using the color key for the source with this
3206 * overlay surface for YUV colors.
3208 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
3211 * there are no bandwidth trade-offs for using colorkey with an overlay
3213 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
3216 /****************************************************************************
3218 * DIRECTDRAW PIXELFORMAT FLAGS
3220 ****************************************************************************/
3223 * The surface has alpha channel information in the pixel format.
3225 #define DDPF_ALPHAPIXELS 0x00000001l
3228 * The pixel format contains alpha only information
3230 #define DDPF_ALPHA 0x00000002l
3233 * The FourCC code is valid.
3235 #define DDPF_FOURCC 0x00000004l
3238 * The surface is 4-bit color indexed.
3240 #define DDPF_PALETTEINDEXED4 0x00000008l
3243 * The surface is indexed into a palette which stores indices
3244 * into the destination surface's 8-bit palette.
3246 #define DDPF_PALETTEINDEXEDTO8 0x00000010l
3249 * The surface is 8-bit color indexed.
3251 #define DDPF_PALETTEINDEXED8 0x00000020l
3254 * The RGB data in the pixel format structure is valid.
3256 #define DDPF_RGB 0x00000040l
3259 * The surface will accept pixel data in the format specified
3260 * and compress it during the write.
3262 #define DDPF_COMPRESSED 0x00000080l
3265 * The surface will accept RGB data and translate it during
3266 * the write to YUV data. The format of the data to be written
3267 * will be contained in the pixel format structure. The DDPF_RGB
3270 #define DDPF_RGBTOYUV 0x00000100l
3273 * pixel format is YUV - YUV data in pixel format struct is valid
3275 #define DDPF_YUV 0x00000200l
3278 * pixel format is a z buffer only surface
3280 #define DDPF_ZBUFFER 0x00000400l
3283 * The surface is 1-bit color indexed.
3285 #define DDPF_PALETTEINDEXED1 0x00000800l
3288 * The surface is 2-bit color indexed.
3290 #define DDPF_PALETTEINDEXED2 0x00001000l
3293 * The surface contains Z information in the pixels
3295 #define DDPF_ZPIXELS 0x00002000l
3298 * The surface contains stencil information along with Z
3300 #define DDPF_STENCILBUFFER 0x00004000l
3303 * Premultiplied alpha format -- the color components have been
3304 * premultiplied by the alpha component.
3306 #define DDPF_ALPHAPREMULT 0x00008000l
3310 * Luminance data in the pixel format is valid.
3311 * Use this flag for luminance-only or luminance+alpha surfaces,
3312 * the bit depth is then ddpf.dwLuminanceBitCount.
3314 #define DDPF_LUMINANCE 0x00020000l
3317 * Luminance data in the pixel format is valid.
3318 * Use this flag when hanging luminance off bumpmap surfaces,
3319 * the bit mask for the luminance portion of the pixel is then
3320 * ddpf.dwBumpLuminanceBitMask
3322 #define DDPF_BUMPLUMINANCE 0x00040000l
3325 * Bump map dUdV data in the pixel format is valid.
3327 #define DDPF_BUMPDUDV 0x00080000l
3329 /*===========================================================================
3332 * DIRECTDRAW CALLBACK FLAGS
3335 *==========================================================================*/
3337 /****************************************************************************
3339 * DIRECTDRAW ENUMSURFACES FLAGS
3341 ****************************************************************************/
3344 * Enumerate all of the surfaces that meet the search criterion.
3346 #define DDENUMSURFACES_ALL 0x00000001l
3349 * A search hit is a surface that matches the surface description.
3351 #define DDENUMSURFACES_MATCH 0x00000002l
3354 * A search hit is a surface that does not match the surface description.
3356 #define DDENUMSURFACES_NOMATCH 0x00000004l
3359 * Enumerate the first surface that can be created which meets the search criterion.
3361 #define DDENUMSURFACES_CANBECREATED 0x00000008l
3364 * Enumerate the surfaces that already exist that meet the search criterion.
3366 #define DDENUMSURFACES_DOESEXIST 0x00000010l
3369 /****************************************************************************
3371 * DIRECTDRAW SETDISPLAYMODE FLAGS
3373 ****************************************************************************/
3376 * The desired mode is a standard VGA mode
3378 #define DDSDM_STANDARDVGAMODE 0x00000001l
3382 /****************************************************************************
3384 * DIRECTDRAW ENUMDISPLAYMODES FLAGS
3386 ****************************************************************************/
3389 * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
3390 * that a particular mode will be enumerated only once. This flag specifies whether
3391 * the refresh rate is taken into account when determining if a mode is unique.
3393 #define DDEDM_REFRESHRATES 0x00000001l
3396 * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
3397 * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
3398 * enumerated if the application has previously called SetCooperativeLevel with the
3399 * DDSCL_ALLOWMODEX flag set).
3401 #define DDEDM_STANDARDVGAMODES 0x00000002L
3404 /****************************************************************************
3406 * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
3408 ****************************************************************************/
3411 * Exclusive mode owner will be responsible for the entire primary surface.
3412 * GDI can be ignored. used with DD
3414 #define DDSCL_FULLSCREEN 0x00000001l
3417 * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
3419 #define DDSCL_ALLOWREBOOT 0x00000002l
3422 * prevents DDRAW from modifying the application window.
3423 * prevents DDRAW from minimize/restore the application window on activation.
3425 #define DDSCL_NOWINDOWCHANGES 0x00000004l
3428 * app wants to work as a regular Windows application
3430 #define DDSCL_NORMAL 0x00000008l
3433 * app wants exclusive access
3435 #define DDSCL_EXCLUSIVE 0x00000010l
3439 * app can deal with non-windows display modes
3441 #define DDSCL_ALLOWMODEX 0x00000040l
3444 * this window will receive the focus messages
3446 #define DDSCL_SETFOCUSWINDOW 0x00000080l
3449 * this window is associated with the DDRAW object and will
3450 * cover the screen in fullscreen mode
3452 #define DDSCL_SETDEVICEWINDOW 0x00000100l
3455 * app wants DDRAW to create a window to be associated with the
3458 #define DDSCL_CREATEDEVICEWINDOW 0x00000200l
3461 * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D
3462 * take the global crtisec more frequently.
3464 #define DDSCL_MULTITHREADED 0x00000400l
3467 * App hints that it would like to keep the FPU set up for optimal Direct3D
3468 * performance (single precision and exceptions disabled) so Direct3D
3469 * does not need to explicitly set the FPU each time
3471 #define DDSCL_FPUSETUP 0x00000800l
3474 /****************************************************************************
3476 * DIRECTDRAW BLT FLAGS
3478 ****************************************************************************/
3481 * Use the alpha information in the pixel format or the alpha channel surface
3482 * attached to the destination surface as the alpha channel for this blt.
3484 #define DDBLT_ALPHADEST 0x00000001l
3487 * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
3488 * for the destination surface for this blt.
3490 #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
3493 * The NEG suffix indicates that the destination surface becomes more
3494 * transparent as the alpha value increases. (0 is opaque)
3496 #define DDBLT_ALPHADESTNEG 0x00000004l
3499 * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
3500 * channel for the destination for this blt.
3502 #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l
3505 * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
3506 * for the edges of the image that border the color key colors.
3508 #define DDBLT_ALPHAEDGEBLEND 0x00000010l
3511 * Use the alpha information in the pixel format or the alpha channel surface
3512 * attached to the source surface as the alpha channel for this blt.
3514 #define DDBLT_ALPHASRC 0x00000020l
3517 * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
3518 * for the source for this blt.
3520 #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
3523 * The NEG suffix indicates that the source surface becomes more transparent
3524 * as the alpha value increases. (0 is opaque)
3526 #define DDBLT_ALPHASRCNEG 0x00000080l
3529 * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
3530 * for the source for this blt.
3532 #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l
3535 * Do this blt asynchronously through the FIFO in the order received. If
3536 * there is no room in the hardware FIFO fail the call.
3538 #define DDBLT_ASYNC 0x00000200l
3541 * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
3542 * to fill the destination rectangle on the destination surface with.
3544 #define DDBLT_COLORFILL 0x00000400l
3547 * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
3548 * to use for the blt.
3550 #define DDBLT_DDFX 0x00000800l
3553 * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
3554 * that are not part of the Win32 API.
3556 #define DDBLT_DDROPS 0x00001000l
3559 * Use the color key associated with the destination surface.
3561 #define DDBLT_KEYDEST 0x00002000l
3564 * Use the dckDestColorkey field in the DDBLTFX structure as the color key
3565 * for the destination surface.
3567 #define DDBLT_KEYDESTOVERRIDE 0x00004000l
3570 * Use the color key associated with the source surface.
3572 #define DDBLT_KEYSRC 0x00008000l
3575 * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
3576 * for the source surface.
3578 #define DDBLT_KEYSRCOVERRIDE 0x00010000l
3581 * Use the dwROP field in the DDBLTFX structure for the raster operation
3582 * for this blt. These ROPs are the same as the ones defined in the Win32 API.
3584 #define DDBLT_ROP 0x00020000l
3587 * Use the dwRotationAngle field in the DDBLTFX structure as the angle
3588 * (specified in 1/100th of a degree) to rotate the surface.
3590 #define DDBLT_ROTATIONANGLE 0x00040000l
3593 * Z-buffered blt using the z-buffers attached to the source and destination
3594 * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
3597 #define DDBLT_ZBUFFER 0x00080000l
3600 * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
3601 * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
3602 * for the destination.
3604 #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l
3607 * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
3608 * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
3609 * respectively for the destination.
3611 #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l
3614 * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
3615 * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
3618 #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l
3621 * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
3622 * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
3623 * respectively for the source.
3625 #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
3628 * wait until the device is ready to handle the blt
3629 * this will cause blt to not return DDERR_WASSTILLDRAWING
3631 #define DDBLT_WAIT 0x01000000l
3634 * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
3635 * to fill the destination rectangle on the destination Z-buffer surface
3638 #define DDBLT_DEPTHFILL 0x02000000l
3641 /****************************************************************************
3645 ****************************************************************************/
3647 #define DDBLTFAST_NOCOLORKEY 0x00000000
3648 #define DDBLTFAST_SRCCOLORKEY 0x00000001
3649 #define DDBLTFAST_DESTCOLORKEY 0x00000002
3650 #define DDBLTFAST_WAIT 0x00000010
3655 /****************************************************************************
3659 ****************************************************************************/
3661 #define DDFLIP_WAIT 0x00000001L
3664 * Indicates that the target surface contains the even field of video data.
3665 * This flag is only valid with an overlay surface.
3667 #define DDFLIP_EVEN 0x00000002L
3670 * Indicates that the target surface contains the odd field of video data.
3671 * This flag is only valid with an overlay surface.
3673 #define DDFLIP_ODD 0x00000004L
3676 * Causes DirectDraw to perform the physical flip immediately and return
3677 * to the application. Typically, what was the front buffer but is now the back
3678 * buffer will still be visible (depending on timing) until the next vertical
3679 * retrace. Subsequent operations involving the two flipped surfaces will
3680 * not check to see if the physical flip has finished (i.e. will not return
3681 * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)).
3682 * This allows an application to perform Flips at a higher frequency than the
3683 * monitor refresh rate, but may introduce visible artifacts.
3684 * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set,
3685 * DDFLIP_NOVSYNC has no effect.
3687 #define DDFLIP_NOVSYNC 0x00000008L
3691 * Flip Interval Flags. These flags indicate how many vertical retraces to wait between
3692 * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each
3693 * surface involved in the flip until the specified number of vertical retraces has
3694 * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set,
3695 * DDFLIP_INTERVALn has no effect.
3699 * DirectDraw will flip on every other vertical sync
3701 #define DDFLIP_INTERVAL2 0x02000000L
3705 * DirectDraw will flip on every third vertical sync
3707 #define DDFLIP_INTERVAL3 0x03000000L
3711 * DirectDraw will flip on every fourth vertical sync
3713 #define DDFLIP_INTERVAL4 0x04000000L
3717 /****************************************************************************
3719 * DIRECTDRAW SURFACE OVERLAY FLAGS
3721 ****************************************************************************/
3724 * Use the alpha information in the pixel format or the alpha channel surface
3725 * attached to the destination surface as the alpha channel for the
3726 * destination overlay.
3728 #define DDOVER_ALPHADEST 0x00000001l
3731 * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
3732 * destination alpha channel for this overlay.
3734 #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
3737 * The NEG suffix indicates that the destination surface becomes more
3738 * transparent as the alpha value increases.
3740 #define DDOVER_ALPHADESTNEG 0x00000004l
3743 * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
3744 * channel destination for this overlay.
3746 #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
3749 * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
3750 * channel for the edges of the image that border the color key colors.
3752 #define DDOVER_ALPHAEDGEBLEND 0x00000010l
3755 * Use the alpha information in the pixel format or the alpha channel surface
3756 * attached to the source surface as the source alpha channel for this overlay.
3758 #define DDOVER_ALPHASRC 0x00000020l
3761 * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
3762 * alpha channel for this overlay.
3764 #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
3767 * The NEG suffix indicates that the source surface becomes more transparent
3768 * as the alpha value increases.
3770 #define DDOVER_ALPHASRCNEG 0x00000080l
3773 * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
3774 * source for this overlay.
3776 #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
3779 * Turn this overlay off.
3781 #define DDOVER_HIDE 0x00000200l
3784 * Use the color key associated with the destination surface.
3786 #define DDOVER_KEYDEST 0x00000400l
3789 * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
3790 * for the destination surface
3792 #define DDOVER_KEYDESTOVERRIDE 0x00000800l
3795 * Use the color key associated with the source surface.
3797 #define DDOVER_KEYSRC 0x00001000l
3800 * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
3801 * for the source surface.
3803 #define DDOVER_KEYSRCOVERRIDE 0x00002000l
3806 * Turn this overlay on.
3808 #define DDOVER_SHOW 0x00004000l
3811 * Add a dirty rect to an emulated overlayed surface.
3813 #define DDOVER_ADDDIRTYRECT 0x00008000l
3816 * Redraw all dirty rects on an emulated overlayed surface.
3818 #define DDOVER_REFRESHDIRTYRECTS 0x00010000l
3821 * Redraw the entire surface on an emulated overlayed surface.
3823 #define DDOVER_REFRESHALL 0x00020000l
3827 * Use the overlay FX flags to define special overlay FX
3829 #define DDOVER_DDFX 0x00080000l
3832 * Autoflip the overlay when ever the video port autoflips
3834 #define DDOVER_AUTOFLIP 0x00100000l
3837 * Display each field of video port data individually without
3838 * causing any jittery artifacts
3840 #define DDOVER_BOB 0x00200000l
3843 * Indicates that bob/weave decisions should not be overridden by other
3846 #define DDOVER_OVERRIDEBOBWEAVE 0x00400000l
3849 * Indicates that the surface memory is composed of interleaved fields.
3851 #define DDOVER_INTERLEAVED 0x00800000l
3854 * Indicates that bob will be performed using hardware rather than
3855 * software or emulated.
3857 #define DDOVER_BOBHARDWARE 0x01000000l
3866 /****************************************************************************
3868 * DIRECTDRAWSURFACE LOCK FLAGS
3870 ****************************************************************************/
3873 * The default. Set to indicate that Lock should return a valid memory pointer
3874 * to the top of the specified rectangle. If no rectangle is specified then a
3875 * pointer to the top of the surface is returned.
3877 #define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default
3880 * Set to indicate that Lock should wait until it can obtain a valid memory
3881 * pointer before returning. If this bit is set, Lock will never return
3882 * DDERR_WASSTILLDRAWING.
3884 #define DDLOCK_WAIT 0x00000001L
3887 * Set if an event handle is being passed to Lock. Lock will trigger the event
3888 * when it can return the surface memory pointer requested.
3890 #define DDLOCK_EVENT 0x00000002L
3893 * Indicates that the surface being locked will only be read from.
3895 #define DDLOCK_READONLY 0x00000010L
3898 * Indicates that the surface being locked will only be written to
3900 #define DDLOCK_WRITEONLY 0x00000020L
3904 * Indicates that a system wide lock should not be taken when this surface
3905 * is locked. This has several advantages (cursor responsiveness, ability
3906 * to call more Windows functions, easier debugging) when locking video
3907 * memory surfaces. However, an application specifying this flag must
3908 * comply with a number of conditions documented in the help file.
3909 * Furthermore, this flag cannot be specified when locking the primary.
3911 #define DDLOCK_NOSYSLOCK 0x00000800L
3914 /****************************************************************************
3916 * DIRECTDRAWSURFACE PAGELOCK FLAGS
3918 ****************************************************************************/
3921 * No flags defined at present
3925 /****************************************************************************
3927 * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
3929 ****************************************************************************/
3932 * No flags defined at present
3936 /****************************************************************************
3938 * DIRECTDRAWSURFACE BLT FX FLAGS
3940 ****************************************************************************/
3943 * If stretching, use arithmetic stretching along the Y axis for this blt.
3945 #define DDBLTFX_ARITHSTRETCHY 0x00000001l
3948 * Do this blt mirroring the surface left to right. Spin the
3949 * surface around its y-axis.
3951 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
3954 * Do this blt mirroring the surface up and down. Spin the surface
3955 * around its x-axis.
3957 #define DDBLTFX_MIRRORUPDOWN 0x00000004l
3960 * Schedule this blt to avoid tearing.
3962 #define DDBLTFX_NOTEARING 0x00000008l
3965 * Do this blt rotating the surface one hundred and eighty degrees.
3967 #define DDBLTFX_ROTATE180 0x00000010l
3970 * Do this blt rotating the surface two hundred and seventy degrees.
3972 #define DDBLTFX_ROTATE270 0x00000020l
3975 * Do this blt rotating the surface ninety degrees.
3977 #define DDBLTFX_ROTATE90 0x00000040l
3980 * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
3981 * specified to limit the bits copied from the source surface.
3983 #define DDBLTFX_ZBUFFERRANGE 0x00000080l
3986 * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
3987 * before comparing it with the desting z values.
3989 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
3991 /****************************************************************************
3993 * DIRECTDRAWSURFACE OVERLAY FX FLAGS
3995 ****************************************************************************/
3998 * If stretching, use arithmetic stretching along the Y axis for this overlay.
4000 #define DDOVERFX_ARITHSTRETCHY 0x00000001l
4003 * Mirror the overlay across the vertical axis
4005 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
4008 * Mirror the overlay across the horizontal axis
4010 #define DDOVERFX_MIRRORUPDOWN 0x00000004l
4012 /****************************************************************************
4014 * Flags for dwDDFX member of DDSPRITEFX structure
4016 ****************************************************************************/
4018 * Use affine transformation matrix in fTransform member.
4020 #define DDSPRITEFX_AFFINETRANSFORM 0x00000001l
4023 * Use RGBA scaling factors in ddrgbaScaleFactors member.
4025 #define DDSPRITEFX_RGBASCALING 0x00000002l
4028 * Degrade RGBA scaling factors to accommodate driver's capabilities.
4030 #define DDSPRITEFX_DEGRADERGBASCALING 0x00000004l
4033 * Do bilinear filtering of stretched or warped sprite.
4035 #define DDSPRITEFX_BILINEARFILTER 0x00000008l
4038 * Do "blur" filtering of stretched or warped sprite.
4040 #define DDSPRITEFX_BLURFILTER 0x00000010l
4043 * Do "flat" filtering of stretched or warped sprite.
4045 #define DDSPRITEFX_FLATFILTER 0x00000020l
4048 * Degrade filtering operation to accommodate driver's capabilities.
4050 #define DDSPRITEFX_DEGRADEFILTER 0x00000040l
4053 /****************************************************************************
4055 * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
4057 ****************************************************************************/
4060 * return when the vertical blank interval begins
4062 #define DDWAITVB_BLOCKBEGIN 0x00000001l
4065 * set up an event to trigger when the vertical blank begins
4067 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
4070 * return when the vertical blank interval ends and display begins
4072 #define DDWAITVB_BLOCKEND 0x00000004l
4074 /****************************************************************************
4076 * DIRECTDRAW GETFLIPSTATUS FLAGS
4078 ****************************************************************************/
4081 * is it OK to flip now?
4083 #define DDGFS_CANFLIP 0x00000001l
4086 * is the last flip finished?
4088 #define DDGFS_ISFLIPDONE 0x00000002l
4090 /****************************************************************************
4092 * DIRECTDRAW GETBLTSTATUS FLAGS
4094 ****************************************************************************/
4097 * is it OK to blt now?
4099 #define DDGBS_CANBLT 0x00000001l
4102 * is the blt to the surface finished?
4104 #define DDGBS_ISBLTDONE 0x00000002l
4107 /****************************************************************************
4109 * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
4111 ****************************************************************************/
4114 * Enumerate overlays back to front.
4116 #define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
4119 * Enumerate overlays front to back
4121 #define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
4123 /****************************************************************************
4125 * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
4127 ****************************************************************************/
4130 * Send overlay to front
4132 #define DDOVERZ_SENDTOFRONT 0x00000000l
4135 * Send overlay to back
4137 #define DDOVERZ_SENDTOBACK 0x00000001l
4140 * Move Overlay forward
4142 #define DDOVERZ_MOVEFORWARD 0x00000002l
4145 * Move Overlay backward
4147 #define DDOVERZ_MOVEBACKWARD 0x00000003l
4150 * Move Overlay in front of relative surface
4152 #define DDOVERZ_INSERTINFRONTOF 0x00000004l
4155 * Move Overlay in back of relative surface
4157 #define DDOVERZ_INSERTINBACKOF 0x00000005l
4161 /****************************************************************************
4163 * DIRECTDRAW SETGAMMARAMP FLAGS
4165 ****************************************************************************/
4168 * Request calibrator to adjust the gamma ramp according to the physical
4169 * properties of the display so that the result should appear identical
4172 #define DDSGR_CALIBRATE 0x00000001L
4175 /*===========================================================================
4178 * DIRECTDRAW RETURN CODES
4180 * The return values from DirectDraw Commands and Surface that return an HRESULT
4181 * are codes from DirectDraw concerning the results of the action
4182 * requested by DirectDraw.
4184 *==========================================================================*/
4189 * Issued by: DirectDraw Commands and all callbacks
4192 #define DD_FALSE S_FALSE
4194 /****************************************************************************
4196 * DIRECTDRAW ENUMCALLBACK RETURN VALUES
4198 * EnumCallback returns are used to control the flow of the DIRECTDRAW and
4199 * DIRECTDRAWSURFACE object enumerations. They can only be returned by
4200 * enumeration callback routines.
4202 ****************************************************************************/
4205 * stop the enumeration
4207 #define DDENUMRET_CANCEL 0
4210 * continue the enumeration
4212 #define DDENUMRET_OK 1
4214 /****************************************************************************
4218 * Errors are represented by negative values and cannot be combined.
4220 ****************************************************************************/
4223 * This object is already initialized
4225 #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
4228 * This surface can not be attached to the requested surface.
4230 #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
4233 * This surface can not be detached from the requested surface.
4235 #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
4238 * Support is currently not available.
4240 #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
4243 * An exception was encountered while performing the requested operation
4245 #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
4250 #define DDERR_GENERIC E_FAIL
4253 * Height of rectangle provided is not a multiple of reqd alignment
4255 #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
4258 * Unable to match primary surface creation request with existing
4261 #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
4264 * One or more of the caps bits passed to the callback are incorrect.
4266 #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
4269 * DirectDraw does not support provided Cliplist.
4271 #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
4274 * DirectDraw does not support the requested mode
4276 #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
4279 * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
4281 #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
4284 * One or more of the parameters passed to the callback function are
4287 #define DDERR_INVALIDPARAMS E_INVALIDARG
4290 * pixel format was invalid as specified
4292 #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
4295 * Rectangle provided was invalid.
4297 #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
4300 * Operation could not be carried out because one or more surfaces are locked
4302 #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
4305 * There is no 3D present.
4307 #define DDERR_NO3D MAKE_DDHRESULT( 170 )
4310 * Operation could not be carried out because there is no alpha accleration
4311 * hardware present or available.
4313 #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
4317 * no clip list available
4319 #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
4322 * Operation could not be carried out because there is no color conversion
4323 * hardware present or available.
4325 #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
4328 * Create function called without DirectDraw object method SetCooperativeLevel
4331 #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
4334 * Surface doesn't currently have a color key
4336 #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
4339 * Operation could not be carried out because there is no hardware support
4340 * of the dest color key.
4342 #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
4345 * No DirectDraw support possible with current display driver
4347 #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
4350 * Operation requires the application to have exclusive mode but the
4351 * application does not have exclusive mode.
4353 #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
4356 * Flipping visible surfaces is not supported.
4358 #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
4361 * There is no GDI present.
4363 #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
4366 * Operation could not be carried out because there is no hardware present
4369 #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
4372 * Requested item was not found
4374 #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
4377 * Operation could not be carried out because there is no overlay hardware
4378 * present or available.
4380 #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
4383 * Operation could not be carried out because the source and destination
4384 * rectangles are on the same surface and overlap each other.
4386 #define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
4389 * Operation could not be carried out because there is no appropriate raster
4390 * op hardware present or available.
4392 #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
4395 * Operation could not be carried out because there is no rotation hardware
4396 * present or available.
4398 #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
4401 * Operation could not be carried out because there is no hardware support
4404 #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
4407 * DirectDrawSurface is not in 4 bit color palette and the requested operation
4408 * requires 4 bit color palette.
4410 #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
4413 * DirectDrawSurface is not in 4 bit color index palette and the requested
4414 * operation requires 4 bit color index palette.
4416 #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
4419 * DirectDraw Surface is not in 8 bit color mode and the requested operation
4420 * requires 8 bit color.
4422 #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
4425 * Operation could not be carried out because there is no texture mapping
4426 * hardware present or available.
4428 #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
4431 * Operation could not be carried out because there is no hardware support
4432 * for vertical blank synchronized operations.
4434 #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
4437 * Operation could not be carried out because there is no hardware support
4438 * for zbuffer blting.
4440 #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
4443 * Overlay surfaces could not be z layered based on their BltOrder because
4444 * the hardware does not support z layering of overlays.
4446 #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
4449 * The hardware needed for the requested operation has already been
4452 #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
4455 * DirectDraw does not have enough memory to perform the operation.
4457 #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
4460 * DirectDraw does not have enough memory to perform the operation.
4462 #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
4465 * hardware does not support clipped overlays
4467 #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
4470 * Can only have ony color key active at one time for overlays
4472 #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
4475 * Access to this palette is being refused because the palette is already
4476 * locked by another thread.
4478 #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
4481 * No src color key specified for this operation.
4483 #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
4486 * This surface is already attached to the surface it is being attached to.
4488 #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
4491 * This surface is already a dependency of the surface it is being made a
4494 #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
4497 * Access to this surface is being refused because the surface is already
4498 * locked by another thread.
4500 #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
4503 * Access to this surface is being refused because no driver exists
4504 * which can supply a pointer to the surface.
4505 * This is most likely to happen when attempting to lock the primary
4506 * surface when no DCI provider is present.
4507 * Will also happen on attempts to lock an optimized surface.
4509 #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
4512 * Access to Surface refused because Surface is obscured.
4514 #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
4517 * Access to this surface is being refused because the surface is gone.
4518 * The DIRECTDRAWSURFACE object representing this surface should
4519 * have Restore called on it.
4521 #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
4524 * The requested surface is not attached.
4526 #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
4529 * Height requested by DirectDraw is too large.
4531 #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
4534 * Size requested by DirectDraw is too large -- The individual height and
4537 #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
4540 * Width requested by DirectDraw is too large.
4542 #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
4545 * Action not supported.
4547 #define DDERR_UNSUPPORTED E_NOTIMPL
4550 * FOURCC format requested is unsupported by DirectDraw
4552 #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
4555 * Bitmask in the pixel format requested is unsupported by DirectDraw
4557 #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
4560 * The specified stream contains invalid data
4562 #define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
4565 * vertical blank is in progress
4567 #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
4570 * Informs DirectDraw that the previous Blt which is transfering information
4571 * to or from this Surface is incomplete.
4573 #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
4577 * Rectangle provided was not horizontally aligned on reqd. boundary
4579 #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
4582 * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
4585 #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
4588 * A DirectDraw object representing this driver has already been created
4591 #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
4594 * A hardware only DirectDraw object creation was attempted but the driver
4595 * did not support any hardware.
4597 #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
4600 * this process already has created a primary surface
4602 #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
4605 * software emulation not available.
4607 #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
4610 * region passed to Clipper::GetClipList is too small.
4612 #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
4615 * an attempt was made to set a clip list for a clipper objec that
4616 * is already monitoring an hwnd.
4618 #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
4621 * No clipper object attached to surface object
4623 #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
4626 * Clipper notification requires an HWND or
4627 * no HWND has previously been set as the CooperativeLevel HWND.
4629 #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
4632 * HWND used by DirectDraw CooperativeLevel has been subclassed,
4633 * this prevents DirectDraw from restoring state.
4635 #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
4638 * The CooperativeLevel HWND has already been set.
4639 * It can not be reset while the process has surfaces or palettes created.
4641 #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
4644 * No palette object attached to this surface.
4646 #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
4649 * No hardware support for 16 or 256 color palettes.
4651 #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
4654 * If a clipper object is attached to the source surface passed into a
4657 #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
4662 #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
4665 * No DirectDraw ROP hardware.
4667 #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
4670 * returned when GetOverlayPosition is called on a hidden overlay
4672 #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
4675 * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
4676 * has never been called on to establish a destionation.
4678 #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
4681 * returned when the position of the overlay on the destionation is no longer
4682 * legal for that destionation.
4684 #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
4687 * returned when an overlay member is called for a non-overlay surface
4689 #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
4692 * An attempt was made to set the cooperative level when it was already
4695 #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
4698 * An attempt has been made to flip a surface that is not flippable.
4700 #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
4703 * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
4706 #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
4709 * Surface was not locked. An attempt to unlock a surface that was not
4710 * locked at all, or by this process, has been attempted.
4712 #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
4715 * Windows can not create any more DCs, or a DC was requested for a paltte-indexed
4716 * surface when the surface had no palette AND the display mode was not palette-indexed
4717 * (in this case DirectDraw cannot select a proper palette into the DC)
4719 #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
4722 * No DC was ever created for this surface.
4724 #define DDERR_NODC MAKE_DDHRESULT( 586 )
4727 * This surface can not be restored because it was created in a different
4730 #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
4733 * This surface can not be restored because it is an implicitly created
4736 #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
4739 * The surface being used is not a palette-based surface
4741 #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
4745 * The display is currently in an unsupported mode
4747 #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
4750 * Operation could not be carried out because there is no mip-map
4751 * texture mapping hardware present or available.
4753 #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
4756 * The requested action could not be performed because the surface was of
4759 #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
4764 * Device does not support optimized surfaces, therefore no video memory optimized surfaces
4766 #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
4769 * Surface is an optimized surface, but has not yet been allocated any memory
4771 #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
4774 * Attempt was made to create or set a device window without first setting
4777 #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
4780 * A DC has already been returned for this surface. Only one DC can be
4781 * retrieved per surface.
4783 #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
4786 * An attempt was made to allocate non-local video memory from a device
4787 * that does not support non-local video memory.
4789 #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
4792 * The attempt to page lock a surface failed.
4794 #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
4798 * The attempt to page unlock a surface failed.
4800 #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
4803 * An attempt was made to page unlock a surface with no outstanding page locks.
4805 #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
4808 * There is more data available than the specified buffer size could hold
4810 #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
4813 * The data has expired and is therefore no longer valid.
4815 #define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
4818 * The video port is not active
4820 #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
4823 * Surfaces created by one direct draw device cannot be used directly by
4824 * another direct draw device.
4826 #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
4830 * An attempt was made to invoke an interface member of a DirectDraw object
4831 * created by CoCreateInstance() before it was initialized.
4833 #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
4836 /* Alpha bit depth constants */