Updated typelib loader. Typelib contents can be stored as multibyte
[wine] / dlls / ddraw / ddraw_private.h
1 #ifndef __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H
2 #define __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H
3
4 /* MAY NOT CONTAIN X11 or DGA specific includes/defines/structs! */
5
6 #include "wtypes.h"
7 #include "winbase.h"
8 #include "wingdi.h"
9 #include "winuser.h"
10 #include "ddraw.h"
11
12 static const char WINE_UNUSED *ddProp = "WINE_DDRAW_Property";
13
14 /****************************************************************************
15  * This is the main DirectDraw driver interface. It is supposed to be called
16  * only from the base functions and only used by those. It should neither be
17  * be called nor used within the interfaces.
18  */
19 typedef struct ddraw_driver {
20         LPGUID  guid;           /*under which we are referenced and enumerated*/
21         CHAR    type[20];       /* type, usually "display" */
22         CHAR    name[40];       /* name, like "WINE Foobar DirectDraw Driver" */
23         int     preference;     /* how good we are. dga might get 100, xlib 50*/
24         HRESULT (*createDDRAW)(LPDIRECTDRAW*); /* also check if arg is NULL */
25 } ddraw_driver;
26
27 extern void ddraw_register_driver(ddraw_driver*);
28
29 /*****************************************************************************
30  * The implementation structures. They must not contain driver specific stuff.
31  * 
32  * For private data the "LPVOID private" pointer should be used.
33  */
34
35 typedef struct IDirectDrawImpl  IDirectDrawImpl;
36 typedef struct IDirectDraw2Impl IDirectDraw2Impl;
37 typedef struct IDirectDraw3Impl IDirectDraw3Impl;
38 typedef struct IDirectDraw4Impl IDirectDraw4Impl;
39 typedef struct IDirectDrawPaletteImpl   IDirectDrawPaletteImpl;
40 typedef struct IDirectDrawClipperImpl   IDirectDrawClipperImpl;
41
42 typedef struct IDirectDrawSurfaceImpl IDirectDrawSurfaceImpl;
43 typedef struct IDirectDrawSurface2Impl IDirectDrawSurface2Impl;
44 typedef struct IDirectDrawSurface4Impl IDirectDrawSurface4Impl;
45
46
47 extern struct ICOM_VTABLE(IDirectDrawClipper)   ddclipvt;
48 extern struct ICOM_VTABLE(IDirectDrawPalette)   ddraw_ddpalvt;
49
50 /*****************************************************************************
51  * IDirectDraw implementation structure
52  */
53 struct _common_directdrawdata
54 {
55     int           ref;          /* for this structure, only once per obj */
56     DDPIXELFORMAT directdraw_pixelformat;
57     DDPIXELFORMAT screen_pixelformat;
58
59     int           pixmap_depth;
60     void (*pixel_convert)(void *src, void *dst, DWORD width, DWORD height, LONG pitch, IDirectDrawPaletteImpl *palette);
61     void (*palette_convert)(LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count);
62     DWORD         height,width; /* set by SetDisplayMode */
63     HWND          mainWindow;   /* set by SetCooperativeLevel */
64
65     /* This is for the fake mainWindow */
66     ATOM          winclass;
67     HWND          window;
68     PAINTSTRUCT   ps;
69     int           paintable;
70     LPVOID        private;
71 };
72
73 /*****************************************************************************
74  * IDirectDraw implementation structure
75  * 
76  * Note: All the IDirectDraw*Impl structures _MUST_ have IDENTICAL layout,
77  *       since we reuse functions across interface versions.
78  */
79 struct IDirectDrawImpl
80 {
81     /* IUnknown fields */
82     ICOM_VFIELD(IDirectDraw);
83     DWORD                               ref;
84
85     /* IDirectDraw fields */
86     struct _common_directdrawdata       *d;
87 };
88
89 struct IDirectDraw2Impl
90 {
91     /* IUnknown fields */
92     ICOM_VFIELD(IDirectDraw2);
93     DWORD                               ref;
94
95     /* IDirectDraw fields */
96     struct _common_directdrawdata       *d;
97 };
98
99 extern HRESULT WINAPI IDirectDrawImpl_SetDisplayMode(
100         LPDIRECTDRAW iface,DWORD width,DWORD height,DWORD depth
101 );
102
103 extern HRESULT WINAPI IDirectDraw2Impl_DuplicateSurface(
104         LPDIRECTDRAW2 iface,LPDIRECTDRAWSURFACE src,LPDIRECTDRAWSURFACE *dst
105 );
106 extern HRESULT WINAPI IDirectDraw2Impl_SetCooperativeLevel(
107         LPDIRECTDRAW2 iface,HWND hwnd,DWORD cooplevel
108 );
109 extern HRESULT WINAPI IDirectDraw2Impl_GetCaps(
110         LPDIRECTDRAW2 iface,LPDDCAPS caps1,LPDDCAPS caps2
111 ) ;
112 extern HRESULT WINAPI IDirectDraw2Impl_CreateClipper(
113     LPDIRECTDRAW2 iface,DWORD x,LPDIRECTDRAWCLIPPER *lpddclip,LPUNKNOWN lpunk
114 );
115 extern HRESULT WINAPI common_IDirectDraw2Impl_CreatePalette(
116     IDirectDraw2Impl* This,DWORD dwFlags,LPPALETTEENTRY palent,
117     IDirectDrawPaletteImpl **lpddpal,LPUNKNOWN lpunk,int *psize
118 );
119 extern HRESULT WINAPI IDirectDraw2Impl_CreatePalette(
120     LPDIRECTDRAW2 iface,DWORD dwFlags,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk
121 );
122 extern HRESULT WINAPI IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 iface);
123 extern HRESULT WINAPI IDirectDraw2Impl_WaitForVerticalBlank(
124         LPDIRECTDRAW2 iface,DWORD x,HANDLE h
125 );
126 extern ULONG WINAPI IDirectDraw2Impl_AddRef(LPDIRECTDRAW2 iface);
127 extern ULONG WINAPI IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface);
128 extern HRESULT WINAPI IDirectDraw2Impl_QueryInterface(
129         LPDIRECTDRAW2 iface,REFIID refiid,LPVOID *obj
130 );
131 extern HRESULT WINAPI IDirectDraw2Impl_GetVerticalBlankStatus(
132         LPDIRECTDRAW2 iface,BOOL *status
133 );
134 extern HRESULT WINAPI IDirectDraw2Impl_EnumDisplayModes(
135         LPDIRECTDRAW2 iface,DWORD dwFlags,LPDDSURFACEDESC lpddsfd,LPVOID context,LPDDENUMMODESCALLBACK modescb
136 );
137 extern HRESULT WINAPI IDirectDraw2Impl_GetDisplayMode(
138         LPDIRECTDRAW2 iface,LPDDSURFACEDESC lpddsfd
139 );
140 extern HRESULT WINAPI IDirectDraw2Impl_FlipToGDISurface(LPDIRECTDRAW2 iface);
141 extern HRESULT WINAPI IDirectDraw2Impl_GetMonitorFrequency(
142     LPDIRECTDRAW2 iface,LPDWORD freq
143 );
144 extern HRESULT WINAPI IDirectDraw2Impl_GetFourCCCodes(
145     LPDIRECTDRAW2 iface,LPDWORD x,LPDWORD y
146 );
147 extern HRESULT WINAPI IDirectDraw2Impl_EnumSurfaces(
148     LPDIRECTDRAW2 iface,DWORD x,LPDDSURFACEDESC ddsfd,LPVOID context,
149     LPDDENUMSURFACESCALLBACK ddsfcb
150 );
151 extern HRESULT WINAPI IDirectDraw2Impl_Compact( LPDIRECTDRAW2 iface );
152 extern HRESULT WINAPI IDirectDraw2Impl_GetGDISurface(
153     LPDIRECTDRAW2 iface, LPDIRECTDRAWSURFACE *lplpGDIDDSSurface
154 );
155 extern HRESULT WINAPI IDirectDraw2Impl_GetScanLine(
156     LPDIRECTDRAW2 iface, LPDWORD lpdwScanLine
157 );
158 extern HRESULT WINAPI IDirectDraw2Impl_Initialize(LPDIRECTDRAW2 iface, GUID *lpGUID);
159 extern HRESULT WINAPI IDirectDraw2Impl_SetDisplayMode(
160     LPDIRECTDRAW2 iface,DWORD width,DWORD height,DWORD depth,
161     DWORD dwRefreshRate, DWORD dwFlags
162 );
163 extern HRESULT WINAPI IDirectDraw2Impl_GetAvailableVidMem(
164         LPDIRECTDRAW2 iface,LPDDSCAPS ddscaps,LPDWORD total,LPDWORD free
165 );
166 extern HRESULT common_off_screen_CreateSurface(
167         IDirectDraw2Impl* This,IDirectDrawSurfaceImpl* lpdsf
168 );
169
170 /*
171  * IDirectDraw4 implementation structure
172  */
173 struct IDirectDraw4Impl
174 {
175     /* IUnknown fields */
176     ICOM_VFIELD(IDirectDraw4);
177     DWORD                               ref;
178     /* IDirectDraw4 fields */
179     struct _common_directdrawdata       *d;
180 };
181
182 extern HRESULT WINAPI IDirectDraw4Impl_GetSurfaceFromDC(
183         LPDIRECTDRAW4 iface, HDC hdc, LPDIRECTDRAWSURFACE *lpDDS
184 );
185 extern HRESULT WINAPI IDirectDraw4Impl_RestoreAllSurfaces(LPDIRECTDRAW4 iface);
186 extern HRESULT WINAPI IDirectDraw4Impl_TestCooperativeLevel(LPDIRECTDRAW4 iface);
187 extern HRESULT WINAPI IDirectDraw4Impl_GetDeviceIdentifier(LPDIRECTDRAW4 iface,
188                                                     LPDDDEVICEIDENTIFIER lpdddi,
189                                                     DWORD dwFlags
190 );
191
192 extern HRESULT WINAPI IDirectDraw7Impl_StartModeTest(
193         LPDIRECTDRAW7 iface,LPSIZE modetotest,DWORD num,DWORD flags
194 );
195 extern HRESULT WINAPI IDirectDraw7Impl_EvaluateMode(
196         LPDIRECTDRAW7 iface,DWORD flags,DWORD *seconduntiltimeout
197 );
198
199 /*****************************************************************************
200  * IDirectDrawPalette implementation structure
201  */
202 struct IDirectDrawPaletteImpl
203 {
204     /* IUnknown fields */
205     ICOM_VFIELD(IDirectDrawPalette);
206     DWORD               ref;
207
208     /* IDirectDrawPalette fields */
209     IDirectDrawImpl*            ddraw;  /* direct draw, no reference count */
210     PALETTEENTRY        palents[256];
211
212     /* This is to store the palette in 'screen format' */
213     int                 screen_palents[256];
214     LPVOID              private;
215 };
216 extern HRESULT WINAPI IDirectDrawPaletteImpl_GetEntries(LPDIRECTDRAWPALETTE,DWORD,DWORD,DWORD,LPPALETTEENTRY);
217 extern HRESULT WINAPI IDirectDrawPaletteImpl_SetEntries(LPDIRECTDRAWPALETTE,DWORD,DWORD,DWORD,LPPALETTEENTRY);
218 extern ULONG WINAPI IDirectDrawPaletteImpl_Release(LPDIRECTDRAWPALETTE);
219 extern ULONG WINAPI IDirectDrawPaletteImpl_AddRef(LPDIRECTDRAWPALETTE);
220 extern HRESULT WINAPI IDirectDrawPaletteImpl_Initialize(LPDIRECTDRAWPALETTE,LPDIRECTDRAW,DWORD,LPPALETTEENTRY);
221 extern HRESULT WINAPI IDirectDrawPaletteImpl_GetCaps(LPDIRECTDRAWPALETTE,LPDWORD);
222 extern HRESULT WINAPI IDirectDrawPaletteImpl_QueryInterface(LPDIRECTDRAWPALETTE,REFIID,LPVOID *);
223
224 extern HRESULT WINAPI common_IDirectDraw2Impl_CreatePalette(
225     IDirectDraw2Impl* This,DWORD dwFlags,LPPALETTEENTRY palent,
226     IDirectDrawPaletteImpl **lpddpal,LPUNKNOWN lpunk,int *psize
227 );
228
229 /*****************************************************************************
230  * IDirectDrawClipper implementation structure
231  */
232 struct IDirectDrawClipperImpl
233 {
234     /* IUnknown fields */
235     ICOM_VFIELD(IDirectDrawClipper);
236     DWORD                            ref;
237
238     /* IDirectDrawClipper fields */
239     HWND hWnd;
240 };
241
242 /*****************************************************************************
243  * IDirectDrawSurface implementation structure
244  */
245 struct IDirect3DTexture2Impl;
246 struct _common_directdrawsurface
247 {
248     IDirectDrawPaletteImpl*     palette;
249     IDirectDraw2Impl*           ddraw;
250
251     struct _surface_chain       *chain;
252
253     DDSURFACEDESC               surface_desc;
254
255     /* For Get / Release DC methods */
256     HBITMAP                     DIBsection;
257     void                        *bitmap_data;
258     HDC                         hdc;
259     HGDIOBJ                     holdbitmap;
260     LPDIRECTDRAWCLIPPER         lpClipper;
261     
262     /* Callback for loaded textures */
263     struct IDirect3DTexture2Impl*       texture;
264     HRESULT WINAPI              (*SetColorKey_cb)(struct IDirect3DTexture2Impl *texture, DWORD dwFlags, LPDDCOLORKEY ckey ) ; 
265 };
266 extern IDirectDrawSurface4Impl* _common_find_flipto(IDirectDrawSurface4Impl* This,IDirectDrawSurface4Impl* flipto);
267
268 struct IDirectDrawSurfaceImpl
269 {
270     /* IUnknown fields */
271     ICOM_VFIELD(IDirectDrawSurface);
272     DWORD                            ref;
273
274     /* IDirectDrawSurface fields */
275     struct _common_directdrawsurface    s;
276     LPVOID private;
277 };
278
279 /*****************************************************************************
280  * IDirectDrawSurface2 implementation structure
281  */
282 struct IDirectDrawSurface2Impl
283 {
284     /* IUnknown fields */
285     ICOM_VFIELD(IDirectDrawSurface2);
286     DWORD                             ref;
287     /* IDirectDrawSurface2 fields */
288     struct _common_directdrawsurface    s;
289     LPVOID private;
290 };
291
292 /*****************************************************************************
293  * IDirectDrawSurface3 implementation structure
294  */
295 struct IDirectDrawSurface3Impl
296 {
297     /* IUnknown fields */
298     ICOM_VFIELD(IDirectDrawSurface3);
299     DWORD                             ref;
300     /* IDirectDrawSurface3 fields */
301     struct _common_directdrawsurface    s;
302     LPVOID private;
303 };
304
305 /*****************************************************************************
306  * IDirectDrawSurface4 implementation structure
307  */
308 struct IDirectDrawSurface4Impl
309 {
310     /* IUnknown fields */
311     ICOM_VFIELD(IDirectDrawSurface4);
312     DWORD                             ref;
313
314     /* IDirectDrawSurface4 fields */
315     struct _common_directdrawsurface    s;
316     LPVOID private;
317 } ;
318
319 struct _surface_chain {
320         IDirectDrawSurface4Impl **surfaces;
321         int                     nrofsurfaces;
322 };
323 extern HRESULT common_off_screen_CreateSurface(IDirectDraw2Impl* This,IDirectDrawSurfaceImpl* lpdsf);
324 extern HRESULT WINAPI IDirectDrawSurface4Impl_Lock(LPDIRECTDRAWSURFACE4 iface,LPRECT lprect,LPDDSURFACEDESC lpddsd,DWORD flags, HANDLE hnd);
325 extern HRESULT WINAPI IDirectDrawSurface4Impl_Unlock( LPDIRECTDRAWSURFACE4 iface,LPVOID surface);
326 extern HRESULT WINAPI IDirectDrawSurface4Impl_Blt(LPDIRECTDRAWSURFACE4 iface,LPRECT rdst,LPDIRECTDRAWSURFACE4 src,LPRECT rsrc,DWORD dwFlags,LPDDBLTFX lpbltfx);
327 extern HRESULT WINAPI IDirectDrawSurface4Impl_BltFast(LPDIRECTDRAWSURFACE4 iface,DWORD dstx,DWORD dsty,LPDIRECTDRAWSURFACE4 src,LPRECT rsrc,DWORD trans);
328 extern HRESULT WINAPI IDirectDrawSurface4Impl_BltBatch(LPDIRECTDRAWSURFACE4 iface,LPDDBLTBATCH ddbltbatch,DWORD x,DWORD y);
329 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetCaps(LPDIRECTDRAWSURFACE4 iface,LPDDSCAPS caps);
330 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetSurfaceDesc(LPDIRECTDRAWSURFACE4 iface,LPDDSURFACEDESC ddsd);
331 extern ULONG WINAPI IDirectDrawSurface4Impl_AddRef(LPDIRECTDRAWSURFACE4 iface);
332 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetAttachedSurface(LPDIRECTDRAWSURFACE4 iface,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE4 *lpdsf);
333 extern HRESULT WINAPI IDirectDrawSurface4Impl_Initialize(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAW ddraw,LPDDSURFACEDESC lpdsfd);
334 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetPixelFormat(LPDIRECTDRAWSURFACE4 iface,LPDDPIXELFORMAT pf);
335 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetBltStatus(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
336 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetOverlayPosition(LPDIRECTDRAWSURFACE4 iface,LPLONG x1,LPLONG x2);
337 extern HRESULT WINAPI IDirectDrawSurface4Impl_SetClipper(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWCLIPPER lpClipper);
338 extern HRESULT WINAPI IDirectDrawSurface4Impl_AddAttachedSurface(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWSURFACE4 surf);
339 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetDC(LPDIRECTDRAWSURFACE4 iface,HDC* lphdc);
340 extern HRESULT WINAPI IDirectDrawSurface4Impl_ReleaseDC(LPDIRECTDRAWSURFACE4 iface,HDC hdc);
341 extern HRESULT WINAPI IDirectDrawSurface4Impl_QueryInterface(LPDIRECTDRAWSURFACE4 iface,REFIID refiid,LPVOID *obj);
342 extern HRESULT WINAPI IDirectDrawSurface4Impl_IsLost(LPDIRECTDRAWSURFACE4 iface);
343 extern HRESULT WINAPI IDirectDrawSurface4Impl_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE4 iface,LPVOID context,LPDDENUMSURFACESCALLBACK esfcb);
344 extern HRESULT WINAPI IDirectDrawSurface4Impl_Restore(LPDIRECTDRAWSURFACE4 iface);
345 extern HRESULT WINAPI IDirectDrawSurface4Impl_SetColorKey(LPDIRECTDRAWSURFACE4 iface, DWORD dwFlags, LPDDCOLORKEY ckey);
346 extern HRESULT WINAPI IDirectDrawSurface4Impl_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE4 iface,LPRECT lpRect);
347 extern HRESULT WINAPI IDirectDrawSurface4Impl_DeleteAttachedSurface(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags,LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface);
348 extern HRESULT WINAPI IDirectDrawSurface4Impl_EnumOverlayZOrders(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags,LPVOID lpContext,LPDDENUMSURFACESCALLBACK lpfnCallback);
349 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetClipper(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWCLIPPER* lplpDDClipper);
350 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetColorKey(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags,LPDDCOLORKEY lpDDColorKey);
351 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetFlipStatus(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
352 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetPalette(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWPALETTE* lplpDDPalette);
353 extern HRESULT WINAPI IDirectDrawSurface4Impl_SetOverlayPosition(LPDIRECTDRAWSURFACE4 iface,LONG lX,LONG lY);
354 extern HRESULT WINAPI IDirectDrawSurface4Impl_UpdateOverlay(LPDIRECTDRAWSURFACE4 iface,LPRECT lpSrcRect,LPDIRECTDRAWSURFACE4 lpDDDestSurface,LPRECT lpDestRect,DWORD dwFlags,LPDDOVERLAYFX lpDDOverlayFx);
355 extern HRESULT WINAPI IDirectDrawSurface4Impl_UpdateOverlayDisplay(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
356 extern HRESULT WINAPI IDirectDrawSurface4Impl_UpdateOverlayZOrder(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags,LPDIRECTDRAWSURFACE4 lpDDSReference);
357 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetDDInterface(LPDIRECTDRAWSURFACE4 iface,LPVOID* lplpDD);
358 extern HRESULT WINAPI IDirectDrawSurface4Impl_PageLock(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
359 extern HRESULT WINAPI IDirectDrawSurface4Impl_PageUnlock(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
360 extern HRESULT WINAPI IDirectDrawSurface4Impl_SetSurfaceDesc(LPDIRECTDRAWSURFACE4 iface,LPDDSURFACEDESC lpDDSD,DWORD dwFlags);
361 extern HRESULT WINAPI IDirectDrawSurface4Impl_SetPrivateData(LPDIRECTDRAWSURFACE4 iface,REFGUID guidTag,LPVOID lpData,DWORD cbSize,DWORD dwFlags);
362 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetPrivateData(LPDIRECTDRAWSURFACE4 iface,REFGUID guidTag,LPVOID lpBuffer,LPDWORD lpcbBufferSize);
363 extern HRESULT WINAPI IDirectDrawSurface4Impl_FreePrivateData(LPDIRECTDRAWSURFACE4 iface,REFGUID guidTag);
364 extern HRESULT WINAPI IDirectDrawSurface4Impl_GetUniquenessValue(LPDIRECTDRAWSURFACE4 iface,LPDWORD lpValue);
365 extern HRESULT WINAPI IDirectDrawSurface4Impl_ChangeUniquenessValue(LPDIRECTDRAWSURFACE4 iface);
366
367 extern void _common_IDirectDrawImpl_SetDisplayMode(IDirectDrawImpl* This);
368
369 /* Get DDSCAPS of surface (shortcutmacro) */
370 #define SDDSCAPS(iface) ((iface)->s.surface_desc.ddsCaps.dwCaps)
371 /* Get the number of bytes per pixel for a given surface */
372 #define PFGET_BPP(pf) (pf.dwFlags&DDPF_PALETTEINDEXED8?1:((pf.u.dwRGBBitCount+7)/8))
373 #define GET_BPP(desc) PFGET_BPP(desc.ddpfPixelFormat)
374
375 typedef struct {
376     unsigned short      bpp,depth;
377     unsigned int        rmask,gmask,bmask;
378 } ConvertMode;
379
380 typedef struct {
381     void (*pixel_convert)(void *src, void *dst, DWORD width, DWORD height, LONG pitch, IDirectDrawPaletteImpl* palette);
382     void (*palette_convert)(LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count);
383 } ConvertFuncs;
384
385 typedef struct {
386     ConvertMode screen, dest;
387     ConvertFuncs funcs;
388 } Convert;
389
390 extern Convert ModeEmulations[7];
391 extern int _common_depth_to_pixelformat(DWORD depth,LPDIRECTDRAW ddraw);
392
393 extern HRESULT create_direct3d(LPVOID *obj,IDirectDraw2Impl*);
394 extern HRESULT create_direct3d2(LPVOID *obj,IDirectDraw2Impl*);
395 extern HRESULT create_direct3d3(LPVOID *obj,IDirectDraw2Impl*);
396
397 /******************************************************************************
398  * Debugging / Flags output functions
399  */
400 extern void _dump_DDBLTFX(DWORD flagmask);
401 extern void _dump_DDBLTFAST(DWORD flagmask);
402 extern void _dump_DDBLT(DWORD flagmask);
403 extern void _dump_DDSCAPS(void *in);
404 extern void _dump_pixelformat_flag(DWORD flagmask);
405 extern void _dump_paletteformat(DWORD dwFlags);
406 extern void _dump_pixelformat(void *in);
407 extern void _dump_colorkeyflag(DWORD ck);
408 extern void _dump_surface_desc(DDSURFACEDESC *lpddsd);
409 extern void _dump_cooperativelevel(DWORD cooplevel);
410 extern void _dump_surface_desc(DDSURFACEDESC *lpddsd);
411 extern void _dump_DDCOLORKEY(void *in);
412 extern void _dump_DDOVERLAY(DWORD flagmask) ;
413 #endif /* __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H */