1 #ifndef __GRAPHICS_WINE_DDRAW_PRIVATE_H
2 #define __GRAPHICS_WINE_DDRAW_PRIVATE_H
6 /*****************************************************************************
7 * Predeclare the interface implementation structures
9 typedef struct IDirectDrawPaletteImpl IDirectDrawPaletteImpl
;
10 typedef struct IDirectDrawClipperImpl IDirectDrawClipperImpl
;
11 typedef struct IDirectDrawImpl IDirectDrawImpl
;
12 typedef struct IDirectDraw2Impl IDirectDraw2Impl
;
13 typedef struct IDirectDraw4Impl IDirectDraw4Impl
;
14 typedef struct IDirectDrawSurfaceImpl IDirectDrawSurfaceImpl
;
15 typedef struct IDirectDrawSurface3Impl IDirectDrawSurface2Impl
;
16 typedef struct IDirectDrawSurface4Impl IDirectDrawSurface3Impl
;
17 typedef struct IDirectDrawSurface4Impl IDirectDrawSurface4Impl
;
18 typedef struct IDirectDrawColorControlImpl IDirectDrawColorControlImpl
;
20 #include "d3d_private.h"
22 /*****************************************************************************
23 * IDirectDrawPalette implementation structure
25 struct IDirectDrawPaletteImpl
28 ICOM_VTABLE(IDirectDrawPalette
)* lpvtbl
;
30 /* IDirectDrawPalette fields */
31 IDirectDrawImpl
* ddraw
;
33 PALETTEENTRY palents
[256];
35 /* This is to store the palette in 'screen format' */
36 int screen_palents
[256];
39 /*****************************************************************************
40 * IDirectDrawClipper implementation structure
42 struct IDirectDrawClipperImpl
45 ICOM_VTABLE(IDirectDrawClipper
)* lpvtbl
;
47 /* IDirectDrawClipper fields */
51 /*****************************************************************************
52 * IDirectDraw implementation structure
54 struct _common_directdrawdata
56 DDPIXELFORMAT directdraw_pixelformat
;
57 DDPIXELFORMAT screen_pixelformat
;
59 void (*pixel_convert
)(void *src
, void *dst
, DWORD width
, DWORD height
, LONG pitch
, IDirectDrawPaletteImpl
* palette
);
60 void (*palette_convert
)(LPPALETTEENTRY palent
, void *screen_palette
, DWORD start
, DWORD count
);
61 DWORD height
,width
; /* SetDisplayMode */
62 HWND mainWindow
; /* SetCooperativeLevel */
64 /* This is for Wine's fake mainWindow.
65 We need it also in DGA mode to make some games (for example Monkey Island III work) */
73 struct _dga_directdrawdata
75 DWORD fb_width
,fb_height
,fb_banksize
,fb_memsize
;
80 struct _xlib_directdrawdata
84 #endif /* defined(HAVE_LIBXXSHM) */
86 /* are these needed for anything? (draw_surf is the active surface)
87 IDirectDrawSurfaceImpl* surfs;
88 DWORD num_surfs, alloc_surfs, draw_surf; */
91 struct IDirectDrawImpl
94 ICOM_VTABLE(IDirectDraw
)* lpvtbl
;
96 /* IDirectDraw fields */
97 struct _common_directdrawdata d
;
99 struct _xlib_directdrawdata xlib
;
100 struct _dga_directdrawdata dga
;
104 /*****************************************************************************
105 * IDirectDraw2 implementation structure
107 struct IDirectDraw2Impl
109 /* IUnknown fields */
110 ICOM_VTABLE(IDirectDraw2
)* lpvtbl
;
112 /* IDirectDraw2 fields */
113 struct _common_directdrawdata d
;
115 struct _xlib_directdrawdata xlib
;
116 struct _dga_directdrawdata dga
;
120 /*****************************************************************************
121 * IDirectDraw4 implementation structure
123 struct IDirectDraw4Impl
125 /* IUnknown fields */
126 ICOM_VTABLE(IDirectDraw4
)* lpvtbl
;
128 /* IDirectDraw4 fields */
129 struct _common_directdrawdata d
;
131 struct _xlib_directdrawdata xlib
;
132 struct _dga_directdrawdata dga
;
136 /*****************************************************************************
137 * IDirectDrawSurface implementation structure
139 struct _common_directdrawsurface
141 IDirectDrawPaletteImpl
* palette
;
142 IDirectDraw2Impl
* ddraw
;
143 IDirectDrawSurface4Impl
* backbuffer
;
145 DDSURFACEDESC surface_desc
;
147 /* Callback for loaded textures */
148 IDirect3DTexture2Impl
* texture
;
149 HRESULT
WINAPI (*SetColorKey_cb
)(IDirect3DTexture2Impl
*texture
, DWORD dwFlags
, LPDDCOLORKEY ckey
) ;
152 struct _dga_directdrawsurface
157 struct _xlib_directdrawsurface
161 XShmSegmentInfo shminfo
;
165 struct IDirectDrawSurfaceImpl
167 /* IUnknown fields */
168 ICOM_VTABLE(IDirectDrawSurface
)* lpvtbl
;
170 /* IDirectDrawSurface fields */
171 struct _common_directdrawsurface s
;
173 struct _dga_directdrawsurface dga
;
174 struct _xlib_directdrawsurface xlib
;
178 /*****************************************************************************
179 * IDirectDrawSurface2 implementation structure
181 struct IDirectDrawSurface2Impl
183 /* IUnknown fields */
184 ICOM_VTABLE(IDirectDrawSurface2
)* lpvtbl
;
186 /* IDirectDrawSurface2 fields */
187 struct _common_directdrawsurface s
;
189 struct _dga_directdrawsurface dga
;
190 struct _xlib_directdrawsurface xlib
;
194 /*****************************************************************************
195 * IDirectDrawSurface3 implementation structure
197 struct IDirectDrawSurface3Impl
199 /* IUnknown fields */
200 ICOM_VTABLE(IDirectDrawSurface3
)* lpvtbl
;
202 /* IDirectDrawSurface3 fields */
203 struct _common_directdrawsurface s
;
205 struct _dga_directdrawsurface dga
;
206 struct _xlib_directdrawsurface xlib
;
210 /*****************************************************************************
211 * IDirectDrawSurface4 implementation structure
213 struct IDirectDrawSurface4Impl
215 /* IUnknown fields */
216 ICOM_VTABLE(IDirectDrawSurface4
)* lpvtbl
;
218 /* IDirectDrawSurface4 fields */
219 struct _common_directdrawsurface s
;
221 struct _dga_directdrawsurface dga
;
222 struct _xlib_directdrawsurface xlib
;
226 /*****************************************************************************
227 * IDirectDrawColorControl implementation structure
229 struct IDirectDrawColorControlImpl
231 /* IUnknown fields */
232 ICOM_VTABLE(IDirectDrawColorControl
)* lpvtbl
;
234 /* IDirectDrawColorControl fields */
239 #endif /* __GRAPHICS_WINE_DDRAW_PRIVATE_H */