widl: Call marshalling routines directly also for user-marshalled types accessed...
[wine] / include / d3dhal.h
1 /*
2  * Direct3D driver interface
3  * (DirectX 7 version)
4  *
5  * Copyright (C) 2001 Ove Kaaven
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 #ifndef __WINE_D3DHAL_H
23 #define __WINE_D3DHAL_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #include <d3d.h>
30
31 /*****************************************************************************
32  * device info structures
33  */
34 typedef struct _D3DDeviceDesc_V1 {
35   DWORD                 dwSize;
36   DWORD                 dwFlags;
37   D3DCOLORMODEL         dcmColorModel;
38   DWORD                 dwDevCaps;
39   D3DTRANSFORMCAPS      dtcTransformCaps;
40   BOOL                  bClipping;
41   D3DLIGHTINGCAPS       dlcLightingCaps;
42   D3DPRIMCAPS           dpcLineCaps;
43   D3DPRIMCAPS           dpcTriCaps;
44   DWORD                 dwDeviceRenderBitDepth;
45   DWORD                 dwDeviceZBufferBitDepth;
46   DWORD                 dwMaxBufferSize;
47   DWORD                 dwMaxVertexCount;
48 } D3DDEVICEDESC_V1,*LPD3DDEVICEDESC_V1;
49
50 /* this is to allow keeping the bulk of our OpenGL code out of x11drv */
51 #define D3DDD_WINE_OPENGL_DEVICE 0x00008000
52
53 typedef struct _D3DHAL_GLOBALDRIVERDATA {
54   DWORD                 dwSize;
55   D3DDEVICEDESC_V1      hwCaps;
56   DWORD                 dwNumVertices;
57   DWORD                 dwNumClipVertices;
58   DWORD                 dwNumTextureFormats;
59   LPDDSURFACEDESC       lpTextureFormats;
60 } D3DHAL_GLOBALDRIVERDATA,*LPD3DHAL_GLOBALDRIVERDATA;
61
62 typedef struct _D3DHAL_D3DEXTENDEDCAPS {
63   DWORD                 dwSize;
64   /* DirectX 5 */
65   DWORD                 dwMinTextureWidth, dwMaxTextureWidth;
66   DWORD                 dwMinTextureHeight, dwMaxTextureHeight;
67   DWORD                 dwMinStippleWidth, dwMaxStippleWidth;
68   DWORD                 dwMinStippleHeight, dwMaxStippleHeight;
69   /* DirectX 6 */
70   DWORD                 dwMaxTextureRepeat;
71   DWORD                 dwMaxTextureAspectRatio;
72   DWORD                 dwMaxAnisotropy;
73   D3DVALUE              dvGuardBandLeft;
74   D3DVALUE              dvGuardBandTop;
75   D3DVALUE              dvGuardBandRight;
76   D3DVALUE              dvGuardBandBottom;
77   D3DVALUE              dvExtentsAdjust;
78   DWORD                 dwStencilCaps;
79   DWORD                 dwFVFCaps;
80   DWORD                 dwTextureOpCaps;
81   WORD                  wMaxTextureBlendStages;
82   WORD                  wMaxSimultaneousTextures;
83   /* DirectX 7 */
84   DWORD                 dwMaxActiveLights;
85   D3DVALUE              dvMaxVertexW;
86   WORD                  wMaxUserClipPlanes;
87   WORD                  wMaxVertexBlendMatrices;
88   DWORD                 dwVertexProcessingCaps;
89   DWORD                 dwReserved1;
90   DWORD                 dwReserved2;
91   DWORD                 dwReserved3;
92   DWORD                 dwReserved4;
93 } D3DHAL_D3DEXTENDEDCAPS,*LPD3DHAL_D3DEXTENDEDCAPS;
94
95 /*****************************************************************************
96  * d3d->driver callbacks
97  */
98 typedef struct _D3DHAL_CONTEXTCREATEDATA        *LPD3DHAL_CONTEXTCREATEDATA;
99 typedef struct _D3DHAL_CONTEXTDESTROYDATA       *LPD3DHAL_CONTEXTDESTROYDATA;
100 typedef struct _D3DHAL_CONTEXTDESTROYALLDATA    *LPD3DHAL_CONTEXTDESTROYALLDATA;
101 typedef struct _D3DHAL_SCENECAPTUREDATA         *LPD3DHAL_SCENECAPTUREDATA;
102 typedef struct _D3DHAL_RENDERSTATEDATA          *LPD3DHAL_RENDERSTATEDATA;
103 typedef struct _D3DHAL_RENDERPRIMITIVEDATA      *LPD3DHAL_RENDERPRIMITIVEDATA;
104 typedef struct _D3DHAL_TEXTURECREATEDATA        *LPD3DHAL_TEXTURECREATEDATA;
105 typedef struct _D3DHAL_TEXTUREDESTROYDATA       *LPD3DHAL_TEXTUREDESTROYDATA;
106 typedef struct _D3DHAL_TEXTURESWAPDATA          *LPD3DHAL_TEXTURESWAPDATA;
107 typedef struct _D3DHAL_TEXTUREGETSURFDATA       *LPD3DHAL_TEXTUREGETSURFDATA;
108 typedef struct _D3DHAL_GETSTATEDATA             *LPD3DHAL_GETSTATEDATA;
109
110 typedef DWORD (PASCAL *LPD3DHAL_CONTEXTCREATECB)    (LPD3DHAL_CONTEXTCREATEDATA);
111 typedef DWORD (PASCAL *LPD3DHAL_CONTEXTDESTROYCB)   (LPD3DHAL_CONTEXTDESTROYDATA);
112 typedef DWORD (PASCAL *LPD3DHAL_CONTEXTDESTROYALLCB)(LPD3DHAL_CONTEXTDESTROYALLDATA);
113 typedef DWORD (PASCAL *LPD3DHAL_SCENECAPTURECB)     (LPD3DHAL_SCENECAPTUREDATA);
114 typedef DWORD (PASCAL *LPD3DHAL_RENDERSTATECB)      (LPD3DHAL_RENDERSTATEDATA);
115 typedef DWORD (PASCAL *LPD3DHAL_RENDERPRIMITIVECB)  (LPD3DHAL_RENDERPRIMITIVEDATA);
116 typedef DWORD (PASCAL *LPD3DHAL_TEXTURECREATECB)    (LPD3DHAL_TEXTURECREATEDATA);
117 typedef DWORD (PASCAL *LPD3DHAL_TEXTUREDESTROYCB)   (LPD3DHAL_TEXTUREDESTROYDATA);
118 typedef DWORD (PASCAL *LPD3DHAL_TEXTURESWAPCB)      (LPD3DHAL_TEXTURESWAPDATA);
119 typedef DWORD (PASCAL *LPD3DHAL_TEXTUREGETSURFCB)   (LPD3DHAL_TEXTUREGETSURFDATA);
120 typedef DWORD (PASCAL *LPD3DHAL_GETSTATECB)         (LPD3DHAL_GETSTATEDATA);
121
122 typedef struct _D3DHAL_CALLBACKS {
123   DWORD                         dwSize;
124   LPD3DHAL_CONTEXTCREATECB      ContextCreate;
125   LPD3DHAL_CONTEXTDESTROYCB     ContextDestroy;
126   LPD3DHAL_CONTEXTDESTROYALLCB  ContextDestroyAll;
127   LPD3DHAL_SCENECAPTURECB       SceneCapture;
128   LPVOID                        lpReserved10;
129   LPVOID                        lpReserved11;
130   LPD3DHAL_RENDERSTATECB        RenderState;
131   LPD3DHAL_RENDERPRIMITIVECB    RenderPrimitive;
132   DWORD                         dwReserved;
133   LPD3DHAL_TEXTURECREATECB      TextureCreate;
134   LPD3DHAL_TEXTUREDESTROYCB     TextureDestroy;
135   LPD3DHAL_TEXTURESWAPCB        TextureSwap;
136   LPD3DHAL_TEXTUREGETSURFCB     TextureGetSurf;
137   /* now why did MS create CALLBACKS2 and CALLBACKS3 structures if
138    * all these reserved fields were available? we may never know */
139   LPVOID                        lpReserved12;
140   LPVOID                        lpReserved13;
141   LPVOID                        lpReserved14;
142   LPVOID                        lpReserved15;
143   LPVOID                        lpReserved16;
144   LPVOID                        lpReserved17;
145   LPVOID                        lpReserved18;
146   LPVOID                        lpReserved19;
147   LPVOID                        lpReserved20;
148   LPVOID                        lpReserved21;
149   LPD3DHAL_GETSTATECB           GetState;
150   DWORD                         dwReserved0;
151   DWORD                         dwReserved1;
152   DWORD                         dwReserved2;
153   DWORD                         dwReserved3;
154   DWORD                         dwReserved4;
155   DWORD                         dwReserved5;
156   DWORD                         dwReserved6;
157   DWORD                         dwReserved7;
158   DWORD                         dwReserved8;
159   DWORD                         dwReserved9;
160 } D3DHAL_CALLBACKS,*LPD3DHAL_CALLBACKS;
161
162 typedef struct _D3DHAL_SETRENDERTARGETDATA              *LPD3DHAL_SETRENDERTARGETDATA;
163 typedef struct _D3DHAL_CLEARDATA                        *LPD3DHAL_CLEARDATA;
164 typedef struct _D3DHAL_DRAWONEPRIMITIVEDATA             *LPD3DHAL_DRAWONEPRIMITIVEDATA;
165 typedef struct _D3DHAL_DRAWONEINDEXEDPRIMITIVEDATA      *LPD3DHAL_DRAWONEINDEXEDPRIMITIVEDATA;
166 typedef struct _D3DHAL_DRAWPRIMITIVESDATA               *LPD3DHAL_DRAWPRIMITIVESDATA;
167
168 typedef DWORD (PASCAL *LPD3DHAL_SETRENDERTARGETCB)        (LPD3DHAL_SETRENDERTARGETDATA);
169 typedef DWORD (PASCAL *LPD3DHAL_CLEARCB)                  (LPD3DHAL_CLEARDATA);
170 typedef DWORD (PASCAL *LPD3DHAL_DRAWONEPRIMITIVECB)       (LPD3DHAL_DRAWONEPRIMITIVEDATA);
171 typedef DWORD (PASCAL *LPD3DHAL_DRAWONEINDEXEDPRIMITIVECB)(LPD3DHAL_DRAWONEINDEXEDPRIMITIVEDATA);
172 typedef DWORD (PASCAL *LPD3DHAL_DRAWPRIMITIVESCB)         (LPD3DHAL_DRAWPRIMITIVESDATA);
173
174 typedef struct _D3DHAL_CALLBACKS2 {
175   DWORD                                 dwSize;
176   DWORD                                 dwFlags;
177   LPD3DHAL_SETRENDERTARGETCB            SetRenderTarget;
178   LPD3DHAL_CLEARCB                      Clear;
179   LPD3DHAL_DRAWONEPRIMITIVECB           DrawOnePrimitive;
180   LPD3DHAL_DRAWONEINDEXEDPRIMITIVECB    DrawOneIndexedPrimitive;
181   LPD3DHAL_DRAWPRIMITIVESCB             DrawPrimitives;
182 } D3DHAL_CALLBACKS2,*LPD3DHAL_CALLBACKS2;
183
184 typedef struct _D3DHAL_CLEAR2DATA                       *LPD3DHAL_CLEAR2DATA;
185 typedef struct _D3DHAL_VALIDATETEXTURESTAGESTATEDATA    *LPD3DHAL_VALIDATETEXTURESTAGESTATEDATA;
186 typedef struct _D3DHAL_DRAWPRIMITIVES2DATA              *LPD3DHAL_DRAWPRIMITIVES2DATA;
187
188 typedef DWORD (PASCAL *LPD3DHAL_CLEAR2CB)                 (LPD3DHAL_CLEAR2DATA);
189 typedef DWORD (PASCAL *LPD3DHAL_VALIDATETEXTURESTAGESTATECB)(LPD3DHAL_VALIDATETEXTURESTAGESTATEDATA);
190 typedef DWORD (PASCAL *LPD3DHAL_DRAWPRIMITIVES2CB)        (LPD3DHAL_DRAWPRIMITIVES2DATA);
191
192 typedef struct _D3DHAL_CALLBACKS3 {
193   DWORD                                 dwSize;
194   DWORD                                 dwFlags;
195   LPD3DHAL_CLEAR2CB                     Clear2;
196   LPVOID                                lpvReserved;
197   LPD3DHAL_VALIDATETEXTURESTAGESTATECB  ValidateTextureStageState;
198   LPD3DHAL_DRAWPRIMITIVES2CB            DrawPrimitives2;
199 } D3DHAL_CALLBACKS3,*LPD3DHAL_CALLBACKS3;
200
201 /*****************************************************************************
202  * parameter structures
203  */
204 typedef struct _D3DHAL_CONTEXTCREATEDATA {
205   union {
206     LPDDRAWI_DIRECTDRAW_GBL     lpDDGbl; /* pre-DirectX 7 */
207     LPDDRAWI_DIRECTDRAW_LCL     lpDDLcl; /* DirectX 7 */
208   } DUMMYUNIONNAME1;
209   union {
210     LPDIRECTDRAWSURFACE         lpDDS;
211     LPDDRAWI_DDRAWSURFACE_LCL   lpDDSLcl; /* DirectX 7 */
212   } DUMMYUNIONNAME2;
213   union {
214     LPDIRECTDRAWSURFACE         lpDDSZ;
215     LPDDRAWI_DDRAWSURFACE_LCL   lpDDSZLcl; /* DirectX 7 */
216   } DUMMYUNIONNAME3;
217   union {
218     DWORD                       dwPID;
219     ULONG_PTR                   dwrstates;
220   } DUMMYUNIONNAME4;
221   ULONG_PTR                     dwhContext;
222   HRESULT                       ddrval;
223 } D3DHAL_CONTEXTCREATEDATA;
224
225 typedef struct _D3DHAL_CONTEXTDESTROYDATA {
226   ULONG_PTR                     dwhContext;
227   HRESULT                       ddrval;
228 } D3DHAL_CONTEXTDESTROYDATA;
229
230 typedef struct _D3DHAL_CONTEXTDESTROYALLDATA {
231   DWORD                         dwPID;
232   HRESULT                       ddrval;
233 } D3DHAL_CONTEXTDESTROYALLDATA;
234
235 typedef struct _D3DHAL_SCENECAPTUREDATA {
236   ULONG_PTR                     dwhContext;
237   DWORD                         dwFlag;
238   HRESULT                       ddrval;
239 } D3DHAL_SCENECAPTUREDATA;
240
241 #define D3DHAL_SCENE_CAPTURE_START      0x00000000
242 #define D3DHAL_SCENE_CAPTURE_END        0x00000001
243
244 typedef struct _D3DHAL_SETRENDERTARGETDATA {
245   ULONG_PTR                     dwhContext;
246   union {
247     LPDIRECTDRAWSURFACE         lpDDS;
248     LPDDRAWI_DDRAWSURFACE_LCL   lpDDSLcl;
249   } DUMMYUNIONNAME1;
250   union {
251     LPDIRECTDRAWSURFACE         lpDDSZ;
252     LPDDRAWI_DDRAWSURFACE_LCL   lpDDSZLcl;
253   } DUMMYUNIONNAME2;
254   HRESULT                       ddrval;
255 } D3DHAL_SETRENDERTARGETDATA;
256
257 typedef struct _D3DHAL_DRAWPRIMITIVES2DATA {
258   ULONG_PTR                     dwhContext;
259   DWORD                         dwFlags;
260   DWORD                         dwVertexType;
261   LPDDRAWI_DDRAWSURFACE_LCL     lpDDCommands;
262   DWORD                         dwCommandOffset;
263   DWORD                         dwCommandLength;
264   union {
265     LPDDRAWI_DDRAWSURFACE_LCL   lpDDVertex;
266     LPVOID                      lpVertices;
267   } DUMMYUNIONNAME1;
268   DWORD                         dwVertexOffset;
269   DWORD                         dwVertexLength;
270   DWORD                         dwReqVertexBufSize;
271   DWORD                         dwReqCommandBufSize;
272   LPDWORD                       lpdwRStates;
273   union {
274     DWORD                       dwVertexSize;
275     HRESULT                     ddrval;
276   } DUMMYUNIONNAME2;
277   DWORD                         dwErrorOffset;
278 } D3DHAL_DRAWPRIMITIVES2DATA;
279
280 #define D3DHALDP2_USERMEMVERTICES       0x00000001
281 #define D3DHALDP2_EXECUTEBUFFER         0x00000002
282 #define D3DHALDP2_SWAPVERTEXBUFFER      0x00000004
283 #define D3DHALDP2_SWAPCOMMANDBUFFER     0x00000008
284 #define D3DHALDP2_REQVERTEXBUFSIZE      0x00000010
285 #define D3DHALDP2_REQCOMMANDBUFSIZE     0x00000020
286 #define D3DHALDP2_VIDMEMVERTEXBUF       0x00000040
287 #define D3DHALDP2_VIDMEMCOMMANDBUF      0x00000080
288
289 /*****************************************************************************
290  * DrawPrimitives2 command structures
291  */
292 typedef struct _D3DHAL_DP2COMMAND {
293   BYTE bCommand;
294   BYTE bReserved;
295   union {
296     WORD wPrimitiveCount;
297     WORD wStateCount;
298   } DUMMYUNIONNAME;
299 } D3DHAL_DP2COMMAND,*LPD3DHAL_DP2COMMAND;
300
301 typedef enum _D3DHAL_DP2OPERATION {
302   D3DDP2OP_POINTS               = 1,
303   D3DDP2OP_INDEXEDLINELIST      = 2,
304   D3DDP2OP_INDEXEDTRIANGLELIST  = 3,
305   D3DDP2OP_RENDERSTATE          = 8,
306   D3DDP2OP_LINELIST             = 15,
307   D3DDP2OP_LINESTRIP            = 16,
308   D3DDP2OP_INDEXEDLINESTRIP     = 17,
309   D3DDP2OP_TRIANGLELIST         = 18,
310   D3DDP2OP_TRIANGLESTRIP        = 19,
311   D3DDP2OP_INDEXEDTRIANGLESTRIP = 20,
312   D3DDP2OP_TRIANGLEFAN          = 21,
313   D3DDP2OP_INDEXEDTRIANGLEFAN   = 22,
314   D3DDP2OP_TRIANGLEFAN_IMM      = 23,
315   D3DDP2OP_LINELIST_IMM         = 24,
316   D3DDP2OP_TEXTURESTAGESTATE    = 25,
317   D3DDP2OP_INDEXEDTRIANGLELIST2 = 26,
318   D3DDP2OP_INDEXEDLINELIST2     = 27,
319   D3DDP2OP_VIEWPORTINFO         = 28,
320   D3DDP2OP_WINFO                = 29,
321   /* pre-DirectX 7 interfaces */
322   D3DDP2OP_SETPALETTE           = 30,
323   D3DDP2OP_UPDATEPALETTE        = 31,
324   /* DirectX 7 interfaces */
325   D3DDP2OP_ZRANGE               = 32,
326   D3DDP2OP_SETMATERIAL          = 33,
327   D3DDP2OP_SETLIGHT             = 34,
328   D3DDP2OP_CREATELIGHT          = 35,
329   D3DDP2OP_SETTRANSFORM         = 36,
330   D3DDP2OP_TEXBLT               = 38,
331   D3DDP2OP_STATESET             = 39,
332   D3DDP2OP_SETPRIORITY          = 40,
333   /* all interfaces */
334   D3DDP2OP_SETRENDERTARGET      = 41,
335   D3DDP2OP_CLEAR                = 42,
336   /* DirectX 7 interfaces */
337   D3DDP2OP_SETTEXLOD            = 43,
338   D3DPP2OP_SETCLIPPLANE         = 44
339 } D3DHAL_DP2OPERATION;
340
341 /* point primitives */
342
343 typedef struct _D3DHAL_POINTS {
344   WORD wCount;
345   WORD wVStart;
346 } D3DHAL_DP2POINTS,*LPD3DHAL_DP2POINTS;
347
348 /* line primitives */
349
350 typedef struct _D3DHAL_DP2STARTVERTEX {
351   WORD wVStart;
352 } D3DHAL_DP2STARTVERTEX,*LPD3DHAL_DP2STARTVERTEX;
353
354 typedef struct _D3DHAL_DP2LINELIST {
355   WORD wVStart;
356 } D3DHAL_DP2LINELIST,*LPD3DHAL_DP2LINELIST;
357
358 typedef struct _D3DHAL_DP2INDEXEDLINELIST {
359   WORD wV1;
360   WORD wV2;
361 } D3DHAL_DP2INDEXEDLINELIST,*LPD3DHAL_DP2INDEXEDLINELIST;
362
363 typedef struct _D3DHAL_DP2LINESTRIP {
364   WORD wVStart;
365 } D3DHAL_DP2LINESTRIP,*LPD3DHAL_DP2LINESTRIP;
366
367 typedef struct _D3DHAL_DP2INDEXEDLINESTRIP {
368   WORD wV[2];
369 } D3DHAL_DP2INDEXEDLINESTRIP,*LPD3DHAL_DP2INDEXEDLINESTRIP;
370
371 /* triangle primitives */
372
373 typedef struct _D3DHAL_DP2TRIANGLELIST {
374   WORD wVStart;
375 } D3DHAL_DP2TRIANGLELIST,*LPD3DHAL_DP2TRIANGLELIST;
376
377 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST {
378   WORD wV1;
379   WORD wV2;
380   WORD wV3;
381   WORD wFlags;
382 } D3DHAL_DP2INDEXEDTRIANGLELIST,*LPD3DHAL_DP2INDEXEDTRIANGLELIST;
383
384 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST2 {
385   WORD wV1;
386   WORD wV2;
387   WORD wV3;
388 } D3DHAL_DP2INDEXEDTRIANGLELIST2,*LPD3DHAL_DP2INDEXEDTRIANGLELIST2;
389
390 typedef struct _D3DHAL_DP2TRIANGLESTRIP {
391   WORD wVStart;
392 } D3DHAL_DP2TRIANGLESTRIP,*LPD3DHAL_DP2TRIANGLESTRIP;
393
394 typedef struct _D3DHAL_DP2INDEXEDTRIANGLESTRIP {
395   WORD wV[3];
396 } D3DHAL_DP2INDEXEDTRIANGLESTRIP,*LPD3DHAL_DP2INDEXEDTRIANGLESTRIP;
397
398 typedef struct _D3DHAL_DP2TRIANGLEFAN {
399   WORD wVStart;
400 } D3DHAL_DP2TRIANGLEFAN,*LPD3DHAL_DP2TRIANGLEFAN;
401
402 typedef struct _D3DHAL_DP2INDEXEDTRIANGLEFAN {
403   WORD wV[3];
404 } D3DHAL_DP2INDEXEDTRIANGLEFAN,*LPD3DHAL_DP2INDEXEDTRIANGLEFAN;
405
406 typedef struct _D3DHAL_DP2TRIANGLEFAN_IMM {
407   DWORD dwEdgeFlags;
408 } D3DHAL_DP2TRIANGLEFAN_IMM,*LPD3DHAL_DP2TRIANGLEFAN_IMM;
409
410 /* render states */
411 typedef struct _D3DHAL_DP2RENDERSTATE {
412   D3DRENDERSTATETYPE    RenderState;
413   union {
414     D3DVALUE dvState;
415     DWORD dwState;
416   } DUMMYUNIONNAME;
417 } D3DHAL_DP2RENDERSTATE,*LPD3DHAL_DP2RENDERSTATE;
418
419 typedef struct _D3DHAL_DP2TEXTURESTAGESTATE {
420   WORD  wStage;
421   WORD  TSState;
422   DWORD dwValue;
423 } D3DHAL_DP2TEXTURESTAGESTATE,*LPD3DHAL_DP2TEXTURESTAGESTATE;
424
425 #define D3DTSS_TEXTUREMAP 0
426
427 typedef struct _D3DHAL_DP2VIEWPORTINFO {
428   DWORD dwX;
429   DWORD dwY;
430   DWORD dwWidth;
431   DWORD dwHeight;
432 } D3DHAL_DP2VIEWPORTINFO,*LPD3DHAL_DP2VIEWPORTINFO;
433
434 typedef struct _D3DHAL_DP2WINFO {
435   D3DVALUE dwWNear;
436   D3DVALUE dwWFar;
437 } D3DHAL_DP2WINFO,*LPD3DHAL_DP2WINFO;
438
439 typedef struct _D3DHAL_DP2SETPALETTE {
440   DWORD dwPaletteHandle;
441   DWORD dwPaletteFlags;
442   DWORD dwSurfaceHandle;
443 } D3DHAL_DP2SETPALETTE,*LPD3DHAL_DP2SETPALETTE;
444
445 typedef struct _D3DHAL_DP2UPDATEPALETTE {
446   DWORD dwPaletteHandle;
447   WORD  wStartIndex;
448   WORD  wNumEntries;
449 } D3DHAL_DP2UPDATEPALETTE,*LPD3DHAL_DP2UPDATEPALETTE;
450
451 typedef struct _D3DHAL_DP2ZRANGE {
452   D3DVALUE dvMinZ;
453   D3DVALUE dvMaxZ;
454 } D3DHAL_DP2ZRANGE,*LPD3DHAL_DP2ZRANGE;
455
456 typedef D3DMATERIAL7 D3DHAL_DP2SETMATERIAL,*LPD3DHAL_DP2SETMATERIAL;
457
458 typedef struct _D3DHAL_DP2SETLIGHT {
459   DWORD dwIndex;
460   DWORD dwDataType;
461 } D3DHAL_DP2SETLIGHT,*LPD3DHAL_DP2SETLIGHT;
462
463 #define D3DHAL_SETLIGHT_ENABLE  0
464 #define D3DHAL_SETLIGHT_DISABLE 1
465 #define D3DHAL_SETLIGHT_DATA    2
466
467 typedef struct _D3DHAL_DP2CREATELIGHT {
468   DWORD dwIndex;
469 } D3DHAL_DP2CREATELIGHT,*LPD3DHAL_DP2CREATELIGHT;
470
471 typedef struct _D3DHAL_DP2SETTRANSFORM {
472   D3DTRANSFORMSTATETYPE xfrmType;
473   D3DMATRIX             matrix;
474 } D3DHAL_DP2SETTRANSFORM,*LPD3DHAL_DP2SETTRANSFORM;
475
476 typedef struct _D3DHAL_DP2TEXBLT {
477   DWORD dwDDDestSurface;
478   DWORD dwDDSrcSurface;
479   POINT pDest;
480   RECTL rSrc;
481   DWORD dwFlags;
482 } D3DHAL_DP2TEXBLT,*LPD3DHAL_DP2TEXBLT;
483
484 typedef struct _D3DHAL_DP2STATESET {
485   DWORD               dwOperation;
486   DWORD               dwParam;
487   D3DSTATEBLOCKTYPE   sbType;
488 } D3DHAL_DP2STATESET,*LPD3DHAL_DP2STATESET;
489
490 #define D3DHAL_STATESETBEGIN    0
491 #define D3DHAL_STATESETEND      1
492 #define D3DHAL_STATESETDELETE   2
493 #define D3DHAL_STATESETEXECUTE  3
494 #define D3DHAL_STATESETCAPTURE  4
495
496 typedef struct _D3DHAL_DP2SETPRIORITY {
497   DWORD dwDDSurface;
498   DWORD dwPriority;
499 } D3DHAL_DP2SETPRIORITY,*LPD3DHAL_DP2SETPRIORITY;
500
501 typedef struct _D3DHAL_DP2SETRENDERTARGET {
502   DWORD hRenderTarget;
503   DWORD hZBuffer;
504 } D3DHAL_DP2SETRENDERTARGET,*LPD3DHAL_DP2SETRENDERTARGET;
505
506 typedef struct _D3DHAL_DP2CLEAR {
507   DWORD         dwFlags;
508   DWORD         dwFillColor;
509   D3DVALUE      dvFillDepth;
510   DWORD         dwFillStencil;
511   RECT          Rects[1];
512 } D3DHAL_DP2CLEAR,*LPD3DHAL_DP2CLEAR;
513
514 typedef struct _D3DHAL_DP2SETTEXLOD {
515   DWORD dwDDSurface;
516   DWORD dwLOD;
517 } D3DHAL_DP2SETTEXLOD,*LPD3DHAL_DP2SETTEXLOD;
518
519 #ifdef __cplusplus
520 } /* extern "C" */
521 #endif
522
523 #endif /* __WINE_D3DHAL_H */