1 #ifndef __GRAPHICS_WINE_DDRAW_PRIVATE_H
2 #define __GRAPHICS_WINE_DDRAW_PRIVATE_H
7 /*****************************************************************************
8 * Predeclare the interface implementation structures
10 typedef struct IDirectDrawPaletteImpl IDirectDrawPaletteImpl
;
11 typedef struct IDirectDrawClipperImpl IDirectDrawClipperImpl
;
12 typedef struct IDirectDrawImpl IDirectDrawImpl
;
13 typedef struct IDirectDraw2Impl IDirectDraw2Impl
;
14 typedef struct IDirectDraw4Impl IDirectDraw4Impl
;
15 typedef struct IDirectDrawSurfaceImpl IDirectDrawSurfaceImpl
;
16 typedef struct IDirectDrawSurface3Impl IDirectDrawSurface2Impl
;
17 typedef struct IDirectDrawSurface4Impl IDirectDrawSurface3Impl
;
18 typedef struct IDirectDrawSurface4Impl IDirectDrawSurface4Impl
;
19 typedef struct IDirectDrawColorControlImpl IDirectDrawColorControlImpl
;
21 #include "d3d_private.h"
23 /*****************************************************************************
24 * IDirectDrawPalette implementation structure
26 struct IDirectDrawPaletteImpl
29 ICOM_VTABLE(IDirectDrawPalette
)* lpvtbl
;
31 /* IDirectDrawPalette fields */
32 IDirectDrawImpl
* ddraw
;
34 PALETTEENTRY palents
[256];
36 /* This is to store the palette in 'screen format' */
37 int screen_palents
[256];
40 /*****************************************************************************
41 * IDirectDrawClipper implementation structure
43 struct IDirectDrawClipperImpl
46 ICOM_VTABLE(IDirectDrawClipper
)* lpvtbl
;
48 /* IDirectDrawClipper fields */
52 /*****************************************************************************
53 * IDirectDraw implementation structure
55 struct _common_directdrawdata
57 DDPIXELFORMAT directdraw_pixelformat
;
58 DDPIXELFORMAT screen_pixelformat
;
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
; /* SetDisplayMode */
63 HWND mainWindow
; /* SetCooperativeLevel */
65 /* This is for Wine's fake mainWindow.
66 We need it also in DGA mode to make some games (for example Monkey Island III work) */
74 struct _dga_directdrawdata
76 DWORD fb_width
,fb_height
,fb_banksize
,fb_memsize
;
81 struct _xlib_directdrawdata
85 #endif /* defined(HAVE_LIBXXSHM) */
87 /* are these needed for anything? (draw_surf is the active surface)
88 IDirectDrawSurfaceImpl* surfs;
89 DWORD num_surfs, alloc_surfs, draw_surf; */
92 struct IDirectDrawImpl
95 ICOM_VTABLE(IDirectDraw
)* lpvtbl
;
97 /* IDirectDraw fields */
98 struct _common_directdrawdata d
;
100 struct _xlib_directdrawdata xlib
;
101 struct _dga_directdrawdata dga
;
105 /*****************************************************************************
106 * IDirectDraw2 implementation structure
108 struct IDirectDraw2Impl
110 /* IUnknown fields */
111 ICOM_VTABLE(IDirectDraw2
)* lpvtbl
;
113 /* IDirectDraw2 fields */
114 struct _common_directdrawdata d
;
116 struct _xlib_directdrawdata xlib
;
117 struct _dga_directdrawdata dga
;
121 /*****************************************************************************
122 * IDirectDraw4 implementation structure
124 struct IDirectDraw4Impl
126 /* IUnknown fields */
127 ICOM_VTABLE(IDirectDraw4
)* lpvtbl
;
129 /* IDirectDraw4 fields */
130 struct _common_directdrawdata d
;
132 struct _xlib_directdrawdata xlib
;
133 struct _dga_directdrawdata dga
;
137 /*****************************************************************************
138 * IDirectDrawSurface implementation structure
140 struct _common_directdrawsurface
142 IDirectDrawPaletteImpl
* palette
;
143 IDirectDraw2Impl
* ddraw
;
145 struct _surface_chain
*chain
;
147 DDSURFACEDESC surface_desc
;
149 /* For Get / Release DC methods */
155 /* Callback for loaded textures */
156 IDirect3DTexture2Impl
* texture
;
157 HRESULT
WINAPI (*SetColorKey_cb
)(IDirect3DTexture2Impl
*texture
, DWORD dwFlags
, LPDDCOLORKEY ckey
) ;
159 /* Storage for attached device (void * as it can be either a Device or a Device2) */
163 struct _dga_directdrawsurface
168 struct _xlib_directdrawsurface
172 XShmSegmentInfo shminfo
;
176 struct IDirectDrawSurfaceImpl
178 /* IUnknown fields */
179 ICOM_VTABLE(IDirectDrawSurface
)* lpvtbl
;
181 /* IDirectDrawSurface fields */
182 struct _common_directdrawsurface s
;
184 struct _dga_directdrawsurface dga
;
185 struct _xlib_directdrawsurface xlib
;
189 /*****************************************************************************
190 * IDirectDrawSurface2 implementation structure
192 struct IDirectDrawSurface2Impl
194 /* IUnknown fields */
195 ICOM_VTABLE(IDirectDrawSurface2
)* lpvtbl
;
197 /* IDirectDrawSurface2 fields */
198 struct _common_directdrawsurface s
;
200 struct _dga_directdrawsurface dga
;
201 struct _xlib_directdrawsurface xlib
;
205 /*****************************************************************************
206 * IDirectDrawSurface3 implementation structure
208 struct IDirectDrawSurface3Impl
210 /* IUnknown fields */
211 ICOM_VTABLE(IDirectDrawSurface3
)* lpvtbl
;
213 /* IDirectDrawSurface3 fields */
214 struct _common_directdrawsurface s
;
216 struct _dga_directdrawsurface dga
;
217 struct _xlib_directdrawsurface xlib
;
221 /*****************************************************************************
222 * IDirectDrawSurface4 implementation structure
224 struct IDirectDrawSurface4Impl
226 /* IUnknown fields */
227 ICOM_VTABLE(IDirectDrawSurface4
)* lpvtbl
;
229 /* IDirectDrawSurface4 fields */
230 struct _common_directdrawsurface s
;
232 struct _dga_directdrawsurface dga
;
233 struct _xlib_directdrawsurface xlib
;
237 struct _surface_chain
{
238 IDirectDrawSurface4Impl
**surfaces
;
242 /*****************************************************************************
243 * IDirectDrawColorControl implementation structure
245 struct IDirectDrawColorControlImpl
247 /* IUnknown fields */
248 ICOM_VTABLE(IDirectDrawColorControl
)* lpvtbl
;
250 /* IDirectDrawColorControl fields */
255 #endif /* __GRAPHICS_WINE_DDRAW_PRIVATE_H */