Keep track of per-column information inside the listview.
[wine] / dlls / ddraw / d3d_private.h
1 /* Direct3D private include file
2  * Copyright (c) 1998 Lionel ULMER
3  *
4  * This file contains all the structure that are not exported
5  * through d3d.h and all common macros.
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  */
21
22 #ifndef __GRAPHICS_WINE_D3D_PRIVATE_H
23 #define __GRAPHICS_WINE_D3D_PRIVATE_H
24
25 /* THIS FILE MUST NOT CONTAIN X11 or MESA DEFINES */
26
27 #include "d3d.h"
28
29 /*****************************************************************************
30  * Predeclare the interface implementation structures
31  */
32 typedef struct IDirect3DImpl IDirect3DImpl;
33 typedef struct IDirect3D2Impl IDirect3D2Impl;
34 typedef struct IDirect3D3Impl IDirect3D3Impl;
35
36 typedef struct IDirect3DLightImpl IDirect3DLightImpl;
37 typedef struct IDirect3DMaterial2Impl IDirect3DMaterial2Impl;
38 typedef struct IDirect3DTexture2Impl IDirect3DTexture2Impl;
39 typedef struct IDirect3DViewport2Impl IDirect3DViewport2Impl;
40 typedef struct IDirect3DExecuteBufferImpl IDirect3DExecuteBufferImpl;
41 typedef struct IDirect3DDeviceImpl IDirect3DDeviceImpl;
42 typedef struct IDirect3DDevice2Impl IDirect3DDevice2Impl;
43
44 #include "ddraw_private.h"
45
46 extern ICOM_VTABLE(IDirect3D)   mesa_d3dvt;
47 extern ICOM_VTABLE(IDirect3D2)  mesa_d3d2vt;
48 extern ICOM_VTABLE(IDirect3D3)  mesa_d3d3vt;
49
50 /*****************************************************************************
51  * IDirect3D implementation structure
52  */
53 struct IDirect3DImpl
54 {
55     /* IUnknown fields */
56     ICOM_VFIELD(IDirect3D);
57     DWORD                   ref;
58     /* IDirect3D fields */
59     IDirectDrawImpl*    ddraw;
60     LPVOID              private;
61 };
62
63 /*****************************************************************************
64  * IDirect3D2 implementation structure
65  */
66 struct IDirect3D2Impl
67 {
68     /* IUnknown fields */
69     ICOM_VFIELD(IDirect3D2);
70     DWORD                    ref;
71     /* IDirect3D2 fields */
72     IDirectDrawImpl*    ddraw;
73     LPVOID              private;
74 };
75
76 struct IDirect3D3Impl
77 {
78     /* IUnknown fields */
79     ICOM_VFIELD(IDirect3D3);
80     DWORD                    ref;
81     /* IDirect3D2 fields */
82     IDirectDrawImpl*    ddraw;
83     LPVOID              private;
84     /* IDirect3D3 fields */
85 };
86
87
88 extern HRESULT WINAPI IDirect3DImpl_QueryInterface(
89     LPDIRECT3D iface,REFIID refiid,LPVOID *obj
90 );
91 extern ULONG WINAPI IDirect3DImpl_AddRef(LPDIRECT3D iface);
92 extern ULONG WINAPI IDirect3DImpl_Release(LPDIRECT3D iface)
93 ;
94 extern HRESULT WINAPI IDirect3DImpl_Initialize(LPDIRECT3D iface,REFIID refiid);
95 extern HRESULT WINAPI IDirect3DImpl_EnumDevices(
96     LPDIRECT3D iface, LPD3DENUMDEVICESCALLBACK cb, LPVOID context
97 );
98 extern HRESULT WINAPI IDirect3DImpl_CreateLight(
99     LPDIRECT3D iface, LPDIRECT3DLIGHT *lplight, IUnknown *lpunk
100 );
101 extern HRESULT WINAPI IDirect3DImpl_CreateMaterial(
102     LPDIRECT3D iface, LPDIRECT3DMATERIAL *lpmaterial, IUnknown *lpunk
103 );
104 extern HRESULT WINAPI IDirect3DImpl_CreateViewport(
105     LPDIRECT3D iface, LPDIRECT3DVIEWPORT *lpviewport, IUnknown *lpunk
106 );
107 extern HRESULT WINAPI IDirect3DImpl_FindDevice(
108     LPDIRECT3D iface, LPD3DFINDDEVICESEARCH lpfinddevsrc,
109     LPD3DFINDDEVICERESULT lpfinddevrst)
110 ;
111 extern HRESULT WINAPI IDirect3D2Impl_QueryInterface(LPDIRECT3D2 iface,REFIID refiid,LPVOID *obj);
112 extern ULONG WINAPI IDirect3D2Impl_AddRef(LPDIRECT3D2 iface);
113 extern ULONG WINAPI IDirect3D2Impl_Release(LPDIRECT3D2 iface);
114 extern HRESULT WINAPI IDirect3D2Impl_EnumDevices(
115     LPDIRECT3D2 iface,LPD3DENUMDEVICESCALLBACK cb, LPVOID context
116 );
117 extern HRESULT WINAPI IDirect3D2Impl_CreateLight(
118     LPDIRECT3D2 iface, LPDIRECT3DLIGHT *lplight, IUnknown *lpunk
119 );
120 extern HRESULT WINAPI IDirect3D2Impl_CreateMaterial(
121     LPDIRECT3D2 iface, LPDIRECT3DMATERIAL2 *lpmaterial, IUnknown *lpunk
122 );
123 extern HRESULT WINAPI IDirect3D2Impl_CreateViewport(
124     LPDIRECT3D2 iface, LPDIRECT3DVIEWPORT2 *lpviewport, IUnknown *lpunk
125 );
126 extern HRESULT WINAPI IDirect3D2Impl_FindDevice(
127     LPDIRECT3D2 iface, LPD3DFINDDEVICESEARCH lpfinddevsrc,
128     LPD3DFINDDEVICERESULT lpfinddevrst);
129 extern HRESULT WINAPI IDirect3D2Impl_CreateDevice(
130     LPDIRECT3D2 iface, REFCLSID rguid, LPDIRECTDRAWSURFACE surface,
131     LPDIRECT3DDEVICE2 *device);
132
133 /*****************************************************************************
134  * IDirect3DLight implementation structure
135  */
136 struct IDirect3DLightImpl
137 {
138     /* IUnknown fields */
139     ICOM_VFIELD(IDirect3DLight);
140     DWORD                        ref;
141     /* IDirect3DLight fields */
142     union {
143         IDirect3DImpl*  d3d1;
144         IDirect3D2Impl* d3d2;
145     } d3d;
146     int                 type;
147
148     D3DLIGHT2           light;
149
150     /* Chained list used for adding / removing from viewports */
151     IDirect3DLightImpl *next, *prev;
152
153     /* Activation function */
154     void (*activate)(IDirect3DLightImpl*);
155     int                 is_active;
156
157     LPVOID              private;
158 };
159
160 /*****************************************************************************
161  * IDirect3DMaterial2 implementation structure
162  */
163 struct IDirect3DMaterial2Impl
164 {
165     /* IUnknown fields */
166     ICOM_VFIELD(IDirect3DMaterial2);
167     DWORD                            ref;
168     /* IDirect3DMaterial2 fields */
169     union {
170         IDirect3DImpl*        d3d1;
171         IDirect3D2Impl*       d3d2;
172     } d3d;
173     union {
174         IDirect3DDeviceImpl*  active_device1;
175         IDirect3DDevice2Impl* active_device2;
176     } device;
177     int                       use_d3d2;
178
179     D3DMATERIAL               mat;
180
181     void (*activate)(IDirect3DMaterial2Impl* this);
182     LPVOID                      private;
183 };
184
185 /*****************************************************************************
186  * IDirect3DTexture2 implementation structure
187  */
188 struct IDirect3DTexture2Impl
189 {
190     /* IUnknown fields */
191     ICOM_VFIELD(IDirect3DTexture2);
192     DWORD                           ref;
193     /* IDirect3DTexture2 fields */
194     void*                       D3Ddevice; /* (void *) to use the same pointer
195                                             * for both Direct3D and Direct3D2 */
196     IDirectDrawSurfaceImpl*     surface;
197     LPVOID                      private;
198 };
199
200 extern HRESULT WINAPI IDirect3DTexture2Impl_QueryInterface(
201     LPDIRECT3DTEXTURE2 iface, REFIID riid, LPVOID* ppvObj
202 );
203 extern ULONG WINAPI IDirect3DTexture2Impl_AddRef(LPDIRECT3DTEXTURE2 iface);
204 extern ULONG WINAPI IDirect3DTexture2Impl_Release(LPDIRECT3DTEXTURE2 iface);
205 extern HRESULT WINAPI IDirect3DTextureImpl_GetHandle(LPDIRECT3DTEXTURE iface,
206                                                  LPDIRECT3DDEVICE lpD3DDevice,
207                                                  LPD3DTEXTUREHANDLE lpHandle)
208 ;
209 extern HRESULT WINAPI IDirect3DTextureImpl_Initialize(LPDIRECT3DTEXTURE iface,
210                                           LPDIRECT3DDEVICE lpD3DDevice,
211                                           LPDIRECTDRAWSURFACE lpSurface)
212 ;
213 extern HRESULT WINAPI IDirect3DTextureImpl_Unload(LPDIRECT3DTEXTURE iface);
214 extern HRESULT WINAPI IDirect3DTexture2Impl_GetHandle(
215     LPDIRECT3DTEXTURE2 iface, LPDIRECT3DDEVICE2 lpD3DDevice2,
216     LPD3DTEXTUREHANDLE lpHandle
217 );
218 extern HRESULT WINAPI IDirect3DTexture2Impl_PaletteChanged(
219     LPDIRECT3DTEXTURE2 iface, DWORD dwStart, DWORD dwCount
220 );
221 extern HRESULT WINAPI IDirect3DTexture2Impl_Load(
222     LPDIRECT3DTEXTURE2 iface, LPDIRECT3DTEXTURE2 lpD3DTexture2
223 );
224
225 /*****************************************************************************
226  * IDirect3DViewport2 implementation structure
227  */
228 struct IDirect3DViewport2Impl
229 {
230     /* IUnknown fields */
231     ICOM_VFIELD(IDirect3DViewport2);
232     DWORD                            ref;
233     /* IDirect3DViewport2 fields */
234     union {
235         IDirect3DImpl*        d3d1;
236         IDirect3D2Impl*       d3d2;
237     } d3d;
238     /* If this viewport is active for one device, put the device here */
239     union {
240         IDirect3DDeviceImpl*    active_device1;
241         IDirect3DDevice2Impl*   active_device2;
242     } device;
243     int                         use_d3d2;
244
245     union {
246         D3DVIEWPORT             vp1;
247         D3DVIEWPORT2            vp2;
248     } viewport;
249     int                         use_vp2;
250
251   /* Activation function */
252   void (*activate)(IDirect3DViewport2Impl*);
253
254   /* Field used to chain viewports together */
255   IDirect3DViewport2Impl*       next;
256
257   /* Lights list */
258   IDirect3DLightImpl*           lights;
259
260   LPVOID                        private;
261 };
262
263 extern HRESULT WINAPI IDirect3DViewport2Impl_QueryInterface(
264     LPDIRECT3DVIEWPORT2 iface, REFIID riid, LPVOID* ppvObj
265 );
266 extern ULONG WINAPI IDirect3DViewport2Impl_AddRef(LPDIRECT3DVIEWPORT2 iface)
267 ;
268 extern ULONG WINAPI IDirect3DViewport2Impl_Release(LPDIRECT3DVIEWPORT2 iface)
269 ;
270 extern HRESULT WINAPI IDirect3DViewport2Impl_Initialize(
271     LPDIRECT3DVIEWPORT2 iface, LPDIRECT3D d3d
272 );
273 extern HRESULT WINAPI IDirect3DViewport2Impl_GetViewport(
274     LPDIRECT3DVIEWPORT2 iface, LPD3DVIEWPORT lpvp
275 );
276 extern HRESULT WINAPI IDirect3DViewport2Impl_SetViewport(
277     LPDIRECT3DVIEWPORT2 iface,LPD3DVIEWPORT lpvp
278 );
279 extern HRESULT WINAPI IDirect3DViewport2Impl_TransformVertices(
280     LPDIRECT3DVIEWPORT2 iface,DWORD dwVertexCount,LPD3DTRANSFORMDATA lpData,
281     DWORD dwFlags,LPDWORD lpOffScreen
282 );
283 extern HRESULT WINAPI IDirect3DViewport2Impl_LightElements(
284     LPDIRECT3DVIEWPORT2 iface,DWORD dwElementCount,LPD3DLIGHTDATA lpData
285 );
286 extern HRESULT WINAPI IDirect3DViewport2Impl_SetBackground(
287     LPDIRECT3DVIEWPORT2 iface, D3DMATERIALHANDLE hMat
288 );
289 extern HRESULT WINAPI IDirect3DViewport2Impl_GetBackground(
290     LPDIRECT3DVIEWPORT2 iface,LPD3DMATERIALHANDLE lphMat,LPBOOL lpValid
291 );
292 extern HRESULT WINAPI IDirect3DViewport2Impl_SetBackgroundDepth(
293     LPDIRECT3DVIEWPORT2 iface,LPDIRECTDRAWSURFACE lpDDSurface
294 );
295 extern HRESULT WINAPI IDirect3DViewport2Impl_GetBackgroundDepth(
296     LPDIRECT3DVIEWPORT2 iface,LPDIRECTDRAWSURFACE* lplpDDSurface,LPBOOL lpValid
297 );
298 extern HRESULT WINAPI IDirect3DViewport2Impl_Clear(
299     LPDIRECT3DVIEWPORT2 iface, DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags
300 );
301 extern HRESULT WINAPI IDirect3DViewport2Impl_AddLight(
302     LPDIRECT3DVIEWPORT2 iface,LPDIRECT3DLIGHT lpLight
303 );
304 extern HRESULT WINAPI IDirect3DViewport2Impl_DeleteLight(
305     LPDIRECT3DVIEWPORT2 iface,LPDIRECT3DLIGHT lpLight
306 );
307 extern HRESULT WINAPI IDirect3DViewport2Impl_NextLight(
308     LPDIRECT3DVIEWPORT2 iface, LPDIRECT3DLIGHT lpLight,
309     LPDIRECT3DLIGHT* lplpLight, DWORD dwFlags
310 );
311 extern HRESULT WINAPI IDirect3DViewport2Impl_GetViewport2(
312     LPDIRECT3DVIEWPORT2 iface, LPD3DVIEWPORT2 lpViewport2
313 );
314 extern HRESULT WINAPI IDirect3DViewport2Impl_SetViewport2(
315     LPDIRECT3DVIEWPORT2 iface, LPD3DVIEWPORT2 lpViewport2
316 );
317
318 /*****************************************************************************
319  * IDirect3DExecuteBuffer implementation structure
320  */
321 struct IDirect3DExecuteBufferImpl
322 {
323     /* IUnknown fields */
324     ICOM_VFIELD(IDirect3DExecuteBuffer);
325     DWORD                                ref;
326     /* IDirect3DExecuteBuffer fields */
327     IDirect3DDeviceImpl* d3ddev;
328
329     D3DEXECUTEBUFFERDESC desc;
330     D3DEXECUTEDATA data;
331
332     /* This buffer will store the transformed vertices */
333     void* vertex_data;
334     D3DVERTEXTYPE vertex_type;
335
336     /* This flags is set to TRUE if we allocated ourselves the
337        data buffer */
338     BOOL need_free;
339
340     void (*execute)(IDirect3DExecuteBuffer* this,
341                     IDirect3DDevice* dev,
342                     IDirect3DViewport* vp);
343     LPVOID private;
344 };
345 extern LPDIRECT3DEXECUTEBUFFER d3dexecutebuffer_create(IDirect3DDeviceImpl* d3ddev, LPD3DEXECUTEBUFFERDESC lpDesc);
346
347 /*****************************************************************************
348  * IDirect3DDevice implementation structure
349  */
350 struct IDirect3DDeviceImpl
351 {
352     /* IUnknown fields */
353     ICOM_VFIELD(IDirect3DDevice);
354     DWORD                         ref;
355     /* IDirect3DDevice fields */
356     IDirect3DImpl*          d3d;
357     IDirectDrawSurfaceImpl* surface;
358
359     IDirect3DViewport2Impl*  viewport_list;
360     IDirect3DViewport2Impl*  current_viewport;
361     IDirect3DTexture2Impl*   current_texture;
362
363     void (*set_context)(IDirect3DDeviceImpl*);
364     LPVOID              private;
365 };
366
367 /*****************************************************************************
368  * IDirect3DDevice2 implementation structure
369  */
370 struct IDirect3DDevice2Impl
371 {
372     /* IUnknown fields */
373     ICOM_VFIELD(IDirect3DDevice2);
374     DWORD                          ref;
375     /* IDirect3DDevice fields */
376     IDirect3D2Impl*         d3d;
377     IDirectDrawSurfaceImpl* surface;
378
379     IDirect3DViewport2Impl* viewport_list;
380     IDirect3DViewport2Impl* current_viewport;
381     IDirect3DTexture2Impl*  current_texture;
382
383     void (*set_context)(IDirect3DDevice2Impl*);
384     LPVOID              private;
385 };
386 extern HRESULT WINAPI IDirect3DDevice2Impl_QueryInterface(
387     LPDIRECT3DDEVICE2 iface, REFIID riid, LPVOID* ppvObj
388 );
389 extern ULONG WINAPI IDirect3DDevice2Impl_AddRef(LPDIRECT3DDEVICE2 iface);
390 extern ULONG WINAPI IDirect3DDevice2Impl_Release(LPDIRECT3DDEVICE2 iface)
391 ;
392 extern HRESULT WINAPI IDirect3DDevice2Impl_GetCaps(
393     LPDIRECT3DDEVICE2 iface, LPD3DDEVICEDESC lpdescsoft,
394     LPD3DDEVICEDESC lpdeschard
395 );
396 extern HRESULT WINAPI IDirect3DDevice2Impl_SwapTextureHandles(
397     LPDIRECT3DDEVICE2 iface,LPDIRECT3DTEXTURE2 lptex1,LPDIRECT3DTEXTURE2 lptex2
398 );
399 extern HRESULT WINAPI IDirect3DDevice2Impl_GetStats(
400     LPDIRECT3DDEVICE2 iface, LPD3DSTATS lpstats)
401 ;
402 extern HRESULT WINAPI IDirect3DDevice2Impl_AddViewport(
403     LPDIRECT3DDEVICE2 iface, LPDIRECT3DVIEWPORT2 lpvp
404 );
405 extern HRESULT WINAPI IDirect3DDevice2Impl_DeleteViewport(
406     LPDIRECT3DDEVICE2 iface, LPDIRECT3DVIEWPORT2 lpvp)
407 ;
408 extern HRESULT WINAPI IDirect3DDevice2Impl_NextViewport(
409     LPDIRECT3DDEVICE2 iface, LPDIRECT3DVIEWPORT2 lpvp,
410     LPDIRECT3DVIEWPORT2* lplpvp, DWORD dwFlags
411 );
412 extern HRESULT WINAPI IDirect3DDevice2Impl_EnumTextureFormats(
413     LPDIRECT3DDEVICE2 iface, LPD3DENUMTEXTUREFORMATSCALLBACK cb, LPVOID context
414 );
415 extern HRESULT WINAPI IDirect3DDevice2Impl_BeginScene(LPDIRECT3DDEVICE2 iface);
416 extern HRESULT WINAPI IDirect3DDevice2Impl_EndScene(LPDIRECT3DDEVICE2 iface);
417 extern HRESULT WINAPI IDirect3DDevice2Impl_GetDirect3D(
418     LPDIRECT3DDEVICE2 iface, LPDIRECT3D2 *lpd3d2
419 );
420 extern HRESULT WINAPI IDirect3DDevice2Impl_SetCurrentViewport(
421     LPDIRECT3DDEVICE2 iface, LPDIRECT3DVIEWPORT2 lpvp
422 );
423 extern HRESULT WINAPI IDirect3DDevice2Impl_GetCurrentViewport(
424     LPDIRECT3DDEVICE2 iface, LPDIRECT3DVIEWPORT2 *lplpvp
425 );
426 extern HRESULT WINAPI IDirect3DDevice2Impl_SetRenderTarget(
427     LPDIRECT3DDEVICE2 iface, LPDIRECTDRAWSURFACE lpdds, DWORD dwFlags
428 );
429 extern HRESULT WINAPI IDirect3DDevice2Impl_GetRenderTarget(
430     LPDIRECT3DDEVICE2 iface, LPDIRECTDRAWSURFACE *lplpdds
431 );
432 extern HRESULT WINAPI IDirect3DDevice2Impl_Begin(
433     LPDIRECT3DDEVICE2 iface, D3DPRIMITIVETYPE d3dp, D3DVERTEXTYPE d3dv,
434     DWORD dwFlags
435 );
436 extern HRESULT WINAPI IDirect3DDevice2Impl_BeginIndexed(
437     LPDIRECT3DDEVICE2 iface, D3DPRIMITIVETYPE d3dp, D3DVERTEXTYPE d3dv,
438     LPVOID lpvert, DWORD numvert, DWORD dwFlags
439 );
440 extern HRESULT WINAPI IDirect3DDevice2Impl_Vertex(
441     LPDIRECT3DDEVICE2 iface,LPVOID lpvert
442 );
443 extern HRESULT WINAPI IDirect3DDevice2Impl_Index(LPDIRECT3DDEVICE2 iface, WORD index);
444 extern HRESULT WINAPI IDirect3DDevice2Impl_End(LPDIRECT3DDEVICE2 iface,DWORD dwFlags);
445 extern HRESULT WINAPI IDirect3DDevice2Impl_GetRenderState(
446     LPDIRECT3DDEVICE2 iface, D3DRENDERSTATETYPE d3drs, LPDWORD lprstate
447 );
448 extern HRESULT WINAPI IDirect3DDevice2Impl_SetRenderState(
449     LPDIRECT3DDEVICE2 iface, D3DRENDERSTATETYPE dwRenderStateType,
450     DWORD dwRenderState
451 );
452 extern HRESULT WINAPI IDirect3DDevice2Impl_GetLightState(
453     LPDIRECT3DDEVICE2 iface, D3DLIGHTSTATETYPE d3dls, LPDWORD lplstate
454 );
455 extern HRESULT WINAPI IDirect3DDevice2Impl_SetLightState(
456     LPDIRECT3DDEVICE2 iface, D3DLIGHTSTATETYPE dwLightStateType,
457     DWORD dwLightState
458 );
459 extern HRESULT WINAPI IDirect3DDevice2Impl_SetTransform(
460     LPDIRECT3DDEVICE2 iface, D3DTRANSFORMSTATETYPE d3dts, LPD3DMATRIX lpmatrix
461 );
462 extern HRESULT WINAPI IDirect3DDevice2Impl_GetTransform(
463     LPDIRECT3DDEVICE2 iface, D3DTRANSFORMSTATETYPE d3dts, LPD3DMATRIX lpmatrix
464 );
465 extern HRESULT WINAPI IDirect3DDevice2Impl_MultiplyTransform(
466     LPDIRECT3DDEVICE2 iface, D3DTRANSFORMSTATETYPE d3dts, LPD3DMATRIX lpmatrix
467 );
468 extern HRESULT WINAPI IDirect3DDevice2Impl_DrawPrimitive(
469     LPDIRECT3DDEVICE2 iface, D3DPRIMITIVETYPE d3dp, D3DVERTEXTYPE d3dv,
470     LPVOID lpvertex, DWORD vertcount, DWORD dwFlags
471 );
472 extern HRESULT WINAPI IDirect3DDevice2Impl_DrawIndexedPrimitive(
473     LPDIRECT3DDEVICE2 iface, D3DPRIMITIVETYPE d3dp, D3DVERTEXTYPE d3dv,
474     LPVOID lpvertex, DWORD vertcount, LPWORD lpindexes, DWORD indexcount,
475     DWORD dwFlags
476 );
477 extern HRESULT WINAPI IDirect3DDevice2Impl_SetClipStatus(
478     LPDIRECT3DDEVICE2 iface, LPD3DCLIPSTATUS lpcs
479 );
480 extern HRESULT WINAPI IDirect3DDevice2Impl_GetClipStatus(
481     LPDIRECT3DDEVICE2 iface, LPD3DCLIPSTATUS lpcs
482 );
483 extern HRESULT WINAPI IDirect3DDeviceImpl_QueryInterface(
484     LPDIRECT3DDEVICE iface, REFIID riid, LPVOID* ppvObj
485 );
486 extern ULONG WINAPI IDirect3DDeviceImpl_AddRef(LPDIRECT3DDEVICE iface);
487 extern ULONG WINAPI IDirect3DDeviceImpl_Release(LPDIRECT3DDEVICE iface);
488 extern HRESULT WINAPI IDirect3DDeviceImpl_Initialize(
489     LPDIRECT3DDEVICE iface, LPDIRECT3D lpd3d, LPGUID lpGUID,
490     LPD3DDEVICEDESC lpd3ddvdesc
491 );
492 extern HRESULT WINAPI IDirect3DDeviceImpl_GetCaps(
493     LPDIRECT3DDEVICE iface, LPD3DDEVICEDESC lpD3DHWDevDesc,
494     LPD3DDEVICEDESC lpD3DSWDevDesc
495 );
496 extern HRESULT WINAPI IDirect3DDeviceImpl_SwapTextureHandles(
497     LPDIRECT3DDEVICE iface, LPDIRECT3DTEXTURE lpD3DTex1,
498     LPDIRECT3DTEXTURE lpD3DTex2
499 );
500 extern HRESULT WINAPI IDirect3DDeviceImpl_CreateExecuteBuffer(
501     LPDIRECT3DDEVICE iface, LPD3DEXECUTEBUFFERDESC lpDesc,
502     LPDIRECT3DEXECUTEBUFFER *lplpDirect3DExecuteBuffer, IUnknown *pUnkOuter
503 );
504 extern HRESULT WINAPI IDirect3DDeviceImpl_GetStats(
505     LPDIRECT3DDEVICE iface, LPD3DSTATS lpD3DStats
506 );
507 extern HRESULT WINAPI IDirect3DDeviceImpl_Execute(
508     LPDIRECT3DDEVICE iface, LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer,
509     LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags
510 );
511 extern HRESULT WINAPI IDirect3DDeviceImpl_AddViewport(
512     LPDIRECT3DDEVICE iface, LPDIRECT3DVIEWPORT lpvp
513 );
514 extern HRESULT WINAPI IDirect3DDeviceImpl_DeleteViewport(
515     LPDIRECT3DDEVICE iface, LPDIRECT3DVIEWPORT lpvp
516 );
517 extern HRESULT WINAPI IDirect3DDeviceImpl_NextViewport(
518     LPDIRECT3DDEVICE iface, LPDIRECT3DVIEWPORT lpvp,
519     LPDIRECT3DVIEWPORT* lplpvp, DWORD dwFlags
520 );
521 extern HRESULT WINAPI IDirect3DDeviceImpl_Pick(
522     LPDIRECT3DDEVICE iface, LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer,
523     LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags, LPD3DRECT lpRect
524 );
525 extern HRESULT WINAPI IDirect3DDeviceImpl_GetPickRecords(
526     LPDIRECT3DDEVICE iface, LPDWORD lpCount, LPD3DPICKRECORD lpD3DPickRec
527 );
528 extern HRESULT WINAPI IDirect3DDeviceImpl_EnumTextureFormats(
529     LPDIRECT3DDEVICE iface,LPD3DENUMTEXTUREFORMATSCALLBACK lpd3dEnumTextureProc,
530     LPVOID lpArg
531 );
532 extern HRESULT WINAPI IDirect3DDeviceImpl_CreateMatrix(
533     LPDIRECT3DDEVICE iface, LPD3DMATRIXHANDLE lpD3DMatHandle
534 )
535 ;
536 extern HRESULT WINAPI IDirect3DDeviceImpl_SetMatrix(
537     LPDIRECT3DDEVICE iface, D3DMATRIXHANDLE d3dMatHandle,
538     const LPD3DMATRIX lpD3DMatrix)
539 ;
540 extern HRESULT WINAPI IDirect3DDeviceImpl_GetMatrix(
541     LPDIRECT3DDEVICE iface,D3DMATRIXHANDLE D3DMatHandle,LPD3DMATRIX lpD3DMatrix
542 );
543 extern HRESULT WINAPI IDirect3DDeviceImpl_DeleteMatrix(
544     LPDIRECT3DDEVICE iface, D3DMATRIXHANDLE d3dMatHandle
545 );
546 extern HRESULT WINAPI IDirect3DDeviceImpl_BeginScene(LPDIRECT3DDEVICE iface)
547 ;
548 extern HRESULT WINAPI IDirect3DDeviceImpl_EndScene(LPDIRECT3DDEVICE iface)
549 ;
550 extern HRESULT WINAPI IDirect3DDeviceImpl_GetDirect3D(
551     LPDIRECT3DDEVICE iface, LPDIRECT3D *lpDirect3D
552 );
553
554 /* All non-static functions 'exported' by various sub-objects */
555 extern LPDIRECT3DTEXTURE2 d3dtexture2_create(IDirectDrawSurfaceImpl* surf);
556 extern LPDIRECT3DTEXTURE d3dtexture_create(IDirectDrawSurfaceImpl* surf);
557
558 extern LPDIRECT3DLIGHT d3dlight_create_dx3(IDirect3DImpl* d3d1);
559 extern LPDIRECT3DLIGHT d3dlight_create(IDirect3D2Impl* d3d2);
560
561 extern LPDIRECT3DEXECUTEBUFFER d3dexecutebuffer_create(IDirect3DDeviceImpl* d3ddev, LPD3DEXECUTEBUFFERDESC lpDesc);
562
563 extern LPDIRECT3DMATERIAL d3dmaterial_create(IDirect3DImpl* d3d1);
564 extern LPDIRECT3DMATERIAL2 d3dmaterial2_create(IDirect3D2Impl* d3d2);
565
566 extern LPDIRECT3DVIEWPORT d3dviewport_create(IDirect3DImpl* d3d1);
567 extern LPDIRECT3DVIEWPORT2 d3dviewport2_create(IDirect3D2Impl* d3d2);
568
569 extern int is_OpenGL_dx3(REFCLSID rguid, IDirectDrawSurfaceImpl* surface, IDirect3DDeviceImpl** device);
570 extern int d3d_OpenGL_dx3(LPD3DENUMDEVICESCALLBACK cb, LPVOID context) ;
571 extern int d3d_OpenGL(LPD3DENUMDEVICESCALLBACK cb, LPVOID context) ;
572 extern int is_OpenGL(REFCLSID rguid, IDirectDrawSurfaceImpl* surface, IDirect3DDevice2Impl** device, IDirect3D2Impl* d3d);
573
574
575 extern const char *_get_renderstate(D3DRENDERSTATETYPE type);
576
577 #define dump_mat(mat) \
578     TRACE("%f %f %f %f\n", (mat)->_11, (mat)->_12, (mat)->_13, (mat)->_14); \
579     TRACE("%f %f %f %f\n", (mat)->_21, (mat)->_22, (mat)->_23, (mat)->_24); \
580     TRACE("%f %f %f %f\n", (mat)->_31, (mat)->_32, (mat)->_33, (mat)->_34); \
581     TRACE("%f %f %f %f\n", (mat)->_41, (mat)->_42, (mat)->_43, (mat)->_44);
582
583 #endif /* __GRAPHICS_WINE_D3D_PRIVATE_H */