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