VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/ddraw.h@ 78046

Last change on this file since 78046 was 53206, checked in by vboxsync, 10 years ago

Devices/vmsvga: header fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 155.0 KB
Line 
1/*
2 * Copyright (C) the Wine project
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19/*
20 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef __DDRAW_INCLUDED__
29#define __DDRAW_INCLUDED__
30
31#define COM_NO_WINDOWS_H
32#include <objbase.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* defined(__cplusplus) */
37
38#ifndef DIRECTDRAW_VERSION
39#define DIRECTDRAW_VERSION 0x0700
40#endif /* DIRECTDRAW_VERSION */
41
42/*****************************************************************************
43 * Predeclare the interfaces
44 */
45#ifndef __DDRAW_GUID_DEFINED__
46DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
47DEFINE_GUID( CLSID_DirectDraw7, 0x3C305196,0x50DB,0x11D3,0x9C,0xFE,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
48DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
49DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
50DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
51DEFINE_GUID( IID_IDirectDraw3, 0x618f8ad4,0x8b7a,0x11d0,0x8f,0xcc,0x0,0xc0,0x4f,0xd9,0x18,0x9d );
52DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
53DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
54DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
55DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
56DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
57DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
58DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
59DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
60DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
61DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
62DEFINE_GUID( IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
63#endif
64
65typedef struct IDirectDraw *LPDIRECTDRAW;
66typedef struct IDirectDraw2 *LPDIRECTDRAW2;
67typedef struct IDirectDraw3 *LPDIRECTDRAW3;
68typedef struct IDirectDraw4 *LPDIRECTDRAW4;
69typedef struct IDirectDraw7 *LPDIRECTDRAW7;
70typedef struct IDirectDrawClipper *LPDIRECTDRAWCLIPPER;
71typedef struct IDirectDrawPalette *LPDIRECTDRAWPALETTE;
72typedef struct IDirectDrawSurface *LPDIRECTDRAWSURFACE;
73typedef struct IDirectDrawSurface2 *LPDIRECTDRAWSURFACE2;
74typedef struct IDirectDrawSurface3 *LPDIRECTDRAWSURFACE3;
75typedef struct IDirectDrawSurface4 *LPDIRECTDRAWSURFACE4;
76typedef struct IDirectDrawSurface7 *LPDIRECTDRAWSURFACE7;
77typedef struct IDirectDrawColorControl *LPDIRECTDRAWCOLORCONTROL;
78typedef struct IDirectDrawGammaControl *LPDIRECTDRAWGAMMACONTROL;
79
80
81#define DDENUMRET_CANCEL 0
82#define DDENUMRET_OK 1
83
84#define DD_OK S_OK
85#define DD_FALSE S_FALSE
86
87
88#define _FACDD 0x876
89#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
90
91#define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
92#define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
93#define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
94#define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
95#define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
96#define DDERR_GENERIC E_FAIL
97#define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
98#define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
99#define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
100#define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
101#define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
102#define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
103#define DDERR_INVALIDPARAMS E_INVALIDARG
104#define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
105#define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
106#define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
107#define DDERR_NO3D MAKE_DDHRESULT( 170 )
108#define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
109#define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
110#define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
111#define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
112#define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
113#define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
114#define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
115#define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
116#define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
117#define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
118#define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
119#define DDERR_NOGDI MAKE_DDHRESULT( 240 )
120#define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
121#define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
122#define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
123#define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
124#define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
125#define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
126#define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
127#define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
128#define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
129#define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
130#define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
131#define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
132#define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
133#define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
134#define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
135#define DDERR_OUTOFMEMORY E_OUTOFMEMORY
136#define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
137#define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
138#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
139#define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
140#define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
141#define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
142#define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
143#define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
144#define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
145#define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
146#define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
147#define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
148#define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
149#define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
150#define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
151#define DDERR_UNSUPPORTED E_NOTIMPL
152#define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
153#define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
154#define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
155#define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
156#define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
157#define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
158#define DDERR_XALIGN MAKE_DDHRESULT( 560 )
159#define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
160#define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
161#define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
162#define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
163#define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
164#define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
165#define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
166#define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
167#define DDERR_NOHWND MAKE_DDHRESULT( 569 )
168#define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
169#define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
170#define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
171#define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
172#define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
173#define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
174#define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
175#define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
176#define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
177#define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
178#define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
179#define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
180#define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
181#define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
182#define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
183#define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
184#define DDERR_NODC MAKE_DDHRESULT( 586 )
185#define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
186#define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
187#define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
188#define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
189#define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
190#define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
191#define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
192#define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
193#define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
194#define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
195#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
196#define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
197#define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
198#define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
199#define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
200#define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
201#define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
202#define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
203#define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
204#define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
205#define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
206#define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
207#define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
208#define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
209#define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
210
211/* dwFlags for Blt* */
212#define DDBLT_ALPHADEST 0x00000001
213#define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
214#define DDBLT_ALPHADESTNEG 0x00000004
215#define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
216#define DDBLT_ALPHAEDGEBLEND 0x00000010
217#define DDBLT_ALPHASRC 0x00000020
218#define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
219#define DDBLT_ALPHASRCNEG 0x00000080
220#define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
221#define DDBLT_ASYNC 0x00000200
222#define DDBLT_COLORFILL 0x00000400
223#define DDBLT_DDFX 0x00000800
224#define DDBLT_DDROPS 0x00001000
225#define DDBLT_KEYDEST 0x00002000
226#define DDBLT_KEYDESTOVERRIDE 0x00004000
227#define DDBLT_KEYSRC 0x00008000
228#define DDBLT_KEYSRCOVERRIDE 0x00010000
229#define DDBLT_ROP 0x00020000
230#define DDBLT_ROTATIONANGLE 0x00040000
231#define DDBLT_ZBUFFER 0x00080000
232#define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
233#define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000
234#define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
235#define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000
236#define DDBLT_WAIT 0x01000000
237#define DDBLT_DEPTHFILL 0x02000000
238#define DDBLT_DONOTWAIT 0x08000000
239
240/* dwTrans for BltFast */
241#define DDBLTFAST_NOCOLORKEY 0x00000000
242#define DDBLTFAST_SRCCOLORKEY 0x00000001
243#define DDBLTFAST_DESTCOLORKEY 0x00000002
244#define DDBLTFAST_WAIT 0x00000010
245#define DDBLTFAST_DONOTWAIT 0x00000020
246
247/* dwFlags for Flip */
248#define DDFLIP_WAIT 0x00000001
249#define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
250#define DDFLIP_ODD 0x00000004 /* only valid for overlay */
251#define DDFLIP_NOVSYNC 0x00000008
252#define DDFLIP_STEREO 0x00000010
253#define DDFLIP_DONOTWAIT 0x00000020
254#define DDFLIP_INTERVAL2 0x02000000
255#define DDFLIP_INTERVAL3 0x03000000
256#define DDFLIP_INTERVAL4 0x04000000
257
258
259/* dwFlags for GetBltStatus */
260#define DDGBS_CANBLT 0x00000001
261#define DDGBS_ISBLTDONE 0x00000002
262
263/* dwFlags for IDirectDrawSurface7::GetFlipStatus */
264#define DDGFS_CANFLIP __MSABI_LONG(1)
265#define DDGFS_ISFLIPDONE __MSABI_LONG(2)
266
267/* dwFlags for IDirectDrawSurface7::SetPrivateData */
268#define DDSPD_IUNKNOWNPOINTER __MSABI_LONG(1)
269#define DDSPD_VOLATILE __MSABI_LONG(2)
270
271/* DDSCAPS.dwCaps */
272/* reserved1, was 3d capable */
273#define DDSCAPS_RESERVED1 0x00000001
274/* surface contains alpha information */
275#define DDSCAPS_ALPHA 0x00000002
276/* this surface is a backbuffer */
277#define DDSCAPS_BACKBUFFER 0x00000004
278/* complex surface structure */
279#define DDSCAPS_COMPLEX 0x00000008
280/* part of surface flipping structure */
281#define DDSCAPS_FLIP 0x00000010
282/* this surface is the frontbuffer surface */
283#define DDSCAPS_FRONTBUFFER 0x00000020
284/* this is a plain offscreen surface */
285#define DDSCAPS_OFFSCREENPLAIN 0x00000040
286/* overlay */
287#define DDSCAPS_OVERLAY 0x00000080
288/* palette objects can be created and attached to us */
289#define DDSCAPS_PALETTE 0x00000100
290/* primary surface (the one the user looks at currently)(right eye)*/
291#define DDSCAPS_PRIMARYSURFACE 0x00000200
292/* primary surface for left eye */
293#define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
294/* surface exists in systemmemory */
295#define DDSCAPS_SYSTEMMEMORY 0x00000800
296/* surface can be used as a texture */
297#define DDSCAPS_TEXTURE 0x00001000
298/* surface may be destination for 3d rendering */
299#define DDSCAPS_3DDEVICE 0x00002000
300/* surface exists in videomemory */
301#define DDSCAPS_VIDEOMEMORY 0x00004000
302/* surface changes immediately visible */
303#define DDSCAPS_VISIBLE 0x00008000
304/* write only surface */
305#define DDSCAPS_WRITEONLY 0x00010000
306/* zbuffer surface */
307#define DDSCAPS_ZBUFFER 0x00020000
308/* has its own DC */
309#define DDSCAPS_OWNDC 0x00040000
310/* surface should be able to receive live video */
311#define DDSCAPS_LIVEVIDEO 0x00080000
312/* should be able to have a hw codec decompress stuff into it */
313#define DDSCAPS_HWCODEC 0x00100000
314/* mode X (320x200 or 320x240) surface */
315#define DDSCAPS_MODEX 0x00200000
316/* one mipmap surface (1 level) */
317#define DDSCAPS_MIPMAP 0x00400000
318#define DDSCAPS_RESERVED2 0x00800000
319/* memory allocation delayed until Load() */
320#define DDSCAPS_ALLOCONLOAD 0x04000000
321/* Indicates that the surface will receive data from a video port */
322#define DDSCAPS_VIDEOPORT 0x08000000
323/* surface is in local videomemory */
324#define DDSCAPS_LOCALVIDMEM 0x10000000
325/* surface is in nonlocal videomemory */
326#define DDSCAPS_NONLOCALVIDMEM 0x20000000
327/* surface is a standard VGA mode surface (NOT ModeX) */
328#define DDSCAPS_STANDARDVGAMODE 0x40000000
329/* optimized? surface */
330#define DDSCAPS_OPTIMIZED 0x80000000
331
332typedef struct _DDSCAPS {
333 DWORD dwCaps; /* capabilities of surface wanted */
334} DDSCAPS,*LPDDSCAPS;
335
336/* DDSCAPS2.dwCaps2 */
337/* indicates the surface will receive data from a video port using
338 deinterlacing hardware. */
339#define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002
340/* indicates the surface will be locked very frequently. */
341#define DDSCAPS2_HINTDYNAMIC 0x00000004
342/* indicates surface can be re-ordered or retiled on load() */
343#define DDSCAPS2_HINTSTATIC 0x00000008
344/* indicates surface to be managed by directdraw/direct3D */
345#define DDSCAPS2_TEXTUREMANAGE 0x00000010
346/* reserved bits */
347#define DDSCAPS2_RESERVED1 0x00000020
348#define DDSCAPS2_RESERVED2 0x00000040
349/* indicates surface will never be locked again */
350#define DDSCAPS2_OPAQUE 0x00000080
351/* set at CreateSurface() time to indicate antialiasing will be used */
352#define DDSCAPS2_HINTANTIALIASING 0x00000100
353/* set at CreateSurface() time to indicate cubic environment map */
354#define DDSCAPS2_CUBEMAP 0x00000200
355/* face flags for cube maps */
356#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
357#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
358#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
359#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
360#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
361#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
362/* specifies all faces of a cube for CreateSurface() */
363#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
364 DDSCAPS2_CUBEMAP_NEGATIVEX |\
365 DDSCAPS2_CUBEMAP_POSITIVEY |\
366 DDSCAPS2_CUBEMAP_NEGATIVEY |\
367 DDSCAPS2_CUBEMAP_POSITIVEZ |\
368 DDSCAPS2_CUBEMAP_NEGATIVEZ )
369/* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */
370#define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000
371/* indicates texture surface to be managed by Direct3D *only* */
372#define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000
373/* indicates managed surface that can safely be lost */
374#define DDSCAPS2_DONOTPERSIST 0x00040000
375/* indicates surface is part of a stereo flipping chain */
376#define DDSCAPS2_STEREOSURFACELEFT 0x00080000
377#define DDSCAPS2_VOLUME 0x00200000
378
379typedef struct _DDSCAPS2 {
380 DWORD dwCaps; /* capabilities of surface wanted */
381 DWORD dwCaps2; /* additional capabilities */
382 DWORD dwCaps3; /* reserved capabilities */
383 DWORD dwCaps4; /* more reserved capabilities */
384} DDSCAPS2,*LPDDSCAPS2;
385
386#define DD_ROP_SPACE (256/32) /* space required to store ROP array */
387
388typedef struct _DDCAPS_DX7 /* DirectX 7 version of caps struct */
389{
390 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
391 DWORD dwCaps; /* driver specific capabilities */
392 DWORD dwCaps2; /* more driver specific capabilities */
393 DWORD dwCKeyCaps; /* color key capabilities of the surface */
394 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
395 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
396 DWORD dwPalCaps; /* palette capabilities */
397 DWORD dwSVCaps; /* stereo vision capabilities */
398 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
399 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
400 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
401 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
402 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
403 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
404 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
405 DWORD dwVidMemTotal; /* total amount of video memory */
406 DWORD dwVidMemFree; /* amount of free video memory */
407 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
408 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
409 DWORD dwNumFourCCCodes; /* number of four cc codes */
410 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
411 DWORD dwAlignSizeSrc; /* source rectangle byte size */
412 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
413 DWORD dwAlignSizeDest; /* dest rectangle byte size */
414 DWORD dwAlignStrideAlign; /* stride alignment */
415 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
416 DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
417 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
418 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
419 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
420 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
421 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
422 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
423 DWORD dwReserved1;
424 DWORD dwReserved2;
425 DWORD dwReserved3;
426 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
427 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
428 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
429 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
430 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
431 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
432 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
433 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
434 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
435 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
436 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
437 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
438 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
439 DWORD dwCurrVideoPorts; /* current number of video ports used */
440 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
441 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
442 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
443 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
444 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
445 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
446 DDSCAPS2 ddsCaps; /* surface capabilities */
447} DDCAPS_DX7,*LPDDCAPS_DX7;
448
449typedef struct _DDCAPS_DX6 /* DirectX 6 version of caps struct */
450{
451 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
452 DWORD dwCaps; /* driver specific capabilities */
453 DWORD dwCaps2; /* more driver specific capabilities */
454 DWORD dwCKeyCaps; /* color key capabilities of the surface */
455 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
456 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
457 DWORD dwPalCaps; /* palette capabilities */
458 DWORD dwSVCaps; /* stereo vision capabilities */
459 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
460 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
461 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
462 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
463 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
464 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
465 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
466 DWORD dwVidMemTotal; /* total amount of video memory */
467 DWORD dwVidMemFree; /* amount of free video memory */
468 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
469 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
470 DWORD dwNumFourCCCodes; /* number of four cc codes */
471 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
472 DWORD dwAlignSizeSrc; /* source rectangle byte size */
473 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
474 DWORD dwAlignSizeDest; /* dest rectangle byte size */
475 DWORD dwAlignStrideAlign; /* stride alignment */
476 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
477 DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
478 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
479 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
480 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
481 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
482 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
483 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
484 DWORD dwReserved1;
485 DWORD dwReserved2;
486 DWORD dwReserved3;
487 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
488 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
489 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
490 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
491 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
492 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
493 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
494 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
495 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
496 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
497 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
498 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
499 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
500 DWORD dwCurrVideoPorts; /* current number of video ports used */
501 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
502 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
503 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
504 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
505 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
506 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
507 /* and one new member for DirectX 6 */
508 DDSCAPS2 ddsCaps; /* surface capabilities */
509} DDCAPS_DX6,*LPDDCAPS_DX6;
510
511typedef struct _DDCAPS_DX5 /* DirectX5 version of caps struct */
512{
513 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
514 DWORD dwCaps; /* driver specific capabilities */
515 DWORD dwCaps2; /* more driver specific capabilities */
516 DWORD dwCKeyCaps; /* color key capabilities of the surface */
517 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
518 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
519 DWORD dwPalCaps; /* palette capabilities */
520 DWORD dwSVCaps; /* stereo vision capabilities */
521 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
522 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
523 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
524 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
525 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
526 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
527 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
528 DWORD dwVidMemTotal; /* total amount of video memory */
529 DWORD dwVidMemFree; /* amount of free video memory */
530 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
531 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
532 DWORD dwNumFourCCCodes; /* number of four cc codes */
533 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
534 DWORD dwAlignSizeSrc; /* source rectangle byte size */
535 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
536 DWORD dwAlignSizeDest; /* dest rectangle byte size */
537 DWORD dwAlignStrideAlign; /* stride alignment */
538 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
539 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
540 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
541 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
542 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
543 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
544 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
545 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
546 DWORD dwReserved1;
547 DWORD dwReserved2;
548 DWORD dwReserved3;
549 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
550 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
551 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
552 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
553 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
554 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
555 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
556 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
557 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
558 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
559 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
560 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
561 /* the following are the new DirectX 5 members */
562 DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
563 DWORD dwCurrVideoPorts; /* current number of video ports used */
564 DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
565 DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
566 DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
567 DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
568 DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
569 DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */
570} DDCAPS_DX5,*LPDDCAPS_DX5;
571
572typedef struct _DDCAPS_DX3 /* DirectX3 version of caps struct */
573{
574 DWORD dwSize; /* size of the DDDRIVERCAPS structure */
575 DWORD dwCaps; /* driver specific capabilities */
576 DWORD dwCaps2; /* more driver specific capabilities */
577 DWORD dwCKeyCaps; /* color key capabilities of the surface */
578 DWORD dwFXCaps; /* driver specific stretching and effects capabilities */
579 DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
580 DWORD dwPalCaps; /* palette capabilities */
581 DWORD dwSVCaps; /* stereo vision capabilities */
582 DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
583 DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
584 DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
585 DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
586 DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
587 DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
588 DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
589 DWORD dwVidMemTotal; /* total amount of video memory */
590 DWORD dwVidMemFree; /* amount of free video memory */
591 DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
592 DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
593 DWORD dwNumFourCCCodes; /* number of four cc codes */
594 DWORD dwAlignBoundarySrc; /* source rectangle alignment */
595 DWORD dwAlignSizeSrc; /* source rectangle byte size */
596 DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
597 DWORD dwAlignSizeDest; /* dest rectangle byte size */
598 DWORD dwAlignStrideAlign; /* stride alignment */
599 DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */
600 DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
601 DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
602 DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
603 DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
604 DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
605 DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
606 DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
607 DWORD dwReserved1;
608 DWORD dwReserved2;
609 DWORD dwReserved3;
610 DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
611 DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
612 DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
613 DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */
614 DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
615 DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
616 DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
617 DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */
618 DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
619 DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
620 DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
621 DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */
622 DWORD dwReserved4;
623 DWORD dwReserved5;
624 DWORD dwReserved6;
625} DDCAPS_DX3,*LPDDCAPS_DX3;
626
627/* set caps struct according to DIRECTDRAW_VERSION */
628
629#if DIRECTDRAW_VERSION <= 0x300
630typedef DDCAPS_DX3 DDCAPS;
631#elif DIRECTDRAW_VERSION <= 0x500
632typedef DDCAPS_DX5 DDCAPS;
633#elif DIRECTDRAW_VERSION <= 0x600
634typedef DDCAPS_DX6 DDCAPS;
635#else
636typedef DDCAPS_DX7 DDCAPS;
637#endif
638
639typedef DDCAPS *LPDDCAPS;
640
641/* DDCAPS.dwCaps */
642#define DDCAPS_3D 0x00000001
643#define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
644#define DDCAPS_ALIGNSIZEDEST 0x00000004
645#define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
646#define DDCAPS_ALIGNSIZESRC 0x00000010
647#define DDCAPS_ALIGNSTRIDE 0x00000020
648#define DDCAPS_BLT 0x00000040
649#define DDCAPS_BLTQUEUE 0x00000080
650#define DDCAPS_BLTFOURCC 0x00000100
651#define DDCAPS_BLTSTRETCH 0x00000200
652#define DDCAPS_GDI 0x00000400
653#define DDCAPS_OVERLAY 0x00000800
654#define DDCAPS_OVERLAYCANTCLIP 0x00001000
655#define DDCAPS_OVERLAYFOURCC 0x00002000
656#define DDCAPS_OVERLAYSTRETCH 0x00004000
657#define DDCAPS_PALETTE 0x00008000
658#define DDCAPS_PALETTEVSYNC 0x00010000
659#define DDCAPS_READSCANLINE 0x00020000
660#define DDCAPS_STEREOVIEW 0x00040000
661#define DDCAPS_VBI 0x00080000
662#define DDCAPS_ZBLTS 0x00100000
663#define DDCAPS_ZOVERLAYS 0x00200000
664#define DDCAPS_COLORKEY 0x00400000
665#define DDCAPS_ALPHA 0x00800000
666#define DDCAPS_COLORKEYHWASSIST 0x01000000
667#define DDCAPS_NOHARDWARE 0x02000000
668#define DDCAPS_BLTCOLORFILL 0x04000000
669#define DDCAPS_BANKSWITCHED 0x08000000
670#define DDCAPS_BLTDEPTHFILL 0x10000000
671#define DDCAPS_CANCLIP 0x20000000
672#define DDCAPS_CANCLIPSTRETCHED 0x40000000
673#define DDCAPS_CANBLTSYSMEM 0x80000000
674
675/* DDCAPS.dwCaps2 */
676#define DDCAPS2_CERTIFIED 0x00000001
677#define DDCAPS2_NO2DDURING3DSCENE 0x00000002
678#define DDCAPS2_VIDEOPORT 0x00000004
679#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
680#define DDCAPS2_CANBOBINTERLEAVED 0x00000010
681#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
682#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
683#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
684#define DDCAPS2_CANDROPZ16BIT 0x00000100
685#define DDCAPS2_NONLOCALVIDMEM 0x00000200
686#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
687#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
688#define DDCAPS2_WIDESURFACES 0x00001000
689#define DDCAPS2_CANFLIPODDEVEN 0x00002000
690#define DDCAPS2_CANBOBHARDWARE 0x00004000
691#define DDCAPS2_COPYFOURCC 0x00008000
692#define DDCAPS2_PRIMARYGAMMA 0x00020000
693#define DDCAPS2_CANRENDERWINDOWED 0x00080000
694#define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
695#define DDCAPS2_FLIPINTERVAL 0x00200000
696#define DDCAPS2_FLIPNOVSYNC 0x00400000
697#define DDCAPS2_CANMANAGETEXTURE 0x00800000
698#define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
699#define DDCAPS2_STEREO 0x02000000
700#define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
701
702
703/* Set/Get Colour Key Flags */
704#define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
705#define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
706#define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
707#define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
708#define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
709
710typedef struct _DDCOLORKEY
711{
712 DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
713 * be treated as Color Key, inclusive
714 */
715 DWORD dwColorSpaceHighValue;/* high boundary of color space that is
716 * to be treated as Color Key, inclusive
717 */
718} DDCOLORKEY,*LPDDCOLORKEY;
719
720/* ddCKEYCAPS bits */
721#define DDCKEYCAPS_DESTBLT 0x00000001
722#define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
723#define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
724#define DDCKEYCAPS_DESTBLTYUV 0x00000008
725#define DDCKEYCAPS_DESTOVERLAY 0x00000010
726#define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
727#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
728#define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
729#define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
730#define DDCKEYCAPS_SRCBLT 0x00000200
731#define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
732#define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
733#define DDCKEYCAPS_SRCBLTYUV 0x00001000
734#define DDCKEYCAPS_SRCOVERLAY 0x00002000
735#define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
736#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
737#define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
738#define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
739#define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
740
741typedef struct _DDPIXELFORMAT {
742 DWORD dwSize; /* 0: size of structure */
743 DWORD dwFlags; /* 4: pixel format flags */
744 DWORD dwFourCC; /* 8: (FOURCC code) */
745 union {
746 DWORD dwRGBBitCount; /* C: how many bits per pixel */
747 DWORD dwYUVBitCount; /* C: how many bits per pixel */
748 DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
749 DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
750 DWORD dwLuminanceBitCount;
751 DWORD dwBumpBitCount;
752 } DUMMYUNIONNAME1;
753 union {
754 DWORD dwRBitMask; /* 10: mask for red bit*/
755 DWORD dwYBitMask; /* 10: mask for Y bits*/
756 DWORD dwStencilBitDepth;
757 DWORD dwLuminanceBitMask;
758 DWORD dwBumpDuBitMask;
759 } DUMMYUNIONNAME2;
760 union {
761 DWORD dwGBitMask; /* 14: mask for green bits*/
762 DWORD dwUBitMask; /* 14: mask for U bits*/
763 DWORD dwZBitMask;
764 DWORD dwBumpDvBitMask;
765 } DUMMYUNIONNAME3;
766 union {
767 DWORD dwBBitMask; /* 18: mask for blue bits*/
768 DWORD dwVBitMask; /* 18: mask for V bits*/
769 DWORD dwStencilBitMask;
770 DWORD dwBumpLuminanceBitMask;
771 } DUMMYUNIONNAME4;
772 union {
773 DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
774 DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
775 DWORD dwLuminanceAlphaBitMask;
776 DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
777 DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
778 } DUMMYUNIONNAME5;
779 /* 20: next structure */
780} DDPIXELFORMAT,*LPDDPIXELFORMAT;
781
782#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
783 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
784 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
785
786/* DDCAPS.dwFXCaps */
787#define DDFXCAPS_BLTALPHA 0x00000001
788#define DDFXCAPS_OVERLAYALPHA 0x00000004
789#define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
790#define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
791#define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
792#define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
793#define DDFXCAPS_BLTROTATION 0x00000100
794#define DDFXCAPS_BLTROTATION90 0x00000200
795#define DDFXCAPS_BLTSHRINKX 0x00000400
796#define DDFXCAPS_BLTSHRINKXN 0x00000800
797#define DDFXCAPS_BLTSHRINKY 0x00001000
798#define DDFXCAPS_BLTSHRINKYN 0x00002000
799#define DDFXCAPS_BLTSTRETCHX 0x00004000
800#define DDFXCAPS_BLTSTRETCHXN 0x00008000
801#define DDFXCAPS_BLTSTRETCHY 0x00010000
802#define DDFXCAPS_BLTSTRETCHYN 0x00020000
803#define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
804#define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
805#define DDFXCAPS_OVERLAYSHRINKX 0x00080000
806#define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
807#define DDFXCAPS_OVERLAYSHRINKY 0x00200000
808#define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
809#define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
810#define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
811#define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
812#define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
813#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
814#define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
815
816#define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
817
818/* DDCAPS.dwFXAlphaCaps */
819#define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
820#define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
821#define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
822#define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
823#define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
824#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
825#define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
826#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
827#define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
828#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
829
830/* DDCAPS.dwPalCaps */
831#define DDPCAPS_4BIT 0x00000001
832#define DDPCAPS_8BITENTRIES 0x00000002
833#define DDPCAPS_8BIT 0x00000004
834#define DDPCAPS_INITIALIZE 0x00000008
835#define DDPCAPS_PRIMARYSURFACE 0x00000010
836#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
837#define DDPCAPS_ALLOW256 0x00000040
838#define DDPCAPS_VSYNC 0x00000080
839#define DDPCAPS_1BIT 0x00000100
840#define DDPCAPS_2BIT 0x00000200
841#define DDPCAPS_ALPHA 0x00000400
842
843/* DDCAPS.dwSVCaps */
844/* the first 4 of these are now obsolete */
845#if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */
846#define DDSVCAPS_RESERVED1 0x00000001
847#define DDSVCAPS_RESERVED2 0x00000002
848#define DDSVCAPS_RESERVED3 0x00000004
849#define DDSVCAPS_RESERVED4 0x00000008
850#else
851#define DDSVCAPS_ENIGMA 0x00000001
852#define DDSVCAPS_FLICKER 0x00000002
853#define DDSVCAPS_REDBLUE 0x00000004
854#define DDSVCAPS_SPLIT 0x00000008
855#endif
856#define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
857
858/* BitDepths */
859#define DDBD_1 0x00004000
860#define DDBD_2 0x00002000
861#define DDBD_4 0x00001000
862#define DDBD_8 0x00000800
863#define DDBD_16 0x00000400
864#define DDBD_24 0x00000200
865#define DDBD_32 0x00000100
866
867/* DDOVERLAYFX.dwDDFX */
868#define DDOVERFX_ARITHSTRETCHY 0x00000001
869#define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
870#define DDOVERFX_MIRRORUPDOWN 0x00000004
871
872/* UpdateOverlay flags */
873#define DDOVER_ALPHADEST 0x00000001
874#define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
875#define DDOVER_ALPHADESTNEG 0x00000004
876#define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
877#define DDOVER_ALPHAEDGEBLEND 0x00000010
878#define DDOVER_ALPHASRC 0x00000020
879#define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
880#define DDOVER_ALPHASRCNEG 0x00000080
881#define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
882#define DDOVER_HIDE 0x00000200
883#define DDOVER_KEYDEST 0x00000400
884#define DDOVER_KEYDESTOVERRIDE 0x00000800
885#define DDOVER_KEYSRC 0x00001000
886#define DDOVER_KEYSRCOVERRIDE 0x00002000
887#define DDOVER_SHOW 0x00004000
888#define DDOVER_ADDDIRTYRECT 0x00008000
889#define DDOVER_REFRESHDIRTYRECTS 0x00010000
890#define DDOVER_REFRESHALL 0x00020000
891#define DDOVER_DDFX 0x00080000
892#define DDOVER_AUTOFLIP 0x00100000
893#define DDOVER_BOB 0x00200000
894#define DDOVER_OVERRIDEBOBWEAVE 0x00400000
895#define DDOVER_INTERLEAVED 0x00800000
896
897/* DDPIXELFORMAT.dwFlags */
898#define DDPF_ALPHAPIXELS 0x00000001
899#define DDPF_ALPHA 0x00000002
900#define DDPF_FOURCC 0x00000004
901#define DDPF_PALETTEINDEXED4 0x00000008
902#define DDPF_PALETTEINDEXEDTO8 0x00000010
903#define DDPF_PALETTEINDEXED8 0x00000020
904#define DDPF_RGB 0x00000040
905#define DDPF_COMPRESSED 0x00000080
906#define DDPF_RGBTOYUV 0x00000100
907#define DDPF_YUV 0x00000200
908#define DDPF_ZBUFFER 0x00000400
909#define DDPF_PALETTEINDEXED1 0x00000800
910#define DDPF_PALETTEINDEXED2 0x00001000
911#define DDPF_ZPIXELS 0x00002000
912#define DDPF_STENCILBUFFER 0x00004000
913#define DDPF_ALPHAPREMULT 0x00008000
914#define DDPF_LUMINANCE 0x00020000
915#define DDPF_BUMPLUMINANCE 0x00040000
916#define DDPF_BUMPDUDV 0x00080000
917
918/* SetCooperativeLevel dwFlags */
919#define DDSCL_FULLSCREEN 0x00000001
920#define DDSCL_ALLOWREBOOT 0x00000002
921#define DDSCL_NOWINDOWCHANGES 0x00000004
922#define DDSCL_NORMAL 0x00000008
923#define DDSCL_EXCLUSIVE 0x00000010
924#define DDSCL_ALLOWMODEX 0x00000040
925#define DDSCL_SETFOCUSWINDOW 0x00000080
926#define DDSCL_SETDEVICEWINDOW 0x00000100
927#define DDSCL_CREATEDEVICEWINDOW 0x00000200
928#define DDSCL_MULTITHREADED 0x00000400
929#define DDSCL_FPUSETUP 0x00000800
930#define DDSCL_FPUPRESERVE 0x00001000
931
932
933/* DDSURFACEDESC.dwFlags */
934#define DDSD_CAPS 0x00000001
935#define DDSD_HEIGHT 0x00000002
936#define DDSD_WIDTH 0x00000004
937#define DDSD_PITCH 0x00000008
938#define DDSD_BACKBUFFERCOUNT 0x00000020
939#define DDSD_ZBUFFERBITDEPTH 0x00000040
940#define DDSD_ALPHABITDEPTH 0x00000080
941#define DDSD_LPSURFACE 0x00000800
942#define DDSD_PIXELFORMAT 0x00001000
943#define DDSD_CKDESTOVERLAY 0x00002000
944#define DDSD_CKDESTBLT 0x00004000
945#define DDSD_CKSRCOVERLAY 0x00008000
946#define DDSD_CKSRCBLT 0x00010000
947#define DDSD_MIPMAPCOUNT 0x00020000
948#define DDSD_REFRESHRATE 0x00040000
949#define DDSD_LINEARSIZE 0x00080000
950#define DDSD_TEXTURESTAGE 0x00100000
951#define DDSD_FVF 0x00200000
952#define DDSD_SRCVBHANDLE 0x00400000
953#define DDSD_DEPTH 0x00800000
954#define DDSD_ALL 0x00fff9ee
955
956/* EnumSurfaces flags */
957#define DDENUMSURFACES_ALL 0x00000001
958#define DDENUMSURFACES_MATCH 0x00000002
959#define DDENUMSURFACES_NOMATCH 0x00000004
960#define DDENUMSURFACES_CANBECREATED 0x00000008
961#define DDENUMSURFACES_DOESEXIST 0x00000010
962
963/* SetDisplayMode flags */
964#define DDSDM_STANDARDVGAMODE 0x00000001
965
966/* EnumDisplayModes flags */
967#define DDEDM_REFRESHRATES 0x00000001
968#define DDEDM_STANDARDVGAMODES 0x00000002
969
970/* WaitForVerticalDisplay flags */
971
972#define DDWAITVB_BLOCKBEGIN 0x00000001
973#define DDWAITVB_BLOCKBEGINEVENT 0x00000002
974#define DDWAITVB_BLOCKEND 0x00000004
975
976typedef struct _DDSURFACEDESC
977{
978 DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
979 DWORD dwFlags; /* 4: determines what fields are valid*/
980 DWORD dwHeight; /* 8: height of surface to be created*/
981 DWORD dwWidth; /* C: width of input surface*/
982 union {
983 LONG lPitch; /* 10: distance to start of next line (return value only)*/
984 DWORD dwLinearSize;
985 } DUMMYUNIONNAME1;
986 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
987 union {
988 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
989 DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
990 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
991 } DUMMYUNIONNAME2;
992 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
993 DWORD dwReserved; /* 20:reserved*/
994 void *lpSurface; /* 24:pointer to the associated surface memory*/
995 DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
996 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
997 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
998 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
999 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
1000 DDSCAPS ddsCaps; /* 68: direct draw surface caps */
1001} DDSURFACEDESC,*LPDDSURFACEDESC;
1002
1003typedef struct _DDSURFACEDESC2
1004{
1005 DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
1006 DWORD dwFlags; /* 4: determines what fields are valid*/
1007 DWORD dwHeight; /* 8: height of surface to be created*/
1008 DWORD dwWidth; /* C: width of input surface*/
1009 union {
1010 LONG lPitch; /*10: distance to start of next line (return value only)*/
1011 DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
1012 } DUMMYUNIONNAME1;
1013 DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
1014 union {
1015 DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
1016 DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
1017 DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
1018 } DUMMYUNIONNAME2;
1019 DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
1020 DWORD dwReserved; /* 20:reserved*/
1021 void *lpSurface; /* 24:pointer to the associated surface memory*/
1022 union {
1023 DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
1024 DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
1025 } DUMMYUNIONNAME3;
1026 DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
1027 DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
1028 DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
1029
1030 union {
1031 DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
1032 DWORD dwFVF; /* 48: vertex format description of vertex buffers */
1033 } DUMMYUNIONNAME4;
1034 DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
1035 DWORD dwTextureStage; /* 78: stage in multitexture cascade */
1036} DDSURFACEDESC2,*LPDDSURFACEDESC2;
1037
1038/* DDCOLORCONTROL.dwFlags */
1039#define DDCOLOR_BRIGHTNESS 0x00000001
1040#define DDCOLOR_CONTRAST 0x00000002
1041#define DDCOLOR_HUE 0x00000004
1042#define DDCOLOR_SATURATION 0x00000008
1043#define DDCOLOR_SHARPNESS 0x00000010
1044#define DDCOLOR_GAMMA 0x00000020
1045#define DDCOLOR_COLORENABLE 0x00000040
1046
1047typedef struct {
1048 DWORD dwSize;
1049 DWORD dwFlags;
1050 LONG lBrightness;
1051 LONG lContrast;
1052 LONG lHue;
1053 LONG lSaturation;
1054 LONG lSharpness;
1055 LONG lGamma;
1056 LONG lColorEnable;
1057 DWORD dwReserved1;
1058} DDCOLORCONTROL,*LPDDCOLORCONTROL;
1059
1060typedef struct {
1061 WORD red[256];
1062 WORD green[256];
1063 WORD blue[256];
1064} DDGAMMARAMP,*LPDDGAMMARAMP;
1065
1066typedef BOOL (CALLBACK *LPDDENUMCALLBACKA)(GUID *guid, char *driver_description, char *driver_name, void *ctx);
1067typedef BOOL (CALLBACK *LPDDENUMCALLBACKW)(GUID *guid, WCHAR *driver_description, WCHAR *driver_name, void *ctx);
1068DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
1069
1070typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK)(DDSURFACEDESC *desc, void *ctx);
1071typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK2)(DDSURFACEDESC2 *desc, void *ctx);
1072typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK)(struct IDirectDrawSurface *surface,
1073 DDSURFACEDESC *surface_desc, void *ctx);
1074typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK2)(struct IDirectDrawSurface4 *surface,
1075 DDSURFACEDESC2 *surface_desc, void *ctx);
1076typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK7)(struct IDirectDrawSurface7 *surface,
1077 DDSURFACEDESC2 *surface_desc, void *ctx);
1078
1079typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXA)(GUID *guid, char *driver_description,
1080 char *driver_name, void *ctx, HMONITOR monitor);
1081typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXW)(GUID *guid, WCHAR *driver_description,
1082 WCHAR *driver_name, void *ctx, HMONITOR monitor);
1083DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
1084
1085HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA cb, void *ctx);
1086HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW cb, void *ctx);
1087#define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
1088
1089HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA cb, void *ctx, DWORD flags);
1090HRESULT WINAPI DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW cb, void *ctx, DWORD flags);
1091#define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx)
1092
1093typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)(LPDDENUMCALLBACKEXA cb, void *ctx, DWORD flags);
1094typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)(LPDDENUMCALLBACKEXW cb, void *ctx, DWORD flags);
1095DECL_WINELIB_TYPE_AW(LPDIRECTDRAWENUMERATEEX)
1096
1097/* flags for DirectDrawEnumerateEx */
1098#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
1099#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
1100#define DDENUM_NONDISPLAYDEVICES 0x00000004
1101
1102/* flags for DirectDrawCreate or IDirectDraw::Initialize */
1103#define DDCREATE_HARDWAREONLY __MSABI_LONG(1)
1104#define DDCREATE_EMULATIONONLY __MSABI_LONG(2)
1105
1106typedef struct _DDBLTFX
1107{
1108 DWORD dwSize; /* size of structure */
1109 DWORD dwDDFX; /* FX operations */
1110 DWORD dwROP; /* Win32 raster operations */
1111 DWORD dwDDROP; /* Raster operations new for DirectDraw */
1112 DWORD dwRotationAngle; /* Rotation angle for blt */
1113 DWORD dwZBufferOpCode; /* ZBuffer compares */
1114 DWORD dwZBufferLow; /* Low limit of Z buffer */
1115 DWORD dwZBufferHigh; /* High limit of Z buffer */
1116 DWORD dwZBufferBaseDest; /* Destination base value */
1117 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
1118 union
1119 {
1120 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
1121 struct IDirectDrawSurface *lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
1122 } DUMMYUNIONNAME1;
1123 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
1124 union
1125 {
1126 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
1127 struct IDirectDrawSurface *lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
1128 } DUMMYUNIONNAME2;
1129 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1130 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
1131 DWORD dwReserved;
1132 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1133 union
1134 {
1135 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
1136 struct IDirectDrawSurface *lpDDSAlphaDest; /* Surface to use as Alpha Channel */
1137 } DUMMYUNIONNAME3;
1138 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1139 union
1140 {
1141 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
1142 struct IDirectDrawSurface *lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
1143 } DUMMYUNIONNAME4;
1144 union
1145 {
1146 DWORD dwFillColor; /* color in RGB or Palettized */
1147 DWORD dwFillDepth; /* depth value for z-buffer */
1148 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
1149 struct IDirectDrawSurface *lpDDSPattern; /* Surface to use as pattern */
1150 } DUMMYUNIONNAME5;
1151 DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
1152 DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
1153} DDBLTFX,*LPDDBLTFX;
1154
1155/* dwDDFX */
1156/* arithmetic stretching along y axis */
1157#define DDBLTFX_ARITHSTRETCHY 0x00000001
1158/* mirror on y axis */
1159#define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
1160/* mirror on x axis */
1161#define DDBLTFX_MIRRORUPDOWN 0x00000004
1162/* do not tear */
1163#define DDBLTFX_NOTEARING 0x00000008
1164/* 180 degrees clockwise rotation */
1165#define DDBLTFX_ROTATE180 0x00000010
1166/* 270 degrees clockwise rotation */
1167#define DDBLTFX_ROTATE270 0x00000020
1168/* 90 degrees clockwise rotation */
1169#define DDBLTFX_ROTATE90 0x00000040
1170/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1171#define DDBLTFX_ZBUFFERRANGE 0x00000080
1172/* add dwZBufferBaseDest to every source z value before compare */
1173#define DDBLTFX_ZBUFFERBASEDEST 0x00000100
1174
1175typedef struct _DDOVERLAYFX
1176{
1177 DWORD dwSize; /* size of structure */
1178 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1179 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
1180 DWORD dwReserved;
1181 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1182 union
1183 {
1184 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
1185 struct IDirectDrawSurface *lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
1186 } DUMMYUNIONNAME1;
1187 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1188 union
1189 {
1190 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
1191 struct IDirectDrawSurface *lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
1192 } DUMMYUNIONNAME2;
1193 DDCOLORKEY dckDestColorkey; /* DestColorkey override */
1194 DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
1195 DWORD dwDDFX; /* Overlay FX */
1196 DWORD dwFlags; /* flags */
1197} DDOVERLAYFX,*LPDDOVERLAYFX;
1198
1199typedef struct _DDBLTBATCH
1200{
1201 RECT *lprDest;
1202 struct IDirectDrawSurface *lpDDSSrc;
1203 RECT *lprSrc;
1204 DWORD dwFlags;
1205 DDBLTFX *lpDDBltFx;
1206} DDBLTBATCH,*LPDDBLTBATCH;
1207
1208#define MAX_DDDEVICEID_STRING 512
1209
1210#define DDGDI_GETHOSTIDENTIFIER 1
1211
1212typedef struct tagDDDEVICEIDENTIFIER {
1213 char szDriver[MAX_DDDEVICEID_STRING];
1214 char szDescription[MAX_DDDEVICEID_STRING];
1215 LARGE_INTEGER liDriverVersion;
1216 DWORD dwVendorId;
1217 DWORD dwDeviceId;
1218 DWORD dwSubSysId;
1219 DWORD dwRevision;
1220 GUID guidDeviceIdentifier;
1221} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
1222
1223typedef struct tagDDDEVICEIDENTIFIER2 {
1224 char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
1225 char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
1226 LARGE_INTEGER liDriverVersion; /* driver version */
1227 DWORD dwVendorId; /* vendor ID, zero if unknown */
1228 DWORD dwDeviceId; /* chipset ID, zero if unknown */
1229 DWORD dwSubSysId; /* board ID, zero if unknown */
1230 DWORD dwRevision; /* chipset version, zero if unknown */
1231 GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
1232 DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
1233} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
1234
1235/*****************************************************************************
1236 * IDirectDrawPalette interface
1237 */
1238#undef INTERFACE
1239#define INTERFACE IDirectDrawPalette
1240DECLARE_INTERFACE_(IDirectDrawPalette,IUnknown)
1241{
1242 /*** IUnknown methods ***/
1243 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1244 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1245 STDMETHOD_(ULONG,Release)(THIS) PURE;
1246 /*** IDirectDrawPalette methods ***/
1247 STDMETHOD(GetCaps)(THIS_ LPDWORD lpdwCaps) PURE;
1248 STDMETHOD(GetEntries)(THIS_ DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) PURE;
1249 STDMETHOD(Initialize)(THIS_ struct IDirectDraw *ddraw, DWORD flags, PALETTEENTRY *color_table) PURE;
1250 STDMETHOD(SetEntries)(THIS_ DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries) PURE;
1251};
1252#undef INTERFACE
1253
1254#if !defined(__cplusplus) || defined(CINTERFACE)
1255/*** IUnknown methods ***/
1256#define IDirectDrawPalette_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1257#define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
1258#define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
1259/*** IDirectDrawPalette methods ***/
1260#define IDirectDrawPalette_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
1261#define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->lpVtbl->GetEntries(p,a,b,c,d)
1262#define IDirectDrawPalette_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1263#define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->lpVtbl->SetEntries(p,a,b,c,d)
1264#else
1265/*** IUnknown methods ***/
1266#define IDirectDrawPalette_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1267#define IDirectDrawPalette_AddRef(p) (p)->AddRef()
1268#define IDirectDrawPalette_Release(p) (p)->Release()
1269/*** IDirectDrawPalette methods ***/
1270#define IDirectDrawPalette_GetCaps(p,a) (p)->GetCaps(a)
1271#define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->GetEntries(a,b,c,d)
1272#define IDirectDrawPalette_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1273#define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->SetEntries(a,b,c,d)
1274#endif
1275
1276
1277/*****************************************************************************
1278 * IDirectDrawClipper interface
1279 */
1280#define INTERFACE IDirectDrawClipper
1281DECLARE_INTERFACE_(IDirectDrawClipper,IUnknown)
1282{
1283 /*** IUnknown methods ***/
1284 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1285 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1286 STDMETHOD_(ULONG,Release)(THIS) PURE;
1287 /*** IDirectDrawClipper methods ***/
1288 STDMETHOD(GetClipList)(THIS_ LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize) PURE;
1289 STDMETHOD(GetHWnd)(THIS_ HWND *lphWnd) PURE;
1290 STDMETHOD(Initialize)(THIS_ struct IDirectDraw *ddraw, DWORD flags) PURE;
1291 STDMETHOD(IsClipListChanged)(THIS_ BOOL *lpbChanged) PURE;
1292 STDMETHOD(SetClipList)(THIS_ LPRGNDATA lpClipList, DWORD dwFlags) PURE;
1293 STDMETHOD(SetHWnd)(THIS_ DWORD dwFlags, HWND hWnd) PURE;
1294};
1295#undef INTERFACE
1296
1297#if !defined(__cplusplus) || defined(CINTERFACE)
1298/*** IUnknown methods ***/
1299#define IDirectDrawClipper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1300#define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
1301#define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
1302/*** IDirectDrawClipper methods ***/
1303#define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->lpVtbl->GetClipList(p,a,b,c)
1304#define IDirectDrawClipper_GetHWnd(p,a) (p)->lpVtbl->GetHWnd(p,a)
1305#define IDirectDrawClipper_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1306#define IDirectDrawClipper_IsClipListChanged(p,a) (p)->lpVtbl->IsClipListChanged(p,a)
1307#define IDirectDrawClipper_SetClipList(p,a,b) (p)->lpVtbl->SetClipList(p,a,b)
1308#define IDirectDrawClipper_SetHWnd(p,a,b) (p)->lpVtbl->SetHWnd(p,a,b)
1309#else
1310/*** IUnknown methods ***/
1311#define IDirectDrawClipper_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1312#define IDirectDrawClipper_AddRef(p) (p)->AddRef()
1313#define IDirectDrawClipper_Release(p) (p)->Release()
1314/*** IDirectDrawClipper methods ***/
1315#define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->GetClipList(a,b,c)
1316#define IDirectDrawClipper_GetHWnd(p,a) (p)->GetHWnd(a)
1317#define IDirectDrawClipper_Initialize(p,a,b) (p)->Initialize(a,b)
1318#define IDirectDrawClipper_IsClipListChanged(p,a) (p)->IsClipListChanged(a)
1319#define IDirectDrawClipper_SetClipList(p,a,b) (p)->SetClipList(a,b)
1320#define IDirectDrawClipper_SetHWnd(p,a,b) (p)->SetHWnd(a,b)
1321#endif
1322
1323
1324/*****************************************************************************
1325 * IDirectDraw interface
1326 */
1327#define INTERFACE IDirectDraw
1328DECLARE_INTERFACE_(IDirectDraw,IUnknown)
1329{
1330 /*** IUnknown methods ***/
1331 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1332 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1333 STDMETHOD_(ULONG,Release)(THIS) PURE;
1334 /*** IDirectDraw methods ***/
1335 STDMETHOD(Compact)(THIS) PURE;
1336 STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1337 STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1338 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1339 STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1340 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1341 STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1342 struct IDirectDrawSurface **dst_surface) PURE;
1343 STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1344 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1345 STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1346 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1347 STDMETHOD(FlipToGDISurface)(THIS) PURE;
1348 STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1349 STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1350 STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1351 STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1352 STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1353 STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1354 STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1355 STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1356 STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1357 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1358 STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP) PURE;
1359 STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1360};
1361#undef INTERFACE
1362
1363#if !defined(__cplusplus) || defined(CINTERFACE)
1364/*** IUnknown methods ***/
1365#define IDirectDraw_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1366#define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
1367#define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
1368/*** IDirectDraw methods ***/
1369#define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
1370#define IDirectDraw_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1371#define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1372#define IDirectDraw_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1373#define IDirectDraw_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1374#define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1375#define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1376#define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1377#define IDirectDraw_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1378#define IDirectDraw_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1379#define IDirectDraw_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1380#define IDirectDraw_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1381#define IDirectDraw_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1382#define IDirectDraw_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1383#define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1384#define IDirectDraw_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1385#define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1386#define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1387#define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->lpVtbl->SetDisplayMode(p,a,b,c)
1388#define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1389#else
1390/*** IUnknown methods ***/
1391#define IDirectDraw_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1392#define IDirectDraw_AddRef(p) (p)->AddRef()
1393#define IDirectDraw_Release(p) (p)->Release()
1394/*** IDirectDraw methods ***/
1395#define IDirectDraw_Compact(p) (p)->Compact()
1396#define IDirectDraw_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1397#define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1398#define IDirectDraw_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1399#define IDirectDraw_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1400#define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1401#define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1402#define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
1403#define IDirectDraw_GetCaps(p,a,b) (p)->GetCaps(a,b)
1404#define IDirectDraw_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1405#define IDirectDraw_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1406#define IDirectDraw_GetGDISurface(p,a) (p)->GetGDISurface(a)
1407#define IDirectDraw_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1408#define IDirectDraw_GetScanLine(p,a) (p)->GetScanLine(a)
1409#define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1410#define IDirectDraw_Initialize(p,a) (p)->Initialize(a)
1411#define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1412#define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1413#define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->SetDisplayMode(a,b,c)
1414#define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1415#endif
1416
1417
1418/* flags for Lock() */
1419#define DDLOCK_SURFACEMEMORYPTR __MSABI_LONG(0x00000000)
1420#define DDLOCK_WAIT __MSABI_LONG(0x00000001)
1421#define DDLOCK_EVENT __MSABI_LONG(0x00000002)
1422#define DDLOCK_READONLY __MSABI_LONG(0x00000010)
1423#define DDLOCK_WRITEONLY __MSABI_LONG(0x00000020)
1424#define DDLOCK_NOSYSLOCK __MSABI_LONG(0x00000800)
1425#define DDLOCK_NOOVERWRITE __MSABI_LONG(0x00001000)
1426#define DDLOCK_DISCARDCONTENTS __MSABI_LONG(0x00002000)
1427#define DDLOCK_OKTOSWAP __MSABI_LONG(0x00002000)
1428#define DDLOCK_DONOTWAIT __MSABI_LONG(0x00004000)
1429#define DDLOCK_HASVOLUMETEXTUREBOXRECT __MSABI_LONG(0x00008000)
1430#define DDLOCK_NODIRTYUPDATE __MSABI_LONG(0x00010000)
1431
1432
1433/*****************************************************************************
1434 * IDirectDraw2 interface
1435 */
1436/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
1437 * arguments of SetDisplayMode has changed !
1438 */
1439#define INTERFACE IDirectDraw2
1440DECLARE_INTERFACE_(IDirectDraw2,IUnknown)
1441{
1442 /*** IUnknown methods ***/
1443/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1444/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1445/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1446 /*** IDirectDraw2 methods ***/
1447/*0c*/ STDMETHOD(Compact)(THIS) PURE;
1448/*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1449/*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1450 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1451/*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1452 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1453/*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1454 struct IDirectDrawSurface **dst_surface) PURE;
1455/*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1456 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1457/*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1458 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1459/*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1460/*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1461/*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1462/*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1463/*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1464/*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1465/*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1466/*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1467/*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1468/*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1469/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1470/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1471/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1472 /* added in v2 */
1473/*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS *caps, DWORD *total, DWORD *free) PURE;
1474};
1475#undef INTERFACE
1476
1477#if !defined(__cplusplus) || defined(CINTERFACE)
1478/*** IUnknown methods ***/
1479#define IDirectDraw2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1480#define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
1481#define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
1482/*** IDirectDraw methods ***/
1483#define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
1484#define IDirectDraw2_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1485#define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1486#define IDirectDraw2_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1487#define IDirectDraw2_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1488#define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1489#define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1490#define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1491#define IDirectDraw2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1492#define IDirectDraw2_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1493#define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1494#define IDirectDraw2_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1495#define IDirectDraw2_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1496#define IDirectDraw2_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1497#define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1498#define IDirectDraw2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1499#define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1500#define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1501#define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1502#define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1503/*** IDirectDraw2 methods ***/
1504#define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1505#else
1506/*** IUnknown methods ***/
1507#define IDirectDraw2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1508#define IDirectDraw2_AddRef(p) (p)->AddRef()
1509#define IDirectDraw2_Release(p) (p)->Release()
1510/*** IDirectDraw methods ***/
1511#define IDirectDraw2_Compact(p) (p)->Compact()
1512#define IDirectDraw2_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1513#define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1514#define IDirectDraw2_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1515#define IDirectDraw2_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1516#define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1517#define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1518#define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
1519#define IDirectDraw2_GetCaps(p,a,b) (p)->GetCaps(a,b)
1520#define IDirectDraw2_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1521#define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1522#define IDirectDraw2_GetGDISurface(p,a) (p)->GetGDISurface(a)
1523#define IDirectDraw2_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1524#define IDirectDraw2_GetScanLine(p,a) (p)->GetScanLine(a)
1525#define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1526#define IDirectDraw2_Initialize(p,a) (p)->Initialize(a)
1527#define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1528#define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1529#define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1530#define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1531/*** IDirectDraw2 methods ***/
1532#define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1533#endif
1534
1535
1536/*****************************************************************************
1537 * IDirectDraw3 interface
1538 */
1539#define INTERFACE IDirectDraw3
1540DECLARE_INTERFACE_(IDirectDraw3,IUnknown)
1541{
1542 /*** IUnknown methods ***/
1543/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1544/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1545/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1546 /*** IDirectDraw2 methods ***/
1547/*0c*/ STDMETHOD(Compact)(THIS) PURE;
1548/*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1549/*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1550 IDirectDrawPalette **lplpDDPalette, IUnknown *outer) PURE;
1551/*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC *surface_desc,
1552 struct IDirectDrawSurface **surface, IUnknown *outer) PURE;
1553/*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface *src_surface,
1554 struct IDirectDrawSurface **dst_surface) PURE;
1555/*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1556 void *ctx, LPDDENUMMODESCALLBACK cb) PURE;
1557/*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC *surface_desc,
1558 void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1559/*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1560/*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1561/*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1562/*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1563/*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface **surface) PURE;
1564/*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1565/*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1566/*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1567/*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1568/*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1569/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1570/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1571/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1572 /* added in v2 */
1573/*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS *caps, DWORD *total, DWORD *free) PURE;
1574 /* added in v3 */
1575/*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface **surface) PURE;
1576};
1577#undef INTERFACE
1578
1579#if !defined(__cplusplus) || defined(CINTERFACE)
1580/*** IUnknown methods ***/
1581#define IDirectDraw3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1582#define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p)
1583#define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p)
1584/*** IDirectDraw methods ***/
1585#define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p)
1586#define IDirectDraw3_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1587#define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1588#define IDirectDraw3_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1589#define IDirectDraw3_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1590#define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1591#define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1592#define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1593#define IDirectDraw3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1594#define IDirectDraw3_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1595#define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1596#define IDirectDraw3_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1597#define IDirectDraw3_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1598#define IDirectDraw3_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1599#define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1600#define IDirectDraw3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1601#define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1602#define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1603#define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1604#define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1605/*** IDirectDraw2 methods ***/
1606#define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1607/*** IDirectDraw3 methods ***/
1608#define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1609#else
1610/*** IUnknown methods ***/
1611#define IDirectDraw3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1612#define IDirectDraw3_AddRef(p) (p)->AddRef()
1613#define IDirectDraw3_Release(p) (p)->Release()
1614/*** IDirectDraw methods ***/
1615#define IDirectDraw3_Compact(p) (p)->Compact()
1616#define IDirectDraw3_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1617#define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1618#define IDirectDraw3_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1619#define IDirectDraw3_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1620#define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1621#define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1622#define IDirectDraw3_FlipToGDISurface(p) (p)->FlipToGDISurface()
1623#define IDirectDraw3_GetCaps(p,a,b) (p)->GetCaps(a,b)
1624#define IDirectDraw3_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1625#define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1626#define IDirectDraw3_GetGDISurface(p,a) (p)->GetGDISurface(a)
1627#define IDirectDraw3_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1628#define IDirectDraw3_GetScanLine(p,a) (p)->GetScanLine(a)
1629#define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1630#define IDirectDraw3_Initialize(p,a) (p)->Initialize(a)
1631#define IDirectDraw3_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1632#define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1633#define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1634#define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1635/*** IDirectDraw2 methods ***/
1636#define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1637/*** IDirectDraw3 methods ***/
1638#define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1639#endif
1640
1641
1642/*****************************************************************************
1643 * IDirectDraw4 interface
1644 */
1645#define INTERFACE IDirectDraw4
1646DECLARE_INTERFACE_(IDirectDraw4,IUnknown)
1647{
1648 /*** IUnknown methods ***/
1649/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1650/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1651/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1652 /*** IDirectDraw4 methods ***/
1653/*0c*/ STDMETHOD(Compact)(THIS) PURE;
1654/*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1655/*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1656 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1657/*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC2 *surface_desc,
1658 struct IDirectDrawSurface4 **surface, IUnknown *outer) PURE;
1659/*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface4 *src_surface,
1660 struct IDirectDrawSurface4 **dst_surface) PURE;
1661/*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1662 void *ctx, LPDDENUMMODESCALLBACK2 cb) PURE;
1663/*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1664 void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
1665/*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1666/*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1667/*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
1668/*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1669/*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface4 **surface) PURE;
1670/*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1671/*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1672/*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1673/*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1674/*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1675/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1676/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1677/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1678 /* added in v2 */
1679/*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS2 *caps, DWORD *total, DWORD *free) PURE;
1680 /* added in v4 */
1681/*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface4 **surface) PURE;
1682/*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
1683/*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1684/*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ DDDEVICEIDENTIFIER *identifier, DWORD flags) PURE;
1685};
1686#undef INTERFACE
1687
1688#if !defined(__cplusplus) || defined(CINTERFACE)
1689/*** IUnknown methods ***/
1690#define IDirectDraw4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1691#define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p)
1692#define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p)
1693/*** IDirectDraw methods ***/
1694#define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p)
1695#define IDirectDraw4_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1696#define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1697#define IDirectDraw4_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1698#define IDirectDraw4_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1699#define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1700#define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1701#define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1702#define IDirectDraw4_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1703#define IDirectDraw4_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1704#define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1705#define IDirectDraw4_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1706#define IDirectDraw4_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1707#define IDirectDraw4_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1708#define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1709#define IDirectDraw4_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1710#define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1711#define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1712#define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1713#define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1714/*** IDirectDraw2 methods ***/
1715#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1716/*** IDirectDraw4 methods ***/
1717#define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1718#define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
1719#define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
1720#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
1721#else
1722/*** IUnknown methods ***/
1723#define IDirectDraw4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1724#define IDirectDraw4_AddRef(p) (p)->AddRef()
1725#define IDirectDraw4_Release(p) (p)->Release()
1726/*** IDirectDraw methods ***/
1727#define IDirectDraw4_Compact(p) (p)->Compact()
1728#define IDirectDraw4_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1729#define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1730#define IDirectDraw4_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1731#define IDirectDraw4_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1732#define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1733#define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1734#define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface()
1735#define IDirectDraw4_GetCaps(p,a,b) (p)->GetCaps(a,b)
1736#define IDirectDraw4_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1737#define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1738#define IDirectDraw4_GetGDISurface(p,a) (p)->GetGDISurface(a)
1739#define IDirectDraw4_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1740#define IDirectDraw4_GetScanLine(p,a) (p)->GetScanLine(a)
1741#define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1742#define IDirectDraw4_Initialize(p,a) (p)->Initialize(a)
1743#define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1744#define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1745#define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1746#define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1747/*** IDirectDraw2 methods ***/
1748#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1749/*** IDirectDraw4 methods ***/
1750#define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1751#define IDirectDraw4_RestoreAllSurfaces(pc) (p)->RestoreAllSurfaces()
1752#define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
1753#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
1754#endif
1755
1756
1757/*****************************************************************************
1758 * IDirectDraw7 interface
1759 */
1760/* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented
1761 * as not interchangeable with earlier DirectDraw interfaces.
1762 */
1763#define INTERFACE IDirectDraw7
1764DECLARE_INTERFACE_(IDirectDraw7,IUnknown)
1765{
1766 /*** IUnknown methods ***/
1767/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1768/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1769/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1770 /*** IDirectDraw7 methods ***/
1771/*0c*/ STDMETHOD(Compact)(THIS) PURE;
1772/*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer) PURE;
1773/*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD flags, PALETTEENTRY *color_table,
1774 IDirectDrawPalette **palette, IUnknown *outer) PURE;
1775/*18*/ STDMETHOD(CreateSurface)(THIS_ DDSURFACEDESC2 *surface_desc,
1776 struct IDirectDrawSurface7 **surface, IUnknown *outer) PURE;
1777/*1c*/ STDMETHOD(DuplicateSurface)(THIS_ struct IDirectDrawSurface7 *src_surface,
1778 struct IDirectDrawSurface7 **dst_surface) PURE;
1779/*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1780 void *ctx, LPDDENUMMODESCALLBACK2 cb) PURE;
1781/*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD flags, DDSURFACEDESC2 *surface_desc,
1782 void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
1783/*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
1784/*2c*/ STDMETHOD(GetCaps)(THIS_ DDCAPS *driver_caps, DDCAPS *hel_caps) PURE;
1785/*30*/ STDMETHOD(GetDisplayMode)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
1786/*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
1787/*38*/ STDMETHOD(GetGDISurface)(THIS_ struct IDirectDrawSurface7 **surface) PURE;
1788/*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
1789/*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
1790/*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
1791/*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
1792/*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
1793/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
1794/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
1795/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
1796 /* added in v2 */
1797/*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ DDSCAPS2 *caps, DWORD *total, DWORD *free) PURE;
1798 /* added in v4 */
1799/*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC dc, struct IDirectDrawSurface7 **surface) PURE;
1800/*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
1801/*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1802/*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ DDDEVICEIDENTIFIER2 *identifier, DWORD flags) PURE;
1803 /* added in v7 */
1804/*70*/ STDMETHOD(StartModeTest)(THIS_ LPSIZE pModes, DWORD dwNumModes, DWORD dwFlags) PURE;
1805/*74*/ STDMETHOD(EvaluateMode)(THIS_ DWORD dwFlags, DWORD *pTimeout) PURE;
1806};
1807#undef INTERFACE
1808
1809#if !defined(__cplusplus) || defined(CINTERFACE)
1810/*** IUnknown methods ***/
1811#define IDirectDraw7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1812#define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p)
1813#define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p)
1814/*** IDirectDraw methods ***/
1815#define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p)
1816#define IDirectDraw7_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
1817#define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
1818#define IDirectDraw7_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
1819#define IDirectDraw7_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
1820#define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
1821#define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
1822#define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
1823#define IDirectDraw7_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
1824#define IDirectDraw7_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
1825#define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
1826#define IDirectDraw7_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
1827#define IDirectDraw7_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
1828#define IDirectDraw7_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
1829#define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
1830#define IDirectDraw7_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1831#define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
1832#define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1833#define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
1834#define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
1835/*** added in IDirectDraw2 ***/
1836#define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
1837/*** added in IDirectDraw4 ***/
1838#define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
1839#define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
1840#define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
1841#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
1842/*** added in IDirectDraw 7 ***/
1843#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c)
1844#define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b)
1845#else
1846/*** IUnknown methods ***/
1847#define IDirectDraw7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1848#define IDirectDraw7_AddRef(p) (p)->AddRef()
1849#define IDirectDraw7_Release(p) (p)->Release()
1850/*** IDirectDraw methods ***/
1851#define IDirectDraw7_Compact(p) (p)->Compact()
1852#define IDirectDraw7_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
1853#define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
1854#define IDirectDraw7_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
1855#define IDirectDraw7_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
1856#define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
1857#define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
1858#define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface()
1859#define IDirectDraw7_GetCaps(p,a,b) (p)->GetCaps(a,b)
1860#define IDirectDraw7_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
1861#define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
1862#define IDirectDraw7_GetGDISurface(p,a) (p)->GetGDISurface(a)
1863#define IDirectDraw7_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
1864#define IDirectDraw7_GetScanLine(p,a) (p)->GetScanLine(a)
1865#define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
1866#define IDirectDraw7_Initialize(p,a) (p)->Initialize(a)
1867#define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
1868#define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1869#define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
1870#define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
1871/*** added in IDirectDraw2 ***/
1872#define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
1873/*** added in IDirectDraw4 ***/
1874#define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
1875#define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
1876#define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
1877#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
1878/*** added in IDirectDraw 7 ***/
1879#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->StartModeTest(a,b,c)
1880#define IDirectDraw7_EvaluateMode(p,a,b) (p)->EvaluateMode(a,b)
1881#endif
1882
1883
1884/*****************************************************************************
1885 * IDirectDrawSurface interface
1886 */
1887#define INTERFACE IDirectDrawSurface
1888DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown)
1889{
1890 /*** IUnknown methods ***/
1891/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1892/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1893/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
1894 /*** IDirectDrawSurface methods ***/
1895/*0c*/ STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface *attachment) PURE;
1896/*10*/ STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
1897/*14*/ STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface *src_surface, RECT *src_rect,
1898 DWORD flags, DDBLTFX *fx) PURE;
1899/*18*/ STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
1900/*1c*/ STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface *src_surface,
1901 RECT *src_rect, DWORD flags) PURE;
1902/*20*/ STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface *attachment) PURE;
1903/*24*/ STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1904/*28*/ STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
1905/*2c*/ STDMETHOD(Flip)(THIS_ IDirectDrawSurface *dst_surface, DWORD flags) PURE;
1906/*30*/ STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface **attachment) PURE;
1907/*34*/ STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
1908/*38*/ STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
1909/*3c*/ STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
1910/*40*/ STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
1911/*44*/ STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
1912/*48*/ STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
1913/*4c*/ STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
1914/*50*/ STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
1915/*54*/ STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
1916/*58*/ STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
1917/*5c*/ STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
1918/*60*/ STDMETHOD(IsLost)(THIS) PURE;
1919/*64*/ STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
1920/*68*/ STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
1921/*6c*/ STDMETHOD(Restore)(THIS) PURE;
1922/*70*/ STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
1923/*74*/ STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
1924/*78*/ STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
1925/*7c*/ STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
1926/*80*/ STDMETHOD(Unlock)(THIS_ void *data) PURE;
1927/*84*/ STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface *dst_surface,
1928 RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx) PURE;
1929/*88*/ STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
1930/*8c*/ STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface *reference_surface) PURE;
1931};
1932#undef INTERFACE
1933
1934#if !defined(__cplusplus) || defined(CINTERFACE)
1935/*** IUnknown methods ***/
1936#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1937#define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
1938#define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
1939/*** IDirectDrawSurface methods ***/
1940#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
1941#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
1942#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
1943#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
1944#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
1945#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
1946#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
1947#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
1948#define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
1949#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
1950#define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
1951#define IDirectDrawSurface_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
1952#define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
1953#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
1954#define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
1955#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
1956#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
1957#define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
1958#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
1959#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
1960#define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1961#define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
1962#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
1963#define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
1964#define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
1965#define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
1966#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
1967#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
1968#define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
1969#define IDirectDrawSurface_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
1970#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
1971#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
1972#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
1973#else
1974/*** IUnknown methods ***/
1975#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1976#define IDirectDrawSurface_AddRef(p) (p)->AddRef()
1977#define IDirectDrawSurface_Release(p) (p)->Release()
1978/*** IDirectDrawSurface methods ***/
1979#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
1980#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
1981#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
1982#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
1983#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
1984#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
1985#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
1986#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
1987#define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
1988#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
1989#define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
1990#define IDirectDrawSurface_GetCaps(p,a) (p)->GetCaps(a)
1991#define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
1992#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
1993#define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
1994#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
1995#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
1996#define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
1997#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
1998#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
1999#define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
2000#define IDirectDrawSurface_IsLost(p) (p)->IsLost()
2001#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2002#define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
2003#define IDirectDrawSurface_Restore(p) (p)->Restore()
2004#define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
2005#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2006#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2007#define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
2008#define IDirectDrawSurface_Unlock(p,a) (p)->Unlock(a)
2009#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2010#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2011#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2012#endif
2013
2014
2015/*****************************************************************************
2016 * IDirectDrawSurface2 interface
2017 */
2018/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
2019 * have been converted to LPDIRECTDRAWSURFACE2.
2020 */
2021#define INTERFACE IDirectDrawSurface2
2022DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown)
2023{
2024 /*** IUnknown methods ***/
2025 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2026 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2027 STDMETHOD_(ULONG,Release)(THIS) PURE;
2028 /*** IDirectDrawSurface2 methods ***/
2029 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface2 *attachment) PURE;
2030 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2031 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface2 *src_surface, RECT *src_rect,
2032 DWORD flags, DDBLTFX *fx) PURE;
2033 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2034 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface2 *src_surface,
2035 RECT *src_rect, DWORD flags) PURE;
2036 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface2 *attachment) PURE;
2037 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2038 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2039 STDMETHOD(Flip)(THIS_ IDirectDrawSurface2 *dst_surface, DWORD flags) PURE;
2040 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface2 **attachment) PURE;
2041 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2042 STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
2043 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2044 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2045 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2046 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2047 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2048 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2049 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2050 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
2051 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
2052 STDMETHOD(IsLost)(THIS) PURE;
2053 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
2054 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2055 STDMETHOD(Restore)(THIS) PURE;
2056 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2057 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2058 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2059 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2060 STDMETHOD(Unlock)(THIS_ void *data) PURE;
2061 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface2 *dst_surface, RECT *dst_rect,
2062 DWORD flags, DDOVERLAYFX *fx) PURE;
2063 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2064 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface2 *reference_surface) PURE;
2065 /* added in v2 */
2066 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2067 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2068 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2069};
2070#undef INTERFACE
2071
2072#if !defined(__cplusplus) || defined(CINTERFACE)
2073/*** IUnknown methods ***/
2074#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2075#define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
2076#define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
2077/*** IDirectDrawSurface methods (almost) ***/
2078#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2079#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2080#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2081#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2082#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2083#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2084#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2085#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2086#define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2087#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2088#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2089#define IDirectDrawSurface2_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2090#define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2091#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2092#define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2093#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2094#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2095#define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2096#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2097#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2098#define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2099#define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
2100#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2101#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2102#define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
2103#define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2104#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2105#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2106#define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2107#define IDirectDrawSurface2_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2108#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2109#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2110#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2111/*** IDirectDrawSurface2 methods ***/
2112#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2113#define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2114#define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2115#else
2116/*** IUnknown methods ***/
2117#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2118#define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
2119#define IDirectDrawSurface2_Release(p) (p)->Release()
2120/*** IDirectDrawSurface methods (almost) ***/
2121#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2122#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2123#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2124#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2125#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2126#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2127#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2128#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2129#define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
2130#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2131#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
2132#define IDirectDrawSurface2_GetCaps(p,a) (p)->GetCaps(a)
2133#define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
2134#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2135#define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
2136#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2137#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2138#define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
2139#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2140#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2141#define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
2142#define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
2143#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2144#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
2145#define IDirectDrawSurface2_Restore(p) (p)->Restore()
2146#define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
2147#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2148#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2149#define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
2150#define IDirectDrawSurface2_Unlock(p,a) (p)->Unlock(a)
2151#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2152#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2153#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2154/*** IDirectDrawSurface2 methods ***/
2155#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
2156#define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
2157#define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
2158#endif
2159
2160
2161/*****************************************************************************
2162 * IDirectDrawSurface3 interface
2163 */
2164/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
2165 * have been converted to LPDIRECTDRAWSURFACE3.
2166 */
2167#define INTERFACE IDirectDrawSurface3
2168DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
2169{
2170 /*** IUnknown methods ***/
2171 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2172 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2173 STDMETHOD_(ULONG,Release)(THIS) PURE;
2174 /*** IDirectDrawSurface3 methods ***/
2175 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface3 *attachment) PURE;
2176 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2177 STDMETHOD(Blt)(THIS_ RECT *dst_rest, IDirectDrawSurface3 *src_surface, RECT *src_rect,
2178 DWORD flags, DDBLTFX *fx) PURE;
2179 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2180 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface3 *src_surface,
2181 RECT *src_rect, DWORD flags) PURE;
2182 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface3 *attachment) PURE;
2183 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2184 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb) PURE;
2185 STDMETHOD(Flip)(THIS_ IDirectDrawSurface3 *dst_surface, DWORD flags) PURE;
2186 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS *caps, IDirectDrawSurface3 **attachment) PURE;
2187 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2188 STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE;
2189 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2190 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2191 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2192 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2193 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2194 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2195 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2196 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc) PURE;
2197 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC *surface_desc) PURE;
2198 STDMETHOD(IsLost)(THIS) PURE;
2199 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE event) PURE;
2200 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2201 STDMETHOD(Restore)(THIS) PURE;
2202 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2203 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2204 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2205 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2206 STDMETHOD(Unlock)(THIS_ void *data) PURE;
2207 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface3 *dst_surface, RECT *dst_rect,
2208 DWORD flags, DDOVERLAYFX *fx) PURE;
2209 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2210 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface3 *reference_surface) PURE;
2211 /* added in v2 */
2212 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2213 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2214 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2215 /* added in v3 */
2216 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC *surface_desc, DWORD flags) PURE;
2217};
2218#undef INTERFACE
2219
2220#if !defined(__cplusplus) || defined(CINTERFACE)
2221/*** IUnknown methods ***/
2222#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2223#define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
2224#define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
2225/*** IDirectDrawSurface methods (almost) ***/
2226#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2227#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2228#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2229#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2230#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2231#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2232#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2233#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2234#define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2235#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2236#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2237#define IDirectDrawSurface3_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2238#define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2239#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2240#define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2241#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2242#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2243#define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2244#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2245#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2246#define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2247#define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
2248#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2249#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2250#define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
2251#define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2252#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2253#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2254#define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2255#define IDirectDrawSurface3_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2256#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2257#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2258#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2259/*** IDirectDrawSurface2 methods ***/
2260#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2261#define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2262#define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2263/*** IDirectDrawSurface3 methods ***/
2264#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2265#else
2266/*** IUnknown methods ***/
2267#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2268#define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
2269#define IDirectDrawSurface3_Release(p) (p)->Release()
2270/*** IDirectDrawSurface methods (almost) ***/
2271#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2272#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2273#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2274#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2275#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2276#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2277#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2278#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2279#define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
2280#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2281#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
2282#define IDirectDrawSurface3_GetCaps(p,a) (p)->GetCaps(a)
2283#define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
2284#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2285#define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
2286#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2287#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2288#define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
2289#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2290#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2291#define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
2292#define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
2293#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2294#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
2295#define IDirectDrawSurface3_Restore(p) (p)->Restore()
2296#define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
2297#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2298#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2299#define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
2300#define IDirectDrawSurface3_Unlock(p,a) (p)->Unlock(a)
2301#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2302#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2303#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2304/*** IDirectDrawSurface2 methods ***/
2305#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
2306#define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
2307#define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
2308/*** IDirectDrawSurface3 methods ***/
2309#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2310#endif
2311
2312
2313/*****************************************************************************
2314 * IDirectDrawSurface4 interface
2315 */
2316/* Cannot inherit from IDirectDrawSurface2 because DDSCAPS changed to DDSCAPS2.
2317 */
2318#define INTERFACE IDirectDrawSurface4
2319DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown)
2320{
2321 /*** IUnknown methods ***/
2322 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2323 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2324 STDMETHOD_(ULONG,Release)(THIS) PURE;
2325 /*** IDirectDrawSurface4 methods ***/
2326 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface4 *attachment) PURE;
2327 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2328 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface4 *src_surface, RECT *src_rect,
2329 DWORD flags, DDBLTFX *fx) PURE;
2330 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2331 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface4 *src_surface,
2332 RECT *src_rect, DWORD flags) PURE;
2333 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface4 *attachment) PURE;
2334 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
2335 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK2 cb) PURE;
2336 STDMETHOD(Flip)(THIS_ IDirectDrawSurface4 *dst_surface, DWORD flags) PURE;
2337 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS2 *caps, IDirectDrawSurface4 **attachment) PURE;
2338 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2339 STDMETHOD(GetCaps)(THIS_ DDSCAPS2 *caps) PURE;
2340 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2341 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2342 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2343 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2344 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2345 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2346 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2347 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
2348 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc) PURE;
2349 STDMETHOD(IsLost)(THIS) PURE;
2350 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE event) PURE;
2351 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2352 STDMETHOD(Restore)(THIS) PURE;
2353 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2354 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2355 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2356 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2357 STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
2358 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface4 *dst_surface, RECT *dst_rect,
2359 DWORD flags, DDOVERLAYFX *fx) PURE;
2360 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2361 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface4 *reference_surface) PURE;
2362 /* added in v2 */
2363 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2364 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2365 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2366 /* added in v3 */
2367 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc, DWORD flags) PURE;
2368 /* added in v4 */
2369 STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, void *data, DWORD size, DWORD flags) PURE;
2370 STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, void *data, DWORD *size) PURE;
2371 STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE;
2372 STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE;
2373 STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
2374};
2375#undef INTERFACE
2376
2377#if !defined(__cplusplus) || defined(CINTERFACE)
2378/*** IUnknown methods ***/
2379#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2380#define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p)
2381#define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p)
2382/*** IDirectDrawSurface (almost) methods ***/
2383#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2384#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2385#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2386#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2387#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2388#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2389#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2390#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2391#define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2392#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2393#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2394#define IDirectDrawSurface4_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2395#define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2396#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2397#define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2398#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2399#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2400#define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2401#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2402#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2403#define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2404#define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p)
2405#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2406#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2407#define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p)
2408#define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2409#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2410#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2411#define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2412#define IDirectDrawSurface4_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2413#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2414#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2415#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2416/*** IDirectDrawSurface2 methods ***/
2417#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2418#define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2419#define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2420/*** IDirectDrawSurface3 methods ***/
2421#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2422/*** IDirectDrawSurface4 methods ***/
2423#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
2424#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
2425#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
2426#define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a)
2427#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
2428#else
2429/*** IUnknown methods ***/
2430#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2431#define IDirectDrawSurface4_AddRef(p) (p)->AddRef()
2432#define IDirectDrawSurface4_Release(p) (p)->Release()
2433/*** IDirectDrawSurface (almost) methods ***/
2434#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2435#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2436#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2437#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2438#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2439#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2440#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2441#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2442#define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b)
2443#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2444#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a)
2445#define IDirectDrawSurface4_GetCaps(p,a) (p)->GetCaps(a)
2446#define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a)
2447#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2448#define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a)
2449#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2450#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2451#define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a)
2452#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2453#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2454#define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b)
2455#define IDirectDrawSurface4_IsLost(p) (p)->IsLost()
2456#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2457#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a)
2458#define IDirectDrawSurface4_Restore(p) (p)->Restore()
2459#define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a)
2460#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2461#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2462#define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a)
2463#define IDirectDrawSurface4_Unlock(p,a) (p)->Unlock(a)
2464#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2465#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2466#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2467/*** IDirectDrawSurface2 methods ***/
2468#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a)
2469#define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a)
2470#define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a)
2471/*** IDirectDrawSurface3 methods ***/
2472#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2473/*** IDirectDrawSurface4 methods ***/
2474#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
2475#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
2476#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a)
2477#define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a)
2478#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
2479#endif
2480
2481
2482/*****************************************************************************
2483 * IDirectDrawSurface7 interface
2484 */
2485#define INTERFACE IDirectDrawSurface7
2486DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown)
2487{
2488 /*** IUnknown methods ***/
2489 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2490 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2491 STDMETHOD_(ULONG,Release)(THIS) PURE;
2492 /*** IDirectDrawSurface7 methods ***/
2493 STDMETHOD(AddAttachedSurface)(THIS_ IDirectDrawSurface7 *attachment) PURE;
2494 STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
2495 STDMETHOD(Blt)(THIS_ RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect,
2496 DWORD flags, DDBLTFX *fx) PURE;
2497 STDMETHOD(BltBatch)(THIS_ DDBLTBATCH *batch, DWORD count, DWORD flags) PURE;
2498 STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, IDirectDrawSurface7 *src_surface,
2499 RECT *src_rect, DWORD flags) PURE;
2500 STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD flags, IDirectDrawSurface7 *attachment) PURE;
2501 STDMETHOD(EnumAttachedSurfaces)(THIS_ void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
2502 STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK7 cb) PURE;
2503 STDMETHOD(Flip)(THIS_ IDirectDrawSurface7 *dst_surface, DWORD flags) PURE;
2504 STDMETHOD(GetAttachedSurface)(THIS_ DDSCAPS2 *caps, IDirectDrawSurface7 **attachment) PURE;
2505 STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
2506 STDMETHOD(GetCaps)(THIS_ DDSCAPS2 *caps) PURE;
2507 STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE;
2508 STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2509 STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
2510 STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
2511 STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
2512 STDMETHOD(GetPalette)(THIS_ IDirectDrawPalette **palette) PURE;
2513 STDMETHOD(GetPixelFormat)(THIS_ DDPIXELFORMAT *format) PURE;
2514 STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc) PURE;
2515 STDMETHOD(Initialize)(THIS_ IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc) PURE;
2516 STDMETHOD(IsLost)(THIS) PURE;
2517 STDMETHOD(Lock)(THIS_ RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE event) PURE;
2518 STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
2519 STDMETHOD(Restore)(THIS) PURE;
2520 STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE;
2521 STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE;
2522 STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
2523 STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE;
2524 STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
2525 STDMETHOD(UpdateOverlay)(THIS_ RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect,
2526 DWORD flags, DDOVERLAYFX *fx) PURE;
2527 STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
2528 STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD flags, IDirectDrawSurface7 *reference_surface) PURE;
2529 /* added in v2 */
2530 STDMETHOD(GetDDInterface)(THIS_ void **ddraw) PURE;
2531 STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
2532 STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
2533 /* added in v3 */
2534 STDMETHOD(SetSurfaceDesc)(THIS_ DDSURFACEDESC2 *surface_desc, DWORD flags) PURE;
2535 /* added in v4 */
2536 STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, void *data, DWORD size, DWORD flags) PURE;
2537 STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, void *data, DWORD *size) PURE;
2538 STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE;
2539 STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE;
2540 STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
2541 /* added in v7 */
2542 STDMETHOD(SetPriority)(THIS_ DWORD prio) PURE;
2543 STDMETHOD(GetPriority)(THIS_ LPDWORD prio) PURE;
2544 STDMETHOD(SetLOD)(THIS_ DWORD lod) PURE;
2545 STDMETHOD(GetLOD)(THIS_ LPDWORD lod) PURE;
2546};
2547#undef INTERFACE
2548
2549#if !defined(__cplusplus) || defined(CINTERFACE)
2550/*** IUnknown methods ***/
2551#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2552#define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p)
2553#define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p)
2554/*** IDirectDrawSurface (almost) methods ***/
2555#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
2556#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
2557#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
2558#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
2559#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
2560#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
2561#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
2562#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
2563#define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
2564#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
2565#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
2566#define IDirectDrawSurface7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
2567#define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
2568#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
2569#define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
2570#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
2571#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
2572#define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
2573#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
2574#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
2575#define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2576#define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p)
2577#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
2578#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
2579#define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p)
2580#define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
2581#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
2582#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
2583#define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
2584#define IDirectDrawSurface7_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
2585#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
2586#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
2587#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
2588/*** IDirectDrawSurface2 methods ***/
2589#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
2590#define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
2591#define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
2592/*** IDirectDrawSurface3 methods ***/
2593#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
2594/*** IDirectDrawSurface4 methods ***/
2595#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
2596#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
2597#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
2598#define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a)
2599#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
2600/*** IDirectDrawSurface7 methods ***/
2601#define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
2602#define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
2603#define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
2604#define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a)
2605#else
2606/*** IUnknown methods ***/
2607#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2608#define IDirectDrawSurface7_AddRef(p) (p)->AddRef()
2609#define IDirectDrawSurface7_Release(p) (p)->Release()
2610/*** IDirectDrawSurface (almost) methods ***/
2611#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
2612#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
2613#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
2614#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
2615#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
2616#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
2617#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
2618#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
2619#define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b)
2620#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
2621#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a)
2622#define IDirectDrawSurface7_GetCaps(p,a) (p)->GetCaps(a)
2623#define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a)
2624#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
2625#define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a)
2626#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
2627#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
2628#define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a)
2629#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
2630#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
2631#define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b)
2632#define IDirectDrawSurface7_IsLost(p) (p)->IsLost()
2633#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
2634#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a)
2635#define IDirectDrawSurface7_Restore(p) (p)->Restore()
2636#define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a)
2637#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
2638#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
2639#define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a)
2640#define IDirectDrawSurface7_Unlock(p,a) (p)->Unlock(a)
2641#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
2642#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
2643#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
2644/*** IDirectDrawSurface2 methods ***/
2645#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a)
2646#define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a)
2647#define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a)
2648/*** IDirectDrawSurface3 methods ***/
2649#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
2650/*** IDirectDrawSurface4 methods ***/
2651#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
2652#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
2653#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a)
2654#define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a)
2655#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
2656/*** IDirectDrawSurface7 methods ***/
2657#define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a)
2658#define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a)
2659#define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a)
2660#define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a)
2661#endif
2662
2663/*****************************************************************************
2664 * IDirectDrawColorControl interface
2665 */
2666#define INTERFACE IDirectDrawColorControl
2667DECLARE_INTERFACE_(IDirectDrawColorControl,IUnknown)
2668{
2669 /*** IUnknown methods ***/
2670 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2671 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2672 STDMETHOD_(ULONG,Release)(THIS) PURE;
2673 /*** IDirectDrawColorControl methods ***/
2674 STDMETHOD(GetColorControls)(THIS_ DDCOLORCONTROL *color_control) PURE;
2675 STDMETHOD(SetColorControls)(THIS_ DDCOLORCONTROL *color_control) PURE;
2676};
2677#undef INTERFACE
2678
2679#if !defined(__cplusplus) || defined(CINTERFACE)
2680/*** IUnknown methods ***/
2681#define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2682#define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
2683#define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
2684/*** IDirectDrawColorControl methods ***/
2685#define IDirectDrawColorControl_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
2686#define IDirectDrawColorControl_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
2687#else
2688/*** IUnknown methods ***/
2689#define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2690#define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
2691#define IDirectDrawColorControl_Release(p) (p)->Release()
2692/*** IDirectDrawColorControl methods ***/
2693#define IDirectDrawColorControl_GetColorControls(p,a) (p)->GetColorControls(a)
2694#define IDirectDrawColorControl_SetColorControls(p,a) (p)->SetColorControls(a)
2695#endif
2696
2697/*****************************************************************************
2698 * IDirectDrawGammaControl interface
2699 */
2700#define INTERFACE IDirectDrawGammaControl
2701DECLARE_INTERFACE_(IDirectDrawGammaControl,IUnknown)
2702{
2703 /*** IUnknown methods ***/
2704 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2705 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2706 STDMETHOD_(ULONG,Release)(THIS) PURE;
2707 /*** IDirectDrawGammaControl methods ***/
2708 STDMETHOD(GetGammaRamp)(THIS_ DWORD flags, DDGAMMARAMP *gamma_ramp) PURE;
2709 STDMETHOD(SetGammaRamp)(THIS_ DWORD flags, DDGAMMARAMP *gamma_ramp) PURE;
2710};
2711#undef INTERFACE
2712
2713#if !defined(__cplusplus) || defined(CINTERFACE)
2714/*** IUnknown methods ***/
2715#define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2716#define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p)
2717#define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p)
2718/*** IDirectDrawGammaControl methods ***/
2719#define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
2720#define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b)
2721#else
2722/*** IUnknown methods ***/
2723#define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2724#define IDirectDrawGammaControl_AddRef(p) (p)->AddRef()
2725#define IDirectDrawGammaControl_Release(p) (p)->Release()
2726/*** IDirectDrawGammaControl methods ***/
2727#define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->GetGammaRamp(a,b)
2728#define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->SetGammaRamp(a,b)
2729#endif
2730
2731
2732HRESULT WINAPI DirectDrawCreate(GUID *driver_guid, IDirectDraw **ddraw, IUnknown *outer);
2733HRESULT WINAPI DirectDrawCreateEx(GUID *driver_guid, void **ddraw, REFIID interface_iid, IUnknown *outer);
2734HRESULT WINAPI DirectDrawCreateClipper(DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer);
2735
2736#ifdef __cplusplus
2737} /* extern "C" */
2738#endif /* defined(__cplusplus) */
2739
2740#endif /* __DDRAW_INCLUDED__ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette