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