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