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 0x0500
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 * GUIDS used by DirectDraw objects
44 #if defined( _WIN32 ) && !defined( _NO_COM )
45 DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
46 DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
47 DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
48 DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
49 DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
50 DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
51 DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
53 DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
54 DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
55 DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
59 /*============================================================================
61 * DirectDraw Structures
63 * Various structures used to invoke DirectDraw.
65 *==========================================================================*/
68 struct IDirectDrawSurface;
69 struct IDirectDrawPalette;
70 struct IDirectDrawClipper;
72 typedef struct IDirectDraw FAR *LPDIRECTDRAW;
73 typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
74 typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
75 typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
76 typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
78 typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
79 typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
80 typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL;
82 typedef struct _DDFXROP FAR *LPDDFXROP;
83 typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
84 typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;
89 #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
90 //#if defined( _WIN32 ) && !defined( _NO_ENUM )
91 typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
92 typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
93 extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
94 extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
96 typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
97 #define DirectDrawEnumerate DirectDrawEnumerateW
99 typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
100 #define DirectDrawEnumerate DirectDrawEnumerateA
102 extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
103 extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
107 #define REGSTR_KEY_DDHW_DESCRIPTION "Description"
108 #define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
109 #define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
111 #define DDCREATE_HARDWAREONLY 0x00000001l
112 #define DDCREATE_EMULATIONONLY 0x00000002l
114 #if defined(WINNT) || !defined(WIN32)
115 typedef long HRESULT;
119 typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
120 typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
125 typedef struct _DDCOLORKEY
127 DWORD dwColorSpaceLowValue; // low boundary of color space that is to
128 // be treated as Color Key, inclusive
129 DWORD dwColorSpaceHighValue; // high boundary of color space that is
130 // to be treated as Color Key, inclusive
133 typedef DDCOLORKEY FAR* LPDDCOLORKEY;
137 * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
139 typedef struct _DDBLTFX
141 DWORD dwSize; // size of structure
142 DWORD dwDDFX; // FX operations
143 DWORD dwROP; // Win32 raster operations
144 DWORD dwDDROP; // Raster operations new for DirectDraw
145 DWORD dwRotationAngle; // Rotation angle for blt
146 DWORD dwZBufferOpCode; // ZBuffer compares
147 DWORD dwZBufferLow; // Low limit of Z buffer
148 DWORD dwZBufferHigh; // High limit of Z buffer
149 DWORD dwZBufferBaseDest; // Destination base value
150 DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
153 DWORD dwZDestConst; // Constant to use as Z buffer for dest
154 LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
156 DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
159 DWORD dwZSrcConst; // Constant to use as Z buffer for src
160 LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
162 DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
163 DWORD dwAlphaEdgeBlend; // Alpha for edge blending
165 DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
168 DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
169 LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
171 DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
174 DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
175 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
179 DWORD dwFillColor; // color in RGB or Palettized
180 DWORD dwFillDepth; // depth value for z-buffer
181 DWORD dwFillPixel; // pixel value for RGBA or RGBZ
182 LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
184 DDCOLORKEY ddckDestColorkey; // DestColorkey override
185 DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
188 typedef DDBLTFX FAR* LPDDBLTFX;
194 typedef struct _DDSCAPS
196 DWORD dwCaps; // capabilities of surface wanted
199 typedef DDSCAPS FAR* LPDDSCAPS;
204 #define DD_ROP_SPACE (256/32) // space required to store ROP array
206 #if DIRECTDRAW_VERSION >= 0x0500
208 * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
209 * It is present for back compatability.
211 typedef struct _DDCAPS_DX3
213 DWORD dwSize; // size of the DDDRIVERCAPS structure
214 DWORD dwCaps; // driver specific capabilities
215 DWORD dwCaps2; // more driver specific capabilites
216 DWORD dwCKeyCaps; // color key capabilities of the surface
217 DWORD dwFXCaps; // driver specific stretching and effects capabilites
218 DWORD dwFXAlphaCaps; // alpha driver specific capabilities
219 DWORD dwPalCaps; // palette capabilities
220 DWORD dwSVCaps; // stereo vision capabilities
221 DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
222 DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
223 DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
224 DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
225 DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
226 DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
227 DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
228 DWORD dwVidMemTotal; // total amount of video memory
229 DWORD dwVidMemFree; // amount of free video memory
230 DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
231 DWORD dwCurrVisibleOverlays; // current number of visible overlays
232 DWORD dwNumFourCCCodes; // number of four cc codes
233 DWORD dwAlignBoundarySrc; // source rectangle alignment
234 DWORD dwAlignSizeSrc; // source rectangle byte size
235 DWORD dwAlignBoundaryDest; // dest rectangle alignment
236 DWORD dwAlignSizeDest; // dest rectangle byte size
237 DWORD dwAlignStrideAlign; // stride alignment
238 DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
239 DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
240 DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
241 DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
242 DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
243 DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
244 DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
245 DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
246 DWORD dwReserved1; // reserved
247 DWORD dwReserved2; // reserved
248 DWORD dwReserved3; // reserved
249 DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
250 DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
251 DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
252 DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
253 DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
254 DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
255 DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
256 DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
257 DWORD dwSSBCaps; // driver specific capabilities for System->System blts
258 DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
259 DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
260 DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
261 DWORD dwReserved4; // reserved
262 DWORD dwReserved5; // reserved
263 DWORD dwReserved6; // reserved
265 typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3;
266 #endif /* DIRECTDRAW_VERSION >= 0x0500 */
268 typedef struct _DDCAPS
270 /* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
271 /* 4*/ DWORD dwCaps; // driver specific capabilities
272 /* 8*/ DWORD dwCaps2; // more driver specific capabilites
273 /* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
274 /* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
275 /* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
276 /* 18*/ DWORD dwPalCaps; // palette capabilities
277 /* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
278 /* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
279 /* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
280 /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
281 /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
282 /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
283 /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
284 /* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
285 /* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
286 /* 40*/ DWORD dwVidMemFree; // amount of free video memory
287 /* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
288 /* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
289 /* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
290 /* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
291 /* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
292 /* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
293 /* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
294 /* 60*/ DWORD dwAlignStrideAlign; // stride alignment
295 /* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
296 /* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
297 /* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
298 /* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
299 /* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
300 /* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
301 /* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
302 /* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
303 /* a0*/ DWORD dwReserved1; // reserved
304 /* a4*/ DWORD dwReserved2; // reserved
305 /* a8*/ DWORD dwReserved3; // reserved
306 /* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
307 /* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
308 /* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
309 /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
310 /* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
311 /* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
312 /* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
313 /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
314 /*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
315 /*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
316 /*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
317 /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
318 #if DIRECTDRAW_VERSION >= 0x0500
319 /*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
320 /*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
321 /*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
322 /*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
323 /*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
324 /*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
325 /*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
326 /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
327 #else /* DIRECTDRAW_VERSION >= 0x0500 */
328 /*130*/ DWORD dwReserved4; // reserved
329 /*134*/ DWORD dwReserved5; // reserved
330 /*138*/ DWORD dwReserved6; // reserved
331 #endif /* DIRECTDRAW_VERSION >= 0x0500 */
334 typedef DDCAPS FAR* LPDDCAPS;
341 typedef struct _DDPIXELFORMAT
343 DWORD dwSize; // size of structure
344 DWORD dwFlags; // pixel format flags
345 DWORD dwFourCC; // (FOURCC code)
348 DWORD dwRGBBitCount; // how many bits per pixel
349 DWORD dwYUVBitCount; // how many bits per pixel
350 DWORD dwZBufferBitDepth; // how many bits for z buffers
351 DWORD dwAlphaBitDepth; // how many bits for alpha channels
355 DWORD dwRBitMask; // mask for red bit
356 DWORD dwYBitMask; // mask for Y bits
360 DWORD dwGBitMask; // mask for green bits
361 DWORD dwUBitMask; // mask for U bits
365 DWORD dwBBitMask; // mask for blue bits
366 DWORD dwVBitMask; // mask for V bits
370 DWORD dwRGBAlphaBitMask; // mask for alpha channel
371 DWORD dwYUVAlphaBitMask; // mask for alpha channel
372 DWORD dwRGBZBitMask; // mask for Z channel
373 DWORD dwYUVZBitMask; // mask for Z channel
377 typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
382 typedef struct _DDOVERLAYFX
384 DWORD dwSize; // size of structure
385 DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
386 DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
388 DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
391 DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
392 LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
394 DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
397 DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
398 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
400 DDCOLORKEY dckDestColorkey; // DestColorkey override
401 DDCOLORKEY dckSrcColorkey; // DestColorkey override
402 DWORD dwDDFX; // Overlay FX
403 DWORD dwFlags; // flags
406 typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
409 * DDBLTBATCH: BltBatch entry structure
411 typedef struct _DDBLTBATCH
414 LPDIRECTDRAWSURFACE lpDDSSrc;
420 typedef DDBLTBATCH FAR * LPDDBLTBATCH;
425 typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
427 typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
442 #if defined( _WIN32 ) && !defined( _NO_COM )
444 #define INTERFACE IDirectDraw
445 DECLARE_INTERFACE_( IDirectDraw, IUnknown )
447 /*** IUnknown methods ***/
448 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
449 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
450 STDMETHOD_(ULONG,Release) (THIS) PURE;
451 /*** IDirectDraw methods ***/
452 STDMETHOD(Compact)(THIS) PURE;
453 STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
454 STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
455 STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
456 STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
457 STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
458 STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
459 STDMETHOD(FlipToGDISurface)(THIS) PURE;
460 STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
461 STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
462 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
463 STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
464 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
465 STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
466 STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
467 STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
468 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
469 STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
470 STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
471 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
474 #if !defined(__cplusplus) || defined(CINTERFACE)
475 #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
476 #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
477 #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
478 #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
479 #define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
480 #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
481 #define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
482 #define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
483 #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
484 #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
485 #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
486 #define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
487 #define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
488 #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
489 #define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
490 #define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
491 #define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
492 #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
493 #define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
494 #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
495 #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
496 #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
497 #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
499 #define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
500 #define IDirectDraw_AddRef(p) (p)->AddRef()
501 #define IDirectDraw_Release(p) (p)->Release()
502 #define IDirectDraw_Compact(p) (p)->Compact()
503 #define IDirectDraw_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
504 #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
505 #define IDirectDraw_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
506 #define IDirectDraw_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
507 #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
508 #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
509 #define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
510 #define IDirectDraw_GetCaps(p, a, b) (p)->GetCaps(a, b)
511 #define IDirectDraw_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
512 #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
513 #define IDirectDraw_GetGDISurface(p, a) (p)->GetGDISurface(a)
514 #define IDirectDraw_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
515 #define IDirectDraw_GetScanLine(p, a) (p)->GetScanLine(a)
516 #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
517 #define IDirectDraw_Initialize(p, a) (p)->Initialize(a)
518 #define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
519 #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
520 #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->SetDisplayMode(a, b, c)
521 #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
526 #if defined( _WIN32 ) && !defined( _NO_COM )
528 #define INTERFACE IDirectDraw2
529 DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
531 /*** IUnknown methods ***/
532 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
533 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
534 STDMETHOD_(ULONG,Release) (THIS) PURE;
535 /*** IDirectDraw methods ***/
536 STDMETHOD(Compact)(THIS) PURE;
537 STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
538 STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
539 STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
540 STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
541 STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
542 STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
543 STDMETHOD(FlipToGDISurface)(THIS) PURE;
544 STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
545 STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
546 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
547 STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
548 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
549 STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
550 STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
551 STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
552 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
553 STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
554 STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
555 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
556 /*** Added in the v2 interface ***/
557 STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
559 #if !defined(__cplusplus) || defined(CINTERFACE)
560 #define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
561 #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
562 #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
563 #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
564 #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
565 #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
566 #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
567 #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
568 #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
569 #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
570 #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
571 #define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
572 #define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
573 #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
574 #define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
575 #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
576 #define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
577 #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
578 #define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
579 #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
580 #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
581 #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
582 #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
583 #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
585 #define IDirectDraw2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
586 #define IDirectDraw2_AddRef(p) (p)->AddRef()
587 #define IDirectDraw2_Release(p) (p)->Release()
588 #define IDirectDraw2_Compact(p) (p)->Compact()
589 #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
590 #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
591 #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
592 #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
593 #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
594 #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
595 #define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
596 #define IDirectDraw2_GetCaps(p, a, b) (p)->GetCaps(a, b)
597 #define IDirectDraw2_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
598 #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
599 #define IDirectDraw2_GetGDISurface(p, a) (p)->GetGDISurface(a)
600 #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
601 #define IDirectDraw2_GetScanLine(p, a) (p)->GetScanLine(a)
602 #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
603 #define IDirectDraw2_Initialize(p, a) (p)->Initialize(a)
604 #define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
605 #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
606 #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
607 #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
608 #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
616 #if defined( _WIN32 ) && !defined( _NO_COM )
618 #define INTERFACE IDirectDrawPalette
619 DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
621 /*** IUnknown methods ***/
622 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
623 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
624 STDMETHOD_(ULONG,Release) (THIS) PURE;
625 /*** IDirectDrawPalette methods ***/
626 STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
627 STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
628 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
629 STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
632 #if !defined(__cplusplus) || defined(CINTERFACE)
633 #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
634 #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
635 #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
636 #define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
637 #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
638 #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
639 #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
641 #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
642 #define IDirectDrawPalette_AddRef(p) (p)->AddRef()
643 #define IDirectDrawPalette_Release(p) (p)->Release()
644 #define IDirectDrawPalette_GetCaps(p, a) (p)->GetCaps(a)
645 #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d)
646 #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
647 #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d)
655 #if defined( _WIN32 ) && !defined( _NO_COM )
657 #define INTERFACE IDirectDrawClipper
658 DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
660 /*** IUnknown methods ***/
661 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
662 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
663 STDMETHOD_(ULONG,Release) (THIS) PURE;
664 /*** IDirectDrawClipper methods ***/
665 STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
666 STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
667 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
668 STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
669 STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
670 STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
673 #if !defined(__cplusplus) || defined(CINTERFACE)
674 #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
675 #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
676 #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
677 #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
678 #define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
679 #define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
680 #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
681 #define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
682 #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
684 #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
685 #define IDirectDrawClipper_AddRef(p) (p)->AddRef()
686 #define IDirectDrawClipper_Release(p) (p)->Release()
687 #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->GetClipList(a, b, c)
688 #define IDirectDrawClipper_GetHWnd(p, a) (p)->GetHWnd(a)
689 #define IDirectDrawClipper_Initialize(p, a, b) (p)->Initialize(a, b)
690 #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->IsClipListChanged(a)
691 #define IDirectDrawClipper_SetClipList(p, a, b) (p)->SetClipList(a, b)
692 #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->SetHWnd(a, b)
698 * IDirectDrawSurface and related interfaces
700 #if defined( _WIN32 ) && !defined( _NO_COM )
702 #define INTERFACE IDirectDrawSurface
703 DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
705 /*** IUnknown methods ***/
706 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
707 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
708 STDMETHOD_(ULONG,Release) (THIS) PURE;
709 /*** IDirectDrawSurface methods ***/
710 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
711 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
712 STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
713 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
714 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
715 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
716 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
717 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
718 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
719 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
720 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
721 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
722 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
723 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
724 STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
725 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
726 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
727 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
728 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
729 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
730 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
731 STDMETHOD(IsLost)(THIS) PURE;
732 STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
733 STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
734 STDMETHOD(Restore)(THIS) PURE;
735 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
736 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
737 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
738 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
739 STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
740 STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
741 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
742 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
745 #if !defined(__cplusplus) || defined(CINTERFACE)
746 #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
747 #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
748 #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
749 #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
750 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
751 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
752 #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
753 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
754 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
755 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
756 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
757 #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
758 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
759 #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
760 #define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
761 #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
762 #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
763 #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
764 #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
765 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
766 #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
767 #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
768 #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
769 #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
770 #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
771 #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
772 #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
773 #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
774 #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
775 #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
776 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
777 #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
778 #define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
779 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
780 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
781 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
783 #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
784 #define IDirectDrawSurface_AddRef(p) (p)->AddRef()
785 #define IDirectDrawSurface_Release(p) (p)->Release()
786 #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
787 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
788 #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
789 #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
790 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
791 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
792 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
793 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
794 #define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
795 #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
796 #define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
797 #define IDirectDrawSurface_GetCaps(p,b) (p)->GetCaps(b)
798 #define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
799 #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
800 #define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
801 #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
802 #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
803 #define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
804 #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
805 #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
806 #define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
807 #define IDirectDrawSurface_IsLost(p) (p)->IsLost()
808 #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
809 #define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
810 #define IDirectDrawSurface_Restore(p) (p)->Restore()
811 #define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
812 #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
813 #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
814 #define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
815 #define IDirectDrawSurface_Unlock(p,b) (p)->Unlock(b)
816 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
817 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
818 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
822 * IDirectDrawSurface2 and related interfaces
825 #define INTERFACE IDirectDrawSurface2
826 DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
828 /*** IUnknown methods ***/
829 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
830 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
831 STDMETHOD_(ULONG,Release) (THIS) PURE;
832 /*** IDirectDrawSurface methods ***/
833 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
834 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
835 STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
836 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
837 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
838 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
839 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
840 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
841 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
842 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
843 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
844 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
845 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
846 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
847 STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
848 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
849 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
850 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
851 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
852 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
853 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
854 STDMETHOD(IsLost)(THIS) PURE;
855 STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
856 STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
857 STDMETHOD(Restore)(THIS) PURE;
858 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
859 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
860 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
861 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
862 STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
863 STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
864 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
865 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
866 /*** Added in the v2 interface ***/
867 STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
868 STDMETHOD(PageLock)(THIS_ DWORD) PURE;
869 STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
872 #if !defined(__cplusplus) || defined(CINTERFACE)
873 #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
874 #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
875 #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
876 #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
877 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
878 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
879 #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
880 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
881 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
882 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
883 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
884 #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
885 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
886 #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
887 #define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
888 #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
889 #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
890 #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
891 #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
892 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
893 #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
894 #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
895 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
896 #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
897 #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
898 #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
899 #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
900 #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
901 #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
902 #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
903 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
904 #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
905 #define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
906 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
907 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
908 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
909 #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
910 #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
911 #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
913 #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
914 #define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
915 #define IDirectDrawSurface2_Release(p) (p)->Release()
916 #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
917 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
918 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
919 #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
920 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
921 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
922 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
923 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
924 #define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
925 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
926 #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
927 #define IDirectDrawSurface2_GetCaps(p,b) (p)->GetCaps(b)
928 #define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
929 #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
930 #define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
931 #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
932 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
933 #define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
934 #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
935 #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
936 #define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
937 #define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
938 #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
939 #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
940 #define IDirectDrawSurface2_Restore(p) (p)->Restore()
941 #define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
942 #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
943 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
944 #define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
945 #define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b)
946 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
947 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
948 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
949 #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
950 #define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
951 #define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
955 * IDirectDrawSurface3 and related interfaces
958 #define INTERFACE IDirectDrawSurface3
959 DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
961 /*** IUnknown methods ***/
962 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
963 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
964 STDMETHOD_(ULONG,Release) (THIS) PURE;
965 /*** IDirectDrawSurface methods ***/
966 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
967 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
968 STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
969 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
970 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
971 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
972 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
973 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
974 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
975 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
976 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
977 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
978 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
979 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
980 STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
981 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
982 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
983 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
984 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
985 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
986 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
987 STDMETHOD(IsLost)(THIS) PURE;
988 STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
989 STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
990 STDMETHOD(Restore)(THIS) PURE;
991 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
992 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
993 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
994 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
995 STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
996 STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
997 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
998 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
999 /*** Added in the v2 interface ***/
1000 STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
1001 STDMETHOD(PageLock)(THIS_ DWORD) PURE;
1002 STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
1003 /*** Added in the V3 interface ***/
1004 STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
1007 #if !defined(__cplusplus) || defined(CINTERFACE)
1008 #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1009 #define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
1010 #define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
1011 #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
1012 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
1013 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
1014 #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
1015 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
1016 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
1017 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
1018 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
1019 #define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
1020 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
1021 #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
1022 #define IDirectDrawSurface3_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
1023 #define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
1024 #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
1025 #define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
1026 #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
1027 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
1028 #define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
1029 #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
1030 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
1031 #define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1032 #define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
1033 #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
1034 #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
1035 #define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
1036 #define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
1037 #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
1038 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
1039 #define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
1040 #define IDirectDrawSurface3_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
1041 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
1042 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
1043 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
1044 #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
1045 #define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
1046 #define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
1047 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
1049 #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1050 #define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
1051 #define IDirectDrawSurface3_Release(p) (p)->Release()
1052 #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
1053 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
1054 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
1055 #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
1056 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
1057 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
1058 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
1059 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
1060 #define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
1061 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
1062 #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
1063 #define IDirectDrawSurface3_GetCaps(p,b) (p)->GetCaps(b)
1064 #define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
1065 #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
1066 #define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
1067 #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
1068 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
1069 #define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
1070 #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
1071 #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
1072 #define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
1073 #define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
1074 #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
1075 #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
1076 #define IDirectDrawSurface3_Restore(p) (p)->Restore()
1077 #define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
1078 #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
1079 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
1080 #define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
1081 #define IDirectDrawSurface3_Unlock(p,b) (p)->Unlock(b)
1082 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
1083 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
1084 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
1085 #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
1086 #define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
1087 #define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
1088 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
1092 * IDirectDrawColorControl
1094 #if defined( _WIN32 ) && !defined( _NO_COM )
1096 #define INTERFACE IDirectDrawColorControl
1097 DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
1099 /*** IUnknown methods ***/
1100 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1101 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1102 STDMETHOD_(ULONG,Release) (THIS) PURE;
1103 /*** IDirectDrawColorControl methods ***/
1104 STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
1105 STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
1108 #if !defined(__cplusplus) || defined(CINTERFACE)
1109 #define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
1110 #define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
1111 #define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
1112 #define IDirectDrawColorControl_GetColorControls(p, a) (p)->lpVtbl->GetColorControls(p, a)
1113 #define IDirectDrawColorControl_SetColorControls(p, a) (p)->lpVtbl->SetColorControls(p, a)
1115 #define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
1116 #define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
1117 #define IDirectDrawColorControl_Release(p) (p)->Release()
1118 #define IDirectDrawColorControl_GetColorControls(p, a) (p)->GetColorControls(a)
1119 #define IDirectDrawColorControl_SetColorControls(p, a) (p)->SetColorControls(a)
1132 typedef struct _DDSURFACEDESC
1134 DWORD dwSize; // size of the DDSURFACEDESC structure
1135 DWORD dwFlags; // determines what fields are valid
1136 DWORD dwHeight; // height of surface to be created
1137 DWORD dwWidth; // width of input surface
1140 LONG lPitch; // distance to start of next line (return value only)
1141 DWORD dwLinearSize; // Formless late-allocated optimized surface size
1143 DWORD dwBackBufferCount; // number of back buffers requested
1146 DWORD dwMipMapCount; // number of mip-map levels requested
1147 DWORD dwZBufferBitDepth; // depth of Z buffer requested
1148 DWORD dwRefreshRate; // refresh rate (used when display mode is described)
1150 DWORD dwAlphaBitDepth; // depth of alpha buffer requested
1151 DWORD dwReserved; // reserved
1152 LPVOID lpSurface; // pointer to the associated surface memory
1153 DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
1154 DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
1155 DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
1156 DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
1157 DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
1158 DDSCAPS ddsCaps; // direct draw surface capabilities
1162 * ddsCaps field is valid.
1164 #define DDSD_CAPS 0x00000001l // default
1167 * dwHeight field is valid.
1169 #define DDSD_HEIGHT 0x00000002l
1172 * dwWidth field is valid.
1174 #define DDSD_WIDTH 0x00000004l
1179 #define DDSD_PITCH 0x00000008l
1182 * dwBackBufferCount is valid.
1184 #define DDSD_BACKBUFFERCOUNT 0x00000020l
1187 * dwZBufferBitDepth is valid.
1189 #define DDSD_ZBUFFERBITDEPTH 0x00000040l
1192 * dwAlphaBitDepth is valid.
1194 #define DDSD_ALPHABITDEPTH 0x00000080l
1198 * lpSurface is valid.
1200 #define DDSD_LPSURFACE 0x00000800l
1203 * ddpfPixelFormat is valid.
1205 #define DDSD_PIXELFORMAT 0x00001000l
1208 * ddckCKDestOverlay is valid.
1210 #define DDSD_CKDESTOVERLAY 0x00002000l
1213 * ddckCKDestBlt is valid.
1215 #define DDSD_CKDESTBLT 0x00004000l
1218 * ddckCKSrcOverlay is valid.
1220 #define DDSD_CKSRCOVERLAY 0x00008000l
1223 * ddckCKSrcBlt is valid.
1225 #define DDSD_CKSRCBLT 0x00010000l
1228 * dwMipMapCount is valid.
1230 #define DDSD_MIPMAPCOUNT 0x00020000l
1233 * dwRefreshRate is valid
1235 #define DDSD_REFRESHRATE 0x00040000l
1238 * dwLinearSize is valid
1240 #define DDSD_LINEARSIZE 0x00080000l
1243 * All input fields are valid.
1245 #define DDSD_ALL 0x000ff9eel
1251 typedef struct _DDCOLORCONTROL
1267 * lBrightness field is valid.
1269 #define DDCOLOR_BRIGHTNESS 0x00000001l
1272 * lContrast field is valid.
1274 #define DDCOLOR_CONTRAST 0x00000002l
1277 * lHue field is valid.
1279 #define DDCOLOR_HUE 0x00000004l
1282 * lSaturation field is valid.
1284 #define DDCOLOR_SATURATION 0x00000008l
1287 * lSharpness field is valid.
1289 #define DDCOLOR_SHARPNESS 0x00000010l
1292 * lGamma field is valid.
1294 #define DDCOLOR_GAMMA 0x00000020l
1297 * lColorEnable field is valid.
1299 #define DDCOLOR_COLORENABLE 0x00000040l
1303 /*============================================================================
1305 * Direct Draw Capability Flags
1307 * These flags are used to describe the capabilities of a given Surface.
1308 * All flags are bit flags.
1310 *==========================================================================*/
1312 /****************************************************************************
1314 * DIRECTDRAWSURFACE CAPABILITY FLAGS
1316 ****************************************************************************/
1319 * This bit is reserved. It should not be specified.
1321 #define DDSCAPS_RESERVED1 0x00000001l
1324 * Indicates that this surface contains alpha-only information.
1325 * (To determine if a surface is RGBA/YUVA, the pixel format must be
1328 #define DDSCAPS_ALPHA 0x00000002l
1331 * Indicates that this surface is a backbuffer. It is generally
1332 * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
1333 * It indicates that this surface is THE back buffer of a surface
1334 * flipping structure. DirectDraw supports N surfaces in a
1335 * surface flipping structure. Only the surface that immediately
1336 * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
1337 * The other surfaces are identified as back buffers by the presence
1338 * of the DDSCAPS_FLIP capability, their attachment order, and the
1339 * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
1340 * capabilities. The bit is sent to CreateSurface when a standalone
1341 * back buffer is being created. This surface could be attached to
1342 * a front buffer and/or back buffers to form a flipping surface
1343 * structure after the CreateSurface call. See AddAttachments for
1344 * a detailed description of the behaviors in this case.
1346 #define DDSCAPS_BACKBUFFER 0x00000004l
1349 * Indicates a complex surface structure is being described. A
1350 * complex surface structure results in the creation of more than
1351 * one surface. The additional surfaces are attached to the root
1352 * surface. The complex structure can only be destroyed by
1353 * destroying the root.
1355 #define DDSCAPS_COMPLEX 0x00000008l
1358 * Indicates that this surface is a part of a surface flipping structure.
1359 * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
1360 * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
1361 * on the resulting creations. The dwBackBufferCount field in the
1362 * DDSURFACEDESC structure must be set to at least 1 in order for
1363 * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
1364 * must always be set with creating multiple surfaces through CreateSurface.
1366 #define DDSCAPS_FLIP 0x00000010l
1369 * Indicates that this surface is THE front buffer of a surface flipping
1370 * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
1371 * capability bit is set.
1372 * If this capability is sent to CreateSurface then a standalonw front buffer
1373 * is created. This surface will not have the DDSCAPS_FLIP capability.
1374 * It can be attached to other back buffers to form a flipping structure.
1375 * See AddAttachments for a detailed description of the behaviors in this
1378 #define DDSCAPS_FRONTBUFFER 0x00000020l
1381 * Indicates that this surface is any offscreen surface that is not an overlay,
1382 * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
1383 * to identify plain vanilla surfaces.
1385 #define DDSCAPS_OFFSCREENPLAIN 0x00000040l
1388 * Indicates that this surface is an overlay. It may or may not be directly visible
1389 * depending on whether or not it is currently being overlayed onto the primary
1390 * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
1391 * overlayed at the moment.
1393 #define DDSCAPS_OVERLAY 0x00000080l
1396 * Indicates that unique DirectDrawPalette objects can be created and
1397 * attached to this surface.
1399 #define DDSCAPS_PALETTE 0x00000100l
1402 * Indicates that this surface is the primary surface. The primary
1403 * surface represents what the user is seeing at the moment.
1405 #define DDSCAPS_PRIMARYSURFACE 0x00000200l
1408 * Indicates that this surface is the primary surface for the left eye.
1409 * The primary surface for the left eye represents what the user is seeing
1410 * at the moment with the users left eye. When this surface is created the
1411 * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
1414 #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400l
1417 * Indicates that this surface memory was allocated in system memory
1419 #define DDSCAPS_SYSTEMMEMORY 0x00000800l
1422 * Indicates that this surface can be used as a 3D texture. It does not
1423 * indicate whether or not the surface is being used for that purpose.
1425 #define DDSCAPS_TEXTURE 0x00001000l
1428 * Indicates that a surface may be a destination for 3D rendering. This
1429 * bit must be set in order to query for a Direct3D Device Interface
1430 * from this surface.
1432 #define DDSCAPS_3DDEVICE 0x00002000l
1435 * Indicates that this surface exists in video memory.
1437 #define DDSCAPS_VIDEOMEMORY 0x00004000l
1440 * Indicates that changes made to this surface are immediately visible.
1441 * It is always set for the primary surface and is set for overlays while
1442 * they are being overlayed and texture maps while they are being textured.
1444 #define DDSCAPS_VISIBLE 0x00008000l
1447 * Indicates that only writes are permitted to the surface. Read accesses
1448 * from the surface may or may not generate a protection fault, but the
1449 * results of a read from this surface will not be meaningful. READ ONLY.
1451 #define DDSCAPS_WRITEONLY 0x00010000l
1454 * Indicates that this surface is a z buffer. A z buffer does not contain
1455 * displayable information. Instead it contains bit depth information that is
1456 * used to determine which pixels are visible and which are obscured.
1458 #define DDSCAPS_ZBUFFER 0x00020000l
1461 * Indicates surface will have a DC associated long term
1463 #define DDSCAPS_OWNDC 0x00040000l
1466 * Indicates surface should be able to receive live video
1468 #define DDSCAPS_LIVEVIDEO 0x00080000l
1471 * Indicates surface should be able to have a stream decompressed
1472 * to it by the hardware.
1474 #define DDSCAPS_HWCODEC 0x00100000l
1477 * Surface is a ModeX surface.
1480 #define DDSCAPS_MODEX 0x00200000l
1483 * Indicates surface is one level of a mip-map. This surface will
1484 * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
1485 * This can be done explicitly, by creating a number of surfaces and
1486 * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
1487 * If this bit is set then DDSCAPS_TEXTURE must also be set.
1489 #define DDSCAPS_MIPMAP 0x00400000l
1492 * This bit is reserved. It should not be specified.
1494 #define DDSCAPS_RESERVED2 0x00800000l
1498 * Indicates that memory for the surface is not allocated until the surface
1499 * is loaded (via the Direct3D texture Load() function).
1501 #define DDSCAPS_ALLOCONLOAD 0x04000000l
1504 * Indicates that the surface will recieve data from a video port.
1506 #define DDSCAPS_VIDEOPORT 0x08000000l
1509 * Indicates that a video memory surface is resident in true, local video
1510 * memory rather than non-local video memory. If this flag is specified then
1511 * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
1512 * DDSCAPS_NONLOCALVIDMEM.
1514 #define DDSCAPS_LOCALVIDMEM 0x10000000l
1517 * Indicates that a video memory surface is resident in non-local video
1518 * memory rather than true, local video memory. If this flag is specified
1519 * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
1520 * DDSCAPS_LOCALVIDMEM.
1522 #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
1525 * Indicates that this surface is a standard VGA mode surface, and not a
1526 * ModeX surface. (This flag will never be set in combination with the
1527 * DDSCAPS_MODEX flag).
1529 #define DDSCAPS_STANDARDVGAMODE 0x40000000l
1532 * Indicates that this surface will be an optimized surface. This flag is
1533 * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
1534 * will be created without any underlying video memory until loaded.
1536 #define DDSCAPS_OPTIMIZED 0x80000000l
1540 /****************************************************************************
1542 * DIRECTDRAW DRIVER CAPABILITY FLAGS
1544 ****************************************************************************/
1547 * Display hardware has 3D acceleration.
1549 #define DDCAPS_3D 0x00000001l
1552 * Indicates that DirectDraw will support only dest rectangles that are aligned
1553 * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
1556 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
1559 * Indicates that DirectDraw will support only source rectangles whose sizes in
1560 * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
1562 #define DDCAPS_ALIGNSIZEDEST 0x00000004l
1564 * Indicates that DirectDraw will support only source rectangles that are aligned
1565 * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
1568 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
1571 * Indicates that DirectDraw will support only source rectangles whose sizes in
1572 * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
1574 #define DDCAPS_ALIGNSIZESRC 0x00000010l
1577 * Indicates that DirectDraw will create video memory surfaces that have a stride
1578 * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
1580 #define DDCAPS_ALIGNSTRIDE 0x00000020l
1583 * Display hardware is capable of blt operations.
1585 #define DDCAPS_BLT 0x00000040l
1588 * Display hardware is capable of asynchronous blt operations.
1590 #define DDCAPS_BLTQUEUE 0x00000080l
1593 * Display hardware is capable of color space conversions during the blt operation.
1595 #define DDCAPS_BLTFOURCC 0x00000100l
1598 * Display hardware is capable of stretching during blt operations.
1600 #define DDCAPS_BLTSTRETCH 0x00000200l
1603 * Display hardware is shared with GDI.
1605 #define DDCAPS_GDI 0x00000400l
1608 * Display hardware can overlay.
1610 #define DDCAPS_OVERLAY 0x00000800l
1613 * Set if display hardware supports overlays but can not clip them.
1615 #define DDCAPS_OVERLAYCANTCLIP 0x00001000l
1618 * Indicates that overlay hardware is capable of color space conversions during
1619 * the overlay operation.
1621 #define DDCAPS_OVERLAYFOURCC 0x00002000l
1624 * Indicates that stretching can be done by the overlay hardware.
1626 #define DDCAPS_OVERLAYSTRETCH 0x00004000l
1629 * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
1630 * other than the primary surface.
1632 #define DDCAPS_PALETTE 0x00008000l
1635 * Indicates that palette changes can be syncd with the veritcal refresh.
1637 #define DDCAPS_PALETTEVSYNC 0x00010000l
1640 * Display hardware can return the current scan line.
1642 #define DDCAPS_READSCANLINE 0x00020000l
1645 * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
1648 #define DDCAPS_STEREOVIEW 0x00040000l
1651 * Display hardware is capable of generating a vertical blank interrupt.
1653 #define DDCAPS_VBI 0x00080000l
1656 * Supports the use of z buffers with blt operations.
1658 #define DDCAPS_ZBLTS 0x00100000l
1661 * Supports Z Ordering of overlays.
1663 #define DDCAPS_ZOVERLAYS 0x00200000l
1666 * Supports color key
1668 #define DDCAPS_COLORKEY 0x00400000l
1671 * Supports alpha surfaces
1673 #define DDCAPS_ALPHA 0x00800000l
1676 * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
1678 #define DDCAPS_COLORKEYHWASSIST 0x01000000l
1681 * no hardware support at all
1683 #define DDCAPS_NOHARDWARE 0x02000000l
1686 * Display hardware is capable of color fill with bltter
1688 #define DDCAPS_BLTCOLORFILL 0x04000000l
1691 * Display hardware is bank switched, and potentially very slow at
1692 * random access to VRAM.
1694 #define DDCAPS_BANKSWITCHED 0x08000000l
1697 * Display hardware is capable of depth filling Z-buffers with bltter
1699 #define DDCAPS_BLTDEPTHFILL 0x10000000l
1702 * Display hardware is capable of clipping while bltting.
1704 #define DDCAPS_CANCLIP 0x20000000l
1707 * Display hardware is capable of clipping while stretch bltting.
1709 #define DDCAPS_CANCLIPSTRETCHED 0x40000000l
1712 * Display hardware is capable of bltting to or from system memory
1714 #define DDCAPS_CANBLTSYSMEM 0x80000000l
1717 /****************************************************************************
1719 * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
1721 ****************************************************************************/
1724 * Display hardware is certified
1726 #define DDCAPS2_CERTIFIED 0x00000001l
1729 * Driver cannot interleave 2D operations (lock and blt) to surfaces with
1730 * Direct3D rendering operations between calls to BeginScene() and EndScene()
1732 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
1735 * Display hardware contains a video port
1737 #define DDCAPS2_VIDEOPORT 0x00000004l
1740 * The overlay can be automatically flipped according to the video port
1741 * VSYNCs, providing automatic doubled buffered display of video port
1742 * data using an overlay
1744 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008l
1747 * Overlay can display each field of interlaced data individually while
1748 * it is interleaved in memory without causing jittery artifacts.
1750 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010l
1753 * Overlay can display each field of interlaced data individually while
1754 * it is not interleaved in memory without causing jittery artifacts.
1756 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020l
1759 * The overlay surface contains color controls (brightness, sharpness, etc.)
1761 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040l
1764 * The primary surface contains color controls (gamma, etc.)
1766 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080l
1769 * RGBZ -> RGB supported for 16:16 RGB:Z
1771 #define DDCAPS2_CANDROPZ16BIT 0x00000100l
1774 * Driver supports non-local video memory.
1776 #define DDCAPS2_NONLOCALVIDMEM 0x00000200l
1779 * Dirver supports non-local video memory but has different capabilities for
1780 * non-local video memory surfaces. If this bit is set then so must
1781 * DDCAPS2_NONLOCALVIDMEM.
1783 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400l
1786 * Driver neither requires nor prefers surfaces to be pagelocked when performing
1787 * blts involving system memory surfaces
1789 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800l
1792 * Driver can create surfaces which are wider than the primary surface
1794 #define DDCAPS2_WIDESURFACES 0x00001000l
1797 * Driver supports bob using software without using a video port
1799 #define DDCAPS2_CANFLIPODDEVEN 0x00002000l
1801 /****************************************************************************
1803 * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
1805 ****************************************************************************/
1808 * Supports alpha blending around the edge of a source color keyed surface.
1811 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
1814 * Supports alpha information in the pixel format. The bit depth of alpha
1815 * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
1816 * more opaque as the alpha value increases. (0 is transparent.)
1819 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
1822 * Supports alpha information in the pixel format. The bit depth of alpha
1823 * information in the pixel format can be 1,2,4, or 8. The alpha value
1824 * becomes more transparent as the alpha value increases. (0 is opaque.)
1825 * This flag can only be set if DDCAPS_ALPHA is set.
1828 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
1831 * Supports alpha only surfaces. The bit depth of an alpha only surface can be
1832 * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
1833 * (0 is transparent.)
1836 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
1839 * The depth of the alpha channel data can range can be 1,2,4, or 8.
1840 * The NEG suffix indicates that this alpha channel becomes more transparent
1841 * as the alpha value increases. (0 is opaque.) This flag can only be set if
1842 * DDCAPS_ALPHA is set.
1845 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
1848 * Supports alpha blending around the edge of a source color keyed surface.
1851 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
1854 * Supports alpha information in the pixel format. The bit depth of alpha
1855 * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
1856 * more opaque as the alpha value increases. (0 is transparent.)
1859 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
1862 * Supports alpha information in the pixel format. The bit depth of alpha
1863 * information in the pixel format can be 1,2,4, or 8. The alpha value
1864 * becomes more transparent as the alpha value increases. (0 is opaque.)
1865 * This flag can only be set if DDCAPS_ALPHA is set.
1868 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
1871 * Supports alpha only surfaces. The bit depth of an alpha only surface can be
1872 * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
1873 * (0 is transparent.)
1876 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
1879 * The depth of the alpha channel data can range can be 1,2,4, or 8.
1880 * The NEG suffix indicates that this alpha channel becomes more transparent
1881 * as the alpha value increases. (0 is opaque.) This flag can only be set if
1882 * DDCAPS_ALPHA is set.
1885 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
1887 /****************************************************************************
1889 * DIRECTDRAW FX CAPABILITY FLAGS
1891 ****************************************************************************/
1894 * Uses arithmetic operations to stretch and shrink surfaces during blt
1895 * rather than pixel doubling techniques. Along the Y axis.
1897 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
1900 * Uses arithmetic operations to stretch during blt
1901 * rather than pixel doubling techniques. Along the Y axis. Only
1902 * works for x1, x2, etc.
1904 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
1907 * Supports mirroring left to right in blt.
1909 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
1912 * Supports mirroring top to bottom in blt.
1914 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
1917 * Supports arbitrary rotation for blts.
1919 #define DDFXCAPS_BLTROTATION 0x00000100l
1922 * Supports 90 degree rotations for blts.
1924 #define DDFXCAPS_BLTROTATION90 0x00000200l
1927 * DirectDraw supports arbitrary shrinking of a surface along the
1928 * x axis (horizontal direction) for blts.
1930 #define DDFXCAPS_BLTSHRINKX 0x00000400l
1933 * DirectDraw supports integer shrinking (1x,2x,) of a surface
1934 * along the x axis (horizontal direction) for blts.
1936 #define DDFXCAPS_BLTSHRINKXN 0x00000800l
1939 * DirectDraw supports arbitrary shrinking of a surface along the
1940 * y axis (horizontal direction) for blts.
1942 #define DDFXCAPS_BLTSHRINKY 0x00001000l
1945 * DirectDraw supports integer shrinking (1x,2x,) of a surface
1946 * along the y axis (vertical direction) for blts.
1948 #define DDFXCAPS_BLTSHRINKYN 0x00002000l
1951 * DirectDraw supports arbitrary stretching of a surface along the
1952 * x axis (horizontal direction) for blts.
1954 #define DDFXCAPS_BLTSTRETCHX 0x00004000l
1957 * DirectDraw supports integer stretching (1x,2x,) of a surface
1958 * along the x axis (horizontal direction) for blts.
1960 #define DDFXCAPS_BLTSTRETCHXN 0x00008000l
1963 * DirectDraw supports arbitrary stretching of a surface along the
1964 * y axis (horizontal direction) for blts.
1966 #define DDFXCAPS_BLTSTRETCHY 0x00010000l
1969 * DirectDraw supports integer stretching (1x,2x,) of a surface
1970 * along the y axis (vertical direction) for blts.
1972 #define DDFXCAPS_BLTSTRETCHYN 0x00020000l
1975 * Uses arithmetic operations to stretch and shrink surfaces during
1976 * overlay rather than pixel doubling techniques. Along the Y axis
1979 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
1982 * Uses arithmetic operations to stretch surfaces during
1983 * overlay rather than pixel doubling techniques. Along the Y axis
1984 * for overlays. Only works for x1, x2, etc.
1986 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
1989 * DirectDraw supports arbitrary shrinking of a surface along the
1990 * x axis (horizontal direction) for overlays.
1992 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
1995 * DirectDraw supports integer shrinking (1x,2x,) of a surface
1996 * along the x axis (horizontal direction) for overlays.
1998 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
2001 * DirectDraw supports arbitrary shrinking of a surface along the
2002 * y axis (horizontal direction) for overlays.
2004 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
2007 * DirectDraw supports integer shrinking (1x,2x,) of a surface
2008 * along the y axis (vertical direction) for overlays.
2010 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
2013 * DirectDraw supports arbitrary stretching of a surface along the
2014 * x axis (horizontal direction) for overlays.
2016 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
2019 * DirectDraw supports integer stretching (1x,2x,) of a surface
2020 * along the x axis (horizontal direction) for overlays.
2022 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
2025 * DirectDraw supports arbitrary stretching of a surface along the
2026 * y axis (horizontal direction) for overlays.
2028 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
2031 * DirectDraw supports integer stretching (1x,2x,) of a surface
2032 * along the y axis (vertical direction) for overlays.
2034 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
2037 * DirectDraw supports mirroring of overlays across the vertical axis
2039 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
2042 * DirectDraw supports mirroring of overlays across the horizontal axis
2044 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
2046 /****************************************************************************
2048 * DIRECTDRAW STEREO VIEW CAPABILITIES
2050 ****************************************************************************/
2053 * The stereo view is accomplished via enigma encoding.
2055 #define DDSVCAPS_ENIGMA 0x00000001l
2058 * The stereo view is accomplished via high frequency flickering.
2060 #define DDSVCAPS_FLICKER 0x00000002l
2063 * The stereo view is accomplished via red and blue filters applied
2064 * to the left and right eyes. All images must adapt their colorspaces
2067 #define DDSVCAPS_REDBLUE 0x00000004l
2070 * The stereo view is accomplished with split screen technology.
2072 #define DDSVCAPS_SPLIT 0x00000008l
2074 /****************************************************************************
2076 * DIRECTDRAWPALETTE CAPABILITIES
2078 ****************************************************************************/
2081 * Index is 4 bits. There are sixteen color entries in the palette table.
2083 #define DDPCAPS_4BIT 0x00000001l
2086 * Index is onto a 8 bit color index. This field is only valid with the
2087 * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
2088 * surface is in 8bpp. Each color entry is one byte long and is an index
2089 * into destination surface's 8bpp palette.
2091 #define DDPCAPS_8BITENTRIES 0x00000002l
2094 * Index is 8 bits. There are 256 color entries in the palette table.
2096 #define DDPCAPS_8BIT 0x00000004l
2099 * Indicates that this DIRECTDRAWPALETTE should use the palette color array
2100 * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
2103 #define DDPCAPS_INITIALIZE 0x00000008l
2106 * This palette is the one attached to the primary surface. Changing this
2107 * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
2110 #define DDPCAPS_PRIMARYSURFACE 0x00000010l
2113 * This palette is the one attached to the primary surface left. Changing
2114 * this table has immediate effect on the display for the left eye unless
2115 * DDPSETPAL_VSYNC is specified and supported.
2117 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
2120 * This palette can have all 256 entries defined
2122 #define DDPCAPS_ALLOW256 0x00000040l
2125 * This palette can have modifications to it synced with the monitors
2128 #define DDPCAPS_VSYNC 0x00000080l
2131 * Index is 1 bit. There are two color entries in the palette table.
2133 #define DDPCAPS_1BIT 0x00000100l
2136 * Index is 2 bit. There are four color entries in the palette table.
2138 #define DDPCAPS_2BIT 0x00000200l
2141 /****************************************************************************
2143 * DIRECTDRAWPALETTE SETENTRY CONSTANTS
2145 ****************************************************************************/
2148 /****************************************************************************
2150 * DIRECTDRAWPALETTE GETENTRY CONSTANTS
2152 ****************************************************************************/
2154 /* 0 is the only legal value */
2156 /****************************************************************************
2158 * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
2160 ****************************************************************************/
2163 /****************************************************************************
2165 * DIRECTDRAW BITDEPTH CONSTANTS
2167 * NOTE: These are only used to indicate supported bit depths. These
2168 * are flags only, they are not to be used as an actual bit depth. The
2169 * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
2170 * bit depths in a surface or for changing the display mode.
2172 ****************************************************************************/
2177 #define DDBD_1 0x00004000l
2182 #define DDBD_2 0x00002000l
2187 #define DDBD_4 0x00001000l
2192 #define DDBD_8 0x00000800l
2195 * 16 bits per pixel.
2197 #define DDBD_16 0x00000400l
2200 * 24 bits per pixel.
2202 #define DDBD_24 0X00000200l
2205 * 32 bits per pixel.
2207 #define DDBD_32 0x00000100l
2209 /****************************************************************************
2211 * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
2213 ****************************************************************************/
2216 * Set if the structure contains a color space. Not set if the structure
2217 * contains a single color key.
2219 #define DDCKEY_COLORSPACE 0x00000001l
2222 * Set if the structure specifies a color key or color space which is to be
2223 * used as a destination color key for blt operations.
2225 #define DDCKEY_DESTBLT 0x00000002l
2228 * Set if the structure specifies a color key or color space which is to be
2229 * used as a destination color key for overlay operations.
2231 #define DDCKEY_DESTOVERLAY 0x00000004l
2234 * Set if the structure specifies a color key or color space which is to be
2235 * used as a source color key for blt operations.
2237 #define DDCKEY_SRCBLT 0x00000008l
2240 * Set if the structure specifies a color key or color space which is to be
2241 * used as a source color key for overlay operations.
2243 #define DDCKEY_SRCOVERLAY 0x00000010l
2246 /****************************************************************************
2248 * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
2250 ****************************************************************************/
2253 * Supports transparent blting using a color key to identify the replaceable
2254 * bits of the destination surface for RGB colors.
2256 #define DDCKEYCAPS_DESTBLT 0x00000001l
2259 * Supports transparent blting using a color space to identify the replaceable
2260 * bits of the destination surface for RGB colors.
2262 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
2265 * Supports transparent blting using a color space to identify the replaceable
2266 * bits of the destination surface for YUV colors.
2268 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
2271 * Supports transparent blting using a color key to identify the replaceable
2272 * bits of the destination surface for YUV colors.
2274 #define DDCKEYCAPS_DESTBLTYUV 0x00000008l
2277 * Supports overlaying using colorkeying of the replaceable bits of the surface
2278 * being overlayed for RGB colors.
2280 #define DDCKEYCAPS_DESTOVERLAY 0x00000010l
2283 * Supports a color space as the color key for the destination for RGB colors.
2285 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
2288 * Supports a color space as the color key for the destination for YUV colors.
2290 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
2293 * Supports only one active destination color key value for visible overlay
2296 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
2299 * Supports overlaying using colorkeying of the replaceable bits of the
2300 * surface being overlayed for YUV colors.
2302 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
2305 * Supports transparent blting using the color key for the source with
2306 * this surface for RGB colors.
2308 #define DDCKEYCAPS_SRCBLT 0x00000200l
2311 * Supports transparent blting using a color space for the source with
2312 * this surface for RGB colors.
2314 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
2317 * Supports transparent blting using a color space for the source with
2318 * this surface for YUV colors.
2320 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
2323 * Supports transparent blting using the color key for the source with
2324 * this surface for YUV colors.
2326 #define DDCKEYCAPS_SRCBLTYUV 0x00001000l
2329 * Supports overlays using the color key for the source with this
2330 * overlay surface for RGB colors.
2332 #define DDCKEYCAPS_SRCOVERLAY 0x00002000l
2335 * Supports overlays using a color space as the source color key for
2336 * the overlay surface for RGB colors.
2338 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
2341 * Supports overlays using a color space as the source color key for
2342 * the overlay surface for YUV colors.
2344 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
2347 * Supports only one active source color key value for visible
2350 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
2353 * Supports overlays using the color key for the source with this
2354 * overlay surface for YUV colors.
2356 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
2359 * there are no bandwidth trade-offs for using colorkey with an overlay
2361 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
2364 /****************************************************************************
2366 * DIRECTDRAW PIXELFORMAT FLAGS
2368 ****************************************************************************/
2371 * The surface has alpha channel information in the pixel format.
2373 #define DDPF_ALPHAPIXELS 0x00000001l
2376 * The pixel format contains alpha only information
2378 #define DDPF_ALPHA 0x00000002l
2381 * The FourCC code is valid.
2383 #define DDPF_FOURCC 0x00000004l
2386 * The surface is 4-bit color indexed.
2388 #define DDPF_PALETTEINDEXED4 0x00000008l
2391 * The surface is indexed into a palette which stores indices
2392 * into the destination surface's 8-bit palette.
2394 #define DDPF_PALETTEINDEXEDTO8 0x00000010l
2397 * The surface is 8-bit color indexed.
2399 #define DDPF_PALETTEINDEXED8 0x00000020l
2402 * The RGB data in the pixel format structure is valid.
2404 #define DDPF_RGB 0x00000040l
2407 * The surface will accept pixel data in the format specified
2408 * and compress it during the write.
2410 #define DDPF_COMPRESSED 0x00000080l
2413 * The surface will accept RGB data and translate it during
2414 * the write to YUV data. The format of the data to be written
2415 * will be contained in the pixel format structure. The DDPF_RGB
2418 #define DDPF_RGBTOYUV 0x00000100l
2421 * pixel format is YUV - YUV data in pixel format struct is valid
2423 #define DDPF_YUV 0x00000200l
2426 * pixel format is a z buffer only surface
2428 #define DDPF_ZBUFFER 0x00000400l
2431 * The surface is 1-bit color indexed.
2433 #define DDPF_PALETTEINDEXED1 0x00000800l
2436 * The surface is 2-bit color indexed.
2438 #define DDPF_PALETTEINDEXED2 0x00001000l
2441 * The surface contains Z information in the pixels
2443 #define DDPF_ZPIXELS 0x00002000l
2445 /*===========================================================================
2448 * DIRECTDRAW CALLBACK FLAGS
2451 *==========================================================================*/
2453 /****************************************************************************
2455 * DIRECTDRAW ENUMSURFACES FLAGS
2457 ****************************************************************************/
2460 * Enumerate all of the surfaces that meet the search criterion.
2462 #define DDENUMSURFACES_ALL 0x00000001l
2465 * A search hit is a surface that matches the surface description.
2467 #define DDENUMSURFACES_MATCH 0x00000002l
2470 * A search hit is a surface that does not match the surface description.
2472 #define DDENUMSURFACES_NOMATCH 0x00000004l
2475 * Enumerate the first surface that can be created which meets the search criterion.
2477 #define DDENUMSURFACES_CANBECREATED 0x00000008l
2480 * Enumerate the surfaces that already exist that meet the search criterion.
2482 #define DDENUMSURFACES_DOESEXIST 0x00000010l
2485 /****************************************************************************
2487 * DIRECTDRAW SETDISPLAYMODE FLAGS
2489 ****************************************************************************/
2492 * The desired mode is a standard VGA mode
2494 #define DDSDM_STANDARDVGAMODE 0x00000001l
2498 /****************************************************************************
2500 * DIRECTDRAW ENUMDISPLAYMODES FLAGS
2502 ****************************************************************************/
2505 * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
2506 * that a particular mode will be enumerated only once. This flag specifies whether
2507 * the refresh rate is taken into account when determining if a mode is unique.
2509 #define DDEDM_REFRESHRATES 0x00000001l
2512 * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
2513 * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
2514 * enumerated if the application has previously called SetCooperativeLevel with the
2515 * DDSCL_ALLOWMODEX flag set).
2517 #define DDEDM_STANDARDVGAMODES 0x00000002L
2520 /****************************************************************************
2522 * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
2524 ****************************************************************************/
2527 * Exclusive mode owner will be responsible for the entire primary surface.
2528 * GDI can be ignored. used with DD
2530 #define DDSCL_FULLSCREEN 0x00000001l
2533 * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
2535 #define DDSCL_ALLOWREBOOT 0x00000002l
2538 * prevents DDRAW from modifying the application window.
2539 * prevents DDRAW from minimize/restore the application window on activation.
2541 #define DDSCL_NOWINDOWCHANGES 0x00000004l
2544 * app wants to work as a regular Windows application
2546 #define DDSCL_NORMAL 0x00000008l
2549 * app wants exclusive access
2551 #define DDSCL_EXCLUSIVE 0x00000010l
2555 * app can deal with non-windows display modes
2557 #define DDSCL_ALLOWMODEX 0x00000040l
2560 /****************************************************************************
2562 * DIRECTDRAW BLT FLAGS
2564 ****************************************************************************/
2567 * Use the alpha information in the pixel format or the alpha channel surface
2568 * attached to the destination surface as the alpha channel for this blt.
2570 #define DDBLT_ALPHADEST 0x00000001l
2573 * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
2574 * for the destination surface for this blt.
2576 #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
2579 * The NEG suffix indicates that the destination surface becomes more
2580 * transparent as the alpha value increases. (0 is opaque)
2582 #define DDBLT_ALPHADESTNEG 0x00000004l
2585 * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
2586 * channel for the destination for this blt.
2588 #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l
2591 * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
2592 * for the edges of the image that border the color key colors.
2594 #define DDBLT_ALPHAEDGEBLEND 0x00000010l
2597 * Use the alpha information in the pixel format or the alpha channel surface
2598 * attached to the source surface as the alpha channel for this blt.
2600 #define DDBLT_ALPHASRC 0x00000020l
2603 * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
2604 * for the source for this blt.
2606 #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
2609 * The NEG suffix indicates that the source surface becomes more transparent
2610 * as the alpha value increases. (0 is opaque)
2612 #define DDBLT_ALPHASRCNEG 0x00000080l
2615 * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
2616 * for the source for this blt.
2618 #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l
2621 * Do this blt asynchronously through the FIFO in the order received. If
2622 * there is no room in the hardware FIFO fail the call.
2624 #define DDBLT_ASYNC 0x00000200l
2627 * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
2628 * to fill the destination rectangle on the destination surface with.
2630 #define DDBLT_COLORFILL 0x00000400l
2633 * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
2634 * to use for the blt.
2636 #define DDBLT_DDFX 0x00000800l
2639 * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
2640 * that are not part of the Win32 API.
2642 #define DDBLT_DDROPS 0x00001000l
2645 * Use the color key associated with the destination surface.
2647 #define DDBLT_KEYDEST 0x00002000l
2650 * Use the dckDestColorkey field in the DDBLTFX structure as the color key
2651 * for the destination surface.
2653 #define DDBLT_KEYDESTOVERRIDE 0x00004000l
2656 * Use the color key associated with the source surface.
2658 #define DDBLT_KEYSRC 0x00008000l
2661 * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
2662 * for the source surface.
2664 #define DDBLT_KEYSRCOVERRIDE 0x00010000l
2667 * Use the dwROP field in the DDBLTFX structure for the raster operation
2668 * for this blt. These ROPs are the same as the ones defined in the Win32 API.
2670 #define DDBLT_ROP 0x00020000l
2673 * Use the dwRotationAngle field in the DDBLTFX structure as the angle
2674 * (specified in 1/100th of a degree) to rotate the surface.
2676 #define DDBLT_ROTATIONANGLE 0x00040000l
2679 * Z-buffered blt using the z-buffers attached to the source and destination
2680 * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
2683 #define DDBLT_ZBUFFER 0x00080000l
2686 * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
2687 * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
2688 * for the destination.
2690 #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l
2693 * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
2694 * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
2695 * respectively for the destination.
2697 #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l
2700 * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
2701 * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
2704 #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l
2707 * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
2708 * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
2709 * respectively for the source.
2711 #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
2714 * wait until the device is ready to handle the blt
2715 * this will cause blt to not return DDERR_WASSTILLDRAWING
2717 #define DDBLT_WAIT 0x01000000l
2720 * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
2721 * to fill the destination rectangle on the destination Z-buffer surface
2724 #define DDBLT_DEPTHFILL 0x02000000l
2728 /****************************************************************************
2732 ****************************************************************************/
2734 #define DDBLTFAST_NOCOLORKEY 0x00000000
2735 #define DDBLTFAST_SRCCOLORKEY 0x00000001
2736 #define DDBLTFAST_DESTCOLORKEY 0x00000002
2737 #define DDBLTFAST_WAIT 0x00000010
2739 /****************************************************************************
2743 ****************************************************************************/
2745 #define DDFLIP_WAIT 0x00000001l
2748 * Indicates that the target surface contains the even field of video data.
2749 * This flag is only valid with an overlay surface.
2751 #define DDFLIP_EVEN 0x00000002l
2754 * Indicates that the target surface contains the odd field of video data.
2755 * This flag is only valid with an overlay surface.
2757 #define DDFLIP_ODD 0x00000004l
2761 /****************************************************************************
2763 * DIRECTDRAW SURFACE OVERLAY FLAGS
2765 ****************************************************************************/
2768 * Use the alpha information in the pixel format or the alpha channel surface
2769 * attached to the destination surface as the alpha channel for the
2770 * destination overlay.
2772 #define DDOVER_ALPHADEST 0x00000001l
2775 * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
2776 * destination alpha channel for this overlay.
2778 #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
2781 * The NEG suffix indicates that the destination surface becomes more
2782 * transparent as the alpha value increases.
2784 #define DDOVER_ALPHADESTNEG 0x00000004l
2787 * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
2788 * channel destination for this overlay.
2790 #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
2793 * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
2794 * channel for the edges of the image that border the color key colors.
2796 #define DDOVER_ALPHAEDGEBLEND 0x00000010l
2799 * Use the alpha information in the pixel format or the alpha channel surface
2800 * attached to the source surface as the source alpha channel for this overlay.
2802 #define DDOVER_ALPHASRC 0x00000020l
2805 * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
2806 * alpha channel for this overlay.
2808 #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
2811 * The NEG suffix indicates that the source surface becomes more transparent
2812 * as the alpha value increases.
2814 #define DDOVER_ALPHASRCNEG 0x00000080l
2817 * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
2818 * source for this overlay.
2820 #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
2823 * Turn this overlay off.
2825 #define DDOVER_HIDE 0x00000200l
2828 * Use the color key associated with the destination surface.
2830 #define DDOVER_KEYDEST 0x00000400l
2833 * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
2834 * for the destination surface
2836 #define DDOVER_KEYDESTOVERRIDE 0x00000800l
2839 * Use the color key associated with the source surface.
2841 #define DDOVER_KEYSRC 0x00001000l
2844 * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
2845 * for the source surface.
2847 #define DDOVER_KEYSRCOVERRIDE 0x00002000l
2850 * Turn this overlay on.
2852 #define DDOVER_SHOW 0x00004000l
2855 * Add a dirty rect to an emulated overlayed surface.
2857 #define DDOVER_ADDDIRTYRECT 0x00008000l
2860 * Redraw all dirty rects on an emulated overlayed surface.
2862 #define DDOVER_REFRESHDIRTYRECTS 0x00010000l
2865 * Redraw the entire surface on an emulated overlayed surface.
2867 #define DDOVER_REFRESHALL 0x00020000l
2871 * Use the overlay FX flags to define special overlay FX
2873 #define DDOVER_DDFX 0x00080000l
2876 * Autoflip the overlay when ever the video port autoflips
2878 #define DDOVER_AUTOFLIP 0x00100000l
2881 * Display each field of video port data individually without
2882 * causing any jittery artifacts
2884 #define DDOVER_BOB 0x00200000l
2887 * Indicates that bob/weave decisions should not be overridden by other
2890 #define DDOVER_OVERRIDEBOBWEAVE 0x00400000l
2893 * Indicates that the surface memory is composed of interleaved fields.
2895 #define DDOVER_INTERLEAVED 0x00800000l
2898 /****************************************************************************
2900 * DIRECTDRAWSURFACE LOCK FLAGS
2902 ****************************************************************************/
2905 * The default. Set to indicate that Lock should return a valid memory pointer
2906 * to the top of the specified rectangle. If no rectangle is specified then a
2907 * pointer to the top of the surface is returned.
2909 #define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default
2912 * Set to indicate that Lock should wait until it can obtain a valid memory
2913 * pointer before returning. If this bit is set, Lock will never return
2914 * DDERR_WASSTILLDRAWING.
2916 #define DDLOCK_WAIT 0x00000001L
2919 * Set if an event handle is being passed to Lock. Lock will trigger the event
2920 * when it can return the surface memory pointer requested.
2922 #define DDLOCK_EVENT 0x00000002L
2925 * Indicates that the surface being locked will only be read from.
2927 #define DDLOCK_READONLY 0x00000010L
2930 * Indicates that the surface being locked will only be written to
2932 #define DDLOCK_WRITEONLY 0x00000020L
2936 * Indicates that a system wide lock should not be taken when this surface
2937 * is locked. This has several advantages (cursor responsiveness, ability
2938 * to call more Windows functions, easier debugging) when locking video
2939 * memory surfaces. However, an application specifying this flag must
2940 * comply with a number of conditions documented in the help file.
2941 * Furthermore, this flag cannot be specified when locking the primary.
2943 #define DDLOCK_NOSYSLOCK 0x00000800L
2946 /****************************************************************************
2948 * DIRECTDRAWSURFACE PAGELOCK FLAGS
2950 ****************************************************************************/
2953 * No flags defined at present
2957 /****************************************************************************
2959 * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
2961 ****************************************************************************/
2964 * No flags defined at present
2968 /****************************************************************************
2970 * DIRECTDRAWSURFACE BLT FX FLAGS
2972 ****************************************************************************/
2975 * If stretching, use arithmetic stretching along the Y axis for this blt.
2977 #define DDBLTFX_ARITHSTRETCHY 0x00000001l
2980 * Do this blt mirroring the surface left to right. Spin the
2981 * surface around its y-axis.
2983 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
2986 * Do this blt mirroring the surface up and down. Spin the surface
2987 * around its x-axis.
2989 #define DDBLTFX_MIRRORUPDOWN 0x00000004l
2992 * Schedule this blt to avoid tearing.
2994 #define DDBLTFX_NOTEARING 0x00000008l
2997 * Do this blt rotating the surface one hundred and eighty degrees.
2999 #define DDBLTFX_ROTATE180 0x00000010l
3002 * Do this blt rotating the surface two hundred and seventy degrees.
3004 #define DDBLTFX_ROTATE270 0x00000020l
3007 * Do this blt rotating the surface ninety degrees.
3009 #define DDBLTFX_ROTATE90 0x00000040l
3012 * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
3013 * specified to limit the bits copied from the source surface.
3015 #define DDBLTFX_ZBUFFERRANGE 0x00000080l
3018 * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
3019 * before comparing it with the desting z values.
3021 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
3023 /****************************************************************************
3025 * DIRECTDRAWSURFACE OVERLAY FX FLAGS
3027 ****************************************************************************/
3030 * If stretching, use arithmetic stretching along the Y axis for this overlay.
3032 #define DDOVERFX_ARITHSTRETCHY 0x00000001l
3035 * Mirror the overlay across the vertical axis
3037 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
3040 * Mirror the overlay across the horizontal axis
3042 #define DDOVERFX_MIRRORUPDOWN 0x00000004l
3044 /****************************************************************************
3046 * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
3048 ****************************************************************************/
3051 * return when the vertical blank interval begins
3053 #define DDWAITVB_BLOCKBEGIN 0x00000001l
3056 * set up an event to trigger when the vertical blank begins
3058 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
3061 * return when the vertical blank interval ends and display begins
3063 #define DDWAITVB_BLOCKEND 0x00000004l
3065 /****************************************************************************
3067 * DIRECTDRAW GETFLIPSTATUS FLAGS
3069 ****************************************************************************/
3072 * is it OK to flip now?
3074 #define DDGFS_CANFLIP 0x00000001l
3077 * is the last flip finished?
3079 #define DDGFS_ISFLIPDONE 0x00000002l
3081 /****************************************************************************
3083 * DIRECTDRAW GETBLTSTATUS FLAGS
3085 ****************************************************************************/
3088 * is it OK to blt now?
3090 #define DDGBS_CANBLT 0x00000001l
3093 * is the blt to the surface finished?
3095 #define DDGBS_ISBLTDONE 0x00000002l
3098 /****************************************************************************
3100 * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
3102 ****************************************************************************/
3105 * Enumerate overlays back to front.
3107 #define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
3110 * Enumerate overlays front to back
3112 #define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
3114 /****************************************************************************
3116 * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
3118 ****************************************************************************/
3121 * Send overlay to front
3123 #define DDOVERZ_SENDTOFRONT 0x00000000l
3126 * Send overlay to back
3128 #define DDOVERZ_SENDTOBACK 0x00000001l
3131 * Move Overlay forward
3133 #define DDOVERZ_MOVEFORWARD 0x00000002l
3136 * Move Overlay backward
3138 #define DDOVERZ_MOVEBACKWARD 0x00000003l
3141 * Move Overlay in front of relative surface
3143 #define DDOVERZ_INSERTINFRONTOF 0x00000004l
3146 * Move Overlay in back of relative surface
3148 #define DDOVERZ_INSERTINBACKOF 0x00000005l
3150 /*===========================================================================
3153 * DIRECTDRAW RETURN CODES
3155 * The return values from DirectDraw Commands and Surface that return an HRESULT
3156 * are codes from DirectDraw concerning the results of the action
3157 * requested by DirectDraw.
3159 *==========================================================================*/
3164 * Issued by: DirectDraw Commands and all callbacks
3168 /****************************************************************************
3170 * DIRECTDRAW ENUMCALLBACK RETURN VALUES
3172 * EnumCallback returns are used to control the flow of the DIRECTDRAW and
3173 * DIRECTDRAWSURFACE object enumerations. They can only be returned by
3174 * enumeration callback routines.
3176 ****************************************************************************/
3179 * stop the enumeration
3181 #define DDENUMRET_CANCEL 0
3184 * continue the enumeration
3186 #define DDENUMRET_OK 1
3188 /****************************************************************************
3192 * Errors are represented by negative values and cannot be combined.
3194 ****************************************************************************/
3197 * This object is already initialized
3199 #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
3202 * This surface can not be attached to the requested surface.
3204 #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
3207 * This surface can not be detached from the requested surface.
3209 #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
3212 * Support is currently not available.
3214 #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
3217 * An exception was encountered while performing the requested operation
3219 #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
3224 #define DDERR_GENERIC E_FAIL
3227 * Height of rectangle provided is not a multiple of reqd alignment
3229 #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
3232 * Unable to match primary surface creation request with existing
3235 #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
3238 * One or more of the caps bits passed to the callback are incorrect.
3240 #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
3243 * DirectDraw does not support provided Cliplist.
3245 #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
3248 * DirectDraw does not support the requested mode
3250 #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
3253 * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
3255 #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
3258 * One or more of the parameters passed to the callback function are
3261 #define DDERR_INVALIDPARAMS E_INVALIDARG
3264 * pixel format was invalid as specified
3266 #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
3269 * Rectangle provided was invalid.
3271 #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
3274 * Operation could not be carried out because one or more surfaces are locked
3276 #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
3279 * There is no 3D present.
3281 #define DDERR_NO3D MAKE_DDHRESULT( 170 )
3284 * Operation could not be carried out because there is no alpha accleration
3285 * hardware present or available.
3287 #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
3291 * no clip list available
3293 #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
3296 * Operation could not be carried out because there is no color conversion
3297 * hardware present or available.
3299 #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
3302 * Create function called without DirectDraw object method SetCooperativeLevel
3305 #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
3308 * Surface doesn't currently have a color key
3310 #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
3313 * Operation could not be carried out because there is no hardware support
3314 * of the dest color key.
3316 #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
3319 * No DirectDraw support possible with current display driver
3321 #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
3324 * Operation requires the application to have exclusive mode but the
3325 * application does not have exclusive mode.
3327 #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
3330 * Flipping visible surfaces is not supported.
3332 #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
3335 * There is no GDI present.
3337 #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
3340 * Operation could not be carried out because there is no hardware present
3343 #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
3346 * Requested item was not found
3348 #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
3351 * Operation could not be carried out because there is no overlay hardware
3352 * present or available.
3354 #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
3357 * Operation could not be carried out because there is no appropriate raster
3358 * op hardware present or available.
3360 #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
3363 * Operation could not be carried out because there is no rotation hardware
3364 * present or available.
3366 #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
3369 * Operation could not be carried out because there is no hardware support
3372 #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
3375 * DirectDrawSurface is not in 4 bit color palette and the requested operation
3376 * requires 4 bit color palette.
3378 #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
3381 * DirectDrawSurface is not in 4 bit color index palette and the requested
3382 * operation requires 4 bit color index palette.
3384 #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
3387 * DirectDraw Surface is not in 8 bit color mode and the requested operation
3388 * requires 8 bit color.
3390 #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
3393 * Operation could not be carried out because there is no texture mapping
3394 * hardware present or available.
3396 #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
3399 * Operation could not be carried out because there is no hardware support
3400 * for vertical blank synchronized operations.
3402 #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
3405 * Operation could not be carried out because there is no hardware support
3406 * for zbuffer blting.
3408 #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
3411 * Overlay surfaces could not be z layered based on their BltOrder because
3412 * the hardware does not support z layering of overlays.
3414 #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
3417 * The hardware needed for the requested operation has already been
3420 #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
3423 * DirectDraw does not have enough memory to perform the operation.
3425 #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
3428 * DirectDraw does not have enough memory to perform the operation.
3430 #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
3433 * hardware does not support clipped overlays
3435 #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
3438 * Can only have ony color key active at one time for overlays
3440 #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
3443 * Access to this palette is being refused because the palette is already
3444 * locked by another thread.
3446 #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
3449 * No src color key specified for this operation.
3451 #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
3454 * This surface is already attached to the surface it is being attached to.
3456 #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
3459 * This surface is already a dependency of the surface it is being made a
3462 #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
3465 * Access to this surface is being refused because the surface is already
3466 * locked by another thread.
3468 #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
3471 * Access to this surface is being refused because no driver exists
3472 * which can supply a pointer to the surface.
3473 * This is most likely to happen when attempting to lock the primary
3474 * surface when no DCI provider is present.
3475 * Will also happen on attempts to lock an optimized surface.
3477 #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
3480 * Access to Surface refused because Surface is obscured.
3482 #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
3485 * Access to this surface is being refused because the surface is gone.
3486 * The DIRECTDRAWSURFACE object representing this surface should
3487 * have Restore called on it.
3489 #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
3492 * The requested surface is not attached.
3494 #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
3497 * Height requested by DirectDraw is too large.
3499 #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
3502 * Size requested by DirectDraw is too large -- The individual height and
3505 #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
3508 * Width requested by DirectDraw is too large.
3510 #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
3513 * Action not supported.
3515 #define DDERR_UNSUPPORTED E_NOTIMPL
3518 * FOURCC format requested is unsupported by DirectDraw
3520 #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
3523 * Bitmask in the pixel format requested is unsupported by DirectDraw
3525 #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
3528 * vertical blank is in progress
3530 #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
3533 * Informs DirectDraw that the previous Blt which is transfering information
3534 * to or from this Surface is incomplete.
3536 #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
3540 * Rectangle provided was not horizontally aligned on reqd. boundary
3542 #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
3545 * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
3548 #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
3551 * A DirectDraw object representing this driver has already been created
3554 #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
3557 * A hardware only DirectDraw object creation was attempted but the driver
3558 * did not support any hardware.
3560 #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
3563 * this process already has created a primary surface
3565 #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
3568 * software emulation not available.
3570 #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
3573 * region passed to Clipper::GetClipList is too small.
3575 #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
3578 * an attempt was made to set a clip list for a clipper objec that
3579 * is already monitoring an hwnd.
3581 #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
3584 * No clipper object attached to surface object
3586 #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
3589 * Clipper notification requires an HWND or
3590 * no HWND has previously been set as the CooperativeLevel HWND.
3592 #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
3595 * HWND used by DirectDraw CooperativeLevel has been subclassed,
3596 * this prevents DirectDraw from restoring state.
3598 #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
3601 * The CooperativeLevel HWND has already been set.
3602 * It can not be reset while the process has surfaces or palettes created.
3604 #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
3607 * No palette object attached to this surface.
3609 #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
3612 * No hardware support for 16 or 256 color palettes.
3614 #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
3617 * If a clipper object is attached to the source surface passed into a
3620 #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
3625 #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
3628 * No DirectDraw ROP hardware.
3630 #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
3633 * returned when GetOverlayPosition is called on a hidden overlay
3635 #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
3638 * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
3639 * has never been called on to establish a destionation.
3641 #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
3644 * returned when the position of the overlay on the destionation is no longer
3645 * legal for that destionation.
3647 #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
3650 * returned when an overlay member is called for a non-overlay surface
3652 #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
3655 * An attempt was made to set the cooperative level when it was already
3658 #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
3661 * An attempt has been made to flip a surface that is not flippable.
3663 #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
3666 * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
3669 #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
3672 * Surface was not locked. An attempt to unlock a surface that was not
3673 * locked at all, or by this process, has been attempted.
3675 #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
3678 * Windows can not create any more DCs
3680 #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
3683 * No DC was ever created for this surface.
3685 #define DDERR_NODC MAKE_DDHRESULT( 586 )
3688 * This surface can not be restored because it was created in a different
3691 #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
3694 * This surface can not be restored because it is an implicitly created
3697 #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
3700 * The surface being used is not a palette-based surface
3702 #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
3706 * The display is currently in an unsupported mode
3708 #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
3711 * Operation could not be carried out because there is no mip-map
3712 * texture mapping hardware present or available.
3714 #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
3717 * The requested action could not be performed because the surface was of
3720 #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
3725 * Device does not support optimized surfaces, therefore no video memory optimized surfaces
3727 #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
3730 * Surface is an optimized surface, but has not yet been allocated any memory
3732 #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
3735 * A DC has already been returned for this surface. Only one DC can be
3736 * retrieved per surface.
3738 #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
3741 * An attempt was made to allocate non-local video memory from a device
3742 * that does not support non-local video memory.
3744 #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
3747 * The attempt to page lock a surface failed.
3749 #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
3752 * The attempt to page unlock a surface failed.
3754 #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
3757 * An attempt was made to page unlock a surface with no outstanding page locks.
3759 #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
3762 * There is more data available than the specified buffer size could hold
3764 #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
3767 * The video port is not active
3769 #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
3772 * Surfaces created by one direct draw device cannot be used directly by
3773 * another direct draw device.
3775 #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
3779 * An attempt was made to invoke an interface member of a DirectDraw object
3780 * created by CoCreateInstance() before it was initialized.
3782 #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
3784 /* Alpha bit depth constants */