gdiplus: Added GdipSetTextRenderingHint/GdipGetTextRenderingHint.
[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_RESERVED0            = 4,
306   D3DDP2OP_RENDERSTATE          = 8,
307   D3DDP2OP_LINELIST             = 15,
308   D3DDP2OP_LINESTRIP            = 16,
309   D3DDP2OP_INDEXEDLINESTRIP     = 17,
310   D3DDP2OP_TRIANGLELIST         = 18,
311   D3DDP2OP_TRIANGLESTRIP        = 19,
312   D3DDP2OP_INDEXEDTRIANGLESTRIP = 20,
313   D3DDP2OP_TRIANGLEFAN          = 21,
314   D3DDP2OP_INDEXEDTRIANGLEFAN   = 22,
315   D3DDP2OP_TRIANGLEFAN_IMM      = 23,
316   D3DDP2OP_LINELIST_IMM         = 24,
317   D3DDP2OP_TEXTURESTAGESTATE    = 25,
318   D3DDP2OP_INDEXEDTRIANGLELIST2 = 26,
319   D3DDP2OP_INDEXEDLINELIST2     = 27,
320   D3DDP2OP_VIEWPORTINFO         = 28,
321   D3DDP2OP_WINFO                = 29,
322   /* pre-DirectX 7 interfaces */
323   D3DDP2OP_SETPALETTE           = 30,
324   D3DDP2OP_UPDATEPALETTE        = 31,
325   /* DirectX 7 interfaces */
326   D3DDP2OP_ZRANGE               = 32,
327   D3DDP2OP_SETMATERIAL          = 33,
328   D3DDP2OP_SETLIGHT             = 34,
329   D3DDP2OP_CREATELIGHT          = 35,
330   D3DDP2OP_SETTRANSFORM         = 36,
331   D3DDP2OP_EXT                  = 37,
332   D3DDP2OP_TEXBLT               = 38,
333   D3DDP2OP_STATESET             = 39,
334   D3DDP2OP_SETPRIORITY          = 40,
335   /* all interfaces */
336   D3DDP2OP_SETRENDERTARGET      = 41,
337   D3DDP2OP_CLEAR                = 42,
338   /* DirectX 7 interfaces */
339   D3DDP2OP_SETTEXLOD            = 43,
340   D3DPP2OP_SETCLIPPLANE         = 44
341 } D3DHAL_DP2OPERATION;
342
343 /* point primitives */
344
345 typedef struct _D3DHAL_POINTS {
346   WORD wCount;
347   WORD wVStart;
348 } D3DHAL_DP2POINTS,*LPD3DHAL_DP2POINTS;
349
350 /* line primitives */
351
352 typedef struct _D3DHAL_DP2STARTVERTEX {
353   WORD wVStart;
354 } D3DHAL_DP2STARTVERTEX,*LPD3DHAL_DP2STARTVERTEX;
355
356 typedef struct _D3DHAL_DP2LINELIST {
357   WORD wVStart;
358 } D3DHAL_DP2LINELIST,*LPD3DHAL_DP2LINELIST;
359
360 typedef struct _D3DHAL_DP2INDEXEDLINELIST {
361   WORD wV1;
362   WORD wV2;
363 } D3DHAL_DP2INDEXEDLINELIST,*LPD3DHAL_DP2INDEXEDLINELIST;
364
365 typedef struct _D3DHAL_DP2LINESTRIP {
366   WORD wVStart;
367 } D3DHAL_DP2LINESTRIP,*LPD3DHAL_DP2LINESTRIP;
368
369 typedef struct _D3DHAL_DP2INDEXEDLINESTRIP {
370   WORD wV[2];
371 } D3DHAL_DP2INDEXEDLINESTRIP,*LPD3DHAL_DP2INDEXEDLINESTRIP;
372
373 /* triangle primitives */
374
375 typedef struct _D3DHAL_DP2TRIANGLELIST {
376   WORD wVStart;
377 } D3DHAL_DP2TRIANGLELIST,*LPD3DHAL_DP2TRIANGLELIST;
378
379 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST {
380   WORD wV1;
381   WORD wV2;
382   WORD wV3;
383   WORD wFlags;
384 } D3DHAL_DP2INDEXEDTRIANGLELIST,*LPD3DHAL_DP2INDEXEDTRIANGLELIST;
385
386 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST2 {
387   WORD wV1;
388   WORD wV2;
389   WORD wV3;
390 } D3DHAL_DP2INDEXEDTRIANGLELIST2,*LPD3DHAL_DP2INDEXEDTRIANGLELIST2;
391
392 typedef struct _D3DHAL_DP2TRIANGLESTRIP {
393   WORD wVStart;
394 } D3DHAL_DP2TRIANGLESTRIP,*LPD3DHAL_DP2TRIANGLESTRIP;
395
396 typedef struct _D3DHAL_DP2INDEXEDTRIANGLESTRIP {
397   WORD wV[3];
398 } D3DHAL_DP2INDEXEDTRIANGLESTRIP,*LPD3DHAL_DP2INDEXEDTRIANGLESTRIP;
399
400 typedef struct _D3DHAL_DP2TRIANGLEFAN {
401   WORD wVStart;
402 } D3DHAL_DP2TRIANGLEFAN,*LPD3DHAL_DP2TRIANGLEFAN;
403
404 typedef struct _D3DHAL_DP2INDEXEDTRIANGLEFAN {
405   WORD wV[3];
406 } D3DHAL_DP2INDEXEDTRIANGLEFAN,*LPD3DHAL_DP2INDEXEDTRIANGLEFAN;
407
408 typedef struct _D3DHAL_DP2TRIANGLEFAN_IMM {
409   DWORD dwEdgeFlags;
410 } D3DHAL_DP2TRIANGLEFAN_IMM,*LPD3DHAL_DP2TRIANGLEFAN_IMM;
411
412 /* render states */
413 typedef struct _D3DHAL_DP2RENDERSTATE {
414   D3DRENDERSTATETYPE    RenderState;
415   union {
416     D3DVALUE dvState;
417     DWORD dwState;
418   } DUMMYUNIONNAME;
419 } D3DHAL_DP2RENDERSTATE,*LPD3DHAL_DP2RENDERSTATE;
420
421 typedef struct _D3DHAL_DP2TEXTURESTAGESTATE {
422   WORD  wStage;
423   WORD  TSState;
424   DWORD dwValue;
425 } D3DHAL_DP2TEXTURESTAGESTATE,*LPD3DHAL_DP2TEXTURESTAGESTATE;
426
427 #define D3DTSS_TEXTUREMAP 0
428
429 typedef struct _D3DHAL_DP2VIEWPORTINFO {
430   DWORD dwX;
431   DWORD dwY;
432   DWORD dwWidth;
433   DWORD dwHeight;
434 } D3DHAL_DP2VIEWPORTINFO,*LPD3DHAL_DP2VIEWPORTINFO;
435
436 typedef struct _D3DHAL_DP2WINFO {
437   D3DVALUE dwWNear;
438   D3DVALUE dwWFar;
439 } D3DHAL_DP2WINFO,*LPD3DHAL_DP2WINFO;
440
441 typedef struct _D3DHAL_DP2SETPALETTE {
442   DWORD dwPaletteHandle;
443   DWORD dwPaletteFlags;
444   DWORD dwSurfaceHandle;
445 } D3DHAL_DP2SETPALETTE,*LPD3DHAL_DP2SETPALETTE;
446
447 typedef struct _D3DHAL_DP2UPDATEPALETTE {
448   DWORD dwPaletteHandle;
449   WORD  wStartIndex;
450   WORD  wNumEntries;
451 } D3DHAL_DP2UPDATEPALETTE,*LPD3DHAL_DP2UPDATEPALETTE;
452
453 typedef struct _D3DHAL_DP2ZRANGE {
454   D3DVALUE dvMinZ;
455   D3DVALUE dvMaxZ;
456 } D3DHAL_DP2ZRANGE,*LPD3DHAL_DP2ZRANGE;
457
458 typedef D3DMATERIAL7 D3DHAL_DP2SETMATERIAL,*LPD3DHAL_DP2SETMATERIAL;
459
460 typedef struct _D3DHAL_DP2SETLIGHT {
461   DWORD dwIndex;
462   DWORD dwDataType;
463 } D3DHAL_DP2SETLIGHT,*LPD3DHAL_DP2SETLIGHT;
464
465 #define D3DHAL_SETLIGHT_ENABLE  0
466 #define D3DHAL_SETLIGHT_DISABLE 1
467 #define D3DHAL_SETLIGHT_DATA    2
468
469 typedef struct _D3DHAL_DP2CREATELIGHT {
470   DWORD dwIndex;
471 } D3DHAL_DP2CREATELIGHT,*LPD3DHAL_DP2CREATELIGHT;
472
473 typedef struct _D3DHAL_DP2SETTRANSFORM {
474   D3DTRANSFORMSTATETYPE xfrmType;
475   D3DMATRIX             matrix;
476 } D3DHAL_DP2SETTRANSFORM,*LPD3DHAL_DP2SETTRANSFORM;
477
478 typedef struct _D3DHAL_DP2TEXBLT {
479   DWORD dwDDDestSurface;
480   DWORD dwDDSrcSurface;
481   POINT pDest;
482   RECTL rSrc;
483   DWORD dwFlags;
484 } D3DHAL_DP2TEXBLT,*LPD3DHAL_DP2TEXBLT;
485
486 typedef struct _D3DHAL_DP2STATESET {
487   DWORD               dwOperation;
488   DWORD               dwParam;
489   D3DSTATEBLOCKTYPE   sbType;
490 } D3DHAL_DP2STATESET,*LPD3DHAL_DP2STATESET;
491
492 #define D3DHAL_STATESETBEGIN    0
493 #define D3DHAL_STATESETEND      1
494 #define D3DHAL_STATESETDELETE   2
495 #define D3DHAL_STATESETEXECUTE  3
496 #define D3DHAL_STATESETCAPTURE  4
497
498 typedef struct _D3DHAL_DP2SETPRIORITY {
499   DWORD dwDDSurface;
500   DWORD dwPriority;
501 } D3DHAL_DP2SETPRIORITY,*LPD3DHAL_DP2SETPRIORITY;
502
503 typedef struct _D3DHAL_DP2SETRENDERTARGET {
504   DWORD hRenderTarget;
505   DWORD hZBuffer;
506 } D3DHAL_DP2SETRENDERTARGET,*LPD3DHAL_DP2SETRENDERTARGET;
507
508 typedef struct _D3DHAL_DP2CLEAR {
509   DWORD         dwFlags;
510   DWORD         dwFillColor;
511   D3DVALUE      dvFillDepth;
512   DWORD         dwFillStencil;
513   RECT          Rects[1];
514 } D3DHAL_DP2CLEAR,*LPD3DHAL_DP2CLEAR;
515
516 typedef struct _D3DHAL_DP2SETTEXLOD {
517   DWORD dwDDSurface;
518   DWORD dwLOD;
519 } D3DHAL_DP2SETTEXLOD,*LPD3DHAL_DP2SETTEXLOD;
520
521 #ifdef __cplusplus
522 } /* extern "C" */
523 #endif
524
525 #endif /* __WINE_DDRAWI_H */