d3d: Remove the format from index buffers.
[wine] / include / wine / wined3d.idl
1 /*
2  * Copyright 2002-2003 The wine-d3d team
3  * Copyright 2002-2003 Jason Edmeades
4  * Copyright 2002-2003 Raphael Junqueira
5  * Copyright 2005 Oliver Stieber
6  * Copyright 2006 Stefan Dösinger
7  * Copyright 2006 Stefan Dösinger for CodeWeavers
8  * Copyright 2007 Henri Verbeet
9  * Copyright 2008 Henri Verbeet for CodeWeavers
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25
26 import "unknwn.idl";
27
28 cpp_quote("#if 0")
29 typedef HANDLE HMONITOR;
30
31 typedef struct _RGNDATAHEADER
32 {
33     DWORD dwSize;
34     DWORD iType;
35     DWORD nCount;
36     DWORD nRgnSize;
37     RECT rcBound;
38 } RGNDATAHEADER;
39
40 typedef struct _RGNDATA
41 {
42     RGNDATAHEADER rdh;
43     char Buffer[1];
44 } RGNDATA;
45 cpp_quote("#endif")
46
47 cpp_quote("#define WINED3D_OK                                  S_OK")
48
49 const UINT _FACWINED3D = 0x876;
50 cpp_quote("#define MAKE_WINED3DSTATUS(code)                    MAKE_HRESULT(0, _FACWINED3D, code)")
51 cpp_quote("#define WINED3DOK_NOAUTOGEN                         MAKE_WINED3DSTATUS(2159)")
52
53 cpp_quote("#define MAKE_WINED3DHRESULT(code)                   MAKE_HRESULT(1, _FACWINED3D, code)")
54 cpp_quote("#define WINED3DERR_WRONGTEXTUREFORMAT               MAKE_WINED3DHRESULT(2072)")
55 cpp_quote("#define WINED3DERR_UNSUPPORTEDCOLOROPERATION        MAKE_WINED3DHRESULT(2073)")
56 cpp_quote("#define WINED3DERR_UNSUPPORTEDCOLORARG              MAKE_WINED3DHRESULT(2074)")
57 cpp_quote("#define WINED3DERR_UNSUPPORTEDALPHAOPERATION        MAKE_WINED3DHRESULT(2075)")
58 cpp_quote("#define WINED3DERR_UNSUPPORTEDALPHAARG              MAKE_WINED3DHRESULT(2076)")
59 cpp_quote("#define WINED3DERR_TOOMANYOPERATIONS                MAKE_WINED3DHRESULT(2077)")
60 cpp_quote("#define WINED3DERR_CONFLICTINGTEXTUREFILTER         MAKE_WINED3DHRESULT(2078)")
61 cpp_quote("#define WINED3DERR_UNSUPPORTEDFACTORVALUE           MAKE_WINED3DHRESULT(2079)")
62 cpp_quote("#define WINED3DERR_CONFLICTINGRENDERSTATE           MAKE_WINED3DHRESULT(2081)")
63 cpp_quote("#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER         MAKE_WINED3DHRESULT(2082)")
64 cpp_quote("#define WINED3DERR_CONFLICTINGTEXTUREPALETTE        MAKE_WINED3DHRESULT(2086)")
65 cpp_quote("#define WINED3DERR_DRIVERINTERNALERROR              MAKE_WINED3DHRESULT(2087)")
66 cpp_quote("#define WINED3DERR_NOTFOUND                         MAKE_WINED3DHRESULT(2150)")
67 cpp_quote("#define WINED3DERR_MOREDATA                         MAKE_WINED3DHRESULT(2151)")
68 cpp_quote("#define WINED3DERR_DEVICELOST                       MAKE_WINED3DHRESULT(2152)")
69 cpp_quote("#define WINED3DERR_DEVICENOTRESET                   MAKE_WINED3DHRESULT(2153)")
70 cpp_quote("#define WINED3DERR_NOTAVAILABLE                     MAKE_WINED3DHRESULT(2154)")
71 cpp_quote("#define WINED3DERR_OUTOFVIDEOMEMORY                 MAKE_WINED3DHRESULT(380)")
72 cpp_quote("#define WINED3DERR_INVALIDDEVICE                    MAKE_WINED3DHRESULT(2155)")
73 cpp_quote("#define WINED3DERR_INVALIDCALL                      MAKE_WINED3DHRESULT(2156)")
74 cpp_quote("#define WINED3DERR_DRIVERINVALIDCALL                MAKE_WINED3DHRESULT(2157)")
75 cpp_quote("#define WINED3DERR_WASSTILLDRAWING                  MAKE_WINED3DHRESULT(540)")
76 cpp_quote("#define WINEDDERR_NOTAOVERLAYSURFACE                MAKE_WINED3DHRESULT(580)")
77 cpp_quote("#define WINEDDERR_NOTLOCKED                         MAKE_WINED3DHRESULT(584)")
78 cpp_quote("#define WINEDDERR_NODC                              MAKE_WINED3DHRESULT(586)")
79 cpp_quote("#define WINEDDERR_DCALREADYCREATED                  MAKE_WINED3DHRESULT(620)")
80 cpp_quote("#define WINEDDERR_NOTFLIPPABLE                      MAKE_WINED3DHRESULT(582)")
81 cpp_quote("#define WINEDDERR_SURFACEBUSY                       MAKE_WINED3DHRESULT(430)")
82 cpp_quote("#define WINEDDERR_INVALIDRECT                       MAKE_WINED3DHRESULT(150)")
83 cpp_quote("#define WINEDDERR_NOCLIPLIST                        MAKE_WINED3DHRESULT(205)")
84 cpp_quote("#define WINEDDERR_OVERLAYNOTVISIBLE                 MAKE_WINED3DHRESULT(577)")
85
86 typedef DWORD WINED3DCOLOR;
87
88 typedef enum _WINED3DLIGHTTYPE
89 {
90     WINED3DLIGHT_POINT                      = 1,
91     WINED3DLIGHT_SPOT                       = 2,
92     WINED3DLIGHT_DIRECTIONAL                = 3,
93     WINED3DLIGHT_PARALLELPOINT              = 4, /* D3D7 */
94     WINED3DLIGHT_GLSPOT                     = 5, /* D3D7 */
95     WINED3DLIGHT_FORCE_DWORD                = 0x7fffffff
96 } WINED3DLIGHTTYPE;
97
98 typedef enum _WINED3DPRIMITIVETYPE
99 {
100     WINED3DPT_UNDEFINED                     = 0,
101     WINED3DPT_POINTLIST                     = 1,
102     WINED3DPT_LINELIST                      = 2,
103     WINED3DPT_LINESTRIP                     = 3,
104     WINED3DPT_TRIANGLELIST                  = 4,
105     WINED3DPT_TRIANGLESTRIP                 = 5,
106     WINED3DPT_TRIANGLEFAN                   = 6,
107     WINED3DPT_LINELIST_ADJ                  = 10,
108     WINED3DPT_LINESTRIP_ADJ                 = 11,
109     WINED3DPT_TRIANGLELIST_ADJ              = 12,
110     WINED3DPT_TRIANGLESTRIP_ADJ             = 13,
111     WINED3DPT_FORCE_DWORD                   = 0x7fffffff
112 } WINED3DPRIMITIVETYPE;
113
114 typedef enum _WINED3DDEVTYPE
115 {
116     WINED3DDEVTYPE_HAL                      = 1,
117     WINED3DDEVTYPE_REF                      = 2,
118     WINED3DDEVTYPE_SW                       = 3,
119     WINED3DDEVTYPE_NULLREF                  = 4,
120     WINED3DDEVTYPE_FORCE_DWORD              = 0xffffffff
121 } WINED3DDEVTYPE;
122
123 typedef enum _WINED3DDEGREETYPE
124 {
125     WINED3DDEGREE_LINEAR                    = 1,
126     WINED3DDEGREE_QUADRATIC                 = 2,
127     WINED3DDEGREE_CUBIC                     = 3,
128     WINED3DDEGREE_QUINTIC                   = 5,
129     WINED3DDEGREE_FORCE_DWORD               = 0x7fffffff
130 } WINED3DDEGREETYPE;
131
132 typedef enum _WINED3DFORMAT
133 {
134     WINED3DFMT_UNKNOWN,
135     WINED3DFMT_R8G8B8,
136     WINED3DFMT_A8R8G8B8,
137     WINED3DFMT_X8R8G8B8,
138     WINED3DFMT_R5G6B5,
139     WINED3DFMT_X1R5G5B5,
140     WINED3DFMT_A1R5G5B5,
141     WINED3DFMT_A4R4G4B4,
142     WINED3DFMT_R3G3B2,
143     WINED3DFMT_A8R3G3B2,
144     WINED3DFMT_X4R4G4B4,
145     WINED3DFMT_X8B8G8R8,
146     WINED3DFMT_A2R10G10B10,
147     WINED3DFMT_A8P8,
148     WINED3DFMT_P8,
149     WINED3DFMT_L8,
150     WINED3DFMT_A8L8,
151     WINED3DFMT_A4L4,
152     WINED3DFMT_L6V5U5,
153     WINED3DFMT_X8L8V8U8,
154     WINED3DFMT_W11V11U10,
155     WINED3DFMT_A2W10V10U10,
156     WINED3DFMT_D16_LOCKABLE,
157     WINED3DFMT_D32,
158     WINED3DFMT_D15S1,
159     WINED3DFMT_D24S8,
160     WINED3DFMT_D24X8,
161     WINED3DFMT_D24X4S4,
162     WINED3DFMT_L16,
163     WINED3DFMT_D32F_LOCKABLE,
164     WINED3DFMT_D24FS8,
165     WINED3DFMT_VERTEXDATA,
166     WINED3DFMT_CxV8U8,
167     /* DXGI formats */
168     WINED3DFMT_R32G32B32A32_TYPELESS,
169     WINED3DFMT_R32G32B32A32_FLOAT,
170     WINED3DFMT_R32G32B32A32_UINT,
171     WINED3DFMT_R32G32B32A32_SINT,
172     WINED3DFMT_R32G32B32_TYPELESS,
173     WINED3DFMT_R32G32B32_FLOAT,
174     WINED3DFMT_R32G32B32_UINT,
175     WINED3DFMT_R32G32B32_SINT,
176     WINED3DFMT_R16G16B16A16_TYPELESS,
177     WINED3DFMT_R16G16B16A16_FLOAT,
178     WINED3DFMT_R16G16B16A16_UNORM,
179     WINED3DFMT_R16G16B16A16_UINT,
180     WINED3DFMT_R16G16B16A16_SNORM,
181     WINED3DFMT_R16G16B16A16_SINT,
182     WINED3DFMT_R32G32_TYPELESS,
183     WINED3DFMT_R32G32_FLOAT,
184     WINED3DFMT_R32G32_UINT,
185     WINED3DFMT_R32G32_SINT,
186     WINED3DFMT_R32G8X24_TYPELESS,
187     WINED3DFMT_D32_FLOAT_S8X24_UINT,
188     WINED3DFMT_R32_FLOAT_X8X24_TYPELESS,
189     WINED3DFMT_X32_TYPELESS_G8X24_UINT,
190     WINED3DFMT_R10G10B10A2_TYPELESS,
191     WINED3DFMT_R10G10B10A2_UNORM,
192     WINED3DFMT_R10G10B10A2_UINT,
193     WINED3DFMT_R10G10B10A2_SNORM,
194     WINED3DFMT_R11G11B10_FLOAT,
195     WINED3DFMT_R8G8B8A8_TYPELESS,
196     WINED3DFMT_R8G8B8A8_UNORM,
197     WINED3DFMT_R8G8B8A8_UNORM_SRGB,
198     WINED3DFMT_R8G8B8A8_UINT,
199     WINED3DFMT_R8G8B8A8_SNORM,
200     WINED3DFMT_R8G8B8A8_SINT,
201     WINED3DFMT_R16G16_TYPELESS,
202     WINED3DFMT_R16G16_FLOAT,
203     WINED3DFMT_R16G16_UNORM,
204     WINED3DFMT_R16G16_UINT,
205     WINED3DFMT_R16G16_SNORM,
206     WINED3DFMT_R16G16_SINT,
207     WINED3DFMT_R32_TYPELESS,
208     WINED3DFMT_D32_FLOAT,
209     WINED3DFMT_R32_FLOAT,
210     WINED3DFMT_R32_UINT,
211     WINED3DFMT_R32_SINT,
212     WINED3DFMT_R24G8_TYPELESS,
213     WINED3DFMT_D24_UNORM_S8_UINT,
214     WINED3DFMT_R24_UNORM_X8_TYPELESS,
215     WINED3DFMT_X24_TYPELESS_G8_UINT,
216     WINED3DFMT_R8G8_TYPELESS,
217     WINED3DFMT_R8G8_UNORM,
218     WINED3DFMT_R8G8_UINT,
219     WINED3DFMT_R8G8_SNORM,
220     WINED3DFMT_R8G8_SINT,
221     WINED3DFMT_R16_TYPELESS,
222     WINED3DFMT_R16_FLOAT,
223     WINED3DFMT_D16_UNORM,
224     WINED3DFMT_R16_UNORM,
225     WINED3DFMT_R16_UINT,
226     WINED3DFMT_R16_SNORM,
227     WINED3DFMT_R16_SINT,
228     WINED3DFMT_R8_TYPELESS,
229     WINED3DFMT_R8_UNORM,
230     WINED3DFMT_R8_UINT,
231     WINED3DFMT_R8_SNORM,
232     WINED3DFMT_R8_SINT,
233     WINED3DFMT_A8_UNORM,
234     WINED3DFMT_R1_UNORM,
235     WINED3DFMT_R9G9B9E5_SHAREDEXP,
236     WINED3DFMT_R8G8_B8G8_UNORM,
237     WINED3DFMT_G8R8_G8B8_UNORM,
238     WINED3DFMT_BC1_TYPELESS,
239     WINED3DFMT_BC1_UNORM,
240     WINED3DFMT_BC1_UNORM_SRGB,
241     WINED3DFMT_BC2_TYPELESS,
242     WINED3DFMT_BC2_UNORM,
243     WINED3DFMT_BC2_UNORM_SRGB,
244     WINED3DFMT_BC3_TYPELESS,
245     WINED3DFMT_BC3_UNORM,
246     WINED3DFMT_BC3_UNORM_SRGB,
247     WINED3DFMT_BC4_TYPELESS,
248     WINED3DFMT_BC4_UNORM,
249     WINED3DFMT_BC4_SNORM,
250     WINED3DFMT_BC5_TYPELESS,
251     WINED3DFMT_BC5_UNORM,
252     WINED3DFMT_BC5_SNORM,
253     WINED3DFMT_B5G6R5_UNORM,
254     WINED3DFMT_B5G5R5A1_UNORM,
255     WINED3DFMT_B8G8R8A8_UNORM,
256     WINED3DFMT_B8G8R8X8_UNORM,
257
258     WINED3DFMT_FORCE_DWORD = 0xffffffff
259 } WINED3DFORMAT;
260 cpp_quote("#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \\")
261 cpp_quote("        ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \\")
262 cpp_quote("        ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))")
263 cpp_quote("#define WINED3DFMT_UYVY         WINEMAKEFOURCC('U', 'Y', 'V', 'Y')")
264 cpp_quote("#define WINED3DFMT_YUY2         WINEMAKEFOURCC('Y', 'U', 'Y', '2')")
265 cpp_quote("#define WINED3DFMT_YV12         WINEMAKEFOURCC('Y', 'V', '1', '2')")
266 cpp_quote("#define WINED3DFMT_DXT1         WINEMAKEFOURCC('D', 'X', 'T', '1')")
267 cpp_quote("#define WINED3DFMT_DXT2         WINEMAKEFOURCC('D', 'X', 'T', '2')")
268 cpp_quote("#define WINED3DFMT_DXT3         WINEMAKEFOURCC('D', 'X', 'T', '3')")
269 cpp_quote("#define WINED3DFMT_DXT4         WINEMAKEFOURCC('D', 'X', 'T', '4')")
270 cpp_quote("#define WINED3DFMT_DXT5         WINEMAKEFOURCC('D', 'X', 'T', '5')")
271 cpp_quote("#define WINED3DFMT_MULTI2_ARGB8 WINEMAKEFOURCC('M', 'E', 'T', '1')")
272 cpp_quote("#define WINED3DFMT_G8R8_G8B8    WINEMAKEFOURCC('G', 'R', 'G', 'B')")
273 cpp_quote("#define WINED3DFMT_R8G8_B8G8    WINEMAKEFOURCC('R', 'G', 'B', 'G')")
274 /* Vendor specific formats */
275 cpp_quote("#define WINED3DFMT_ATI2N        WINEMAKEFOURCC('A', 'T', 'I', '2')")
276 cpp_quote("#define WINED3DFMT_NVHU         WINEMAKEFOURCC('N', 'V', 'H', 'U')")
277 cpp_quote("#define WINED3DFMT_NVHS         WINEMAKEFOURCC('N', 'V', 'H', 'S')")
278
279 typedef enum _WINED3DRENDERSTATETYPE
280 {
281     WINED3DRS_TEXTUREHANDLE                 = 1, /* d3d7 */
282     WINED3DRS_ANTIALIAS                     = 2, /* d3d7 */
283     WINED3DRS_TEXTUREADDRESS                = 3, /* d3d7 */
284     WINED3DRS_TEXTUREPERSPECTIVE            = 4, /* d3d7 */
285     WINED3DRS_WRAPU                         = 5, /* d3d7 */
286     WINED3DRS_WRAPV                         = 6, /* d3d7 */
287     WINED3DRS_ZENABLE                       = 7,
288     WINED3DRS_FILLMODE                      = 8,
289     WINED3DRS_SHADEMODE                     = 9,
290     WINED3DRS_LINEPATTERN                   = 10, /* d3d7, d3d8 */
291     WINED3DRS_MONOENABLE                    = 11, /* d3d7 */
292     WINED3DRS_ROP2                          = 12, /* d3d7 */
293     WINED3DRS_PLANEMASK                     = 13, /* d3d7 */
294     WINED3DRS_ZWRITEENABLE                  = 14,
295     WINED3DRS_ALPHATESTENABLE               = 15,
296     WINED3DRS_LASTPIXEL                     = 16,
297     WINED3DRS_TEXTUREMAG                    = 17, /* d3d7 */
298     WINED3DRS_TEXTUREMIN                    = 18, /* d3d7 */
299     WINED3DRS_SRCBLEND                      = 19,
300     WINED3DRS_DESTBLEND                     = 20,
301     WINED3DRS_TEXTUREMAPBLEND               = 21, /* d3d7 */
302     WINED3DRS_CULLMODE                      = 22,
303     WINED3DRS_ZFUNC                         = 23,
304     WINED3DRS_ALPHAREF                      = 24,
305     WINED3DRS_ALPHAFUNC                     = 25,
306     WINED3DRS_DITHERENABLE                  = 26,
307     WINED3DRS_ALPHABLENDENABLE              = 27,
308     WINED3DRS_FOGENABLE                     = 28,
309     WINED3DRS_SPECULARENABLE                = 29,
310     WINED3DRS_ZVISIBLE                      = 30, /* d3d7, d3d8 */
311     WINED3DRS_SUBPIXEL                      = 31, /* d3d7 */
312     WINED3DRS_SUBPIXELX                     = 32, /* d3d7 */
313     WINED3DRS_STIPPLEDALPHA                 = 33, /* d3d7 */
314     WINED3DRS_FOGCOLOR                      = 34,
315     WINED3DRS_FOGTABLEMODE                  = 35,
316     WINED3DRS_FOGSTART                      = 36,
317     WINED3DRS_FOGEND                        = 37,
318     WINED3DRS_FOGDENSITY                    = 38,
319     WINED3DRS_STIPPLEENABLE                 = 39, /* d3d7 */
320     WINED3DRS_EDGEANTIALIAS                 = 40, /* d3d7, d3d8 */
321     WINED3DRS_COLORKEYENABLE                = 41, /* d3d7 */
322     WINED3DRS_BORDERCOLOR                   = 43, /* d3d7 */
323     WINED3DRS_TEXTUREADDRESSU               = 44, /* d3d7 */
324     WINED3DRS_TEXTUREADDRESSV               = 45, /* d3d7 */
325     WINED3DRS_MIPMAPLODBIAS                 = 46, /* d3d7 */
326     WINED3DRS_ZBIAS                         = 47, /* d3d7, d3d8 */
327     WINED3DRS_RANGEFOGENABLE                = 48,
328     WINED3DRS_ANISOTROPY                    = 49, /* d3d7 */
329     WINED3DRS_FLUSHBATCH                    = 50, /* d3d7 */
330     WINED3DRS_TRANSLUCENTSORTINDEPENDENT    = 51, /* d3d7 */
331     WINED3DRS_STENCILENABLE                 = 52,
332     WINED3DRS_STENCILFAIL                   = 53,
333     WINED3DRS_STENCILZFAIL                  = 54,
334     WINED3DRS_STENCILPASS                   = 55,
335     WINED3DRS_STENCILFUNC                   = 56,
336     WINED3DRS_STENCILREF                    = 57,
337     WINED3DRS_STENCILMASK                   = 58,
338     WINED3DRS_STENCILWRITEMASK              = 59,
339     WINED3DRS_TEXTUREFACTOR                 = 60,
340     WINED3DRS_STIPPLEPATTERN00              = 64,
341     WINED3DRS_STIPPLEPATTERN01              = 65,
342     WINED3DRS_STIPPLEPATTERN02              = 66,
343     WINED3DRS_STIPPLEPATTERN03              = 67,
344     WINED3DRS_STIPPLEPATTERN04              = 68,
345     WINED3DRS_STIPPLEPATTERN05              = 69,
346     WINED3DRS_STIPPLEPATTERN06              = 70,
347     WINED3DRS_STIPPLEPATTERN07              = 71,
348     WINED3DRS_STIPPLEPATTERN08              = 72,
349     WINED3DRS_STIPPLEPATTERN09              = 73,
350     WINED3DRS_STIPPLEPATTERN10              = 74,
351     WINED3DRS_STIPPLEPATTERN11              = 75,
352     WINED3DRS_STIPPLEPATTERN12              = 76,
353     WINED3DRS_STIPPLEPATTERN13              = 77,
354     WINED3DRS_STIPPLEPATTERN14              = 78,
355     WINED3DRS_STIPPLEPATTERN15              = 79,
356     WINED3DRS_STIPPLEPATTERN16              = 80,
357     WINED3DRS_STIPPLEPATTERN17              = 81,
358     WINED3DRS_STIPPLEPATTERN18              = 82,
359     WINED3DRS_STIPPLEPATTERN19              = 83,
360     WINED3DRS_STIPPLEPATTERN20              = 84,
361     WINED3DRS_STIPPLEPATTERN21              = 85,
362     WINED3DRS_STIPPLEPATTERN22              = 86,
363     WINED3DRS_STIPPLEPATTERN23              = 87,
364     WINED3DRS_STIPPLEPATTERN24              = 88,
365     WINED3DRS_STIPPLEPATTERN25              = 89,
366     WINED3DRS_STIPPLEPATTERN26              = 90,
367     WINED3DRS_STIPPLEPATTERN27              = 91,
368     WINED3DRS_STIPPLEPATTERN28              = 92,
369     WINED3DRS_STIPPLEPATTERN29              = 93,
370     WINED3DRS_STIPPLEPATTERN30              = 94,
371     WINED3DRS_STIPPLEPATTERN31              = 95,
372     WINED3DRS_WRAP0                         = 128,
373     WINED3DRS_WRAP1                         = 129,
374     WINED3DRS_WRAP2                         = 130,
375     WINED3DRS_WRAP3                         = 131,
376     WINED3DRS_WRAP4                         = 132,
377     WINED3DRS_WRAP5                         = 133,
378     WINED3DRS_WRAP6                         = 134,
379     WINED3DRS_WRAP7                         = 135,
380     WINED3DRS_CLIPPING                      = 136,
381     WINED3DRS_LIGHTING                      = 137,
382     WINED3DRS_EXTENTS                       = 138, /* d3d7 */
383     WINED3DRS_AMBIENT                       = 139,
384     WINED3DRS_FOGVERTEXMODE                 = 140,
385     WINED3DRS_COLORVERTEX                   = 141,
386     WINED3DRS_LOCALVIEWER                   = 142,
387     WINED3DRS_NORMALIZENORMALS              = 143,
388     WINED3DRS_COLORKEYBLENDENABLE           = 144, /* d3d7 */
389     WINED3DRS_DIFFUSEMATERIALSOURCE         = 145,
390     WINED3DRS_SPECULARMATERIALSOURCE        = 146,
391     WINED3DRS_AMBIENTMATERIALSOURCE         = 147,
392     WINED3DRS_EMISSIVEMATERIALSOURCE        = 148,
393     WINED3DRS_VERTEXBLEND                   = 151,
394     WINED3DRS_CLIPPLANEENABLE               = 152,
395     WINED3DRS_SOFTWAREVERTEXPROCESSING      = 153, /* d3d8 */
396     WINED3DRS_POINTSIZE                     = 154,
397     WINED3DRS_POINTSIZE_MIN                 = 155,
398     WINED3DRS_POINTSPRITEENABLE             = 156,
399     WINED3DRS_POINTSCALEENABLE              = 157,
400     WINED3DRS_POINTSCALE_A                  = 158,
401     WINED3DRS_POINTSCALE_B                  = 159,
402     WINED3DRS_POINTSCALE_C                  = 160,
403     WINED3DRS_MULTISAMPLEANTIALIAS          = 161,
404     WINED3DRS_MULTISAMPLEMASK               = 162,
405     WINED3DRS_PATCHEDGESTYLE                = 163,
406     WINED3DRS_PATCHSEGMENTS                 = 164, /* d3d8 */
407     WINED3DRS_DEBUGMONITORTOKEN             = 165,
408     WINED3DRS_POINTSIZE_MAX                 = 166,
409     WINED3DRS_INDEXEDVERTEXBLENDENABLE      = 167,
410     WINED3DRS_COLORWRITEENABLE              = 168,
411     WINED3DRS_TWEENFACTOR                   = 170,
412     WINED3DRS_BLENDOP                       = 171,
413     WINED3DRS_POSITIONORDER                 = 172,
414     WINED3DRS_NORMALORDER                   = 173,
415     WINED3DRS_POSITIONDEGREE                = 172,
416     WINED3DRS_NORMALDEGREE                  = 173,
417     WINED3DRS_SCISSORTESTENABLE             = 174,
418     WINED3DRS_SLOPESCALEDEPTHBIAS           = 175,
419     WINED3DRS_ANTIALIASEDLINEENABLE         = 176,
420     WINED3DRS_MINTESSELLATIONLEVEL          = 178,
421     WINED3DRS_MAXTESSELLATIONLEVEL          = 179,
422     WINED3DRS_ADAPTIVETESS_X                = 180,
423     WINED3DRS_ADAPTIVETESS_Y                = 181,
424     WINED3DRS_ADAPTIVETESS_Z                = 182,
425     WINED3DRS_ADAPTIVETESS_W                = 183,
426     WINED3DRS_ENABLEADAPTIVETESSELLATION    = 184,
427     WINED3DRS_TWOSIDEDSTENCILMODE           = 185,
428     WINED3DRS_CCW_STENCILFAIL               = 186,
429     WINED3DRS_CCW_STENCILZFAIL              = 187,
430     WINED3DRS_CCW_STENCILPASS               = 188,
431     WINED3DRS_CCW_STENCILFUNC               = 189,
432     WINED3DRS_COLORWRITEENABLE1             = 190,
433     WINED3DRS_COLORWRITEENABLE2             = 191,
434     WINED3DRS_COLORWRITEENABLE3             = 192,
435     WINED3DRS_BLENDFACTOR                   = 193,
436     WINED3DRS_SRGBWRITEENABLE               = 194,
437     WINED3DRS_DEPTHBIAS                     = 195,
438     WINED3DRS_WRAP8                         = 198,
439     WINED3DRS_WRAP9                         = 199,
440     WINED3DRS_WRAP10                        = 200,
441     WINED3DRS_WRAP11                        = 201,
442     WINED3DRS_WRAP12                        = 202,
443     WINED3DRS_WRAP13                        = 203,
444     WINED3DRS_WRAP14                        = 204,
445     WINED3DRS_WRAP15                        = 205,
446     WINED3DRS_SEPARATEALPHABLENDENABLE      = 206,
447     WINED3DRS_SRCBLENDALPHA                 = 207,
448     WINED3DRS_DESTBLENDALPHA                = 208,
449     WINED3DRS_BLENDOPALPHA                  = 209,
450     WINED3DRS_FORCE_DWORD                   = 0x7fffffff
451 } WINED3DRENDERSTATETYPE;
452 const UINT WINEHIGHEST_RENDER_STATE         = WINED3DRS_BLENDOPALPHA;
453
454 typedef enum _WINED3DBLEND
455 {
456     WINED3DBLEND_ZERO                       =  1,
457     WINED3DBLEND_ONE                        =  2,
458     WINED3DBLEND_SRCCOLOR                   =  3,
459     WINED3DBLEND_INVSRCCOLOR                =  4,
460     WINED3DBLEND_SRCALPHA                   =  5,
461     WINED3DBLEND_INVSRCALPHA                =  6,
462     WINED3DBLEND_DESTALPHA                  =  7,
463     WINED3DBLEND_INVDESTALPHA               =  8,
464     WINED3DBLEND_DESTCOLOR                  =  9,
465     WINED3DBLEND_INVDESTCOLOR               = 10,
466     WINED3DBLEND_SRCALPHASAT                = 11,
467     WINED3DBLEND_BOTHSRCALPHA               = 12,
468     WINED3DBLEND_BOTHINVSRCALPHA            = 13,
469     WINED3DBLEND_BLENDFACTOR                = 14,
470     WINED3DBLEND_INVBLENDFACTOR             = 15,
471     WINED3DBLEND_FORCE_DWORD                = 0x7fffffff
472 } WINED3DBLEND;
473
474 typedef enum _WINED3DBLENDOP
475 {
476     WINED3DBLENDOP_ADD                      = 1,
477     WINED3DBLENDOP_SUBTRACT                 = 2,
478     WINED3DBLENDOP_REVSUBTRACT              = 3,
479     WINED3DBLENDOP_MIN                      = 4,
480     WINED3DBLENDOP_MAX                      = 5,
481     WINED3DBLENDOP_FORCE_DWORD              = 0x7fffffff
482 } WINED3DBLENDOP;
483
484 typedef enum _WINED3DVERTEXBLENDFLAGS
485 {
486     WINED3DVBF_DISABLE                      = 0,
487     WINED3DVBF_1WEIGHTS                     = 1,
488     WINED3DVBF_2WEIGHTS                     = 2,
489     WINED3DVBF_3WEIGHTS                     = 3,
490     WINED3DVBF_TWEENING                     = 255,
491     WINED3DVBF_0WEIGHTS                     = 256
492 } WINED3DVERTEXBLENDFLAGS;
493
494 typedef enum _WINED3DCMPFUNC
495 {
496     WINED3DCMP_NEVER                        = 1,
497     WINED3DCMP_LESS                         = 2,
498     WINED3DCMP_EQUAL                        = 3,
499     WINED3DCMP_LESSEQUAL                    = 4,
500     WINED3DCMP_GREATER                      = 5,
501     WINED3DCMP_NOTEQUAL                     = 6,
502     WINED3DCMP_GREATEREQUAL                 = 7,
503     WINED3DCMP_ALWAYS                       = 8,
504     WINED3DCMP_FORCE_DWORD                  = 0x7fffffff
505 } WINED3DCMPFUNC;
506
507 typedef enum _WINED3DZBUFFERTYPE
508 {
509     WINED3DZB_FALSE                         = 0,
510     WINED3DZB_TRUE                          = 1,
511     WINED3DZB_USEW                          = 2,
512     WINED3DZB_FORCE_DWORD                   = 0x7fffffff
513 } WINED3DZBUFFERTYPE;
514
515 typedef enum _WINED3DFOGMODE
516 {
517     WINED3DFOG_NONE                         = 0,
518     WINED3DFOG_EXP                          = 1,
519     WINED3DFOG_EXP2                         = 2,
520     WINED3DFOG_LINEAR                       = 3,
521     WINED3DFOG_FORCE_DWORD                  = 0x7fffffff
522 } WINED3DFOGMODE;
523
524 typedef enum _WINED3DSHADEMODE
525 {
526     WINED3DSHADE_FLAT                       = 1,
527     WINED3DSHADE_GOURAUD                    = 2,
528     WINED3DSHADE_PHONG                      = 3,
529     WINED3DSHADE_FORCE_DWORD                = 0x7fffffff
530 } WINED3DSHADEMODE;
531
532 typedef enum _WINED3DFILLMODE
533 {
534     WINED3DFILL_POINT                       = 1,
535     WINED3DFILL_WIREFRAME                   = 2,
536     WINED3DFILL_SOLID                       = 3,
537     WINED3DFILL_FORCE_DWORD                 = 0x7fffffff
538 } WINED3DFILLMODE;
539
540 typedef enum _WINED3DCULL
541 {
542     WINED3DCULL_NONE                        = 1,
543     WINED3DCULL_CW                          = 2,
544     WINED3DCULL_CCW                         = 3,
545     WINED3DCULL_FORCE_DWORD                 = 0x7fffffff
546 } WINED3DCULL;
547
548 typedef enum _WINED3DSTENCILOP
549 {
550     WINED3DSTENCILOP_KEEP                   = 1,
551     WINED3DSTENCILOP_ZERO                   = 2,
552     WINED3DSTENCILOP_REPLACE                = 3,
553     WINED3DSTENCILOP_INCRSAT                = 4,
554     WINED3DSTENCILOP_DECRSAT                = 5,
555     WINED3DSTENCILOP_INVERT                 = 6,
556     WINED3DSTENCILOP_INCR                   = 7,
557     WINED3DSTENCILOP_DECR                   = 8,
558     WINED3DSTENCILOP_FORCE_DWORD            = 0x7fffffff
559 } WINED3DSTENCILOP;
560
561 typedef enum _WINED3DMATERIALCOLORSOURCE
562 {
563     WINED3DMCS_MATERIAL                     = 0,
564     WINED3DMCS_COLOR1                       = 1,
565     WINED3DMCS_COLOR2                       = 2,
566     WINED3DMCS_FORCE_DWORD                  = 0x7fffffff
567 } WINED3DMATERIALCOLORSOURCE;
568
569 typedef enum _WINED3DPATCHEDGESTYLE
570 {
571     WINED3DPATCHEDGE_DISCRETE               = 0,
572     WINED3DPATCHEDGE_CONTINUOUS             = 1,
573     WINED3DPATCHEDGE_FORCE_DWORD            = 0x7fffffff
574 } WINED3DPATCHEDGESTYLE;
575
576 typedef enum _WINED3DBACKBUFFER_TYPE
577 {
578     WINED3DBACKBUFFER_TYPE_MONO             = 0,
579     WINED3DBACKBUFFER_TYPE_LEFT             = 1,
580     WINED3DBACKBUFFER_TYPE_RIGHT            = 2,
581     WINED3DBACKBUFFER_TYPE_FORCE_DWORD      = 0x7fffffff
582 } WINED3DBACKBUFFER_TYPE;
583
584 typedef enum _WINED3DSWAPEFFECT
585 {
586     WINED3DSWAPEFFECT_DISCARD               = 1,
587     WINED3DSWAPEFFECT_FLIP                  = 2,
588     WINED3DSWAPEFFECT_COPY                  = 3,
589     WINED3DSWAPEFFECT_COPY_VSYNC            = 4,
590     WINED3DSWAPEFFECT_FORCE_DWORD           = 0xffffffff
591 } WINED3DSWAPEFFECT;
592
593 typedef enum _WINED3DSAMPLERSTATETYPE
594 {
595     WINED3DSAMP_ADDRESSU                    = 1,
596     WINED3DSAMP_ADDRESSV                    = 2,
597     WINED3DSAMP_ADDRESSW                    = 3,
598     WINED3DSAMP_BORDERCOLOR                 = 4,
599     WINED3DSAMP_MAGFILTER                   = 5,
600     WINED3DSAMP_MINFILTER                   = 6,
601     WINED3DSAMP_MIPFILTER                   = 7,
602     WINED3DSAMP_MIPMAPLODBIAS               = 8,
603     WINED3DSAMP_MAXMIPLEVEL                 = 9,
604     WINED3DSAMP_MAXANISOTROPY               = 10,
605     WINED3DSAMP_SRGBTEXTURE                 = 11,
606     WINED3DSAMP_ELEMENTINDEX                = 12,
607     WINED3DSAMP_DMAPOFFSET                  = 13,
608     WINED3DSAMP_FORCE_DWORD                 = 0x7fffffff,
609 } WINED3DSAMPLERSTATETYPE;
610 const UINT WINED3D_HIGHEST_SAMPLER_STATE    = WINED3DSAMP_DMAPOFFSET;
611
612 typedef enum _WINED3DMULTISAMPLE_TYPE
613 {
614     WINED3DMULTISAMPLE_NONE                 = 0,
615     WINED3DMULTISAMPLE_NONMASKABLE          = 1,
616     WINED3DMULTISAMPLE_2_SAMPLES            = 2,
617     WINED3DMULTISAMPLE_3_SAMPLES            = 3,
618     WINED3DMULTISAMPLE_4_SAMPLES            = 4,
619     WINED3DMULTISAMPLE_5_SAMPLES            = 5,
620     WINED3DMULTISAMPLE_6_SAMPLES            = 6,
621     WINED3DMULTISAMPLE_7_SAMPLES            = 7,
622     WINED3DMULTISAMPLE_8_SAMPLES            = 8,
623     WINED3DMULTISAMPLE_9_SAMPLES            = 9,
624     WINED3DMULTISAMPLE_10_SAMPLES           = 10,
625     WINED3DMULTISAMPLE_11_SAMPLES           = 11,
626     WINED3DMULTISAMPLE_12_SAMPLES           = 12,
627     WINED3DMULTISAMPLE_13_SAMPLES           = 13,
628     WINED3DMULTISAMPLE_14_SAMPLES           = 14,
629     WINED3DMULTISAMPLE_15_SAMPLES           = 15,
630     WINED3DMULTISAMPLE_16_SAMPLES           = 16,
631     WINED3DMULTISAMPLE_FORCE_DWORD          = 0xffffffff
632 } WINED3DMULTISAMPLE_TYPE;
633
634 typedef enum _WINED3DTEXTURESTAGESTATETYPE
635 {
636     WINED3DTSS_COLOROP                      = 0,
637     WINED3DTSS_COLORARG1                    = 1,
638     WINED3DTSS_COLORARG2                    = 2,
639     WINED3DTSS_ALPHAOP                      = 3,
640     WINED3DTSS_ALPHAARG1                    = 4,
641     WINED3DTSS_ALPHAARG2                    = 5,
642     WINED3DTSS_BUMPENVMAT00                 = 6,
643     WINED3DTSS_BUMPENVMAT01                 = 7,
644     WINED3DTSS_BUMPENVMAT10                 = 8,
645     WINED3DTSS_BUMPENVMAT11                 = 9,
646     WINED3DTSS_TEXCOORDINDEX                = 10,
647     WINED3DTSS_BUMPENVLSCALE                = 11,
648     WINED3DTSS_BUMPENVLOFFSET               = 12,
649     WINED3DTSS_TEXTURETRANSFORMFLAGS        = 13,
650     WINED3DTSS_COLORARG0                    = 14,
651     WINED3DTSS_ALPHAARG0                    = 15,
652     WINED3DTSS_RESULTARG                    = 16,
653     WINED3DTSS_CONSTANT                     = 17,
654     WINED3DTSS_FORCE_DWORD                  = 0x7fffffff
655 } WINED3DTEXTURESTAGESTATETYPE;
656 const UINT WINED3D_HIGHEST_TEXTURE_STATE    = WINED3DTSS_CONSTANT;
657
658 typedef enum _WINED3DTEXTURETRANSFORMFLAGS
659 {
660     WINED3DTTFF_DISABLE                     = 0,
661     WINED3DTTFF_COUNT1                      = 1,
662     WINED3DTTFF_COUNT2                      = 2,
663     WINED3DTTFF_COUNT3                      = 3,
664     WINED3DTTFF_COUNT4                      = 4,
665     WINED3DTTFF_PROJECTED                   = 256,
666     WINED3DTTFF_FORCE_DWORD                 = 0x7fffffff
667 } WINED3DTEXTURETRANSFORMFLAGS;
668
669 typedef enum _WINED3DTEXTUREOP
670 {
671     WINED3DTOP_DISABLE                      = 1,
672     WINED3DTOP_SELECTARG1                   = 2,
673     WINED3DTOP_SELECTARG2                   = 3,
674     WINED3DTOP_MODULATE                     = 4,
675     WINED3DTOP_MODULATE2X                   = 5,
676     WINED3DTOP_MODULATE4X                   = 6,
677     WINED3DTOP_ADD                          = 7,
678     WINED3DTOP_ADDSIGNED                    = 8,
679     WINED3DTOP_ADDSIGNED2X                  = 9,
680     WINED3DTOP_SUBTRACT                     = 10,
681     WINED3DTOP_ADDSMOOTH                    = 11,
682     WINED3DTOP_BLENDDIFFUSEALPHA            = 12,
683     WINED3DTOP_BLENDTEXTUREALPHA            = 13,
684     WINED3DTOP_BLENDFACTORALPHA             = 14,
685     WINED3DTOP_BLENDTEXTUREALPHAPM          = 15,
686     WINED3DTOP_BLENDCURRENTALPHA            = 16,
687     WINED3DTOP_PREMODULATE                  = 17,
688     WINED3DTOP_MODULATEALPHA_ADDCOLOR       = 18,
689     WINED3DTOP_MODULATECOLOR_ADDALPHA       = 19,
690     WINED3DTOP_MODULATEINVALPHA_ADDCOLOR    = 20,
691     WINED3DTOP_MODULATEINVCOLOR_ADDALPHA    = 21,
692     WINED3DTOP_BUMPENVMAP                   = 22,
693     WINED3DTOP_BUMPENVMAPLUMINANCE          = 23,
694     WINED3DTOP_DOTPRODUCT3                  = 24,
695     WINED3DTOP_MULTIPLYADD                  = 25,
696     WINED3DTOP_LERP                         = 26,
697     WINED3DTOP_FORCE_DWORD                  = 0x7fffffff,
698 } WINED3DTEXTUREOP;
699
700 typedef enum _WINED3DTEXTUREADDRESS
701 {
702     WINED3DTADDRESS_WRAP                    = 1,
703     WINED3DTADDRESS_MIRROR                  = 2,
704     WINED3DTADDRESS_CLAMP                   = 3,
705     WINED3DTADDRESS_BORDER                  = 4,
706     WINED3DTADDRESS_MIRRORONCE              = 5,
707     WINED3DTADDRESS_FORCE_DWORD             = 0x7fffffff
708 } WINED3DTEXTUREADDRESS;
709
710 typedef enum _WINED3DTRANSFORMSTATETYPE
711 {
712     WINED3DTS_VIEW                          = 2,
713     WINED3DTS_PROJECTION                    = 3,
714     WINED3DTS_TEXTURE0                      = 16,
715     WINED3DTS_TEXTURE1                      = 17,
716     WINED3DTS_TEXTURE2                      = 18,
717     WINED3DTS_TEXTURE3                      = 19,
718     WINED3DTS_TEXTURE4                      = 20,
719     WINED3DTS_TEXTURE5                      = 21,
720     WINED3DTS_TEXTURE6                      = 22,
721     WINED3DTS_TEXTURE7                      = 23,
722     WINED3DTS_FORCE_DWORD                   = 0x7fffffff
723 } WINED3DTRANSFORMSTATETYPE;
724 cpp_quote("#define WINED3DTS_WORLD  WINED3DTS_WORLDMATRIX(0)")
725 cpp_quote("#define WINED3DTS_WORLD1 WINED3DTS_WORLDMATRIX(1)")
726 cpp_quote("#define WINED3DTS_WORLD2 WINED3DTS_WORLDMATRIX(2)")
727 cpp_quote("#define WINED3DTS_WORLD3 WINED3DTS_WORLDMATRIX(3)")
728 cpp_quote("#define WINED3DTS_WORLDMATRIX(index) (WINED3DTRANSFORMSTATETYPE)(index + 256)")
729
730 typedef enum _WINED3DBASISTYPE
731 {
732     WINED3DBASIS_BEZIER                     = 0,
733     WINED3DBASIS_BSPLINE                    = 1,
734     WINED3DBASIS_INTERPOLATE                = 2,
735     WINED3DBASIS_FORCE_DWORD                = 0x7fffffff
736 } WINED3DBASISTYPE;
737
738 typedef enum _WINED3DCUBEMAP_FACES
739 {
740     WINED3DCUBEMAP_FACE_POSITIVE_X          = 0,
741     WINED3DCUBEMAP_FACE_NEGATIVE_X          = 1,
742     WINED3DCUBEMAP_FACE_POSITIVE_Y          = 2,
743     WINED3DCUBEMAP_FACE_NEGATIVE_Y          = 3,
744     WINED3DCUBEMAP_FACE_POSITIVE_Z          = 4,
745     WINED3DCUBEMAP_FACE_NEGATIVE_Z          = 5,
746     WINED3DCUBEMAP_FACE_FORCE_DWORD         = 0xffffffff
747 } WINED3DCUBEMAP_FACES;
748
749 typedef enum _WINED3DTEXTUREFILTERTYPE
750 {
751     WINED3DTEXF_NONE                        = 0,
752     WINED3DTEXF_POINT                       = 1,
753     WINED3DTEXF_LINEAR                      = 2,
754     WINED3DTEXF_ANISOTROPIC                 = 3,
755     WINED3DTEXF_FLATCUBIC                   = 4,
756     WINED3DTEXF_GAUSSIANCUBIC               = 5,
757     WINED3DTEXF_PYRAMIDALQUAD               = 6,
758     WINED3DTEXF_GAUSSIANQUAD                = 7,
759     WINED3DTEXF_FORCE_DWORD                 = 0x7fffffff
760 } WINED3DTEXTUREFILTERTYPE;
761
762 typedef enum _WINED3DRESOURCETYPE
763 {
764     WINED3DRTYPE_SURFACE                    = 1,
765     WINED3DRTYPE_VOLUME                     = 2,
766     WINED3DRTYPE_TEXTURE                    = 3,
767     WINED3DRTYPE_VOLUMETEXTURE              = 4,
768     WINED3DRTYPE_CUBETEXTURE                = 5,
769     WINED3DRTYPE_BUFFER                     = 6,
770     WINED3DRTYPE_FORCE_DWORD                = 0x7fffffff
771 } WINED3DRESOURCETYPE;
772 const UINT WINED3DRTYPECOUNT                = WINED3DRTYPE_BUFFER + 1;
773
774 typedef enum _WINED3DPOOL
775 {
776     WINED3DPOOL_DEFAULT                     = 0,
777     WINED3DPOOL_MANAGED                     = 1,
778     WINED3DPOOL_SYSTEMMEM                   = 2,
779     WINED3DPOOL_SCRATCH                     = 3,
780     WINED3DPOOL_FORCE_DWORD                 = 0x7fffffff
781 } WINED3DPOOL;
782
783 typedef enum _WINED3DQUERYTYPE
784 {
785     WINED3DQUERYTYPE_VCACHE                 = 4,
786     WINED3DQUERYTYPE_RESOURCEMANAGER        = 5,
787     WINED3DQUERYTYPE_VERTEXSTATS            = 6,
788     WINED3DQUERYTYPE_EVENT                  = 8,
789     WINED3DQUERYTYPE_OCCLUSION              = 9,
790     WINED3DQUERYTYPE_TIMESTAMP              = 10,
791     WINED3DQUERYTYPE_TIMESTAMPDISJOINT      = 11,
792     WINED3DQUERYTYPE_TIMESTAMPFREQ          = 12,
793     WINED3DQUERYTYPE_PIPELINETIMINGS        = 13,
794     WINED3DQUERYTYPE_INTERFACETIMINGS       = 14,
795     WINED3DQUERYTYPE_VERTEXTIMINGS          = 15,
796     WINED3DQUERYTYPE_PIXELTIMINGS           = 16,
797     WINED3DQUERYTYPE_BANDWIDTHTIMINGS       = 17,
798     WINED3DQUERYTYPE_CACHEUTILIZATION       = 18
799 } WINED3DQUERYTYPE;
800
801 const UINT WINED3DISSUE_BEGIN               = (1 << 1);
802 const UINT WINED3DISSUE_END                 = (1 << 0);
803 const UINT WINED3DGETDATA_FLUSH             = (1 << 0);
804
805 typedef enum _WINED3DSTATEBLOCKTYPE
806 {
807     WINED3DSBT_INIT                         = 0,
808     WINED3DSBT_ALL                          = 1,
809     WINED3DSBT_PIXELSTATE                   = 2,
810     WINED3DSBT_VERTEXSTATE                  = 3,
811     WINED3DSBT_RECORDED                     = 4, /* WineD3D private */
812     WINED3DSBT_FORCE_DWORD                  = 0xffffffff
813 } WINED3DSTATEBLOCKTYPE;
814
815 typedef enum _WINED3DDECLMETHOD
816 {
817     WINED3DDECLMETHOD_DEFAULT               = 0,
818     WINED3DDECLMETHOD_PARTIALU              = 1,
819     WINED3DDECLMETHOD_PARTIALV              = 2,
820     WINED3DDECLMETHOD_CROSSUV               = 3,
821     WINED3DDECLMETHOD_UV                    = 4,
822     WINED3DDECLMETHOD_LOOKUP                = 5,
823     WINED3DDECLMETHOD_LOOKUPPRESAMPLED      = 6
824 } WINED3DDECLMETHOD;
825
826 typedef enum _WINED3DDECLUSAGE
827 {
828     WINED3DDECLUSAGE_POSITION               = 0,
829     WINED3DDECLUSAGE_BLENDWEIGHT            = 1,
830     WINED3DDECLUSAGE_BLENDINDICES           = 2,
831     WINED3DDECLUSAGE_NORMAL                 = 3,
832     WINED3DDECLUSAGE_PSIZE                  = 4,
833     WINED3DDECLUSAGE_TEXCOORD               = 5,
834     WINED3DDECLUSAGE_TANGENT                = 6,
835     WINED3DDECLUSAGE_BINORMAL               = 7,
836     WINED3DDECLUSAGE_TESSFACTOR             = 8,
837     WINED3DDECLUSAGE_POSITIONT              = 9,
838     WINED3DDECLUSAGE_COLOR                  = 10,
839     WINED3DDECLUSAGE_FOG                    = 11,
840     WINED3DDECLUSAGE_DEPTH                  = 12,
841     WINED3DDECLUSAGE_SAMPLE                 = 13
842 } WINED3DDECLUSAGE;
843
844 typedef enum _WINED3DSURFTYPE
845 {
846     SURFACE_UNKNOWN                         = 0,    /* Default / Unknown surface type */
847     SURFACE_OPENGL,                                 /* OpenGL surface: Renders using libGL, needed for 3D */
848     SURFACE_GDI,                                    /* User surface. No 3D, DirectDraw rendering with GDI */
849 } WINED3DSURFTYPE;
850
851 const UINT WINED3DCOLORWRITEENABLE_RED                          = (1<<0);
852 const UINT WINED3DCOLORWRITEENABLE_GREEN                        = (1<<1);
853 const UINT WINED3DCOLORWRITEENABLE_BLUE                         = (1<<2);
854 const UINT WINED3DCOLORWRITEENABLE_ALPHA                        = (1<<3);
855
856 const UINT WINED3DADAPTER_DEFAULT                               = 0;
857 const UINT WINED3DENUM_NO_WHQL_LEVEL                            = 2;
858 const UINT WINED3DPRESENT_BACK_BUFFER_MAX                       = 3;
859
860 const UINT WINED3DTSS_TCI_PASSTHRU                              = 0x00000;
861 const UINT WINED3DTSS_TCI_CAMERASPACENORMAL                     = 0x10000;
862 const UINT WINED3DTSS_TCI_CAMERASPACEPOSITION                   = 0x20000;
863 const UINT WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR           = 0x30000;
864 const UINT WINED3DTSS_TCI_SPHEREMAP                             = 0x40000;
865
866 const UINT WINED3DTA_SELECTMASK                                 = 0x0000000f;
867 const UINT WINED3DTA_DIFFUSE                                    = 0x00000000;
868 const UINT WINED3DTA_CURRENT                                    = 0x00000001;
869 const UINT WINED3DTA_TEXTURE                                    = 0x00000002;
870 const UINT WINED3DTA_TFACTOR                                    = 0x00000003;
871 const UINT WINED3DTA_SPECULAR                                   = 0x00000004;
872 const UINT WINED3DTA_TEMP                                       = 0x00000005;
873 const UINT WINED3DTA_CONSTANT                                   = 0x00000006;
874 const UINT WINED3DTA_COMPLEMENT                                 = 0x00000010;
875 const UINT WINED3DTA_ALPHAREPLICATE                             = 0x00000020;
876
877 const UINT WINED3DPRESENTFLAG_LOCKABLE_BACKBUFFER               = 0x00000001;
878 const UINT WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL              = 0x00000002;
879 const UINT WINED3DPRESENTFLAG_DEVICECLIP                        = 0x00000004;
880 const UINT WINED3DPRESENTFLAG_VIDEO                             = 0x00000010;
881 const UINT WINED3DPRESENTFLAG_NOAUTOROTATE                      = 0x00000020;
882 const UINT WINED3DPRESENTFLAG_UNPRUNEDMODE                      = 0x00000040;
883
884 const UINT WINED3DDP_MAXTEXCOORD                                = 8;
885
886 const UINT WINED3DUSAGE_RENDERTARGET                            = 0x00000001;
887 const UINT WINED3DUSAGE_DEPTHSTENCIL                            = 0x00000002;
888 const UINT WINED3DUSAGE_WRITEONLY                               = 0x00000008;
889 const UINT WINED3DUSAGE_SOFTWAREPROCESSING                      = 0x00000010;
890 const UINT WINED3DUSAGE_DONOTCLIP                               = 0x00000020;
891 const UINT WINED3DUSAGE_POINTS                                  = 0x00000040;
892 const UINT WINED3DUSAGE_RTPATCHES                               = 0x00000080;
893 const UINT WINED3DUSAGE_NPATCHES                                = 0x00000100;
894 const UINT WINED3DUSAGE_DYNAMIC                                 = 0x00000200;
895 const UINT WINED3DUSAGE_AUTOGENMIPMAP                           = 0x00000400;
896 const UINT WINED3DUSAGE_DMAP                                    = 0x00004000;
897 const UINT WINED3DUSAGE_MASK                                    = 0x00004fff;
898 const UINT WINED3DUSAGE_OVERLAY                                 = 0x80000000;
899
900 const UINT WINED3DUSAGE_QUERY_LEGACYBUMPMAP                     = 0x00008000;
901 const UINT WINED3DUSAGE_QUERY_FILTER                            = 0x00020000;
902 const UINT WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING          = 0x00080000;
903 const UINT WINED3DUSAGE_QUERY_SRGBREAD                          = 0x00010000;
904 const UINT WINED3DUSAGE_QUERY_SRGBWRITE                         = 0x00040000;
905 const UINT WINED3DUSAGE_QUERY_VERTEXTEXTURE                     = 0x00100000;
906 const UINT WINED3DUSAGE_QUERY_WRAPANDMIP                        = 0x00200000;
907 const UINT WINED3DUSAGE_QUERY_MASK                              = 0x003f8000;
908
909 const UINT WINED3DLOCK_READONLY                                 = 0x0010;
910 const UINT WINED3DLOCK_NOSYSLOCK                                = 0x0800;
911 const UINT WINED3DLOCK_NOOVERWRITE                              = 0x1000;
912 const UINT WINED3DLOCK_DISCARD                                  = 0x2000;
913 const UINT WINED3DLOCK_DONOTWAIT                                = 0x4000;
914 const UINT WINED3DLOCK_NO_DIRTY_UPDATE                          = 0x8000;
915
916 const UINT WINED3DPRESENT_RATE_DEFAULT                          = 0x000000000;
917
918 const UINT WINED3DPRESENT_INTERVAL_DEFAULT                      = 0x00000000;
919 const UINT WINED3DPRESENT_INTERVAL_ONE                          = 0x00000001;
920 const UINT WINED3DPRESENT_INTERVAL_TWO                          = 0x00000002;
921 const UINT WINED3DPRESENT_INTERVAL_THREE                        = 0x00000004;
922 const UINT WINED3DPRESENT_INTERVAL_FOUR                         = 0x00000008;
923 const UINT WINED3DPRESENT_INTERVAL_IMMEDIATE                    = 0x80000000;
924
925 const UINT WINED3DMAXUSERCLIPPLANES                             = 32;
926 const UINT WINED3DCLIPPLANE0                                    = (1 << 0);
927 const UINT WINED3DCLIPPLANE1                                    = (1 << 1);
928 const UINT WINED3DCLIPPLANE2                                    = (1 << 2);
929 const UINT WINED3DCLIPPLANE3                                    = (1 << 3);
930 const UINT WINED3DCLIPPLANE4                                    = (1 << 4);
931 const UINT WINED3DCLIPPLANE5                                    = (1 << 5);
932
933 /* FVF (Flexible Vertex Format) codes */
934 const UINT WINED3DFVF_RESERVED0                                 = 0x0001;
935 const UINT WINED3DFVF_POSITION_MASK                             = 0x400e;
936 const UINT WINED3DFVF_XYZ                                       = 0x0002;
937 const UINT WINED3DFVF_XYZRHW                                    = 0x0004;
938 const UINT WINED3DFVF_XYZB1                                     = 0x0006;
939 const UINT WINED3DFVF_XYZB2                                     = 0x0008;
940 const UINT WINED3DFVF_XYZB3                                     = 0x000a;
941 const UINT WINED3DFVF_XYZB4                                     = 0x000c;
942 const UINT WINED3DFVF_XYZB5                                     = 0x000e;
943 const UINT WINED3DFVF_XYZW                                      = 0x4002;
944 const UINT WINED3DFVF_NORMAL                                    = 0x0010;
945 const UINT WINED3DFVF_PSIZE                                     = 0x0020;
946 const UINT WINED3DFVF_DIFFUSE                                   = 0x0040;
947 const UINT WINED3DFVF_SPECULAR                                  = 0x0080;
948 const UINT WINED3DFVF_TEXCOUNT_MASK                             = 0x0f00;
949 const UINT WINED3DFVF_TEXCOUNT_SHIFT                            = 8;
950 const UINT WINED3DFVF_TEX0                                      = 0x0000;
951 const UINT WINED3DFVF_TEX1                                      = 0x0100;
952 const UINT WINED3DFVF_TEX2                                      = 0x0200;
953 const UINT WINED3DFVF_TEX3                                      = 0x0300;
954 const UINT WINED3DFVF_TEX4                                      = 0x0400;
955 const UINT WINED3DFVF_TEX5                                      = 0x0500;
956 const UINT WINED3DFVF_TEX6                                      = 0x0600;
957 const UINT WINED3DFVF_TEX7                                      = 0x0700;
958 const UINT WINED3DFVF_TEX8                                      = 0x0800;
959 const UINT WINED3DFVF_LASTBETA_UBYTE4                           = 0x1000;
960 const UINT WINED3DFVF_LASTBETA_D3DCOLOR                         = 0x8000;
961 const UINT WINED3DFVF_RESERVED2                                 = 0x6000;
962
963 const UINT WINED3DFVF_TEXTUREFORMAT1                            = 3;
964 const UINT WINED3DFVF_TEXTUREFORMAT2                            = 0;
965 const UINT WINED3DFVF_TEXTUREFORMAT3                            = 1;
966 const UINT WINED3DFVF_TEXTUREFORMAT4                            = 2;
967 cpp_quote("#define WINED3DFVF_TEXCOORDSIZE1(CoordIndex) (WINED3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))")
968 cpp_quote("#define WINED3DFVF_TEXCOORDSIZE2(CoordIndex) (WINED3DFVF_TEXTUREFORMAT2)")
969 cpp_quote("#define WINED3DFVF_TEXCOORDSIZE3(CoordIndex) (WINED3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))")
970 cpp_quote("#define WINED3DFVF_TEXCOORDSIZE4(CoordIndex) (WINED3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))")
971
972 /* Clear flags */
973 const UINT WINED3DCLEAR_TARGET                                  = 0x00000001;
974 const UINT WINED3DCLEAR_ZBUFFER                                 = 0x00000002;
975 const UINT WINED3DCLEAR_STENCIL                                 = 0x00000004;
976
977 /* Stream source flags */
978 const UINT WINED3DSTREAMSOURCE_INDEXEDDATA                      = (1 << 30);
979 const UINT WINED3DSTREAMSOURCE_INSTANCEDATA                     = (2 << 30);
980
981 /* SetPrivateData flags */
982 const UINT WINED3DSPD_IUNKNOWN                                  = 0x00000001;
983
984 /* IWineD3D::CreateDevice behaviour flags */
985 const UINT WINED3DCREATE_FPU_PRESERVE                           = 0x00000002;
986 const UINT WINED3DCREATE_PUREDEVICE                             = 0x00000010;
987 const UINT WINED3DCREATE_SOFTWARE_VERTEXPROCESSING              = 0x00000020;
988 const UINT WINED3DCREATE_HARDWARE_VERTEXPROCESSING              = 0x00000040;
989 const UINT WINED3DCREATE_MIXED_VERTEXPROCESSING                 = 0x00000080;
990 const UINT WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT              = 0x00000100;
991 const UINT WINED3DCREATE_ADAPTERGROUP_DEVICE                    = 0x00000200;
992
993 /* VTF defines */
994 const UINT WINED3DDMAPSAMPLER                                   = 0x100;
995 const UINT WINED3DVERTEXTEXTURESAMPLER0                         = (WINED3DDMAPSAMPLER + 1);
996 const UINT WINED3DVERTEXTEXTURESAMPLER1                         = (WINED3DDMAPSAMPLER + 2);
997 const UINT WINED3DVERTEXTEXTURESAMPLER2                         = (WINED3DDMAPSAMPLER + 3);
998 const UINT WINED3DVERTEXTEXTURESAMPLER3                         = (WINED3DDMAPSAMPLER + 4);
999
1000 const UINT WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD        = 0x00000020;
1001 const UINT WINED3DCAPS3_LINEAR_TO_SRGB_PRESENTATION             = 0x00000080;
1002 const UINT WINED3DCAPS3_COPY_TO_VIDMEM                          = 0x00000100;
1003 const UINT WINED3DCAPS3_COPY_TO_SYSTEMMEM                       = 0x00000200;
1004 const UINT WINED3DCAPS3_RESERVED                                = 0x8000001f;
1005
1006 const UINT WINED3DDEVCAPS2_STREAMOFFSET                         = 0x00000001;
1007 const UINT WINED3DDEVCAPS2_DMAPNPATCH                           = 0x00000002;
1008 const UINT WINED3DDEVCAPS2_ADAPTIVETESSRTPATCH                  = 0x00000004;
1009 const UINT WINED3DDEVCAPS2_ADAPTIVETESSNPATCH                   = 0x00000008;
1010 const UINT WINED3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES        = 0x00000010;
1011 const UINT WINED3DDEVCAPS2_PRESAMPLEDDMAPNPATCH                 = 0x00000020;
1012 const UINT WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET   = 0x00000040;
1013
1014 const UINT WINED3DDTCAPS_UBYTE4                                 = 0x00000001;
1015 const UINT WINED3DDTCAPS_UBYTE4N                                = 0x00000002;
1016 const UINT WINED3DDTCAPS_SHORT2N                                = 0x00000004;
1017 const UINT WINED3DDTCAPS_SHORT4N                                = 0x00000008;
1018 const UINT WINED3DDTCAPS_USHORT2N                               = 0x00000010;
1019 const UINT WINED3DDTCAPS_USHORT4N                               = 0x00000020;
1020 const UINT WINED3DDTCAPS_UDEC3                                  = 0x00000040;
1021 const UINT WINED3DDTCAPS_DEC3N                                  = 0x00000080;
1022 const UINT WINED3DDTCAPS_FLOAT16_2                              = 0x00000100;
1023 const UINT WINED3DDTCAPS_FLOAT16_4                              = 0x00000200;
1024
1025 const UINT WINED3DFVFCAPS_TEXCOORDCOUNTMASK                     = 0x0000ffff;
1026 const UINT WINED3DFVFCAPS_DONOTSTRIPELEMENTS                    = 0x00080000;
1027 const UINT WINED3DFVFCAPS_PSIZE                                 = 0x00100000;
1028
1029 const UINT WINED3DLINECAPS_TEXTURE                              = 0x00000001;
1030 const UINT WINED3DLINECAPS_ZTEST                                = 0x00000002;
1031 const UINT WINED3DLINECAPS_BLEND                                = 0x00000004;
1032 const UINT WINED3DLINECAPS_ALPHACMP                             = 0x00000008;
1033 const UINT WINED3DLINECAPS_FOG                                  = 0x00000010;
1034 const UINT WINED3DLINECAPS_ANTIALIAS                            = 0x00000020;
1035
1036 const UINT WINED3DMAX30SHADERINSTRUCTIONS                       = 32768;
1037 const UINT WINED3DMIN30SHADERINSTRUCTIONS                       = 512;
1038
1039 const UINT WINED3DPBLENDCAPS_ZERO                               = 0x00000001;
1040 const UINT WINED3DPBLENDCAPS_ONE                                = 0x00000002;
1041 const UINT WINED3DPBLENDCAPS_SRCCOLOR                           = 0x00000004;
1042 const UINT WINED3DPBLENDCAPS_INVSRCCOLOR                        = 0x00000008;
1043 const UINT WINED3DPBLENDCAPS_SRCALPHA                           = 0x00000010;
1044 const UINT WINED3DPBLENDCAPS_INVSRCALPHA                        = 0x00000020;
1045 const UINT WINED3DPBLENDCAPS_DESTALPHA                          = 0x00000040;
1046 const UINT WINED3DPBLENDCAPS_INVDESTALPHA                       = 0x00000080;
1047 const UINT WINED3DPBLENDCAPS_DESTCOLOR                          = 0x00000100;
1048 const UINT WINED3DPBLENDCAPS_INVDESTCOLOR                       = 0x00000200;
1049 const UINT WINED3DPBLENDCAPS_SRCALPHASAT                        = 0x00000400;
1050 const UINT WINED3DPBLENDCAPS_BOTHSRCALPHA                       = 0x00000800;
1051 const UINT WINED3DPBLENDCAPS_BOTHINVSRCALPHA                    = 0x00001000;
1052 const UINT WINED3DPBLENDCAPS_BLENDFACTOR                        = 0x00002000;
1053
1054 const UINT WINED3DPCMPCAPS_NEVER                                = 0x00000001;
1055 const UINT WINED3DPCMPCAPS_LESS                                 = 0x00000002;
1056 const UINT WINED3DPCMPCAPS_EQUAL                                = 0x00000004;
1057 const UINT WINED3DPCMPCAPS_LESSEQUAL                            = 0x00000008;
1058 const UINT WINED3DPCMPCAPS_GREATER                              = 0x00000010;
1059 const UINT WINED3DPCMPCAPS_NOTEQUAL                             = 0x00000020;
1060 const UINT WINED3DPCMPCAPS_GREATEREQUAL                         = 0x00000040;
1061 const UINT WINED3DPCMPCAPS_ALWAYS                               = 0x00000080;
1062
1063 const UINT WINED3DPMISCCAPS_MASKZ                               = 0x00000002;
1064 const UINT WINED3DPMISCCAPS_LINEPATTERNREP                      = 0x00000004;
1065 const UINT WINED3DPMISCCAPS_CULLNONE                            = 0x00000010;
1066 const UINT WINED3DPMISCCAPS_CULLCW                              = 0x00000020;
1067 const UINT WINED3DPMISCCAPS_CULLCCW                             = 0x00000040;
1068 const UINT WINED3DPMISCCAPS_COLORWRITEENABLE                    = 0x00000080;
1069 const UINT WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS               = 0x00000100;
1070 const UINT WINED3DPMISCCAPS_CLIPTLVERTS                         = 0x00000200;
1071 const UINT WINED3DPMISCCAPS_TSSARGTEMP                          = 0x00000400;
1072 const UINT WINED3DPMISCCAPS_BLENDOP                             = 0x00000800;
1073 const UINT WINED3DPMISCCAPS_NULLREFERENCE                       = 0x00001000;
1074 const UINT WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS               = 0x00004000;
1075 const UINT WINED3DPMISCCAPS_PERSTAGECONSTANT                    = 0x00008000;
1076 const UINT WINED3DPMISCCAPS_FOGANDSPECULARALPHA                 = 0x00010000;
1077 const UINT WINED3DPMISCCAPS_SEPARATEALPHABLEND                  = 0x00020000;
1078 const UINT WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS             = 0x00040000;
1079 const UINT WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING          = 0x00080000;
1080 const UINT WINED3DPMISCCAPS_FOGVERTEXCLAMPED                    = 0x00100000;
1081
1082 const UINT WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH              = 24;
1083 const UINT WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH              = 0;
1084 const UINT WINED3DPS20_MAX_NUMTEMPS                             = 32;
1085 const UINT WINED3DPS20_MIN_NUMTEMPS                             = 12;
1086 const UINT WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH               = 4;
1087 const UINT WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH               = 0;
1088 const UINT WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS                  = 512;
1089 const UINT WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS                  = 96;
1090
1091 const UINT WINED3DPS20CAPS_ARBITRARYSWIZZLE                     = 0x00000001;
1092 const UINT WINED3DPS20CAPS_GRADIENTINSTRUCTIONS                 = 0x00000002;
1093 const UINT WINED3DPS20CAPS_PREDICATION                          = 0x00000004;
1094 const UINT WINED3DPS20CAPS_NODEPENDENTREADLIMIT                 = 0x00000008;
1095 const UINT WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT                = 0x00000010;
1096
1097 const UINT WINED3DPTADDRESSCAPS_WRAP                            = 0x00000001;
1098 const UINT WINED3DPTADDRESSCAPS_MIRROR                          = 0x00000002;
1099 const UINT WINED3DPTADDRESSCAPS_CLAMP                           = 0x00000004;
1100 const UINT WINED3DPTADDRESSCAPS_BORDER                          = 0x00000008;
1101 const UINT WINED3DPTADDRESSCAPS_INDEPENDENTUV                   = 0x00000010;
1102 const UINT WINED3DPTADDRESSCAPS_MIRRORONCE                      = 0x00000020;
1103
1104 const UINT WINED3DSTENCILCAPS_KEEP                              = 0x00000001;
1105 const UINT WINED3DSTENCILCAPS_ZERO                              = 0x00000002;
1106 const UINT WINED3DSTENCILCAPS_REPLACE                           = 0x00000004;
1107 const UINT WINED3DSTENCILCAPS_INCRSAT                           = 0x00000008;
1108 const UINT WINED3DSTENCILCAPS_DECRSAT                           = 0x00000010;
1109 const UINT WINED3DSTENCILCAPS_INVERT                            = 0x00000020;
1110 const UINT WINED3DSTENCILCAPS_INCR                              = 0x00000040;
1111 const UINT WINED3DSTENCILCAPS_DECR                              = 0x00000080;
1112 const UINT WINED3DSTENCILCAPS_TWOSIDED                          = 0x00000100;
1113
1114 const UINT WINED3DTEXOPCAPS_DISABLE                             = 0x00000001;
1115 const UINT WINED3DTEXOPCAPS_SELECTARG1                          = 0x00000002;
1116 const UINT WINED3DTEXOPCAPS_SELECTARG2                          = 0x00000004;
1117 const UINT WINED3DTEXOPCAPS_MODULATE                            = 0x00000008;
1118 const UINT WINED3DTEXOPCAPS_MODULATE2X                          = 0x00000010;
1119 const UINT WINED3DTEXOPCAPS_MODULATE4X                          = 0x00000020;
1120 const UINT WINED3DTEXOPCAPS_ADD                                 = 0x00000040;
1121 const UINT WINED3DTEXOPCAPS_ADDSIGNED                           = 0x00000080;
1122 const UINT WINED3DTEXOPCAPS_ADDSIGNED2X                         = 0x00000100;
1123 const UINT WINED3DTEXOPCAPS_SUBTRACT                            = 0x00000200;
1124 const UINT WINED3DTEXOPCAPS_ADDSMOOTH                           = 0x00000400;
1125 const UINT WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA                   = 0x00000800;
1126 const UINT WINED3DTEXOPCAPS_BLENDTEXTUREALPHA                   = 0x00001000;
1127 const UINT WINED3DTEXOPCAPS_BLENDFACTORALPHA                    = 0x00002000;
1128 const UINT WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM                 = 0x00004000;
1129 const UINT WINED3DTEXOPCAPS_BLENDCURRENTALPHA                   = 0x00008000;
1130 const UINT WINED3DTEXOPCAPS_PREMODULATE                         = 0x00010000;
1131 const UINT WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR              = 0x00020000;
1132 const UINT WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA              = 0x00040000;
1133 const UINT WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR           = 0x00080000;
1134 const UINT WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA           = 0x00100000;
1135 const UINT WINED3DTEXOPCAPS_BUMPENVMAP                          = 0x00200000;
1136 const UINT WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE                 = 0x00400000;
1137 const UINT WINED3DTEXOPCAPS_DOTPRODUCT3                         = 0x00800000;
1138 const UINT WINED3DTEXOPCAPS_MULTIPLYADD                         = 0x01000000;
1139 const UINT WINED3DTEXOPCAPS_LERP                                = 0x02000000;
1140
1141 const UINT WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH              = 24;
1142 const UINT WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH              = 0;
1143 const UINT WINED3DVS20_MAX_NUMTEMPS                             = 32;
1144 const UINT WINED3DVS20_MIN_NUMTEMPS                             = 12;
1145 const UINT WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH               = 4;
1146 const UINT WINED3DVS20_MIN_STATICFLOWCONTROLDEPTH               = 1;
1147
1148 const UINT WINED3DVS20CAPS_PREDICATION                          = 0x00000001;
1149
1150 const UINT WINED3DCAPS2_NO2DDURING3DSCENE                       = 0x00000002;
1151 const UINT WINED3DCAPS2_FULLSCREENGAMMA                         = 0x00020000;
1152 const UINT WINED3DCAPS2_CANRENDERWINDOWED                       = 0x00080000;
1153 const UINT WINED3DCAPS2_CANCALIBRATEGAMMA                       = 0x00100000;
1154 const UINT WINED3DCAPS2_RESERVED                                = 0x02000000;
1155 const UINT WINED3DCAPS2_CANMANAGERESOURCE                       = 0x10000000;
1156 const UINT WINED3DCAPS2_DYNAMICTEXTURES                         = 0x20000000;
1157 const UINT WINED3DCAPS2_CANAUTOGENMIPMAP                        = 0x40000000;
1158
1159 const UINT WINED3DPRASTERCAPS_DITHER                            = 0x00000001;
1160 const UINT WINED3DPRASTERCAPS_ROP2                              = 0x00000002;
1161 const UINT WINED3DPRASTERCAPS_XOR                               = 0x00000004;
1162 const UINT WINED3DPRASTERCAPS_PAT                               = 0x00000008;
1163 const UINT WINED3DPRASTERCAPS_ZTEST                             = 0x00000010;
1164 const UINT WINED3DPRASTERCAPS_SUBPIXEL                          = 0x00000020;
1165 const UINT WINED3DPRASTERCAPS_SUBPIXELX                         = 0x00000040;
1166 const UINT WINED3DPRASTERCAPS_FOGVERTEX                         = 0x00000080;
1167 const UINT WINED3DPRASTERCAPS_FOGTABLE                          = 0x00000100;
1168 const UINT WINED3DPRASTERCAPS_STIPPLE                           = 0x00000200;
1169 const UINT WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT            = 0x00000400;
1170 const UINT WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT          = 0x00000800;
1171 const UINT WINED3DPRASTERCAPS_ANTIALIASEDGES                    = 0x00001000;
1172 const UINT WINED3DPRASTERCAPS_MIPMAPLODBIAS                     = 0x00002000;
1173 const UINT WINED3DPRASTERCAPS_ZBIAS                             = 0x00004000;
1174 const UINT WINED3DPRASTERCAPS_ZBUFFERLESSHSR                    = 0x00008000;
1175 const UINT WINED3DPRASTERCAPS_FOGRANGE                          = 0x00010000;
1176 const UINT WINED3DPRASTERCAPS_ANISOTROPY                        = 0x00020000;
1177 const UINT WINED3DPRASTERCAPS_WBUFFER                           = 0x00040000;
1178 const UINT WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT        = 0x00080000;
1179 const UINT WINED3DPRASTERCAPS_WFOG                              = 0x00100000;
1180 const UINT WINED3DPRASTERCAPS_ZFOG                              = 0x00200000;
1181 const UINT WINED3DPRASTERCAPS_COLORPERSPECTIVE                  = 0x00400000;
1182 const UINT WINED3DPRASTERCAPS_SCISSORTEST                       = 0x01000000;
1183 const UINT WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS               = 0x02000000;
1184 const UINT WINED3DPRASTERCAPS_DEPTHBIAS                         = 0x04000000;
1185 const UINT WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE                = 0x08000000;
1186
1187 const UINT WINED3DPSHADECAPS_COLORFLATMONO                      = 0x00000001;
1188 const UINT WINED3DPSHADECAPS_COLORFLATRGB                       = 0x00000002;
1189 const UINT WINED3DPSHADECAPS_COLORGOURAUDMONO                   = 0x00000004;
1190 const UINT WINED3DPSHADECAPS_COLORGOURAUDRGB                    = 0x00000008;
1191 const UINT WINED3DPSHADECAPS_COLORPHONGMONO                     = 0x00000010;
1192 const UINT WINED3DPSHADECAPS_COLORPHONGRGB                      = 0x00000020;
1193 const UINT WINED3DPSHADECAPS_SPECULARFLATMONO                   = 0x00000040;
1194 const UINT WINED3DPSHADECAPS_SPECULARFLATRGB                    = 0x00000080;
1195 const UINT WINED3DPSHADECAPS_SPECULARGOURAUDMONO                = 0x00000100;
1196 const UINT WINED3DPSHADECAPS_SPECULARGOURAUDRGB                 = 0x00000200;
1197 const UINT WINED3DPSHADECAPS_SPECULARPHONGMONO                  = 0x00000400;
1198 const UINT WINED3DPSHADECAPS_SPECULARPHONGRGB                   = 0x00000800;
1199 const UINT WINED3DPSHADECAPS_ALPHAFLATBLEND                     = 0x00001000;
1200 const UINT WINED3DPSHADECAPS_ALPHAFLATSTIPPLED                  = 0x00002000;
1201 const UINT WINED3DPSHADECAPS_ALPHAGOURAUDBLEND                  = 0x00004000;
1202 const UINT WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED               = 0x00008000;
1203 const UINT WINED3DPSHADECAPS_ALPHAPHONGBLEND                    = 0x00010000;
1204 const UINT WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED                 = 0x00020000;
1205 const UINT WINED3DPSHADECAPS_FOGFLAT                            = 0x00040000;
1206 const UINT WINED3DPSHADECAPS_FOGGOURAUD                         = 0x00080000;
1207 const UINT WINED3DPSHADECAPS_FOGPHONG                           = 0x00100000;
1208
1209 const UINT WINED3DPTEXTURECAPS_PERSPECTIVE                      = 0x00000001;
1210 const UINT WINED3DPTEXTURECAPS_POW2                             = 0x00000002;
1211 const UINT WINED3DPTEXTURECAPS_ALPHA                            = 0x00000004;
1212 const UINT WINED3DPTEXTURECAPS_TRANSPARENCY                     = 0x00000008;
1213 const UINT WINED3DPTEXTURECAPS_BORDER                           = 0x00000010;
1214 const UINT WINED3DPTEXTURECAPS_SQUAREONLY                       = 0x00000020;
1215 const UINT WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE         = 0x00000040;
1216 const UINT WINED3DPTEXTURECAPS_ALPHAPALETTE                     = 0x00000080;
1217 const UINT WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL               = 0x00000100;
1218 const UINT WINED3DPTEXTURECAPS_PROJECTED                        = 0x00000400;
1219 const UINT WINED3DPTEXTURECAPS_CUBEMAP                          = 0x00000800;
1220 const UINT WINED3DPTEXTURECAPS_COLORKEYBLEND                    = 0x00001000;
1221 const UINT WINED3DPTEXTURECAPS_VOLUMEMAP                        = 0x00002000;
1222 const UINT WINED3DPTEXTURECAPS_MIPMAP                           = 0x00004000;
1223 const UINT WINED3DPTEXTURECAPS_MIPVOLUMEMAP                     = 0x00008000;
1224 const UINT WINED3DPTEXTURECAPS_MIPCUBEMAP                       = 0x00010000;
1225 const UINT WINED3DPTEXTURECAPS_CUBEMAP_POW2                     = 0x00020000;
1226 const UINT WINED3DPTEXTURECAPS_VOLUMEMAP_POW2                   = 0x00040000;
1227 const UINT WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV               = 0x00200000;
1228
1229 const UINT WINED3DPTFILTERCAPS_NEAREST                          = 0x00000001;
1230 const UINT WINED3DPTFILTERCAPS_LINEAR                           = 0x00000002;
1231 const UINT WINED3DPTFILTERCAPS_MIPNEAREST                       = 0x00000004;
1232 const UINT WINED3DPTFILTERCAPS_MIPLINEAR                        = 0x00000008;
1233 const UINT WINED3DPTFILTERCAPS_LINEARMIPNEAREST                 = 0x00000010;
1234 const UINT WINED3DPTFILTERCAPS_LINEARMIPLINEAR                  = 0x00000020;
1235 const UINT WINED3DPTFILTERCAPS_MINFPOINT                        = 0x00000100;
1236 const UINT WINED3DPTFILTERCAPS_MINFLINEAR                       = 0x00000200;
1237 const UINT WINED3DPTFILTERCAPS_MINFANISOTROPIC                  = 0x00000400;
1238 const UINT WINED3DPTFILTERCAPS_MIPFPOINT                        = 0x00010000;
1239 const UINT WINED3DPTFILTERCAPS_MIPFLINEAR                       = 0x00020000;
1240 const UINT WINED3DPTFILTERCAPS_MAGFPOINT                        = 0x01000000;
1241 const UINT WINED3DPTFILTERCAPS_MAGFLINEAR                       = 0x02000000;
1242 const UINT WINED3DPTFILTERCAPS_MAGFANISOTROPIC                  = 0x04000000;
1243 const UINT WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD                = 0x08000000;
1244 const UINT WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD                 = 0x10000000;
1245
1246 const UINT WINED3DVTXPCAPS_TEXGEN                               = 0x00000001;
1247 const UINT WINED3DVTXPCAPS_MATERIALSOURCE7                      = 0x00000002;
1248 const UINT WINED3DVTXPCAPS_VERTEXFOG                            = 0x00000004;
1249 const UINT WINED3DVTXPCAPS_DIRECTIONALLIGHTS                    = 0x00000008;
1250 const UINT WINED3DVTXPCAPS_POSITIONALLIGHTS                     = 0x00000010;
1251 const UINT WINED3DVTXPCAPS_LOCALVIEWER                          = 0x00000020;
1252 const UINT WINED3DVTXPCAPS_TWEENING                             = 0x00000040;
1253 const UINT WINED3DVTXPCAPS_TEXGEN_SPHEREMAP                     = 0x00000100;
1254 const UINT WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER             = 0x00000200;
1255
1256 const UINT WINED3DCURSORCAPS_COLOR                              = 0x00000001;
1257 const UINT WINED3DCURSORCAPS_LOWRES                             = 0x00000002;
1258
1259 const UINT WINED3DDEVCAPS_FLOATTLVERTEX                         = 0x00000001;
1260 const UINT WINED3DDEVCAPS_SORTINCREASINGZ                       = 0x00000002;
1261 const UINT WINED3DDEVCAPS_SORTDECREASINGZ                       = 0X00000004;
1262 const UINT WINED3DDEVCAPS_SORTEXACT                             = 0x00000008;
1263 const UINT WINED3DDEVCAPS_EXECUTESYSTEMMEMORY                   = 0x00000010;
1264 const UINT WINED3DDEVCAPS_EXECUTEVIDEOMEMORY                    = 0x00000020;
1265 const UINT WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY                  = 0x00000040;
1266 const UINT WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY                   = 0x00000080;
1267 const UINT WINED3DDEVCAPS_TEXTURESYSTEMMEMORY                   = 0x00000100;
1268 const UINT WINED3DDEVCAPS_TEXTUREVIDEOMEMORY                    = 0x00000200;
1269 const UINT WINED3DDEVCAPS_DRAWPRIMTLVERTEX                      = 0x00000400;
1270 const UINT WINED3DDEVCAPS_CANRENDERAFTERFLIP                    = 0x00000800;
1271 const UINT WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM                 = 0x00001000;
1272 const UINT WINED3DDEVCAPS_DRAWPRIMITIVES2                       = 0x00002000;
1273 const UINT WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES               = 0x00004000;
1274 const UINT WINED3DDEVCAPS_DRAWPRIMITIVES2EX                     = 0x00008000;
1275 const UINT WINED3DDEVCAPS_HWTRANSFORMANDLIGHT                   = 0x00010000;
1276 const UINT WINED3DDEVCAPS_CANBLTSYSTONONLOCAL                   = 0x00020000;
1277 const UINT WINED3DDEVCAPS_HWRASTERIZATION                       = 0x00080000;
1278 const UINT WINED3DDEVCAPS_PUREDEVICE                            = 0x00100000;
1279 const UINT WINED3DDEVCAPS_QUINTICRTPATCHES                      = 0x00200000;
1280 const UINT WINED3DDEVCAPS_RTPATCHES                             = 0x00400000;
1281 const UINT WINED3DDEVCAPS_RTPATCHHANDLEZERO                     = 0x00800000;
1282 const UINT WINED3DDEVCAPS_NPATCHES                              = 0x01000000;
1283
1284 /* dwDDFX */
1285 /* arithmetic stretching along y axis */
1286 const UINT WINEDDBLTFX_ARITHSTRETCHY                            = 0x00000001;
1287 /* mirror on y axis */
1288 const UINT WINEDDBLTFX_MIRRORLEFTRIGHT                          = 0x00000002;
1289 /* mirror on x axis */
1290 const UINT WINEDDBLTFX_MIRRORUPDOWN                             = 0x00000004;
1291 /* do not tear */
1292 const UINT WINEDDBLTFX_NOTEARING                                = 0x00000008;
1293 /* 180 degrees clockwise rotation */
1294 const UINT WINEDDBLTFX_ROTATE180                                = 0x00000010;
1295 /* 270 degrees clockwise rotation */
1296 const UINT WINEDDBLTFX_ROTATE270                                = 0x00000020;
1297 /* 90 degrees clockwise rotation */
1298 const UINT WINEDDBLTFX_ROTATE90                                 = 0x00000040;
1299 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1300 const UINT WINEDDBLTFX_ZBUFFERRANGE                             = 0x00000080;
1301 /* add dwZBufferBaseDest to every source z value before compare */
1302 const UINT WINEDDBLTFX_ZBUFFERBASEDEST                          = 0x00000100;
1303
1304 /* dwFlags for Blt* */
1305 const UINT WINEDDBLT_ALPHADEST                                  = 0x00000001;
1306 const UINT WINEDDBLT_ALPHADESTCONSTOVERRIDE                     = 0x00000002;
1307 const UINT WINEDDBLT_ALPHADESTNEG                               = 0x00000004;
1308 const UINT WINEDDBLT_ALPHADESTSURFACEOVERRIDE                   = 0x00000008;
1309 const UINT WINEDDBLT_ALPHAEDGEBLEND                             = 0x00000010;
1310 const UINT WINEDDBLT_ALPHASRC                                   = 0x00000020;
1311 const UINT WINEDDBLT_ALPHASRCCONSTOVERRIDE                      = 0x00000040;
1312 const UINT WINEDDBLT_ALPHASRCNEG                                = 0x00000080;
1313 const UINT WINEDDBLT_ALPHASRCSURFACEOVERRIDE                    = 0x00000100;
1314 const UINT WINEDDBLT_ASYNC                                      = 0x00000200;
1315 const UINT WINEDDBLT_COLORFILL                                  = 0x00000400;
1316 const UINT WINEDDBLT_DDFX                                       = 0x00000800;
1317 const UINT WINEDDBLT_DDROPS                                     = 0x00001000;
1318 const UINT WINEDDBLT_KEYDEST                                    = 0x00002000;
1319 const UINT WINEDDBLT_KEYDESTOVERRIDE                            = 0x00004000;
1320 const UINT WINEDDBLT_KEYSRC                                     = 0x00008000;
1321 const UINT WINEDDBLT_KEYSRCOVERRIDE                             = 0x00010000;
1322 const UINT WINEDDBLT_ROP                                        = 0x00020000;
1323 const UINT WINEDDBLT_ROTATIONANGLE                              = 0x00040000;
1324 const UINT WINEDDBLT_ZBUFFER                                    = 0x00080000;
1325 const UINT WINEDDBLT_ZBUFFERDESTCONSTOVERRIDE                   = 0x00100000;
1326 const UINT WINEDDBLT_ZBUFFERDESTOVERRIDE                        = 0x00200000;
1327 const UINT WINEDDBLT_ZBUFFERSRCCONSTOVERRIDE                    = 0x00400000;
1328 const UINT WINEDDBLT_ZBUFFERSRCOVERRIDE                         = 0x00800000;
1329 const UINT WINEDDBLT_WAIT                                       = 0x01000000;
1330 const UINT WINEDDBLT_DEPTHFILL                                  = 0x02000000;
1331 const UINT WINEDDBLT_DONOTWAIT                                  = 0x08000000;
1332
1333 /* dwTrans for BltFast */
1334 const UINT WINEDDBLTFAST_NOCOLORKEY                             = 0x00000000;
1335 const UINT WINEDDBLTFAST_SRCCOLORKEY                            = 0x00000001;
1336 const UINT WINEDDBLTFAST_DESTCOLORKEY                           = 0x00000002;
1337 const UINT WINEDDBLTFAST_WAIT                                   = 0x00000010;
1338 const UINT WINEDDBLTFAST_DONOTWAIT                              = 0x00000020;
1339
1340 /* DDSURFACEDESC.dwFlags */
1341 const UINT WINEDDSD_CAPS                                        = 0x00000001;
1342 const UINT WINEDDSD_HEIGHT                                      = 0x00000002;
1343 const UINT WINEDDSD_WIDTH                                       = 0x00000004;
1344 const UINT WINEDDSD_PITCH                                       = 0x00000008;
1345 const UINT WINEDDSD_BACKBUFFERCOUNT                             = 0x00000020;
1346 const UINT WINEDDSD_ZBUFFERBITDEPTH                             = 0x00000040;
1347 const UINT WINEDDSD_ALPHABITDEPTH                               = 0x00000080;
1348 const UINT WINEDDSD_LPSURFACE                                   = 0x00000800;
1349 const UINT WINEDDSD_PIXELFORMAT                                 = 0x00001000;
1350 const UINT WINEDDSD_CKDESTOVERLAY                               = 0x00002000;
1351 const UINT WINEDDSD_CKDESTBLT                                   = 0x00004000;
1352 const UINT WINEDDSD_CKSRCOVERLAY                                = 0x00008000;
1353 const UINT WINEDDSD_CKSRCBLT                                    = 0x00010000;
1354 const UINT WINEDDSD_MIPMAPCOUNT                                 = 0x00020000;
1355 const UINT WINEDDSD_REFRESHRATE                                 = 0x00040000;
1356 const UINT WINEDDSD_LINEARSIZE                                  = 0x00080000;
1357 const UINT WINEDDSD_TEXTURESTAGE                                = 0x00100000;
1358 const UINT WINEDDSD_FVF                                         = 0x00200000;
1359 const UINT WINEDDSD_SRCVBHANDLE                                 = 0x00400000;
1360 const UINT WINEDDSD_ALL                                         = 0x007ff9ee;
1361
1362 /* Set/Get Colour Key Flags */
1363 const UINT WINEDDCKEY_COLORSPACE                                = 0x00000001; /* Struct is single colour space */
1364 const UINT WINEDDCKEY_DESTBLT                                   = 0x00000002; /* To be used as dest for blt */
1365 const UINT WINEDDCKEY_DESTOVERLAY                               = 0x00000004; /* To be used as dest for CK overlays */
1366 const UINT WINEDDCKEY_SRCBLT                                    = 0x00000008; /* To be used as src for blt */
1367 const UINT WINEDDCKEY_SRCOVERLAY                                = 0x00000010; /* To be used as src for CK overlays */
1368
1369 /* dwFlags for GetBltStatus */
1370 const UINT WINEDDGBS_CANBLT                                     = 0x00000001;
1371 const UINT WINEDDGBS_ISBLTDONE                                  = 0x00000002;
1372
1373 /* dwFlags for GetFlipStatus */
1374 const UINT WINEDDGFS_CANFLIP                                    = 0x00000001;
1375 const UINT WINEDDGFS_ISFLIPDONE                                 = 0x00000002;
1376
1377 /* dwFlags for Flip */
1378 const UINT WINEDDFLIP_WAIT                                      = 0x00000001;
1379 const UINT WINEDDFLIP_EVEN                                      = 0x00000002; /* only valid for overlay */
1380 const UINT WINEDDFLIP_ODD                                       = 0x00000004; /* only valid for overlay */
1381 const UINT WINEDDFLIP_NOVSYNC                                   = 0x00000008;
1382 const UINT WINEDDFLIP_STEREO                                    = 0x00000010;
1383 const UINT WINEDDFLIP_DONOTWAIT                                 = 0x00000020;
1384 const UINT WINEDDFLIP_INTERVAL2                                 = 0x02000000;
1385 const UINT WINEDDFLIP_INTERVAL3                                 = 0x03000000;
1386 const UINT WINEDDFLIP_INTERVAL4                                 = 0x04000000;
1387
1388 const UINT WINEDDOVER_ALPHADEST                                 = 0x00000001;
1389 const UINT WINEDDOVER_ALPHADESTCONSTOVERRIDE                    = 0x00000002;
1390 const UINT WINEDDOVER_ALPHADESTNEG                              = 0x00000004;
1391 const UINT WINEDDOVER_ALPHADESTSURFACEOVERRIDE                  = 0x00000008;
1392 const UINT WINEDDOVER_ALPHAEDGEBLEND                            = 0x00000010;
1393 const UINT WINEDDOVER_ALPHASRC                                  = 0x00000020;
1394 const UINT WINEDDOVER_ALPHASRCCONSTOVERRIDE                     = 0x00000040;
1395 const UINT WINEDDOVER_ALPHASRCNEG                               = 0x00000080;
1396 const UINT WINEDDOVER_ALPHASRCSURFACEOVERRIDE                   = 0x00000100;
1397 const UINT WINEDDOVER_HIDE                                      = 0x00000200;
1398 const UINT WINEDDOVER_KEYDEST                                   = 0x00000400;
1399 const UINT WINEDDOVER_KEYDESTOVERRIDE                           = 0x00000800;
1400 const UINT WINEDDOVER_KEYSRC                                    = 0x00001000;
1401 const UINT WINEDDOVER_KEYSRCOVERRIDE                            = 0x00002000;
1402 const UINT WINEDDOVER_SHOW                                      = 0x00004000;
1403 const UINT WINEDDOVER_ADDDIRTYRECT                              = 0x00008000;
1404 const UINT WINEDDOVER_REFRESHDIRTYRECTS                         = 0x00010000;
1405 const UINT WINEDDOVER_REFRESHALL                                = 0x00020000;
1406 const UINT WINEDDOVER_DDFX                                      = 0x00080000;
1407 const UINT WINEDDOVER_AUTOFLIP                                  = 0x00100000;
1408 const UINT WINEDDOVER_BOB                                       = 0x00200000;
1409 const UINT WINEDDOVER_OVERRIDEBOBWEAVE                          = 0x00400000;
1410 const UINT WINEDDOVER_INTERLEAVED                               = 0x00800000;
1411
1412 /* DirectDraw Caps */
1413 const UINT WINEDDSCAPS_RESERVED1                                = 0x00000001;
1414 const UINT WINEDDSCAPS_ALPHA                                    = 0x00000002;
1415 const UINT WINEDDSCAPS_BACKBUFFER                               = 0x00000004;
1416 const UINT WINEDDSCAPS_COMPLEX                                  = 0x00000008;
1417 const UINT WINEDDSCAPS_FLIP                                     = 0x00000010;
1418 const UINT WINEDDSCAPS_FRONTBUFFER                              = 0x00000020;
1419 const UINT WINEDDSCAPS_OFFSCREENPLAIN                           = 0x00000040;
1420 const UINT WINEDDSCAPS_OVERLAY                                  = 0x00000080;
1421 const UINT WINEDDSCAPS_PALETTE                                  = 0x00000100;
1422 const UINT WINEDDSCAPS_PRIMARYSURFACE                           = 0x00000200;
1423 const UINT WINEDDSCAPS_PRIMARYSURFACELEFT                       = 0x00000400;
1424 const UINT WINEDDSCAPS_SYSTEMMEMORY                             = 0x00000800;
1425 const UINT WINEDDSCAPS_TEXTURE                                  = 0x00001000;
1426 const UINT WINEDDSCAPS_3DDEVICE                                 = 0x00002000;
1427 const UINT WINEDDSCAPS_VIDEOMEMORY                              = 0x00004000;
1428 const UINT WINEDDSCAPS_VISIBLE                                  = 0x00008000;
1429 const UINT WINEDDSCAPS_WRITEONLY                                = 0x00010000;
1430 const UINT WINEDDSCAPS_ZBUFFER                                  = 0x00020000;
1431 const UINT WINEDDSCAPS_OWNDC                                    = 0x00040000;
1432 const UINT WINEDDSCAPS_LIVEVIDEO                                = 0x00080000;
1433 const UINT WINEDDSCAPS_HWCODEC                                  = 0x00100000;
1434 const UINT WINEDDSCAPS_MODEX                                    = 0x00200000;
1435 const UINT WINEDDSCAPS_MIPMAP                                   = 0x00400000;
1436 const UINT WINEDDSCAPS_RESERVED2                                = 0x00800000;
1437 const UINT WINEDDSCAPS_ALLOCONLOAD                              = 0x04000000;
1438 const UINT WINEDDSCAPS_VIDEOPORT                                = 0x08000000;
1439 const UINT WINEDDSCAPS_LOCALVIDMEM                              = 0x10000000;
1440 const UINT WINEDDSCAPS_NONLOCALVIDMEM                           = 0x20000000;
1441 const UINT WINEDDSCAPS_STANDARDVGAMODE                          = 0x40000000;
1442 const UINT WINEDDSCAPS_OPTIMIZED                                = 0x80000000;
1443
1444 const UINT WINEDDCKEYCAPS_DESTBLT                               = 0x00000001;
1445 const UINT WINEDDCKEYCAPS_DESTBLTCLRSPACE                       = 0x00000002;
1446 const UINT WINEDDCKEYCAPS_DESTBLTCLRSPACEYUV                    = 0x00000004;
1447 const UINT WINEDDCKEYCAPS_DESTBLTYUV                            = 0x00000008;
1448 const UINT WINEDDCKEYCAPS_DESTOVERLAY                           = 0x00000010;
1449 const UINT WINEDDCKEYCAPS_DESTOVERLAYCLRSPACE                   = 0x00000020;
1450 const UINT WINEDDCKEYCAPS_DESTOVERLAYCLRSPACEYUV                = 0x00000040;
1451 const UINT WINEDDCKEYCAPS_DESTOVERLAYONEACTIVE                  = 0x00000080;
1452 const UINT WINEDDCKEYCAPS_DESTOVERLAYYUV                        = 0x00000100;
1453 const UINT WINEDDCKEYCAPS_SRCBLT                                = 0x00000200;
1454 const UINT WINEDDCKEYCAPS_SRCBLTCLRSPACE                        = 0x00000400;
1455 const UINT WINEDDCKEYCAPS_SRCBLTCLRSPACEYUV                     = 0x00000800;
1456 const UINT WINEDDCKEYCAPS_SRCBLTYUV                             = 0x00001000;
1457 const UINT WINEDDCKEYCAPS_SRCOVERLAY                            = 0x00002000;
1458 const UINT WINEDDCKEYCAPS_SRCOVERLAYCLRSPACE                    = 0x00004000;
1459 const UINT WINEDDCKEYCAPS_SRCOVERLAYCLRSPACEYUV                 = 0x00008000;
1460 const UINT WINEDDCKEYCAPS_SRCOVERLAYONEACTIVE                   = 0x00010000;
1461 const UINT WINEDDCKEYCAPS_SRCOVERLAYYUV                         = 0x00020000;
1462 const UINT WINEDDCKEYCAPS_NOCOSTOVERLAY                         = 0x00040000;
1463
1464 const UINT WINEDDFXCAPS_BLTALPHA                                = 0x00000001;
1465 const UINT WINEDDFXCAPS_OVERLAYALPHA                            = 0x00000004;
1466 const UINT WINEDDFXCAPS_BLTARITHSTRETCHYN                       = 0x00000010;
1467 const UINT WINEDDFXCAPS_BLTARITHSTRETCHY                        = 0x00000020;
1468 const UINT WINEDDFXCAPS_BLTMIRRORLEFTRIGHT                      = 0x00000040;
1469 const UINT WINEDDFXCAPS_BLTMIRRORUPDOWN                         = 0x00000080;
1470 const UINT WINEDDFXCAPS_BLTROTATION                             = 0x00000100;
1471 const UINT WINEDDFXCAPS_BLTROTATION90                           = 0x00000200;
1472 const UINT WINEDDFXCAPS_BLTSHRINKX                              = 0x00000400;
1473 const UINT WINEDDFXCAPS_BLTSHRINKXN                             = 0x00000800;
1474 const UINT WINEDDFXCAPS_BLTSHRINKY                              = 0x00001000;
1475 const UINT WINEDDFXCAPS_BLTSHRINKYN                             = 0x00002000;
1476 const UINT WINEDDFXCAPS_BLTSTRETCHX                             = 0x00004000;
1477 const UINT WINEDDFXCAPS_BLTSTRETCHXN                            = 0x00008000;
1478 const UINT WINEDDFXCAPS_BLTSTRETCHY                             = 0x00010000;
1479 const UINT WINEDDFXCAPS_BLTSTRETCHYN                            = 0x00020000;
1480 const UINT WINEDDFXCAPS_OVERLAYARITHSTRETCHY                    = 0x00040000;
1481 const UINT WINEDDFXCAPS_OVERLAYARITHSTRETCHYN                   = 0x00000008;
1482 const UINT WINEDDFXCAPS_OVERLAYSHRINKX                          = 0x00080000;
1483 const UINT WINEDDFXCAPS_OVERLAYSHRINKXN                         = 0x00100000;
1484 const UINT WINEDDFXCAPS_OVERLAYSHRINKY                          = 0x00200000;
1485 const UINT WINEDDFXCAPS_OVERLAYSHRINKYN                         = 0x00400000;
1486 const UINT WINEDDFXCAPS_OVERLAYSTRETCHX                         = 0x00800000;
1487 const UINT WINEDDFXCAPS_OVERLAYSTRETCHXN                        = 0x01000000;
1488 const UINT WINEDDFXCAPS_OVERLAYSTRETCHY                         = 0x02000000;
1489 const UINT WINEDDFXCAPS_OVERLAYSTRETCHYN                        = 0x04000000;
1490 const UINT WINEDDFXCAPS_OVERLAYMIRRORLEFTRIGHT                  = 0x08000000;
1491 const UINT WINEDDFXCAPS_OVERLAYMIRRORUPDOWN                     = 0x10000000;
1492
1493 const UINT WINEDDCAPS_3D                                        = 0x00000001;
1494 const UINT WINEDDCAPS_ALIGNBOUNDARYDEST                         = 0x00000002;
1495 const UINT WINEDDCAPS_ALIGNSIZEDEST                             = 0x00000004;
1496 const UINT WINEDDCAPS_ALIGNBOUNDARYSRC                          = 0x00000008;
1497 const UINT WINEDDCAPS_ALIGNSIZESRC                              = 0x00000010;
1498 const UINT WINEDDCAPS_ALIGNSTRIDE                               = 0x00000020;
1499 const UINT WINEDDCAPS_BLT                                       = 0x00000040;
1500 const UINT WINEDDCAPS_BLTQUEUE                                  = 0x00000080;
1501 const UINT WINEDDCAPS_BLTFOURCC                                 = 0x00000100;
1502 const UINT WINEDDCAPS_BLTSTRETCH                                = 0x00000200;
1503 const UINT WINEDDCAPS_GDI                                       = 0x00000400;
1504 const UINT WINEDDCAPS_OVERLAY                                   = 0x00000800;
1505 const UINT WINEDDCAPS_OVERLAYCANTCLIP                           = 0x00001000;
1506 const UINT WINEDDCAPS_OVERLAYFOURCC                             = 0x00002000;
1507 const UINT WINEDDCAPS_OVERLAYSTRETCH                            = 0x00004000;
1508 const UINT WINEDDCAPS_PALETTE                                   = 0x00008000;
1509 const UINT WINEDDCAPS_PALETTEVSYNC                              = 0x00010000;
1510 const UINT WINEDDCAPS_READSCANLINE                              = 0x00020000;
1511 const UINT WINEDDCAPS_STEREOVIEW                                = 0x00040000;
1512 const UINT WINEDDCAPS_VBI                                       = 0x00080000;
1513 const UINT WINEDDCAPS_ZBLTS                                     = 0x00100000;
1514 const UINT WINEDDCAPS_ZOVERLAYS                                 = 0x00200000;
1515 const UINT WINEDDCAPS_COLORKEY                                  = 0x00400000;
1516 const UINT WINEDDCAPS_ALPHA                                     = 0x00800000;
1517 const UINT WINEDDCAPS_COLORKEYHWASSIST                          = 0x01000000;
1518 const UINT WINEDDCAPS_NOHARDWARE                                = 0x02000000;
1519 const UINT WINEDDCAPS_BLTCOLORFILL                              = 0x04000000;
1520 const UINT WINEDDCAPS_BANKSWITCHED                              = 0x08000000;
1521 const UINT WINEDDCAPS_BLTDEPTHFILL                              = 0x10000000;
1522 const UINT WINEDDCAPS_CANCLIP                                   = 0x20000000;
1523 const UINT WINEDDCAPS_CANCLIPSTRETCHED                          = 0x40000000;
1524 const UINT WINEDDCAPS_CANBLTSYSMEM                              = 0x80000000;
1525
1526 const UINT WINEDDCAPS2_CERTIFIED                                = 0x00000001;
1527 const UINT WINEDDCAPS2_NO2DDURING3DSCENE                        = 0x00000002;
1528 const UINT WINEDDCAPS2_VIDEOPORT                                = 0x00000004;
1529 const UINT WINEDDCAPS2_AUTOFLIPOVERLAY                          = 0x00000008;
1530 const UINT WINEDDCAPS2_CANBOBINTERLEAVED                        = 0x00000010;
1531 const UINT WINEDDCAPS2_CANBOBNONINTERLEAVED                     = 0x00000020;
1532 const UINT WINEDDCAPS2_COLORCONTROLOVERLAY                      = 0x00000040;
1533 const UINT WINEDDCAPS2_COLORCONTROLPRIMARY                      = 0x00000080;
1534 const UINT WINEDDCAPS2_CANDROPZ16BIT                            = 0x00000100;
1535 const UINT WINEDDCAPS2_NONLOCALVIDMEM                           = 0x00000200;
1536 const UINT WINEDDCAPS2_NONLOCALVIDMEMCAPS                       = 0x00000400;
1537 const UINT WINEDDCAPS2_NOPAGELOCKREQUIRED                       = 0x00000800;
1538 const UINT WINEDDCAPS2_WIDESURFACES                             = 0x00001000;
1539 const UINT WINEDDCAPS2_CANFLIPODDEVEN                           = 0x00002000;
1540 const UINT WINEDDCAPS2_CANBOBHARDWARE                           = 0x00004000;
1541 const UINT WINEDDCAPS2_COPYFOURCC                               = 0x00008000;
1542 const UINT WINEDDCAPS2_PRIMARYGAMMA                             = 0x00020000;
1543 const UINT WINEDDCAPS2_CANRENDERWINDOWED                        = 0x00080000;
1544 const UINT WINEDDCAPS2_CANCALIBRATEGAMMA                        = 0x00100000;
1545 const UINT WINEDDCAPS2_FLIPINTERVAL                             = 0x00200000;
1546 const UINT WINEDDCAPS2_FLIPNOVSYNC                              = 0x00400000;
1547 const UINT WINEDDCAPS2_CANMANAGETEXTURE                         = 0x00800000;
1548 const UINT WINEDDCAPS2_TEXMANINNONLOCALVIDMEM                   = 0x01000000;
1549 const UINT WINEDDCAPS2_STEREO                                   = 0x02000000;
1550 const UINT WINEDDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL              = 0x04000000;
1551
1552 /* DDCAPS.d */
1553 const UINT WINEDDPCAPS_4BIT                                     = 0x00000001;
1554 const UINT WINEDDPCAPS_8BITENTRIES                              = 0x00000002;
1555 const UINT WINEDDPCAPS_8BIT                                     = 0x00000004;
1556 const UINT WINEDDPCAPS_INITIALIZE                               = 0x00000008;
1557 const UINT WINEDDPCAPS_PRIMARYSURFACE                           = 0x00000010;
1558 const UINT WINEDDPCAPS_PRIMARYSURFACELEFT                       = 0x00000020;
1559 const UINT WINEDDPCAPS_ALLOW256                                 = 0x00000040;
1560 const UINT WINEDDPCAPS_VSYNC                                    = 0x00000080;
1561 const UINT WINEDDPCAPS_1BIT                                     = 0x00000100;
1562 const UINT WINEDDPCAPS_2BIT                                     = 0x00000200;
1563 const UINT WINEDDPCAPS_ALPHA                                    = 0x00000400;
1564
1565 typedef struct _WINED3DDISPLAYMODE
1566 {
1567     UINT Width;
1568     UINT Height;
1569     UINT RefreshRate;
1570     WINED3DFORMAT Format;
1571 } WINED3DDISPLAYMODE;
1572
1573 typedef struct _WINED3DCOLORVALUE
1574 {
1575     float r;
1576     float g;
1577     float b;
1578     float a;
1579 } WINED3DCOLORVALUE;
1580
1581 typedef struct _WINED3DVECTOR
1582 {
1583     float x;
1584     float y;
1585     float z;
1586 } WINED3DVECTOR;
1587
1588 typedef struct _WINED3DMATRIX
1589 {
1590     union
1591     {
1592         struct
1593         {
1594             float _11, _12, _13, _14;
1595             float _21, _22, _23, _24;
1596             float _31, _32, _33, _34;
1597             float _41, _42, _43, _44;
1598         } DUMMYSTRUCTNAME;
1599         float m[4][4];
1600     } DUMMYUNIONNAME;
1601 } WINED3DMATRIX;
1602
1603 typedef struct _WINED3DRECT
1604 {
1605     LONG x1;
1606     LONG y1;
1607     LONG x2;
1608     LONG y2;
1609 } WINED3DRECT;
1610
1611 typedef struct _WINED3DLIGHT
1612 {
1613     WINED3DLIGHTTYPE Type;
1614     WINED3DCOLORVALUE Diffuse;
1615     WINED3DCOLORVALUE Specular;
1616     WINED3DCOLORVALUE Ambient;
1617     WINED3DVECTOR Position;
1618     WINED3DVECTOR Direction;
1619     float Range;
1620     float Falloff;
1621     float Attenuation0;
1622     float Attenuation1;
1623     float Attenuation2;
1624     float Theta;
1625     float Phi;
1626 } WINED3DLIGHT;
1627
1628 typedef struct _WINED3DMATERIAL
1629 {
1630     WINED3DCOLORVALUE Diffuse;
1631     WINED3DCOLORVALUE Ambient;
1632     WINED3DCOLORVALUE Specular;
1633     WINED3DCOLORVALUE Emissive;
1634     float Power;
1635 } WINED3DMATERIAL;
1636
1637 typedef struct _WINED3DVIEWPORT
1638 {
1639     DWORD X;
1640     DWORD Y;
1641     DWORD Width;
1642     DWORD Height;
1643     float MinZ;
1644     float MaxZ;
1645 } WINED3DVIEWPORT;
1646
1647 typedef struct _WINED3DGAMMARAMP
1648 {
1649     WORD red[256];
1650     WORD green[256];
1651     WORD blue[256];
1652 } WINED3DGAMMARAMP;
1653
1654 typedef struct _WINED3DLINEPATTERN
1655 {
1656     WORD wRepeatFactor;
1657     WORD wLinePattern;
1658 } WINED3DLINEPATTERN;
1659
1660 typedef struct _WINEDD3DRECTPATCH_INFO
1661 {
1662     UINT StartVertexOffsetWidth;
1663     UINT StartVertexOffsetHeight;
1664     UINT Width;
1665     UINT Height;
1666     UINT Stride;
1667     WINED3DBASISTYPE Basis;
1668     WINED3DDEGREETYPE Degree;
1669 } WINED3DRECTPATCH_INFO;
1670
1671 typedef struct _WINED3DTRIPATCH_INFO
1672 {
1673     UINT StartVertexOffset;
1674     UINT NumVertices;
1675     WINED3DBASISTYPE Basis;
1676     WINED3DDEGREETYPE Degree;
1677 } WINED3DTRIPATCH_INFO;
1678
1679 typedef struct _WINED3DADAPTER_IDENTIFIER
1680 {
1681     char *Driver;
1682     char *Description;
1683     char *DeviceName;
1684     LARGE_INTEGER *DriverVersion;
1685     DWORD *VendorId;
1686     DWORD *DeviceId;
1687     DWORD *SubSysId;
1688     DWORD *Revision;
1689     GUID *DeviceIdentifier;
1690     DWORD *WHQLLevel;
1691 } WINED3DADAPTER_IDENTIFIER;
1692
1693 typedef struct _WINED3DPRESENT_PARAMETERS
1694 {
1695     UINT BackBufferWidth;
1696     UINT BackBufferHeight;
1697     WINED3DFORMAT BackBufferFormat;
1698     UINT BackBufferCount;
1699     WINED3DMULTISAMPLE_TYPE MultiSampleType;
1700     DWORD MultiSampleQuality;
1701     WINED3DSWAPEFFECT SwapEffect;
1702     HWND hDeviceWindow;
1703     BOOL Windowed;
1704     BOOL EnableAutoDepthStencil;
1705     WINED3DFORMAT AutoDepthStencilFormat;
1706     DWORD Flags;
1707     UINT FullScreen_RefreshRateInHz;
1708     UINT PresentationInterval;
1709     BOOL AutoRestoreDisplayMode;
1710 } WINED3DPRESENT_PARAMETERS;
1711
1712 typedef struct _WINED3DSURFACE_DESC
1713 {
1714     WINED3DFORMAT *Format;
1715     WINED3DRESOURCETYPE *Type;
1716     DWORD *Usage;
1717     WINED3DPOOL *Pool;
1718     UINT *Size;
1719     WINED3DMULTISAMPLE_TYPE *MultiSampleType;
1720     DWORD *MultiSampleQuality;
1721     UINT *Width;
1722     UINT *Height;
1723 } WINED3DSURFACE_DESC;
1724
1725 typedef struct _WINED3DVOLUME_DESC
1726 {
1727     WINED3DFORMAT *Format;
1728     WINED3DRESOURCETYPE *Type;
1729     DWORD *Usage;
1730     WINED3DPOOL *Pool;
1731     UINT *Size;
1732     UINT *Width;
1733     UINT *Height;
1734     UINT *Depth;
1735 } WINED3DVOLUME_DESC;
1736
1737 typedef struct _WINED3DCLIPSTATUS
1738 {
1739    DWORD ClipUnion;
1740    DWORD ClipIntersection;
1741 } WINED3DCLIPSTATUS;
1742
1743 typedef struct _WINED3DVERTEXELEMENT
1744 {
1745     WINED3DFORMAT format;
1746     WORD input_slot;
1747     WORD offset;
1748     UINT output_slot; /* D3D 8 & 10 */
1749     BYTE method;
1750     BYTE usage;
1751     BYTE usage_idx;
1752 } WINED3DVERTEXELEMENT;
1753
1754 typedef struct _WINED3DDEVICE_CREATION_PARAMETERS
1755 {
1756     UINT AdapterOrdinal;
1757     WINED3DDEVTYPE DeviceType;
1758     HWND hFocusWindow;
1759     DWORD BehaviorFlags;
1760 } WINED3DDEVICE_CREATION_PARAMETERS;
1761
1762 typedef struct _WINED3DDEVINFO_BANDWIDTHTIMINGS
1763 {
1764     float MaxBandwidthUtilized;
1765     float FrontEndUploadMemoryUtilizedPercent;
1766     float VertexRateUtilizedPercent;
1767     float TriangleSetupRateUtilizedPercent;
1768     float FillRateUtilizedPercent;
1769 } WINED3DDEVINFO_BANDWIDTHTIMINGS;
1770
1771 typedef struct _WINED3DDEVINFO_CACHEUTILIZATION
1772 {
1773     float TextureCacheHitRate;
1774     float PostTransformVertexCacheHitRate;
1775 } WINED3DDEVINFO_CACHEUTILIZATION;
1776
1777 typedef struct _WINED3DDEVINFO_INTERFACETIMINGS
1778 {
1779     float WaitingForGPUToUseApplicationResourceTimePercent;
1780     float WaitingForGPUToAcceptMoreCommandsTimePercent;
1781     float WaitingForGPUToStayWithinLatencyTimePercent;
1782     float WaitingForGPUExclusiveResourceTimePercent;
1783     float WaitingForGPUOtherTimePercent;
1784 } WINED3DDEVINFO_INTERFACETIMINGS;
1785
1786 typedef struct _WINED3DDEVINFO_PIPELINETIMINGS
1787 {
1788     float VertexProcessingTimePercent;
1789     float PixelProcessingTimePercent;
1790     float OtherGPUProcessingTimePercent;
1791     float GPUIdleTimePercent;
1792 } WINED3DDEVINFO_PIPELINETIMINGS;
1793
1794 typedef struct _WINED3DDEVINFO_STAGETIMINGS
1795 {
1796     float MemoryProcessingPercent;
1797     float ComputationProcessingPercent;
1798 } WINED3DDEVINFO_STAGETIMINGS;
1799
1800 typedef struct _WINED3DRASTER_STATUS
1801 {
1802     BOOL InVBlank;
1803     UINT ScanLine;
1804 } WINED3DRASTER_STATUS;
1805
1806 typedef struct WINED3DRESOURCESTATS
1807 {
1808     BOOL bThrashing;
1809     DWORD ApproxBytesDownloaded;
1810     DWORD NumEvicts;
1811     DWORD NumVidCreates;
1812     DWORD LastPri;
1813     DWORD NumUsed;
1814     DWORD NumUsedInVidMem;
1815     DWORD WorkingSet;
1816     DWORD WorkingSetBytes;
1817     DWORD TotalManaged;
1818     DWORD TotalBytes;
1819 } WINED3DRESOURCESTATS;
1820
1821 typedef struct _WINED3DDEVINFO_RESOURCEMANAGER
1822 {
1823     WINED3DRESOURCESTATS stats[WINED3DRTYPECOUNT];
1824 } WINED3DDEVINFO_RESOURCEMANAGER;
1825
1826 typedef struct _WINED3DDEVINFO_VERTEXSTATS
1827 {
1828     DWORD NumRenderedTriangles;
1829     DWORD NumExtraClippingTriangles;
1830 } WINED3DDEVINFO_VERTEXSTATS;
1831
1832 typedef struct _WINED3DLOCKED_RECT
1833 {
1834     INT Pitch;
1835     void *pBits;
1836 } WINED3DLOCKED_RECT;
1837
1838 typedef struct _WINED3DLOCKED_BOX
1839 {
1840     INT RowPitch;
1841     INT SlicePitch;
1842     void *pBits;
1843 } WINED3DLOCKED_BOX;
1844
1845 typedef struct _WINED3DBOX
1846 {
1847     UINT Left;
1848     UINT Top;
1849     UINT Right;
1850     UINT Bottom;
1851     UINT Front;
1852     UINT Back;
1853 } WINED3DBOX;
1854
1855 /*Vertex cache optimization hints.*/
1856 typedef struct WINED3DDEVINFO_VCACHE
1857 {
1858     DWORD Pattern;      /* Must be a 4 char code FOURCC (e.g. CACH) */
1859     DWORD OptMethod;    /* 0 to get the longest  strips, 1 vertex cache */
1860     DWORD CacheSize;    /* Cache size to use (only valid if OptMethod==1) */
1861     DWORD MagicNumber;  /* Internal for deciding when to restart strips,
1862                            non user modifiable (only valid if OptMethod==1) */
1863 } WINED3DDEVINFO_VCACHE;
1864
1865 typedef struct _WINED3DBUFFER_DESC
1866 {
1867     WINED3DRESOURCETYPE Type;
1868     DWORD Usage;
1869     WINED3DPOOL Pool;
1870     UINT Size;
1871 } WINED3DBUFFER_DESC;
1872
1873 typedef struct glDescriptor
1874 {
1875     UINT textureName, srgbTextureName;
1876     int level;
1877     int /*GLenum*/ target;
1878 } glDescriptor;
1879
1880 typedef struct WineDirect3DStridedData
1881 {
1882     WINED3DFORMAT format;   /* Format of the data */
1883     const BYTE *lpData;     /* Pointer to start of data */
1884     DWORD dwStride;         /* Stride between occurrences of this data */
1885 } WineDirect3DStridedData;
1886
1887 typedef struct WineDirect3DVertexStridedData
1888 {
1889     WineDirect3DStridedData position;
1890     WineDirect3DStridedData normal;
1891     WineDirect3DStridedData diffuse;
1892     WineDirect3DStridedData specular;
1893     WineDirect3DStridedData texCoords[WINED3DDP_MAXTEXCOORD];
1894     BOOL position_transformed;
1895 } WineDirect3DVertexStridedData;
1896
1897 typedef struct _WINED3DVSHADERCAPS2_0
1898 {
1899     DWORD Caps;
1900     INT DynamicFlowControlDepth;
1901     INT NumTemps;
1902     INT StaticFlowControlDepth;
1903 } WINED3DVSHADERCAPS2_0;
1904
1905 typedef struct _WINED3DPSHADERCAPS2_0
1906 {
1907     DWORD Caps;
1908     INT DynamicFlowControlDepth;
1909     INT NumTemps;
1910     INT StaticFlowControlDepth;
1911     INT NumInstructionSlots;
1912 } WINED3DPSHADERCAPS2_0;
1913
1914 typedef struct _WINEDDCAPS
1915 {
1916     DWORD Caps;
1917     DWORD Caps2;
1918     DWORD CKeyCaps;
1919     DWORD FXCaps;
1920     DWORD FXAlphaCaps;
1921     DWORD PalCaps;
1922     DWORD SVCaps;
1923     DWORD SVBCaps;
1924     DWORD SVBCKeyCaps;
1925     DWORD SVBFXCaps;
1926     DWORD VSBCaps;
1927     DWORD VSBCKeyCaps;
1928     DWORD VSBFXCaps;
1929     DWORD SSBCaps;
1930     DWORD SSBCKeyCaps;
1931     DWORD SSBFXCaps;
1932     DWORD ddsCaps;
1933     DWORD StrideAlign;
1934 } WINEDDCAPS;
1935
1936 typedef struct _WINED3DCAPS
1937 {
1938     WINED3DDEVTYPE DeviceType;
1939     UINT AdapterOrdinal;
1940
1941     DWORD Caps;
1942     DWORD Caps2;
1943     DWORD Caps3;
1944     DWORD PresentationIntervals;
1945
1946     DWORD CursorCaps;
1947     DWORD DevCaps;
1948     DWORD PrimitiveMiscCaps;
1949     DWORD RasterCaps;
1950     DWORD ZCmpCaps;
1951     DWORD SrcBlendCaps;
1952     DWORD DestBlendCaps;
1953     DWORD AlphaCmpCaps;
1954     DWORD ShadeCaps;
1955     DWORD TextureCaps;
1956     DWORD TextureFilterCaps;
1957     DWORD CubeTextureFilterCaps;
1958     DWORD VolumeTextureFilterCaps;
1959     DWORD TextureAddressCaps;
1960     DWORD VolumeTextureAddressCaps;
1961     DWORD LineCaps;
1962
1963     DWORD MaxTextureWidth;
1964     DWORD MaxTextureHeight;
1965     DWORD MaxVolumeExtent;
1966     DWORD MaxTextureRepeat;
1967     DWORD MaxTextureAspectRatio;
1968     DWORD MaxAnisotropy;
1969     float MaxVertexW;
1970
1971     float GuardBandLeft;
1972     float GuardBandTop;
1973     float GuardBandRight;
1974     float GuardBandBottom;
1975
1976     float ExtentsAdjust;
1977     DWORD StencilCaps;
1978
1979     DWORD FVFCaps;
1980     DWORD TextureOpCaps;
1981     DWORD MaxTextureBlendStages;
1982     DWORD MaxSimultaneousTextures;
1983
1984     DWORD VertexProcessingCaps;
1985     DWORD MaxActiveLights;
1986     DWORD MaxUserClipPlanes;
1987     DWORD MaxVertexBlendMatrices;
1988     DWORD MaxVertexBlendMatrixIndex;
1989
1990     float MaxPointSize;
1991
1992     DWORD MaxPrimitiveCount;
1993     DWORD MaxVertexIndex;
1994     DWORD MaxStreams;
1995     DWORD MaxStreamStride;
1996
1997     DWORD VertexShaderVersion;
1998     DWORD MaxVertexShaderConst;
1999
2000     DWORD PixelShaderVersion;
2001     float PixelShader1xMaxValue;
2002
2003     /* DX 9 */
2004     DWORD DevCaps2;
2005
2006     float MaxNpatchTessellationLevel;
2007     DWORD Reserved5; /* undocumented */
2008
2009     UINT MasterAdapterOrdinal;
2010     UINT AdapterOrdinalInGroup;
2011     UINT NumberOfAdaptersInGroup;
2012     DWORD DeclTypes;
2013     DWORD NumSimultaneousRTs;
2014     DWORD StretchRectFilterCaps;
2015     WINED3DVSHADERCAPS2_0 VS20Caps;
2016     WINED3DPSHADERCAPS2_0 PS20Caps;
2017     DWORD VertexTextureFilterCaps;
2018     DWORD MaxVShaderInstructionsExecuted;
2019     DWORD MaxPShaderInstructionsExecuted;
2020     DWORD MaxVertexShader30InstructionSlots;
2021     DWORD MaxPixelShader30InstructionSlots;
2022     DWORD Reserved2; /* Not in the microsoft headers but documented */
2023     DWORD Reserved3;
2024
2025     WINEDDCAPS DirectDrawCaps;
2026 } WINED3DCAPS;
2027
2028 /* DirectDraw types */
2029
2030 typedef struct _WINEDDCOLORKEY
2031 {
2032     DWORD dwColorSpaceLowValue;     /* low boundary of color space that is to
2033                                      * be treated as Color Key, inclusive */
2034     DWORD dwColorSpaceHighValue;    /* high boundary of color space that is
2035                                      * to be treated as Color Key, inclusive */
2036 } WINEDDCOLORKEY,*LPWINEDDCOLORKEY;
2037
2038 typedef struct _WINEDDBLTFX
2039 {
2040     DWORD dwSize;                                   /* size of structure */
2041     DWORD dwDDFX;                                   /* FX operations */
2042     DWORD dwROP;                                    /* Win32 raster operations */
2043     DWORD dwDDROP;                                  /* Raster operations new for DirectDraw */
2044     DWORD dwRotationAngle;                          /* Rotation angle for blt */
2045     DWORD dwZBufferOpCode;                          /* ZBuffer compares */
2046     DWORD dwZBufferLow;                             /* Low limit of Z buffer */
2047     DWORD dwZBufferHigh;                            /* High limit of Z buffer */
2048     DWORD dwZBufferBaseDest;                        /* Destination base value */
2049     DWORD dwZDestConstBitDepth;                     /* Bit depth used to specify Z constant for destination */
2050     union
2051     {
2052         DWORD dwZDestConst;                         /* Constant to use as Z buffer for dest */
2053         struct IWineD3DSurface *lpDDSZBufferDest;   /* Surface to use as Z buffer for dest */
2054     } DUMMYUNIONNAME1;
2055     DWORD dwZSrcConstBitDepth;                      /* Bit depth used to specify Z constant for source */
2056     union
2057     {
2058         DWORD dwZSrcConst;                          /* Constant to use as Z buffer for src */
2059         struct IWineD3DSurface *lpDDSZBufferSrc;    /* Surface to use as Z buffer for src */
2060     } DUMMYUNIONNAME2;
2061     DWORD dwAlphaEdgeBlendBitDepth;                 /* Bit depth used to specify constant for alpha edge blend */
2062     DWORD dwAlphaEdgeBlend;                         /* Alpha for edge blending */
2063     DWORD dwReserved;
2064     DWORD dwAlphaDestConstBitDepth;                 /* Bit depth used to specify alpha constant for destination */
2065     union
2066     {
2067         DWORD dwAlphaDestConst;                     /* Constant to use as Alpha Channel */
2068         struct IWineD3DSurface *lpDDSAlphaDest;     /* Surface to use as Alpha Channel */
2069     } DUMMYUNIONNAME3;
2070     DWORD dwAlphaSrcConstBitDepth;                  /* Bit depth used to specify alpha constant for source */
2071     union
2072     {
2073         DWORD dwAlphaSrcConst;                      /* Constant to use as Alpha Channel */
2074         struct IWineD3DSurface *lpDDSAlphaSrc;      /* Surface to use as Alpha Channel */
2075     } DUMMYUNIONNAME4;
2076     union
2077     {
2078         DWORD dwFillColor;                          /* color in RGB or Palettized */
2079         DWORD dwFillDepth;                          /* depth value for z-buffer */
2080         DWORD dwFillPixel;                          /* pixel val for RGBA or RGBZ */
2081         struct IWineD3DSurface *lpDDSPattern;       /* Surface to use as pattern */
2082     } DUMMYUNIONNAME5;
2083     WINEDDCOLORKEY ddckDestColorkey;                /* DestColorkey override */
2084     WINEDDCOLORKEY ddckSrcColorkey;                 /* SrcColorkey override */
2085 } WINEDDBLTFX,*LPWINEDDBLTFX;
2086
2087 typedef struct _WINEDDOVERLAYFX
2088 {
2089     DWORD dwSize;                                   /* size of structure */
2090     DWORD dwAlphaEdgeBlendBitDepth;                 /* Bit depth used to specify constant for alpha edge blend */
2091     DWORD dwAlphaEdgeBlend;                         /* Constant to use as alpha for edge blend */
2092     DWORD dwReserved;
2093     DWORD dwAlphaDestConstBitDepth;                 /* Bit depth used to specify alpha constant for destination */
2094     union
2095     {
2096         DWORD dwAlphaDestConst;                     /* Constant to use as alpha channel for dest */
2097         struct IWineD3DSurface *lpDDSAlphaDest;     /* Surface to use as alpha channel for dest */
2098     } DUMMYUNIONNAME1;
2099     DWORD dwAlphaSrcConstBitDepth;                  /* Bit depth used to specify alpha constant for source */
2100     union
2101     {
2102         DWORD dwAlphaSrcConst;                      /* Constant to use as alpha channel for src */
2103         struct IWineD3DSurface *lpDDSAlphaSrc;      /* Surface to use as alpha channel for src */
2104     } DUMMYUNIONNAME2;
2105     WINEDDCOLORKEY dckDestColorkey;                 /* DestColorkey override */
2106     WINEDDCOLORKEY dckSrcColorkey;                  /* SrcColorkey override */
2107     DWORD dwDDFX;                                   /* Overlay FX */
2108     DWORD dwFlags;                                  /* flags */
2109 } WINEDDOVERLAYFX;
2110
2111 struct wined3d_buffer_desc
2112 {
2113     UINT byte_width;
2114     DWORD usage;
2115     UINT bind_flags;
2116     UINT cpu_access_flags;
2117     UINT misc_flags;
2118 };
2119
2120 interface IWineD3DResource;
2121 interface IWineD3DSurface;
2122 interface IWineD3DVolume;
2123 interface IWineD3DSwapChain;
2124 interface IWineD3DDevice;
2125
2126 [
2127     object,
2128     local,
2129     uuid(aeb62dfc-bdcb-4f02-9519-1eeea00c15cd)
2130 ]
2131 interface IWineD3DDeviceParent : IUnknown
2132 {
2133     void WineD3DDeviceCreated(
2134         [in] IWineD3DDevice *device
2135     );
2136
2137     HRESULT CreateSurface(
2138         [in] IUnknown *superior,
2139         [in] UINT width,
2140         [in] UINT height,
2141         [in] WINED3DFORMAT format,
2142         [in] DWORD usage,
2143         [in] WINED3DPOOL pool,
2144         [in] UINT level,
2145         [in] WINED3DCUBEMAP_FACES face,
2146         [out] IWineD3DSurface **surface
2147     );
2148
2149     HRESULT CreateRenderTarget(
2150         [in] IUnknown *superior,
2151         [in] UINT width,
2152         [in] UINT height,
2153         [in] WINED3DFORMAT format,
2154         [in] WINED3DMULTISAMPLE_TYPE multisample_type,
2155         [in] DWORD multisample_quality,
2156         [in] BOOL lockable,
2157         [out] IWineD3DSurface **surface
2158     );
2159
2160     HRESULT CreateDepthStencilSurface(
2161         [in] IUnknown *superior,
2162         [in] UINT width,
2163         [in] UINT height,
2164         [in] WINED3DFORMAT format,
2165         [in] WINED3DMULTISAMPLE_TYPE multisample_type,
2166         [in] DWORD multisample_quality,
2167         [in] BOOL discard,
2168         [out] IWineD3DSurface **surface
2169     );
2170
2171     HRESULT CreateVolume(
2172         [in] IUnknown *superior,
2173         [in] UINT width,
2174         [in] UINT height,
2175         [in] UINT depth,
2176         [in] WINED3DFORMAT format,
2177         [in] WINED3DPOOL pool,
2178         [in] DWORD usage,
2179         [out] IWineD3DVolume **volume
2180     );
2181
2182     HRESULT CreateSwapChain(
2183         [in, out] WINED3DPRESENT_PARAMETERS *present_parameters,
2184         [out] IWineD3DSwapChain **swapchain
2185     );
2186 }
2187 typedef ULONG (*D3DCB_DESTROYSURFACEFN)(IWineD3DSurface *pSurface);
2188 typedef ULONG (*D3DCB_DESTROYVOLUMEFN)(IWineD3DVolume *pVolume);
2189 typedef ULONG (*D3DCB_DESTROYSWAPCHAINFN)(IWineD3DSwapChain *pSwapChain);
2190 typedef HRESULT (*D3DCB_ENUMRESOURCES)(IWineD3DResource *resource, void *pData);
2191
2192 [
2193     object,
2194     local,
2195     uuid(46799311-8e0e-40ce-b2ec-ddb99f18fcb4)
2196 ]
2197 interface IWineD3DBase : IUnknown
2198 {
2199     HRESULT GetParent(
2200         [out] IUnknown **parent
2201     );
2202 }
2203
2204 [
2205     object,
2206     local,
2207     uuid(108f9c44-6f30-11d9-c687-00046142c14f)
2208 ]
2209 interface IWineD3D : IWineD3DBase
2210 {
2211     UINT GetAdapterCount(
2212     );
2213     HRESULT RegisterSoftwareDevice(
2214         [in] void *pInitializeFunction
2215     );
2216     HMONITOR GetAdapterMonitor(
2217         [in] UINT adapter_idx
2218     );
2219     UINT GetAdapterModeCount(
2220         [in] UINT adapter_idx,
2221         [in] WINED3DFORMAT format
2222     );
2223     HRESULT EnumAdapterModes(
2224         [in] UINT adapter_idx,
2225         [in] UINT mode_idx,
2226         [in] WINED3DFORMAT format,
2227         [out] WINED3DDISPLAYMODE *mode
2228     );
2229     HRESULT GetAdapterDisplayMode(
2230         [in] UINT adapter_idx,
2231         [out] WINED3DDISPLAYMODE *mode
2232     );
2233     HRESULT GetAdapterIdentifier(
2234         [in] UINT adapter_idx,
2235         [in] DWORD flags,
2236         [out] WINED3DADAPTER_IDENTIFIER *identifier
2237     );
2238     HRESULT CheckDeviceMultiSampleType(
2239         [in] UINT adapter_idx,
2240         [in] WINED3DDEVTYPE device_type,
2241         [in] WINED3DFORMAT surface_format,
2242         [in] BOOL windowed,
2243         [in] WINED3DMULTISAMPLE_TYPE multisample_type,
2244         [out] DWORD *quality_levels
2245     );
2246     HRESULT CheckDepthStencilMatch(
2247         [in] UINT adapter_idx,
2248         [in] WINED3DDEVTYPE device_type,
2249         [in] WINED3DFORMAT adapter_format,
2250         [in] WINED3DFORMAT render_target_format,
2251         [in] WINED3DFORMAT depth_stencil_format
2252     );
2253     HRESULT CheckDeviceType(
2254         [in] UINT adapter_idx,
2255         [in] WINED3DDEVTYPE device_type,
2256         [in] WINED3DFORMAT display_format,
2257         [in] WINED3DFORMAT backbuffer_format,
2258         [in] BOOL windowed
2259     );
2260     HRESULT CheckDeviceFormat(
2261         [in] UINT adaper_idx,
2262         [in] WINED3DDEVTYPE device_type,
2263         [in] WINED3DFORMAT adapter_format,
2264         [in] DWORD usage,
2265         [in] WINED3DRESOURCETYPE resource_type,
2266         [in] WINED3DFORMAT check_format,
2267         [in] WINED3DSURFTYPE surface_type
2268     );
2269     HRESULT CheckDeviceFormatConversion(
2270         [in] UINT adapter_idx,
2271         [in] WINED3DDEVTYPE device_type,
2272         [in] WINED3DFORMAT source_format,
2273         [in] WINED3DFORMAT target_format
2274     );
2275     HRESULT GetDeviceCaps(
2276         [in] UINT adapter_idx,
2277         [in] WINED3DDEVTYPE device_type,
2278         [out] WINED3DCAPS *caps
2279     );
2280     HRESULT CreateDevice(
2281         [in] UINT adapter_idx,
2282         [in] WINED3DDEVTYPE device_type,
2283         [in] HWND focus_window,
2284         [in] DWORD behaviour_flags,
2285         [in] IUnknown *parent,
2286         [in] IWineD3DDeviceParent *device_parent,
2287         [out] IWineD3DDevice **device
2288     );
2289 }
2290
2291 [
2292     object,
2293     local,
2294     uuid(1f3bfb34-6f30-11d9-c687-00046142c14f)
2295 ]
2296 interface IWineD3DResource : IWineD3DBase
2297 {
2298     HRESULT GetDevice(
2299         [out] IWineD3DDevice **device
2300     );
2301     HRESULT SetPrivateData(
2302         [in] REFGUID guid,
2303         [in] const void *data,
2304         [in] DWORD data_size,
2305         [in] DWORD flags
2306     );
2307     HRESULT GetPrivateData(
2308         [in] REFGUID guid,
2309         [out] void *data,
2310         [in, out] DWORD *data_size
2311     );
2312     HRESULT FreePrivateData(
2313         [in] REFGUID guid
2314     );
2315     DWORD SetPriority(
2316         [in] DWORD new_priority
2317     );
2318     DWORD GetPriority(
2319     );
2320     void PreLoad(
2321     );
2322     void UnLoad(
2323     );
2324     WINED3DRESOURCETYPE GetType(
2325     );
2326 }
2327
2328 [
2329     object,
2330     local,
2331     uuid(f7d8abf4-fb93-43e4-9c96-4618cf9b3cbc)
2332 ]
2333 interface IWineD3DRendertargetView : IWineD3DBase
2334 {
2335     HRESULT GetResource(
2336         [out] IWineD3DResource **resource
2337     );
2338 }
2339
2340 [
2341     object,
2342     local,
2343     uuid(f756720c-32b9-4439-b5a3-1d6c97037d9e)
2344 ]
2345 interface IWineD3DPalette : IWineD3DBase
2346 {
2347     HRESULT GetEntries(
2348         [in] DWORD flags,
2349         [in] DWORD start,
2350         [in] DWORD count,
2351         [out] PALETTEENTRY *entries
2352     );
2353     HRESULT GetCaps(
2354         [out] DWORD *caps
2355     );
2356     HRESULT SetEntries(
2357         [in] DWORD flags,
2358         [in] DWORD start,
2359         [in] DWORD count,
2360         [in] const PALETTEENTRY *entries
2361     );
2362 }
2363
2364 [
2365     object,
2366     local,
2367     uuid(8f2bceb1-d338-488c-ab7f-0ec980bf5d2d)
2368 ]
2369 interface IWineD3DClipper : IWineD3DBase
2370 {
2371     HRESULT GetClipList(
2372         [in] const RECT *rect,
2373         [out] RGNDATA *clip_list,
2374         [in, out] DWORD *clip_list_size
2375     );
2376     HRESULT GetHWnd(
2377         [out] HWND *hwnd
2378     );
2379     HRESULT IsClipListChanged(
2380         [out] BOOL *changed
2381     );
2382     HRESULT SetClipList(
2383         [in] const RGNDATA *clip_list,
2384         [in] DWORD flags
2385     );
2386     HRESULT SetHWnd(
2387         [in] DWORD flags,
2388         [in] HWND hwnd
2389     );
2390 }
2391
2392 [
2393     object,
2394     local,
2395     uuid(37cd5526-6f30-11d9-c687-00046142c14f)
2396 ]
2397 interface IWineD3DSurface : IWineD3DResource
2398 {
2399     HRESULT GetContainer(
2400         [in] REFIID riid,
2401         [out] void **container
2402     );
2403     HRESULT GetDesc(
2404         [out] WINED3DSURFACE_DESC *desc
2405     );
2406     HRESULT LockRect(
2407         [out] WINED3DLOCKED_RECT *locked_rect,
2408         [in] const RECT *rect,
2409         [in] DWORD flags
2410     );
2411     HRESULT UnlockRect(
2412     );
2413     HRESULT GetDC(
2414         [out] HDC *dc
2415     );
2416     HRESULT ReleaseDC(
2417         [in] HDC dc
2418     );
2419     HRESULT Flip(
2420         [in] IWineD3DSurface *override,
2421         [in] DWORD flags
2422     );
2423     HRESULT Blt(
2424         [in] const RECT *dst_rect,
2425         [in] IWineD3DSurface *src_surface,
2426         [in] const RECT *src_rect,
2427         [in] DWORD flags,
2428         [in] const WINEDDBLTFX *blt_fx,
2429         [in] WINED3DTEXTUREFILTERTYPE filter
2430     );
2431     HRESULT GetBltStatus(
2432         [in] DWORD flags
2433     );
2434     HRESULT GetFlipStatus(
2435         [in] DWORD flags
2436     );
2437     HRESULT IsLost(
2438     );
2439     HRESULT Restore(
2440     );
2441     HRESULT BltFast(
2442         [in] DWORD dst_x,
2443         [in] DWORD dst_y,
2444         [in] IWineD3DSurface *src_surface,
2445         [in] const RECT *src_rect,
2446         [in] DWORD trans
2447     );
2448     HRESULT GetPalette(
2449         [out] IWineD3DPalette **palette
2450     );
2451     HRESULT SetPalette(
2452         [in] IWineD3DPalette *palette
2453     );
2454     HRESULT RealizePalette(
2455     );
2456     HRESULT SetColorKey(
2457         [in] DWORD flags,
2458         [in] const WINEDDCOLORKEY *color_key
2459     );
2460     DWORD GetPitch(
2461     );
2462     HRESULT SetMem(
2463         [in] void *mem
2464     );
2465     HRESULT SetOverlayPosition(
2466         [in] LONG x,
2467         [in] LONG y
2468     );
2469     HRESULT GetOverlayPosition(
2470         [out] LONG *x,
2471         [out] LONG *y
2472     );
2473     HRESULT UpdateOverlayZOrder(
2474         [in] DWORD flags,
2475         [in] IWineD3DSurface *ref
2476     );
2477     HRESULT UpdateOverlay(
2478         [in] const RECT *src_rect,
2479         [in] IWineD3DSurface *dst_surface,
2480         [in] const RECT *dst_rect,
2481         [in] DWORD flags,
2482         [in] const WINEDDOVERLAYFX *fx
2483     );
2484     HRESULT SetClipper(
2485         [in] IWineD3DClipper *clipper
2486     );
2487     HRESULT GetClipper(
2488         [out] IWineD3DClipper **clipper
2489     );
2490     HRESULT LoadTexture(
2491         [in] BOOL srgb_mode
2492     );
2493     void BindTexture(
2494         [in] BOOL srgb
2495     );
2496     HRESULT SaveSnapshot(
2497         [in] const char *filename
2498     );
2499     HRESULT SetContainer(
2500         [in] IWineD3DBase *container
2501     );
2502     void GetGlDesc(
2503         [out] glDescriptor **desc
2504     );
2505     const void *GetData(
2506     );
2507     HRESULT SetFormat(
2508         [in] WINED3DFORMAT format
2509     );
2510     HRESULT PrivateSetup(
2511     );
2512     void ModifyLocation(
2513         [in] DWORD location,
2514         [in] BOOL persistent
2515     );
2516     HRESULT LoadLocation(
2517         [in] DWORD location,
2518         [in] const RECT *rect
2519     );
2520     WINED3DSURFTYPE GetImplType(
2521     );
2522     HRESULT DrawOverlay(
2523     );
2524 }
2525
2526 [
2527     object,
2528     local,
2529     uuid(24769ed8-6f30-11d9-c687-00046142c14f)
2530 ]
2531 interface IWineD3DVolume : IWineD3DResource
2532 {
2533     HRESULT GetContainer(
2534         [in] REFIID riid,
2535         [out] void **container
2536     );
2537     HRESULT GetDesc(
2538         [out] WINED3DVOLUME_DESC *desc
2539     );
2540     HRESULT LockBox(
2541         [out] WINED3DLOCKED_BOX *locked_box,
2542         [in] const WINED3DBOX *box,
2543         [in] DWORD flags
2544     );
2545     HRESULT UnlockBox(
2546     );
2547     HRESULT LoadTexture(
2548         [in] int gl_level,
2549         [in] BOOL srgb_mode
2550     );
2551     HRESULT SetContainer(
2552         [in] IWineD3DBase *container
2553     );
2554 }
2555
2556 [
2557     object,
2558     local,
2559     uuid(3c2aebf6-6f30-11d9-c687-00046142c14f)
2560 ]
2561 interface IWineD3DBaseTexture : IWineD3DResource
2562 {
2563     DWORD SetLOD(
2564         [in] DWORD new_lod
2565     );
2566     DWORD GetLOD(
2567     );
2568     DWORD GetLevelCount(
2569     );
2570     HRESULT SetAutoGenFilterType(
2571         WINED3DTEXTUREFILTERTYPE filter_type
2572     );
2573     WINED3DTEXTUREFILTERTYPE GetAutoGenFilterType(
2574     );
2575     void GenerateMipSubLevels(
2576     );
2577     BOOL SetDirty(
2578         BOOL dirty
2579     );
2580     BOOL GetDirty(
2581     );
2582     HRESULT BindTexture(
2583         [in] BOOL srgb
2584     );
2585     UINT GetTextureDimensions(
2586     );
2587     BOOL IsCondNP2(
2588     );
2589     void ApplyStateChanges(
2590         const DWORD texture_states[WINED3D_HIGHEST_TEXTURE_STATE + 1],
2591         const DWORD sampler_states[WINED3D_HIGHEST_SAMPLER_STATE + 1]
2592     );
2593 }
2594
2595 [
2596     object,
2597     local,
2598     uuid(3e72cc1c-6f30-11d9-c687-00046142c14f)
2599 ]
2600 interface IWineD3DTexture : IWineD3DBaseTexture
2601 {
2602     void Destroy(
2603         [in] D3DCB_DESTROYSURFACEFN destroy_surface_callback
2604     );
2605     HRESULT GetLevelDesc(
2606         [in] UINT level,
2607         [out] WINED3DSURFACE_DESC *desc
2608     );
2609     HRESULT GetSurfaceLevel(
2610         [in] UINT level,
2611         [out] IWineD3DSurface **surface
2612     );
2613     HRESULT LockRect(
2614         [in] UINT level,
2615         [out] WINED3DLOCKED_RECT *locked_rect,
2616         [in] const RECT *rect,
2617         [in] DWORD flags
2618     );
2619     HRESULT UnlockRect(
2620         [in] UINT level
2621     );
2622     HRESULT AddDirtyRect(
2623         [in] const RECT *dirty_rect
2624     );
2625 }
2626
2627 [
2628     object,
2629     local,
2630     uuid(41752900-6f30-11d9-c687-00046142c14f)
2631 ]
2632 interface IWineD3DCubeTexture : IWineD3DBaseTexture
2633 {
2634     void Destroy(
2635         [in] D3DCB_DESTROYSURFACEFN destroy_surface_callback
2636     );
2637     HRESULT GetLevelDesc(
2638         [in] UINT level,
2639         [out] WINED3DSURFACE_DESC *desc
2640     );
2641     HRESULT GetCubeMapSurface(
2642         [in] WINED3DCUBEMAP_FACES face,
2643         [in] UINT level,
2644         [out] IWineD3DSurface **surface
2645     );
2646     HRESULT LockRect(
2647         [in] WINED3DCUBEMAP_FACES face,
2648         [in] UINT level,
2649         [out] WINED3DLOCKED_RECT *locked_rect,
2650         [in] const RECT *rect,
2651         [in] DWORD flags
2652     );
2653     HRESULT UnlockRect(
2654         [in] WINED3DCUBEMAP_FACES face,
2655         [in] UINT level
2656     );
2657     HRESULT AddDirtyRect(
2658         [in] WINED3DCUBEMAP_FACES face,
2659         [in] const RECT *dirty_rect
2660     );
2661 }
2662
2663 [
2664     object,
2665     local,
2666     uuid(7b39470c-6f30-11d9-c687-00046142c14f)
2667 ]
2668 interface IWineD3DVolumeTexture : IWineD3DBaseTexture
2669 {
2670     void Destroy(
2671         [in] D3DCB_DESTROYVOLUMEFN destroy_volume_callback
2672     );
2673     HRESULT GetLevelDesc(
2674         [in] UINT level,
2675         [out] WINED3DVOLUME_DESC *desc
2676     );
2677     HRESULT GetVolumeLevel(
2678         [in] UINT level,
2679         [out] IWineD3DVolume **volume
2680     );
2681     HRESULT LockBox(
2682         [in] UINT level,
2683         [out] WINED3DLOCKED_BOX *locked_box,
2684         [in] const WINED3DBOX *box,
2685         [in] DWORD flags
2686     );
2687     HRESULT UnlockBox(
2688         [in] UINT level
2689     );
2690     HRESULT AddDirtyBox(
2691         [in] const WINED3DBOX *dirty_box
2692     );
2693 }
2694
2695 [
2696     object,
2697     local,
2698     uuid(7cd55be6-6f30-11d9-c687-00046142c14f)
2699 ]
2700 interface IWineD3DVertexDeclaration : IWineD3DBase
2701 {
2702     HRESULT GetDevice(
2703         [out] IWineD3DDevice **device
2704     );
2705 }
2706
2707 [
2708     object,
2709     local,
2710     uuid(83b073ce-6f30-11d9-c687-00046142c14f)
2711 ]
2712 interface IWineD3DStateBlock : IWineD3DBase
2713 {
2714     HRESULT GetDevice(
2715         [out] IWineD3DDevice **device
2716     );
2717     HRESULT Capture(
2718     );
2719     HRESULT Apply(
2720     );
2721     HRESULT InitStartupStateBlock(
2722     );
2723 }
2724
2725 [
2726     object,
2727     local,
2728     uuid(905ddbac-6f30-11d9-c687-00046142c14f)
2729 ]
2730 interface IWineD3DQuery : IWineD3DBase
2731 {
2732     HRESULT GetDevice(
2733         [out] IWineD3DDevice **device
2734     );
2735     HRESULT GetData(
2736         [out] void *data,
2737         [in] DWORD data_size,
2738         [in] DWORD flags
2739     );
2740     DWORD GetDataSize(
2741     );
2742     WINED3DQUERYTYPE GetType(
2743     );
2744     HRESULT Issue(
2745         DWORD flags
2746     );
2747 }
2748
2749 [
2750     object,
2751     local,
2752     uuid(34d01b10-6f30-11d9-c687-00046142c14f)
2753 ]
2754 interface IWineD3DSwapChain : IWineD3DBase
2755 {
2756     void Destroy(
2757         [in] D3DCB_DESTROYSURFACEFN destroy_surface_callback
2758     );
2759     HRESULT GetDevice(
2760         [out] IWineD3DDevice **device
2761     );
2762     HRESULT Present(
2763         [in] const RECT *src_rect,
2764         [in] const RECT *dst_rect,
2765         [in] HWND dst_window_override,
2766         [in] const RGNDATA *dirty_region,
2767         [in] DWORD flags
2768     );
2769     HRESULT SetDestWindowOverride(
2770         [in] HWND window
2771     );
2772     HRESULT GetFrontBufferData(
2773         [in] IWineD3DSurface *dst_surface
2774     );
2775     HRESULT GetBackBuffer(
2776         [in] UINT backbuffer_idx,
2777         [in] WINED3DBACKBUFFER_TYPE backbuffer_type,
2778         [out] IWineD3DSurface **backbuffer
2779     );
2780     HRESULT GetRasterStatus(
2781         [out] WINED3DRASTER_STATUS *raster_status
2782     );
2783     HRESULT GetDisplayMode(
2784         [out] WINED3DDISPLAYMODE *mode
2785     );
2786     HRESULT GetPresentParameters(
2787         [out] WINED3DPRESENT_PARAMETERS *present_parameters
2788     );
2789     HRESULT SetGammaRamp(
2790         [in] DWORD flags,
2791         [in] const WINED3DGAMMARAMP *ramp
2792     );
2793     HRESULT GetGammaRamp(
2794         [out] WINED3DGAMMARAMP *ramp
2795     );
2796 }
2797
2798 [
2799     object,
2800     local,
2801     uuid(b3f028e8-1a40-4ab3-9292-5bf6cfd80209)
2802 ]
2803 interface IWineD3DBuffer : IWineD3DResource
2804 {
2805     HRESULT Map(
2806         [in] UINT offset,
2807         [in] UINT size,
2808         [out] BYTE **data,
2809         [in] DWORD flags
2810     );
2811     HRESULT Unmap(
2812     );
2813     HRESULT GetDesc(
2814         [out] WINED3DBUFFER_DESC *desc
2815     );
2816 }
2817
2818 [
2819     object,
2820     local,
2821     uuid(eac93065-a4df-446f-86a1-9ef2bca40a3c)
2822 ]
2823 interface IWineD3DBaseShader : IWineD3DBase
2824 {
2825     HRESULT SetFunction(
2826         [in] const DWORD *function
2827     );
2828 }
2829
2830 [
2831     object,
2832     local,
2833     uuid(7f7a2b60-6f30-11d9-c687-00046142c14f)
2834 ]
2835 interface IWineD3DVertexShader : IWineD3DBaseShader
2836 {
2837     HRESULT GetDevice(
2838         [out] IWineD3DDevice **device
2839     );
2840     HRESULT GetFunction(
2841         [out] void *data,
2842         [in, out] UINT *data_size
2843     );
2844     void FakeSemantics(
2845         [in] IWineD3DVertexDeclaration *vertex_declaration
2846     );
2847     HRESULT SetLocalConstantsF(
2848         [in] UINT start_idx,
2849         [in] const float *src_data,
2850         [in] UINT vector4f_count
2851     );
2852 }
2853
2854 [
2855     object,
2856     local,
2857     uuid(818503da-6f30-11d9-c687-00046142c14f)
2858 ]
2859 interface IWineD3DPixelShader : IWineD3DBaseShader
2860 {
2861     HRESULT GetDevice(
2862         [out] IWineD3DDevice **device
2863     );
2864     HRESULT GetFunction(
2865         [out] void *data,
2866         [in, out] UINT *data_size
2867     );
2868 }
2869
2870 [
2871     object,
2872     local,
2873     uuid(6d10a2ce-09d0-4a53-a427-11388f9f8ca5)
2874 ]
2875 interface IWineD3DDevice : IWineD3DBase
2876 {
2877     HRESULT CreateBuffer(
2878         [in] struct wined3d_buffer_desc *desc,
2879         [in] const void *data,
2880         [in] IUnknown *parent,
2881         [out] IWineD3DBuffer **buffer
2882     );
2883     HRESULT CreateVertexBuffer(
2884         [in] UINT length,
2885         [in] DWORD usage,
2886         [in] DWORD fvf,
2887         [in] WINED3DPOOL pool,
2888         [out] IWineD3DBuffer **vertex_buffer,
2889         [in] HANDLE *shared_handle,
2890         [in] IUnknown *parent
2891     );
2892     HRESULT CreateIndexBuffer(
2893         [in] UINT length,
2894         [in] DWORD usage,
2895         [in] WINED3DPOOL pool,
2896         [out] IWineD3DBuffer **index_buffer,
2897         [in] HANDLE *shared_handle,
2898         [in] IUnknown *parent
2899     );
2900     HRESULT CreateStateBlock(
2901         [in] WINED3DSTATEBLOCKTYPE type,
2902         [out] IWineD3DStateBlock **stateblock,
2903         [in] IUnknown *parent
2904     );
2905     HRESULT CreateSurface(
2906         [in] UINT width,
2907         [in] UINT height,
2908         [in] WINED3DFORMAT format,
2909         [in] BOOL lockable,
2910         [in] BOOL discard,
2911         [in] UINT level,
2912         [out] IWineD3DSurface **surface,
2913         [in] WINED3DRESOURCETYPE resource_type,
2914         [in] DWORD usage,
2915         [in] WINED3DPOOL pool,
2916         [in] WINED3DMULTISAMPLE_TYPE multisample_type,
2917         [in] DWORD multisample_quality,
2918         [in] HANDLE *shared_handle,
2919         [in] WINED3DSURFTYPE surface_type,
2920         [in] IUnknown *parent
2921     );
2922     HRESULT CreateRendertargetView(
2923         [in] IWineD3DResource *resource,
2924         [in] IUnknown *parent,
2925         [out] IWineD3DRendertargetView **rendertarget_view
2926     );
2927     HRESULT CreateTexture(
2928         [in] UINT width,
2929         [in] UINT height,
2930         [in] UINT levels,
2931         [in] DWORD usage,
2932         [in] WINED3DFORMAT format,
2933         [in] WINED3DPOOL pool,
2934         [out] IWineD3DTexture **texture,
2935         [in] HANDLE *shared_handle,
2936         [in] IUnknown *parent
2937     );
2938     HRESULT CreateVolumeTexture(
2939         [in] UINT width,
2940         [in] UINT height,
2941         [in] UINT depth,
2942         [in] UINT levels,
2943         [in] DWORD usage,
2944         [in] WINED3DFORMAT format,
2945         [in] WINED3DPOOL pool,
2946         [out] IWineD3DVolumeTexture **texture,
2947         [in] HANDLE *shared_handle,
2948         [in] IUnknown *parent
2949     );
2950     HRESULT CreateVolume(
2951         [in] UINT width,
2952         [in] UINT height,
2953         [in] UINT depth,
2954         [in] DWORD usage,
2955         [in] WINED3DFORMAT format,
2956         [in] WINED3DPOOL pool,
2957         [out] IWineD3DVolume **volume,
2958         [in] HANDLE *shared_handle,
2959         [in] IUnknown *parent
2960     );
2961     HRESULT CreateCubeTexture(
2962         [in] UINT edge_length,
2963         [in] UINT levels,
2964         [in] DWORD usage,
2965         [in] WINED3DFORMAT format,
2966         [in] WINED3DPOOL pool,
2967         [out] IWineD3DCubeTexture **texture,
2968         [in] HANDLE *shared_handle,
2969         [in] IUnknown *parent
2970     );
2971     HRESULT CreateQuery(
2972         [in] WINED3DQUERYTYPE type,
2973         [out] IWineD3DQuery **query,
2974         [in] IUnknown *parent
2975     );
2976     HRESULT CreateSwapChain(
2977         [in] WINED3DPRESENT_PARAMETERS *present_parameters,
2978         [out] IWineD3DSwapChain **swapchain,
2979         [in] IUnknown *parent,
2980         [in] WINED3DSURFTYPE surface_type
2981     );
2982     HRESULT CreateVertexDeclaration(
2983         [out] IWineD3DVertexDeclaration **declaration,
2984         [in] IUnknown *parent,
2985         [in] const WINED3DVERTEXELEMENT *elements,
2986         [in] UINT element_count
2987     );
2988     HRESULT CreateVertexDeclarationFromFVF(
2989         [out] IWineD3DVertexDeclaration **declaration,
2990         [in] IUnknown *parent,
2991         [in] DWORD fvf
2992     );
2993     HRESULT CreateVertexShader(
2994         [in] IWineD3DVertexDeclaration *declaration,
2995         [in] const DWORD *function,
2996         [out] IWineD3DVertexShader **shader,
2997         [in] IUnknown *parent
2998     );
2999     HRESULT CreatePixelShader(
3000         [in] const DWORD *function,
3001         [out] IWineD3DPixelShader **shader,
3002         [in] IUnknown *parent
3003     );
3004     HRESULT CreatePalette(
3005         [in] DWORD flags,
3006         [in] const PALETTEENTRY *palette_entry,
3007         [out] IWineD3DPalette **palette,
3008         [in] IUnknown *parent
3009     );
3010     HRESULT Init3D(
3011         [in] WINED3DPRESENT_PARAMETERS *present_parameters
3012     );
3013     HRESULT InitGDI(
3014         [in] WINED3DPRESENT_PARAMETERS *present_parameters
3015     );
3016     HRESULT Uninit3D(
3017         [in] D3DCB_DESTROYSURFACEFN destroy_surface_callback,
3018         [in] D3DCB_DESTROYSWAPCHAINFN destroy_swapchain_callback
3019     );
3020     HRESULT UninitGDI(
3021         [in] D3DCB_DESTROYSWAPCHAINFN destroy_swapchain_callback
3022     );
3023     void SetMultithreaded(
3024     );
3025     HRESULT EvictManagedResources(
3026     );
3027     UINT GetAvailableTextureMem(
3028     );
3029     HRESULT GetBackBuffer(
3030         [in] UINT swapchain_idx,
3031         [in] UINT backbuffer_idx,
3032         [in] WINED3DBACKBUFFER_TYPE backbuffer_type,
3033         [out] IWineD3DSurface **backbuffer
3034     );
3035     HRESULT GetCreationParameters(
3036         [out] WINED3DDEVICE_CREATION_PARAMETERS *creation_parameters
3037     );
3038     HRESULT GetDeviceCaps(
3039         [out] WINED3DCAPS *caps
3040     );
3041     HRESULT GetDirect3D(
3042         [out] IWineD3D** d3d
3043     );
3044     HRESULT GetDisplayMode(
3045         [in] UINT swapchain_idx,
3046         [out] WINED3DDISPLAYMODE *mode
3047     );
3048     HRESULT SetDisplayMode(
3049         [in] UINT swapchain_idx,
3050         [in] const WINED3DDISPLAYMODE *mode
3051     );
3052     UINT GetNumberOfSwapChains(
3053     );
3054     HRESULT GetRasterStatus(
3055         [in] UINT swapchain_idx,
3056         [out] WINED3DRASTER_STATUS *raster_status
3057     );
3058     HRESULT GetSwapChain(
3059         [in] UINT swapchain_idx,
3060         [out] IWineD3DSwapChain **swapchain
3061     );
3062     HRESULT Reset(
3063         [in] WINED3DPRESENT_PARAMETERS *present_parameters
3064     );
3065     HRESULT SetDialogBoxMode(
3066         [in] BOOL enable_dialogs
3067     );
3068     HRESULT SetCursorProperties(
3069         [in] UINT x_hotspot,
3070         [in] UINT y_hotspot,
3071         [in] IWineD3DSurface *cursor_surface
3072     );
3073     void SetCursorPosition(
3074         [in] int x_screen_space,
3075         [in] int y_screen_space,
3076         [in] DWORD flags
3077     );
3078     BOOL ShowCursor(
3079         [in] BOOL show
3080     );
3081     HRESULT TestCooperativeLevel(
3082     );
3083     HRESULT SetClipPlane(
3084         [in] DWORD plane_idx,
3085         [in] const float *plane
3086     );
3087     HRESULT GetClipPlane(
3088         [in] DWORD plane_idx,
3089         [out] float *plane
3090     );
3091     HRESULT SetClipStatus(
3092         [in] const WINED3DCLIPSTATUS *clip_status
3093     );
3094     HRESULT GetClipStatus(
3095         [out] WINED3DCLIPSTATUS *clip_status
3096     );
3097     HRESULT SetCurrentTexturePalette(
3098         [in] UINT palette_number
3099     );
3100     HRESULT GetCurrentTexturePalette(
3101         [out] UINT *palette_number
3102     );
3103     HRESULT SetDepthStencilSurface(
3104         [in] IWineD3DSurface *depth_stencil
3105     );
3106     HRESULT GetDepthStencilSurface(
3107         [out] IWineD3DSurface **depth_stencil
3108     );
3109     void SetGammaRamp(
3110         [in] UINT swapchain_idx,
3111         [in] DWORD flags,
3112         [in] const WINED3DGAMMARAMP *ramp
3113     );
3114     void GetGammaRamp(
3115         [in] UINT swapchain_idx,
3116         [out] WINED3DGAMMARAMP *ramp
3117     );
3118     HRESULT SetIndices(
3119         [in] IWineD3DBuffer *index_buffer,
3120         [in] WINED3DFORMAT format
3121     );
3122     HRESULT GetIndices(
3123         [out] IWineD3DBuffer **index_buffer
3124     );
3125     HRESULT SetBaseVertexIndex(
3126         [in] INT base_index
3127     );
3128     HRESULT GetBaseVertexIndex(
3129         [out] INT *base_index
3130     );
3131     HRESULT SetLight(
3132         [in] DWORD light_idx,
3133         [in] const WINED3DLIGHT *light
3134     );
3135     HRESULT GetLight(
3136         [in] DWORD light_idx,
3137         [out] WINED3DLIGHT *light
3138     );
3139     HRESULT SetLightEnable(
3140         [in] DWORD light_idx,
3141         [in] BOOL enable
3142     );
3143     HRESULT GetLightEnable(
3144         [in] DWORD light_idx,
3145         [out] BOOL *enable
3146     );
3147     HRESULT SetMaterial(
3148         [in] const WINED3DMATERIAL *material
3149     );
3150     HRESULT GetMaterial(
3151         [out] WINED3DMATERIAL *material
3152     );
3153     HRESULT SetNPatchMode(
3154         [in] float segments
3155     );
3156     float GetNPatchMode(
3157     );
3158     HRESULT SetPaletteEntries(
3159         [in] UINT palette_number,
3160         [in] const PALETTEENTRY *entries
3161     );
3162     HRESULT GetPaletteEntries(
3163         [in] UINT palette_number,
3164         [out] PALETTEENTRY *entries
3165     );
3166     HRESULT SetPixelShader(
3167         [in] IWineD3DPixelShader *shader
3168     );
3169     HRESULT GetPixelShader(
3170         [out] IWineD3DPixelShader **shader
3171     );
3172     HRESULT SetPixelShaderConstantB(
3173         [in] UINT start_register,
3174         [in] const BOOL *constants,
3175         [in] UINT bool_count
3176     );
3177     HRESULT GetPixelShaderConstantB(
3178         [in] UINT start_register,
3179         [out] BOOL *constants,
3180         [in] UINT bool_count
3181     );
3182     HRESULT SetPixelShaderConstantI(
3183         [in] UINT start_register,
3184         [in] const int *constants,
3185         [in] UINT vector4i_count
3186     );
3187     HRESULT GetPixelShaderConstantI(
3188         [in] UINT start_register,
3189         [out] int *constants,
3190         [in] UINT vector4i_count
3191     );
3192     HRESULT SetPixelShaderConstantF(
3193         [in] UINT start_register,
3194         [in] const float *constants,
3195         [in] UINT vector4f_count
3196     );
3197     HRESULT GetPixelShaderConstantF(
3198         [in] UINT start_register,
3199         [out] float *constants,
3200         [in] UINT vector4f_count
3201     );
3202     HRESULT SetRenderState(
3203         [in] WINED3DRENDERSTATETYPE state,
3204         [in] DWORD value
3205     );
3206     HRESULT GetRenderState(
3207         [in] WINED3DRENDERSTATETYPE state,
3208         [out] DWORD *value
3209     );
3210     HRESULT SetRenderTarget(
3211         [in] DWORD render_target_idx,
3212         [in] IWineD3DSurface *render_target
3213     );
3214     HRESULT GetRenderTarget(
3215         [in] DWORD render_target_idx,
3216         [out] IWineD3DSurface **render_target
3217     );
3218     HRESULT SetFrontBackBuffers(
3219         [in] IWineD3DSurface *front,
3220         [in] IWineD3DSurface *back
3221     );
3222     HRESULT SetSamplerState(
3223         [in] DWORD sampler_idx,
3224         [in] WINED3DSAMPLERSTATETYPE state,
3225         [in] DWORD value
3226     );
3227     HRESULT GetSamplerState(
3228         [in] DWORD sampler_idx,
3229         [in] WINED3DSAMPLERSTATETYPE state,
3230         [out] DWORD *value
3231     );
3232     HRESULT SetScissorRect(
3233         [in] const RECT *rect
3234     );
3235     HRESULT GetScissorRect(
3236         [out] RECT *rect
3237     );
3238     HRESULT SetSoftwareVertexProcessing(
3239         [in] BOOL software
3240     );
3241     BOOL GetSoftwareVertexProcessing(
3242     );
3243     HRESULT SetStreamSource(
3244         [in] UINT stream_idx,
3245         [in] IWineD3DBuffer *buffer,
3246         [in] UINT offset,
3247         [in] UINT stride
3248     );
3249     HRESULT GetStreamSource(
3250         [in] UINT stream_idx,
3251         [out] IWineD3DBuffer **buffer,
3252         [out] UINT *offset,
3253         [out] UINT *stride
3254     );
3255     HRESULT SetStreamSourceFreq(
3256         [in] UINT stream_idx,
3257         [in] UINT divider
3258     );
3259     HRESULT GetStreamSourceFreq(
3260         [in] UINT stream_idx,
3261         [out] UINT *divider
3262     );
3263     HRESULT SetTexture(
3264         [in] DWORD stage,
3265         [in] IWineD3DBaseTexture *texture
3266     );
3267     HRESULT GetTexture(
3268         [in] DWORD stage,
3269         [out] IWineD3DBaseTexture **texture
3270     );
3271     HRESULT SetTextureStageState(
3272         [in] DWORD stage,
3273         [in] WINED3DTEXTURESTAGESTATETYPE state,
3274         [in] DWORD value
3275     );
3276     HRESULT GetTextureStageState(
3277         [in] DWORD stage,
3278         [in] WINED3DTEXTURESTAGESTATETYPE state,
3279         [out] DWORD *value
3280     );
3281     HRESULT SetTransform(
3282         [in] WINED3DTRANSFORMSTATETYPE state,
3283         [in] const WINED3DMATRIX *matrix
3284     );
3285     HRESULT GetTransform(
3286         [in] WINED3DTRANSFORMSTATETYPE state,
3287         [out] WINED3DMATRIX *matrix
3288     );
3289     HRESULT SetVertexDeclaration(
3290         [in] IWineD3DVertexDeclaration *declaration
3291     );
3292     HRESULT GetVertexDeclaration(
3293         [out] IWineD3DVertexDeclaration **declaration
3294     );
3295     HRESULT SetVertexShader(
3296         [in] IWineD3DVertexShader *shader
3297     );
3298     HRESULT GetVertexShader(
3299         [out] IWineD3DVertexShader **shader
3300     );
3301     HRESULT SetVertexShaderConstantB(
3302         [in] UINT start_register,
3303         [in] const BOOL *constants,
3304         [in] UINT bool_count
3305     );
3306     HRESULT GetVertexShaderConstantB(
3307         [in] UINT start_register,
3308         [out] BOOL *constants,
3309         [in] UINT bool_count
3310     );
3311     HRESULT SetVertexShaderConstantI(
3312         [in] UINT start_register,
3313         [in] const int *constants,
3314         [in] UINT vector4i_count
3315     );
3316     HRESULT GetVertexShaderConstantI(
3317         [in] UINT start_register,
3318         [out] int *constants,
3319         [in] UINT vector4i_count
3320     );
3321     HRESULT SetVertexShaderConstantF(
3322         [in] UINT start_register,
3323         [in] const float *constants,
3324         [in] UINT vector4f_count
3325     );
3326     HRESULT GetVertexShaderConstantF(
3327         [in] UINT start_register,
3328         [out] float *constants,
3329         [in] UINT vector4f_count
3330     );
3331     HRESULT SetViewport(
3332         [in] const WINED3DVIEWPORT *viewport
3333     );
3334     HRESULT GetViewport(
3335         [out] WINED3DVIEWPORT *viewport
3336     );
3337     HRESULT MultiplyTransform(
3338         [in] WINED3DTRANSFORMSTATETYPE state,
3339         [in] const WINED3DMATRIX *matrix
3340     );
3341     HRESULT ValidateDevice(
3342         [out] DWORD *num_passes
3343     );
3344     HRESULT ProcessVertices(
3345         [in] UINT src_start_idx,
3346         [in] UINT dst_idx,
3347         [in] UINT vertex_count,
3348         [in] IWineD3DBuffer *dest_buffer,
3349         [in] IWineD3DVertexDeclaration *declaration,
3350         [in] DWORD flags,
3351         [in] DWORD DestFVF
3352     );
3353     HRESULT BeginStateBlock(
3354     );
3355     HRESULT EndStateBlock(
3356         [out] IWineD3DStateBlock **stateblock
3357     );
3358     HRESULT BeginScene(
3359     );
3360     HRESULT EndScene(
3361     );
3362     HRESULT Present(
3363         [in] const RECT *src_rect,
3364         [in] const RECT *dst_rect,
3365         [in] HWND dst_window_override,
3366         [in] const RGNDATA *dirty_region
3367     );
3368     HRESULT Clear(
3369         [in] DWORD rect_count,
3370         [in] const WINED3DRECT *rects,
3371         [in] DWORD flags,
3372         [in] WINED3DCOLOR color,
3373         [in] float z,
3374         [in] DWORD stencil
3375     );
3376     void ClearRendertargetView(
3377         [in] IWineD3DRendertargetView *rendertarget_view,
3378         [in] const float color[4]
3379     );
3380     void SetPrimitiveType(
3381         [in] WINED3DPRIMITIVETYPE primitive_topology
3382     );
3383     void GetPrimitiveType(
3384         [out] WINED3DPRIMITIVETYPE *primitive_topology
3385     );
3386     HRESULT DrawPrimitive(
3387         [in] UINT start_vertex,
3388         [in] UINT vertex_count
3389     );
3390     HRESULT DrawIndexedPrimitive(
3391         [in] UINT min_vertex_idx,
3392         [in] UINT vertex_count,
3393         [in] UINT start_idx,
3394         [in] UINT index_count
3395     );
3396     HRESULT DrawPrimitiveUP(
3397         [in] UINT vertex_count,
3398         [in] const void *stream_data,
3399         [in] UINT stream_stride
3400     );
3401     HRESULT DrawIndexedPrimitiveUP(
3402         [in] UINT min_vertex_idx,
3403         [in] UINT vertex_count,
3404         [in] UINT index_count,
3405         [in] const void *index_data,
3406         [in] WINED3DFORMAT index_data_format,
3407         [in] const void *stream_data,
3408         [in] UINT stream_stride
3409     );
3410     HRESULT DrawPrimitiveStrided(
3411         [in] UINT vertex_count,
3412         [in] const WineDirect3DVertexStridedData *strided_data
3413     );
3414     HRESULT DrawIndexedPrimitiveStrided(
3415         [in] UINT index_count,
3416         [in] const WineDirect3DVertexStridedData *strided_data,
3417         [in] UINT vertex_count,
3418         [in] const void *index_data,
3419         [in] WINED3DFORMAT index_data_format
3420     );
3421     HRESULT DrawRectPatch(
3422         [in] UINT handle,
3423         [in] const float *num_segs,
3424         [in] const WINED3DRECTPATCH_INFO *rect_patch_info
3425     );
3426     HRESULT DrawTriPatch(
3427         [in] UINT handle,
3428         [in] const float *num_segs,
3429         [in] const WINED3DTRIPATCH_INFO *tri_patch_info
3430     );
3431     HRESULT DeletePatch(
3432         [in] UINT handle
3433     );
3434     HRESULT ColorFill(
3435         [in] IWineD3DSurface *surface,
3436         [in] const WINED3DRECT *rect,
3437         [in] WINED3DCOLOR color
3438     );
3439     HRESULT UpdateTexture(
3440         [in] IWineD3DBaseTexture *src_texture,
3441         [in] IWineD3DBaseTexture *dst_texture
3442     );
3443     HRESULT UpdateSurface(
3444         [in] IWineD3DSurface *src_surface,
3445         [in] const RECT *src_rect,
3446         [in] IWineD3DSurface *dst_surface,
3447         [in] const POINT *dst_point
3448     );
3449     HRESULT GetFrontBufferData(
3450         [in] UINT swapchain_idx,
3451         [in] IWineD3DSurface *dst_surface
3452     );
3453     void ResourceReleased(
3454         [in] IWineD3DResource *resource
3455     );
3456     HRESULT EnumResources(
3457         [in] D3DCB_ENUMRESOURCES callback,
3458         [in] void *data
3459     );
3460 }
3461
3462 IWineD3D *WineDirect3DCreate(UINT dxVersion, IUnknown *parent);
3463 IWineD3DClipper *WineDirect3DCreateClipper(IUnknown *parent);