Undefined CHAR_MAX and CHAR_MIN (#defined by NetBSD's system headers).
[wine/multimedia.git] / include / ddraw.h
blob1e03f8b163231547599044cc02b9f345990f51bf
1 #ifndef __WINE_DDRAW_H
2 #define __WINE_DDRAW_H
4 #include "ts_xlib.h"
5 #ifdef HAVE_LIBXXSHM
6 #include "ts_xshm.h"
7 #endif
9 #ifndef DIRECTDRAW_VERSION
10 #define DIRECTDRAW_VERSION 0x0500
11 #endif /* DIRECTDRAW_VERSION */
14 DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
15 DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
16 DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
17 DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
18 DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
19 DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
20 DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
21 DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
22 DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
23 DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
25 typedef struct IDirectDraw IDirectDraw,*LPDIRECTDRAW;
26 typedef struct IDirectDraw2 IDirectDraw2,*LPDIRECTDRAW2;
27 typedef struct IDirectDrawClipper IDirectDrawClipper,*LPDIRECTDRAWCLIPPER;
28 typedef struct IDirectDrawPalette IDirectDrawPalette,*LPDIRECTDRAWPALETTE;
29 typedef struct IDirectDrawSurface IDirectDrawSurface,*LPDIRECTDRAWSURFACE;
30 typedef struct IDirectDrawSurface2 IDirectDrawSurface2,*LPDIRECTDRAWSURFACE2;
31 typedef struct IDirectDrawSurface3 IDirectDrawSurface3,*LPDIRECTDRAWSURFACE3;
32 typedef struct IDirectDrawColorControl IDirectDrawColorControl,*LPDIRECTDRAWCOLORCONTROL;
34 #define DDENUMRET_CANCEL 0
35 #define DDENUMRET_OK 1
37 #define DD_OK 0
40 #define _FACDD 0x876
41 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
43 #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
44 #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
45 #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
46 #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
47 #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
48 #define DDERR_GENERIC E_FAIL
49 #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
50 #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
51 #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
52 #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
53 #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
54 #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
55 #define DDERR_INVALIDPARAMS E_INVALIDARG
56 #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
57 #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
58 #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
59 #define DDERR_NO3D MAKE_DDHRESULT( 170 )
60 #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
61 #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
62 #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
63 #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
64 #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
65 #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
66 #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
67 #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
68 #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
69 #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
70 #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
71 #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
72 #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
73 #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
74 #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
75 #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
76 #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
77 #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
78 #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
79 #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
80 #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
81 #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
82 #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
83 #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
84 #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
85 #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
86 #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
87 #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
88 #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
89 #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
90 #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
91 #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
92 #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
93 #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
94 #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
95 #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
96 #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
97 #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
98 #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
99 #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
100 #define DDERR_UNSUPPORTED E_NOTIMPL
101 #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
102 #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
103 #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
104 #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
105 #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
106 #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
107 #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
108 #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
109 #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
110 #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
111 #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
112 #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
113 #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
114 #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
115 #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
116 #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
117 #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
118 #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
119 #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
120 #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
121 #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
122 #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
123 #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
124 #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
125 #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
126 #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
127 #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
128 #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
129 #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
130 #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
131 #define DDERR_NODC MAKE_DDHRESULT( 586 )
132 #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
133 #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
134 #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
135 #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
136 #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
137 #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
138 #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
139 #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
140 #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
141 #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
142 #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
143 #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
144 #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
145 #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
146 #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
147 #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
148 #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
149 #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
151 /* dwFlags for Blt* */
152 #define DDBLT_ALPHADEST 0x00000001
153 #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
154 #define DDBLT_ALPHADESTNEG 0x00000004
155 #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
156 #define DDBLT_ALPHAEDGEBLEND 0x00000010
157 #define DDBLT_ALPHASRC 0x00000020
158 #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
159 #define DDBLT_ALPHASRCNEG 0x00000080
160 #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
161 #define DDBLT_ASYNC 0x00000200
162 #define DDBLT_COLORFILL 0x00000400
163 #define DDBLT_DDFX 0x00000800
164 #define DDBLT_DDROPS 0x00001000
165 #define DDBLT_KEYDEST 0x00002000
166 #define DDBLT_KEYDESTOVERRIDE 0x00004000
167 #define DDBLT_KEYSRC 0x00008000
168 #define DDBLT_KEYSRCOVERRIDE 0x00010000
169 #define DDBLT_ROP 0x00020000
170 #define DDBLT_ROTATIONANGLE 0x00040000
171 #define DDBLT_ZBUFFER 0x00080000
172 #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
173 #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000
174 #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
175 #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000
176 #define DDBLT_WAIT 0x01000000
177 #define DDBLT_DEPTHFILL 0x02000000
179 /* dwTrans for BltFast */
180 #define DDBLTFAST_NOCOLORKEY 0x00000000
181 #define DDBLTFAST_SRCCOLORKEY 0x00000001
182 #define DDBLTFAST_DESTCOLORKEY 0x00000002
183 #define DDBLTFAST_WAIT 0x00000010
185 /* dwFlags for Flip */
186 #define DDFLIP_WAIT 0x00000001
187 #define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
188 #define DDFLIP_ODD 0x00000004 /* only valid for overlay */
190 /* dwFlags for GetBltStatus */
191 #define DDGBS_CANBLT 0x00000001
192 #define DDGBS_ISBLTDONE 0x00000002
194 /* DDSCAPS.dwCaps */
195 /* reserved1, was 3d capable */
196 #define DDSCAPS_RESERVED1 0x00000001
197 /* surface contains alpha information */
198 #define DDSCAPS_ALPHA 0x00000002
199 /* this surface is a backbuffer */
200 #define DDSCAPS_BACKBUFFER 0x00000004
201 /* complex surface structure */
202 #define DDSCAPS_COMPLEX 0x00000008
203 /* part of surface flipping structure */
204 #define DDSCAPS_FLIP 0x00000010
205 /* this surface is the frontbuffer surface */
206 #define DDSCAPS_FRONTBUFFER 0x00000020
207 /* this is a plain offscreen surface */
208 #define DDSCAPS_OFFSCREENPLAIN 0x00000040
209 /* overlay */
210 #define DDSCAPS_OVERLAY 0x00000080
211 /* palette objects can be created and attached to us */
212 #define DDSCAPS_PALETTE 0x00000100
213 /* primary surface (the one the user looks at currently)(right eye)*/
214 #define DDSCAPS_PRIMARYSURFACE 0x00000200
215 /* primary surface for left eye */
216 #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
217 /* surface exists in systemmemory */
218 #define DDSCAPS_SYSTEMMEMORY 0x00000800
219 /* surface can be used as a texture */
220 #define DDSCAPS_TEXTURE 0x00001000
221 /* surface may be destination for 3d rendering */
222 #define DDSCAPS_3DDEVICE 0x00002000
223 /* surface exists in videomemory */
224 #define DDSCAPS_VIDEOMEMORY 0x00004000
225 /* surface changes immediately visible */
226 #define DDSCAPS_VISIBLE 0x00008000
227 /* write only surface */
228 #define DDSCAPS_WRITEONLY 0x00010000
229 /* zbuffer surface */
230 #define DDSCAPS_ZBUFFER 0x00020000
231 /* has its own DC */
232 #define DDSCAPS_OWNDC 0x00040000
233 /* surface should be able to receive live video */
234 #define DDSCAPS_LIVEVIDEO 0x00080000
235 /* should be able to have a hw codec decompress stuff into it */
236 #define DDSCAPS_HWCODEC 0x00100000
237 /* mode X (320x200 or 320x240) surface */
238 #define DDSCAPS_MODEX 0x00200000
239 /* one mipmap surface (1 level) */
240 #define DDSCAPS_MIPMAP 0x00400000
241 #define DDSCAPS_RESERVED2 0x00800000
242 /* memory allocation delayed until Load() */
243 #define DDSCAPS_ALLOCONLOAD 0x04000000
244 /* Indicates that the surface will recieve data from a video port */
245 #define DDSCAPS_VIDEOPORT 0x08000000
246 /* surface is in local videomemory */
247 #define DDSCAPS_LOCALVIDMEM 0x10000000
248 /* surface is in nonlocal videomemory */
249 #define DDSCAPS_NONLOCALVIDMEM 0x20000000
250 /* surface is a standard VGA mode surface (NOT ModeX) */
251 #define DDSCAPS_STANDARDVGAMODE 0x40000000
252 /* optimized? surface */
253 #define DDSCAPS_OPTIMIZED 0x80000000
255 typedef struct _DDSCAPS {
256 DWORD dwCaps; /* capabilities of surface wanted */
257 } DDSCAPS,*LPDDSCAPS;
259 #define DD_ROP_SPACE (256/32) /* space required to store ROP array */
261 typedef struct _DDCAPS_DX3
263 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
264 DWORD dwCaps; /* driver specific capabilities */
265 DWORD dwCaps2; /* more driver specific capabilites */
266 DWORD dwCKeyCaps; /* color key capabilities of the surface */
267 DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
268 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
269 DWORD dwPalCaps; /* palette capabilities */
270 DWORD dwSVCaps; /* stereo vision capabilities */
271 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
272 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
273 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
274 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
275 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
276 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
277 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
278 DWORD dwVidMemTotal; /* total amount of video memory */
279 DWORD dwVidMemFree; /* amount of free video memory */
280 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
281 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
282 DWORD dwNumFourCCCodes; /* number of four cc codes */
283 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
284 DWORD dwAlignSizeSrc; /* source rectangle byte size */
285 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
286 DWORD dwAlignSizeDest; /* dest rectangle byte size */
287 DWORD dwAlignStrideAlign; /* stride alignment */
288 DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
289 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
290 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
291 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
292 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
293 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
294 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
295 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
296 DWORD dwReserved1;
297 DWORD dwReserved2;
298 DWORD dwReserved3;
299 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
300 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
301 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
302 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
303 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
304 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
305 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
306 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
307 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
308 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
309 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
310 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
311 DWORD dwReserved4;
312 DWORD dwReserved5;
313 DWORD dwReserved6;
314 } DDCAPS_DX3,*LPDDCAPS_DX3;
316 typedef struct _DDCAPS
318 /* 0*/ DWORD dwSize; /* size of the DDDRIVERCAPS structure */
319 /* 4*/ DWORD dwCaps; /* driver specific capabilities */
320 /* 8*/ DWORD dwCaps2; /* more driver specific capabilites */
321 /* c*/ DWORD dwCKeyCaps; /* color key capabilities of the surface */
322 /* 10*/ DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
323 /* 14*/ DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
324 /* 18*/ DWORD dwPalCaps; /* palette capabilities */
325 /* 1c*/ DWORD dwSVCaps; /* stereo vision capabilities */
326 /* 20*/ DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
327 /* 24*/ DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
328 /* 28*/ DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
329 /* 2c*/ DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
330 /* 30*/ DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
331 /* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
332 /* 38*/ DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
333 /* 3c*/ DWORD dwVidMemTotal; /* total amount of video memory */
334 /* 40*/ DWORD dwVidMemFree; /* amount of free video memory */
335 /* 44*/ DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
336 /* 48*/ DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
337 /* 4c*/ DWORD dwNumFourCCCodes; /* number of four cc codes */
338 /* 50*/ DWORD dwAlignBoundarySrc; /* source rectangle alignment */
339 /* 54*/ DWORD dwAlignSizeSrc; /* source rectangle byte size */
340 /* 58*/ DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
341 /* 5c*/ DWORD dwAlignSizeDest; /* dest rectangle byte size */
342 /* 60*/ DWORD dwAlignStrideAlign; /* stride alignment */
343 /* 64*/ DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
344 /* 84*/ DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
345 /* 88*/ DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
346 /* 8c*/ DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
347 /* 90*/ DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
348 /* 94*/ DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
349 /* 98*/ DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
350 /* 9c*/ DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
351 /* a0*/ DWORD dwReserved1;
352 /* a4*/ DWORD dwReserved2;
353 /* a8*/ DWORD dwReserved3;
354 /* ac*/ DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
355 /* b0*/ DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
356 /* b4*/ DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
357 /* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
358 /* d8*/ DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
359 /* dc*/ DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
360 /* e0*/ DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
361 /* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
362 /*104*/ DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
363 /*108*/ DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
364 /*10c*/ DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
365 /*110*/ DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
366 #if DIRECTDRAW_VERSION >= 0x0500
367 /*130*/ DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
368 /*134*/ DWORD dwCurrVideoPorts;/* current number of video ports used */
369 /*138*/ DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
370 /*13c*/ DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
371 /*140*/ DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
372 /*144*/ DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
373 /*148*/ DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
374 /*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE];/* ROPS supported for non-local->local blts */
375 #else /* DIRECTDRAW_VERSION >= 0x0500 */
376 /*130*/ DWORD dwReserved4;
377 /*134*/ DWORD dwReserved5;
378 /*138*/ DWORD dwReserved6;
379 #endif /* DIRECTDRAW_VERSION >= 0x0500 */
380 } DDCAPS,*LPDDCAPS;
383 /* DDCAPS.dwCaps */
384 #define DDCAPS_3D 0x00000001
385 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
386 #define DDCAPS_ALIGNSIZEDEST 0x00000004
387 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
388 #define DDCAPS_ALIGNSIZESRC 0x00000010
389 #define DDCAPS_ALIGNSTRIDE 0x00000020
390 #define DDCAPS_BLT 0x00000040
391 #define DDCAPS_BLTQUEUE 0x00000080
392 #define DDCAPS_BLTFOURCC 0x00000100
393 #define DDCAPS_BLTSTRETCH 0x00000200
394 #define DDCAPS_GDI 0x00000400
395 #define DDCAPS_OVERLAY 0x00000800
396 #define DDCAPS_OVERLAYCANTCLIP 0x00001000
397 #define DDCAPS_OVERLAYFOURCC 0x00002000
398 #define DDCAPS_OVERLAYSTRETCH 0x00004000
399 #define DDCAPS_PALETTE 0x00008000
400 #define DDCAPS_PALETTEVSYNC 0x00010000
401 #define DDCAPS_READSCANLINE 0x00020000
402 #define DDCAPS_STEREOVIEW 0x00040000
403 #define DDCAPS_VBI 0x00080000
404 #define DDCAPS_ZBLTS 0x00100000
405 #define DDCAPS_ZOVERLAYS 0x00200000
406 #define DDCAPS_COLORKEY 0x00400000
407 #define DDCAPS_ALPHA 0x00800000
408 #define DDCAPS_COLORKEYHWASSIST 0x01000000
409 #define DDCAPS_NOHARDWARE 0x02000000
410 #define DDCAPS_BLTCOLORFILL 0x04000000
411 #define DDCAPS_BANKSWITCHED 0x08000000
412 #define DDCAPS_BLTDEPTHFILL 0x10000000
413 #define DDCAPS_CANCLIP 0x20000000
414 #define DDCAPS_CANCLIPSTRETCHED 0x40000000
415 #define DDCAPS_CANBLTSYSMEM 0x80000000
417 /* DDCAPS.dwCaps2 */
418 #define DDCAPS2_CERTIFIED 0x00000001
419 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002
420 #define DDCAPS2_VIDEOPORT 0x00000004
421 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
422 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010
423 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
424 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
425 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
426 #define DDCAPS2_CANDROPZ16BIT 0x00000100
427 #define DDCAPS2_NONLOCALVIDMEM 0x00000200
428 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
429 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
430 #define DDCAPS2_WIDESURFACES 0x00001000
431 #define DDCAPS2_CANFLIPODDEVEN 0x00002000
432 #define DDCAPS2_CANBOBHARDWARE 0x00004000
435 /* Set/Get Colour Key Flags */
436 #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
437 #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
438 #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
439 #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
440 #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
442 typedef struct _DDCOLORKEY
444 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
445 * be treated as Color Key, inclusive
447 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
448 * to be treated as Color Key, inclusive
450 } DDCOLORKEY,*LPDDCOLORKEY;
452 /* ddCKEYCAPS bits */
453 #define DDCKEYCAPS_DESTBLT 0x00000001
454 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
455 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
456 #define DDCKEYCAPS_DESTBLTYUV 0x00000008
457 #define DDCKEYCAPS_DESTOVERLAY 0x00000010
458 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
459 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
460 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
461 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
462 #define DDCKEYCAPS_SRCBLT 0x00000200
463 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
464 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
465 #define DDCKEYCAPS_SRCBLTYUV 0x00001000
466 #define DDCKEYCAPS_SRCOVERLAY 0x00002000
467 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
468 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
469 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
470 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
471 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
473 typedef struct _DDPIXELFORMAT {
474 DWORD dwSize; /* 0: size of structure */
475 DWORD dwFlags; /* 4: pixel format flags */
476 DWORD dwFourCC; /* 8: (FOURCC code) */
477 union {
478 DWORD dwRGBBitCount; /* C: how many bits per pixel */
479 DWORD dwYUVBitCount; /* C: how many bits per pixel */
480 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
481 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
482 } x;
483 union {
484 DWORD dwRBitMask; /* 10: mask for red bit*/
485 DWORD dwYBitMask; /* 10: mask for Y bits*/
486 } y;
487 union {
488 DWORD dwGBitMask; /* 14: mask for green bits*/
489 DWORD dwUBitMask; /* 14: mask for U bits*/
490 } z;
491 union {
492 DWORD dwBBitMask; /* 18: mask for blue bits*/
493 DWORD dwVBitMask; /* 18: mask for V bits*/
494 } xx;
495 union {
496 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
497 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
498 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
499 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
500 } xy;
501 /* 20: next structure */
502 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
504 /* DDCAPS.dwFXCaps */
505 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
506 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
507 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
508 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
509 #define DDFXCAPS_BLTROTATION 0x00000100
510 #define DDFXCAPS_BLTROTATION90 0x00000200
511 #define DDFXCAPS_BLTSHRINKX 0x00000400
512 #define DDFXCAPS_BLTSHRINKXN 0x00000800
513 #define DDFXCAPS_BLTSHRINKY 0x00001000
514 #define DDFXCAPS_BLTSHRINKYN 0x00002000
515 #define DDFXCAPS_BLTSTRETCHX 0x00004000
516 #define DDFXCAPS_BLTSTRETCHXN 0x00008000
517 #define DDFXCAPS_BLTSTRETCHY 0x00010000
518 #define DDFXCAPS_BLTSTRETCHYN 0x00020000
519 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
520 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
521 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000
522 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
523 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000
524 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
525 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
526 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
527 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
528 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
529 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
530 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
532 /* DDCAPS.dwFXAlphaCaps */
533 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
534 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
535 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
536 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
537 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
538 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
539 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
540 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
541 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
542 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
544 /* DDCAPS.dwPalCaps */
545 #define DDPCAPS_4BIT 0x00000001
546 #define DDPCAPS_8BITENTRIES 0x00000002
547 #define DDPCAPS_8BIT 0x00000004
548 #define DDPCAPS_INITIALIZE 0x00000008
549 #define DDPCAPS_PRIMARYSURFACE 0x00000010
550 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
551 #define DDPCAPS_ALLOW256 0x00000040
552 #define DDPCAPS_VSYNC 0x00000080
553 #define DDPCAPS_1BIT 0x00000100
554 #define DDPCAPS_2BIT 0x00000200
556 /* DDCAPS.dwSVCaps */
557 #define DDSVCAPS_ENIGMA 0x00000001l
558 #define DDSVCAPS_FLICKER 0x00000002l
559 #define DDSVCAPS_REDBLUE 0x00000004l
560 #define DDSVCAPS_SPLIT 0x00000008l
562 /* BitDepths */
563 #define DDBD_1 0x00004000
564 #define DDBD_2 0x00002000
565 #define DDBD_4 0x00001000
566 #define DDBD_8 0x00000800
567 #define DDBD_16 0x00000400
568 #define DDBD_24 0x00000200
569 #define DDBD_32 0x00000100
571 /* DDOVERLAYFX.dwDDFX */
572 #define DDOVERFX_ARITHSTRETCHY 0x00000001
573 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
574 #define DDOVERFX_MIRRORUPDOWN 0x00000004
576 /* DDCOLORKEY.dwFlags */
577 #define DDPF_ALPHAPIXELS 0x00000001
578 #define DDPF_ALPHA 0x00000002
579 #define DDPF_FOURCC 0x00000004
580 #define DDPF_PALETTEINDEXED4 0x00000008
581 #define DDPF_PALETTEINDEXEDTO8 0x00000010
582 #define DDPF_PALETTEINDEXED8 0x00000020
583 #define DDPF_RGB 0x00000040
584 #define DDPF_COMPRESSED 0x00000080
585 #define DDPF_RGBTOYUV 0x00000100
586 #define DDPF_YUV 0x00000200
587 #define DDPF_ZBUFFER 0x00000400
588 #define DDPF_PALETTEINDEXED1 0x00000800
589 #define DDPF_PALETTEINDEXED2 0x00001000
590 #define DDPF_ZPIXELS 0x00002000
592 /* SetCooperativeLevel dwFlags */
593 #define DDSCL_FULLSCREEN 0x00000001
594 #define DDSCL_ALLOWREBOOT 0x00000002
595 #define DDSCL_NOWINDOWCHANGES 0x00000004
596 #define DDSCL_NORMAL 0x00000008
597 #define DDSCL_EXCLUSIVE 0x00000010
598 #define DDSCL_ALLOWMODEX 0x00000040
599 #define DDSCL_SETFOCUSWINDOW 0x00000080
600 #define DDSCL_SETDEVICEWINDOW 0x00000100
601 #define DDSCL_CREATEDEVICEWINDOW 0x00000200
604 /* DDSURFACEDESC.dwFlags */
605 #define DDSD_CAPS 0x00000001
606 #define DDSD_HEIGHT 0x00000002
607 #define DDSD_WIDTH 0x00000004
608 #define DDSD_PITCH 0x00000008
609 #define DDSD_BACKBUFFERCOUNT 0x00000020
610 #define DDSD_ZBUFFERBITDEPTH 0x00000040
611 #define DDSD_ALPHABITDEPTH 0x00000080
612 #define DDSD_LPSURFACE 0x00000800
613 #define DDSD_PIXELFORMAT 0x00001000
614 #define DDSD_CKDESTOVERLAY 0x00002000
615 #define DDSD_CKDESTBLT 0x00004000
616 #define DDSD_CKSRCOVERLAY 0x00008000
617 #define DDSD_CKSRCBLT 0x00010000
618 #define DDSD_MIPMAPCOUNT 0x00020000
619 #define DDSD_REFRESHRATE 0x00040000
620 #define DDSD_LINEARSIZE 0x00080000
621 #define DDSD_ALL 0x000ff9ee
623 /* SetDisplayMode flags */
624 #define DDSDM_STANDARDVGAMODE 0x00000001
626 /* EnumDisplayModes flags */
627 #define DDEDM_REFRESHRATES 0x00000001
628 #define DDEDM_STANDARDVGAMODES 0x00000002
631 typedef struct _DDSURFACEDESC
633 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
634 DWORD dwFlags; /* 4: determines what fields are valid*/
635 DWORD dwHeight; /* 8: height of surface to be created*/
636 DWORD dwWidth; /* C: width of input surface*/
637 LONG lPitch; /*10: distance to start of next line (return value only)*/
638 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
639 union {
640 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
641 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
642 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
643 } x;
644 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
645 DWORD dwReserved; /* 20:reserved*/
646 union {
647 LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
648 DWORD dwLinearSize; /* 24:Formless late-allocated optimized surface size*/
649 } y;
650 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
651 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
652 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
653 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
654 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
655 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
656 } DDSURFACEDESC,*LPDDSURFACEDESC;
658 /* DDCOLORCONTROL.dwFlags */
659 #define DDCOLOR_BRIGHTNESS 0x00000001
660 #define DDCOLOR_CONTRAST 0x00000002
661 #define DDCOLOR_HUE 0x00000004
662 #define DDCOLOR_SATURATION 0x00000008
663 #define DDCOLOR_SHARPNESS 0x00000010
664 #define DDCOLOR_GAMMA 0x00000020
665 #define DDCOLOR_COLORENABLE 0x00000040
667 typedef struct {
668 DWORD dwSize;
669 DWORD dwFlags;
670 LONG lBrightness;
671 LONG lContrast;
672 LONG lHue;
673 LONG lSaturation;
674 LONG lSharpness;
675 LONG lGamma;
676 LONG lColorEnable;
677 DWORD dwReserved1;
678 } DDCOLORCONTROL,*LPDDCOLORCONTROL;
680 typedef BOOL32 (CALLBACK * LPDDENUMCALLBACK32A)(GUID *, LPSTR, LPSTR, LPVOID);
681 typedef BOOL32 (CALLBACK * LPDDENUMCALLBACK32W)(GUID *, LPWSTR, LPWSTR, LPVOID);
682 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
684 typedef HRESULT (CALLBACK * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
685 typedef HRESULT (CALLBACK * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
687 typedef BOOL32 (CALLBACK * LPDDENUMCALLBACKEX32A)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
688 typedef BOOL32 (CALLBACK * LPDDENUMCALLBACKEX32W)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
689 DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
691 HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEX32A lpCallback, LPVOID lpContext, DWORD dwFlags);
692 HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEX32W lpCallback, LPVOID lpContext, DWORD dwFlags);
694 /* flags for DirectDrawEnumerateEx */
695 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
696 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
697 #define DDENUM_NONDISPLAYDEVICES 0x00000004
699 typedef struct _DDBLTFX
701 DWORD dwSize; /* size of structure */
702 DWORD dwDDFX; /* FX operations */
703 DWORD dwROP; /* Win32 raster operations */
704 DWORD dwDDROP; /* Raster operations new for DirectDraw */
705 DWORD dwRotationAngle; /* Rotation angle for blt */
706 DWORD dwZBufferOpCode; /* ZBuffer compares */
707 DWORD dwZBufferLow; /* Low limit of Z buffer */
708 DWORD dwZBufferHigh; /* High limit of Z buffer */
709 DWORD dwZBufferBaseDest; /* Destination base value */
710 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
711 union
713 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
714 LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
715 } x;
716 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
717 union
719 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
720 LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
721 } y;
722 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
723 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
724 DWORD dwReserved;
725 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
726 union
728 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
729 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */
730 } z;
731 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
732 union
734 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
735 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
736 } a;
737 union
739 DWORD dwFillColor; /* color in RGB or Palettized */
740 DWORD dwFillDepth; /* depth value for z-buffer */
741 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
742 LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
743 } b;
744 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
745 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
746 } DDBLTFX,*LPDDBLTFX;
748 /* dwDDFX */
749 /* arithmetic stretching along y axis */
750 #define DDBLTFX_ARITHSTRETCHY 0x00000001
751 /* mirror on y axis */
752 #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
753 /* mirror on x axis */
754 #define DDBLTFX_MIRRORUPDOWN 0x00000004
755 /* do not tear */
756 #define DDBLTFX_NOTEARING 0x00000008
757 /* 180 degrees clockwise rotation */
758 #define DDBLTFX_ROTATE180 0x00000010
759 /* 270 degrees clockwise rotation */
760 #define DDBLTFX_ROTATE270 0x00000020
761 /* 90 degrees clockwise rotation */
762 #define DDBLTFX_ROTATE90 0x00000040
763 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
764 #define DDBLTFX_ZBUFFERRANGE 0x00000080
765 /* add dwZBufferBaseDest to every source z value before compare */
766 #define DDBLTFX_ZBUFFERBASEDEST 0x00000100
768 typedef struct _DDOVERLAYFX
770 DWORD dwSize; /* size of structure */
771 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
772 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
773 DWORD dwReserved;
774 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
775 union
777 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
778 LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
779 } x;
780 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
781 union
783 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
784 LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
785 } y;
786 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
787 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
788 DWORD dwDDFX; /* Overlay FX */
789 DWORD dwFlags; /* flags */
790 } DDOVERLAYFX,*LPDDOVERLAYFX;
792 typedef struct _DDBLTBATCH
794 LPRECT32 lprDest;
795 LPDIRECTDRAWSURFACE lpDDSSrc;
796 LPRECT32 lprSrc;
797 DWORD dwFlags;
798 LPDDBLTFX lpDDBltFx;
799 } DDBLTBATCH,*LPDDBLTBATCH;
801 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
802 #define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
803 #define PURE
804 #define FAR
805 #define THIS_ THIS ,
807 #define THIS LPDIRECTDRAWPALETTE this
809 typedef struct IDirectDrawPalette_VTable {
810 /*** IUnknown methods ***/
811 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
812 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
813 STDMETHOD_(ULONG,Release) (THIS) PURE;
814 /*** IDirectDrawPalette methods ***/
815 STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
816 STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
817 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
818 STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
819 } *LPDIRECTDRAWPALETTE_VTABLE,IDirectDrawPalette_VTable;
821 struct IDirectDrawPalette {
822 LPDIRECTDRAWPALETTE_VTABLE lpvtbl;
823 DWORD ref;
824 LPDIRECTDRAW ddraw;
825 Colormap cm;
826 PALETTEENTRY palents[256];
827 int installed;
829 #undef THIS
831 #define THIS LPDIRECTDRAWCLIPPER this
832 typedef struct IDirectDrawClipper_VTable {
833 /*** IUnknown methods ***/
834 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
835 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
836 STDMETHOD_(ULONG,Release) (THIS) PURE;
837 /*** IDirectDrawClipper methods ***/
838 STDMETHOD(GetClipList)(THIS_ LPRECT32, LPRGNDATA, LPDWORD) PURE;
839 STDMETHOD(GetHWnd)(THIS_ HWND32 FAR *) PURE;
840 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
841 STDMETHOD(IsClipListChanged)(THIS_ BOOL32 FAR *) PURE;
842 STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
843 STDMETHOD(SetHWnd)(THIS_ DWORD, HWND32 ) PURE;
844 } *LPDIRECTDRAWCLIPPER_VTABLE,IDirectDrawClipper_VTable;
846 struct IDirectDrawClipper {
847 LPDIRECTDRAWCLIPPER_VTABLE lpvtbl;
848 DWORD ref;
850 #undef THIS
852 #define THIS LPDIRECTDRAW this
853 typedef struct IDirectDraw_VTable {
854 /*** IUnknown methods ***/
855 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
856 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
857 STDMETHOD_(ULONG,Release) (THIS) PURE;
858 /*** IDirectDraw methods ***/
859 STDMETHOD(Compact)(THIS) PURE;
860 STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
861 STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
862 STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *,
863 IUnknown FAR *) PURE;
864 STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE
865 FAR * ) PURE;
866 STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
867 STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
868 STDMETHOD(FlipToGDISurface)(THIS) PURE;
869 STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
870 STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
871 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
872 STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
873 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
874 STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
875 STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL32* ) PURE;
876 STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
877 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
878 STDMETHOD(SetCooperativeLevel)(THIS_ HWND32, DWORD) PURE;
879 STDMETHOD(SetDisplayMode)(THIS_ DWORD , DWORD ,DWORD ) PURE;
880 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE32 ) PURE;
881 } *LPDIRECTDRAW_VTABLE,IDirectDraw_VTable;
883 struct _common_directdrawdata {
884 DWORD depth;
885 DWORD height,width; /* SetDisplayMode */
886 HWND32 mainWindow; /* SetCooperativeLevel */
888 /* This is for Wine's fake mainWindow.
889 We need it also in DGA mode to make some games (for example Monkey Island III work) */
890 ATOM winclass;
891 HWND32 window;
892 PAINTSTRUCT32 ps;
895 struct _dga_directdrawdata {
896 DWORD fb_width,fb_height,fb_banksize,fb_memsize;
897 void *fb_addr;
898 unsigned int vpmask;
901 struct _xlib_directdrawdata {
902 Window drawable;
903 int paintable;
905 #ifdef HAVE_LIBXXSHM
906 int xshm_active;
907 #endif
909 /* are these needed for anything? (draw_surf is the active surface)
910 IDirectDrawSurface *surfs;
911 DWORD num_surfs, alloc_surfs, draw_surf; */
914 struct IDirectDraw {
915 LPDIRECTDRAW_VTABLE lpvtbl;
916 DWORD ref;
917 struct _common_directdrawdata d;
918 union {
919 struct _xlib_directdrawdata xlib;
920 struct _dga_directdrawdata dga;
921 } e;
923 #undef THIS
925 /* flags for Lock() */
926 #define DDLOCK_SURFACEMEMORYPTR 0x00000000
927 #define DDLOCK_WAIT 0x00000001
928 #define DDLOCK_EVENT 0x00000002
929 #define DDLOCK_READONLY 0x00000010
930 #define DDLOCK_WRITEONLY 0x00000020
931 #define DDLOCK_NOSYSLOCK 0x00000800
934 #define THIS LPDIRECTDRAW2 this
935 typedef struct IDirectDraw2_VTable
937 /*** IUnknown methods ***/
938 /*00*/ STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
939 /*04*/ STDMETHOD_(ULONG,AddRef) (THIS) PURE;
940 /*08*/ STDMETHOD_(ULONG,Release) (THIS) PURE;
941 /*** IDirectDraw methods ***/
942 /*0C*/ STDMETHOD(Compact)(THIS) PURE;
943 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
944 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD,LPPALETTEENTRY,
945 LPDIRECTDRAWPALETTE FAR*, IUnknown FAR *) PURE;
946 /*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC,LPDIRECTDRAWSURFACE
947 FAR *, IUnknown FAR *) PURE;
948 /*1C*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE,
949 LPDIRECTDRAWSURFACE FAR * ) PURE;
950 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,
951 LPDDENUMMODESCALLBACK ) PURE;
952 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,
953 LPDDENUMSURFACESCALLBACK ) PURE;
954 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
955 /*2C*/ STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
956 /*30*/ STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
957 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
958 /*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
959 /*3C*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
960 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
961 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL32* ) PURE;
962 /*48*/ STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
963 /*4C*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
964 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND32, DWORD) PURE;
965 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD, DWORD, DWORD, DWORD) PURE;
966 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE32 ) PURE;
967 /*** Added in the v2 interface ***/
968 /*5C*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
969 } IDirectDraw2_VTable,*LPDIRECTDRAW2_VTABLE;
970 /* MUST HAVE THE SAME LAYOUT AS struct IDirectDraw */
972 struct IDirectDraw2 {
973 LPDIRECTDRAW2_VTABLE lpvtbl;
974 DWORD ref;
975 struct _common_directdrawdata d;
976 union {
977 struct _xlib_directdrawdata xlib;
978 struct _dga_directdrawdata dga;
979 } e;
981 #undef THIS
983 #define THIS LPDIRECTDRAWSURFACE this
984 struct _common_directdrawsurface {
985 LPDIRECTDRAWPALETTE palette;
986 LPDIRECTDRAW2 ddraw;
987 LPDIRECTDRAWSURFACE3 backbuffer;
989 DDSURFACEDESC surface_desc;
992 struct _dga_directdrawsurface {
993 DWORD fb_height;
996 struct _xlib_directdrawsurface {
997 XImage *image;
998 #ifdef HAVE_LIBXXSHM
999 XShmSegmentInfo shminfo;
1000 #endif
1003 typedef struct IDirectDrawSurface_VTable {
1004 /*** IUnknown methods ***/
1005 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1006 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1007 STDMETHOD_(ULONG,Release) (THIS) PURE;
1008 /*** IDirectDrawSurface methods ***/
1009 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
1010 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT32) PURE;
1011 STDMETHOD(Blt)(THIS_ LPRECT32,LPDIRECTDRAWSURFACE, LPRECT32,DWORD, LPDDBLTFX) PURE;
1012 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
1013 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT32,DWORD) PURE;
1014 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
1015 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1016 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1017 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
1018 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
1019 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
1020 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
1021 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
1022 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1023 STDMETHOD(GetDC)(THIS_ HDC32 FAR *) PURE;
1024 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
1025 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
1026 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
1027 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
1028 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
1029 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
1030 STDMETHOD(IsLost)(THIS) PURE;
1031 STDMETHOD(Lock)(THIS_ LPRECT32,LPDDSURFACEDESC,DWORD flags,HANDLE32) PURE;
1032 STDMETHOD(ReleaseDC)(THIS_ HDC32) PURE;
1033 STDMETHOD(Restore)(THIS) PURE;
1034 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
1035 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1036 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
1037 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
1038 STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
1039 STDMETHOD(UpdateOverlay)(THIS_ LPRECT32, LPDIRECTDRAWSURFACE,LPRECT32,DWORD, LPDDOVERLAYFX) PURE;
1040 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
1041 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
1042 } *LPDIRECTDRAWSURFACE_VTABLE,IDirectDrawSurface_VTable;
1044 struct IDirectDrawSurface {
1045 LPDIRECTDRAWSURFACE_VTABLE lpvtbl;
1046 DWORD ref;
1047 struct _common_directdrawsurface s;
1048 union {
1049 struct _dga_directdrawsurface dga;
1050 struct _xlib_directdrawsurface xlib;
1051 } t;
1053 #undef THIS
1054 #define THIS LPDIRECTDRAWSURFACE2 this
1056 typedef struct IDirectDrawSurface2_VTable {
1057 /*** IUnknown methods ***/
1058 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1059 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1060 STDMETHOD_(ULONG,Release) (THIS) PURE;
1061 /*** IDirectDrawSurface methods ***/
1062 STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
1063 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT32) PURE;
1064 STDMETHOD(Blt)(THIS_ LPRECT32,LPDIRECTDRAWSURFACE2, LPRECT32,DWORD, LPDDBLTFX) PURE;
1065 STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
1066 STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT32,DWORD) PURE;
1067 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
1068 STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1069 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1070 STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
1071 STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
1072 STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
1073 STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
1074 STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
1075 STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1076 STDMETHOD(GetDC)(THIS_ HDC32 FAR *) PURE;
1077 STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
1078 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
1079 STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
1080 STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
1081 STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
1082 STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
1083 STDMETHOD(IsLost)(THIS) PURE;
1084 STDMETHOD(Lock)(THIS_ LPRECT32,LPDDSURFACEDESC,DWORD,HANDLE32) PURE;
1085 STDMETHOD(ReleaseDC)(THIS_ HDC32) PURE;
1086 STDMETHOD(Restore)(THIS) PURE;
1087 STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
1088 STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1089 STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
1090 STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
1091 STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
1092 STDMETHOD(UpdateOverlay)(THIS_ LPRECT32, LPDIRECTDRAWSURFACE2,LPRECT32,DWORD, LPDDOVERLAYFX) PURE;
1093 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
1094 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
1095 /*** Added in the v2 interface ***/
1096 STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
1097 STDMETHOD(PageLock)(THIS_ DWORD) PURE;
1098 STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
1099 } *LPDIRECTDRAWSURFACE2_VTABLE,IDirectDrawSurface2_VTable;
1101 struct IDirectDrawSurface2 {
1102 LPDIRECTDRAWSURFACE2_VTABLE lpvtbl;
1103 DWORD ref;
1104 struct _common_directdrawsurface s;
1105 union {
1106 struct _dga_directdrawsurface dga;
1107 struct _xlib_directdrawsurface xshm;
1108 struct _xlib_directdrawsurface xlib;
1109 } t;
1111 #undef THIS
1112 #define THIS LPDIRECTDRAWSURFACE3 this
1114 typedef struct IDirectDrawSurface3_VTable {
1115 /*** IUnknown methods ***/
1116 /*00*/STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1117 /*04*/STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1118 /*08*/STDMETHOD_(ULONG,Release) (THIS) PURE;
1119 /*** IDirectDrawSurface methods ***/
1120 /*0c*/STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
1121 /*10*/STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT32) PURE;
1122 /*14*/STDMETHOD(Blt)(THIS_ LPRECT32,LPDIRECTDRAWSURFACE3, LPRECT32,DWORD, LPDDBLTFX) PURE;
1123 /*18*/STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
1124 /*1c*/STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT32,DWORD) PURE;
1125 /*20*/STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
1126 /*24*/STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1127 /*28*/STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
1128 /*2c*/STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
1129 /*30*/STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
1130 /*34*/STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
1131 /*38*/STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
1132 /*3c*/STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
1133 /*40*/STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1134 /*44*/STDMETHOD(GetDC)(THIS_ HDC32 FAR *) PURE;
1135 /*48*/STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
1136 /*4c*/STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
1137 /*50*/STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
1138 /*54*/STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
1139 /*58*/STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
1140 /*5c*/STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
1141 /*60*/STDMETHOD(IsLost)(THIS) PURE;
1142 /*64*/STDMETHOD(Lock)(THIS_ LPRECT32,LPDDSURFACEDESC,DWORD,HANDLE32) PURE;
1143 /*68*/STDMETHOD(ReleaseDC)(THIS_ HDC32) PURE;
1144 /*6c*/STDMETHOD(Restore)(THIS) PURE;
1145 /*70*/STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
1146 /*74*/STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
1147 /*78*/STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
1148 /*7c*/STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
1149 /*80*/STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
1150 /*84*/STDMETHOD(UpdateOverlay)(THIS_ LPRECT32, LPDIRECTDRAWSURFACE3,LPRECT32,DWORD, LPDDOVERLAYFX) PURE;
1151 /*88*/STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
1152 /*8c*/STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
1153 /*** Added in the v2 interface ***/
1154 /*90*/STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
1155 /*94*/STDMETHOD(PageLock)(THIS_ DWORD) PURE;
1156 /*98*/STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
1157 /*** Added in the V3 interface ***/
1158 /*9c*/STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
1159 } *LPDIRECTDRAWSURFACE3_VTABLE,IDirectDrawSurface3_VTable;
1161 struct IDirectDrawSurface3 {
1162 LPDIRECTDRAWSURFACE3_VTABLE lpvtbl;
1163 DWORD ref;
1164 struct _common_directdrawsurface s;
1165 union {
1166 struct _dga_directdrawsurface dga;
1167 struct _xlib_directdrawsurface xshm;
1168 struct _xlib_directdrawsurface xlib;
1169 } t;
1171 #undef THIS
1173 #define THIS LPDIRECTDRAWCOLORCONTROL this
1174 typedef struct IDirectDrawColorControl_VTable {
1175 /*** IUnknown methods ***/
1176 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
1177 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1178 STDMETHOD_(ULONG,Release) (THIS) PURE;
1179 /*** IDirectDrawColorControl methods ***/
1180 STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
1181 STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
1182 } IDirectDrawColorControl_VTable,*LPDIRECTDRAWCOLORCONTROL_VTABLE;
1184 struct IDirectDrawColorControl {
1185 LPDIRECTDRAWCOLORCONTROL_VTABLE lpvtbl;
1186 DWORD ref;
1188 #undef THIS
1190 #undef THIS_
1191 #undef PURE
1192 #undef FAR
1193 #undef STDMETHOD
1194 #undef STDMETHOD_
1196 HRESULT WINAPI DirectDrawCreate(LPGUID,LPDIRECTDRAW*,LPUNKNOWN);
1197 HRESULT WINAPI DirectDrawEnumerate32A(LPDDENUMCALLBACK32A,LPVOID);
1198 HRESULT WINAPI DirectDrawEnumerate32W(LPDDENUMCALLBACK32W,LPVOID);
1199 HRESULT WINAPI DirectDrawCreateClipper(DWORD,LPDIRECTDRAWCLIPPER*,LPUNKNOWN);
1200 #define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
1201 #endif