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
;
144 IDirectDrawSurface4Impl
* backbuffer
;
146 DDSURFACEDESC surface_desc
;
148 /* Callback for loaded textures */
149 IDirect3DTexture2Impl
* texture
;
150 HRESULT
WINAPI (*SetColorKey_cb
)(IDirect3DTexture2Impl
*texture
, DWORD dwFlags
, LPDDCOLORKEY ckey
) ;
153 struct _dga_directdrawsurface
158 struct _xlib_directdrawsurface
162 XShmSegmentInfo shminfo
;
166 struct IDirectDrawSurfaceImpl
168 /* IUnknown fields */
169 ICOM_VTABLE(IDirectDrawSurface
)* lpvtbl
;
171 /* IDirectDrawSurface fields */
172 struct _common_directdrawsurface s
;
174 struct _dga_directdrawsurface dga
;
175 struct _xlib_directdrawsurface xlib
;
179 /*****************************************************************************
180 * IDirectDrawSurface2 implementation structure
182 struct IDirectDrawSurface2Impl
184 /* IUnknown fields */
185 ICOM_VTABLE(IDirectDrawSurface2
)* lpvtbl
;
187 /* IDirectDrawSurface2 fields */
188 struct _common_directdrawsurface s
;
190 struct _dga_directdrawsurface dga
;
191 struct _xlib_directdrawsurface xlib
;
195 /*****************************************************************************
196 * IDirectDrawSurface3 implementation structure
198 struct IDirectDrawSurface3Impl
200 /* IUnknown fields */
201 ICOM_VTABLE(IDirectDrawSurface3
)* lpvtbl
;
203 /* IDirectDrawSurface3 fields */
204 struct _common_directdrawsurface s
;
206 struct _dga_directdrawsurface dga
;
207 struct _xlib_directdrawsurface xlib
;
211 /*****************************************************************************
212 * IDirectDrawSurface4 implementation structure
214 struct IDirectDrawSurface4Impl
216 /* IUnknown fields */
217 ICOM_VTABLE(IDirectDrawSurface4
)* lpvtbl
;
219 /* IDirectDrawSurface4 fields */
220 struct _common_directdrawsurface s
;
222 struct _dga_directdrawsurface dga
;
223 struct _xlib_directdrawsurface xlib
;
227 /*****************************************************************************
228 * IDirectDrawColorControl implementation structure
230 struct IDirectDrawColorControlImpl
232 /* IUnknown fields */
233 ICOM_VTABLE(IDirectDrawColorControl
)* lpvtbl
;
235 /* IDirectDrawColorControl fields */
240 #endif /* __GRAPHICS_WINE_DDRAW_PRIVATE_H */