Map PrintDlg16 to PrintDlgA.
[wine.git] / graphics / ddraw_private.h
blobe5d8587e2805897990e9505d68df89c82198ba8b
1 #ifndef __GRAPHICS_WINE_DDRAW_PRIVATE_H
2 #define __GRAPHICS_WINE_DDRAW_PRIVATE_H
4 #include "ddraw.h"
5 #include "winuser.h"
7 /*****************************************************************************
8 * Predeclare the interface implementation structures
9 */
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
28 /* IUnknown fields */
29 ICOM_VTABLE(IDirectDrawPalette)* lpvtbl;
30 DWORD ref;
31 /* IDirectDrawPalette fields */
32 IDirectDrawImpl* ddraw;
33 Colormap cm;
34 PALETTEENTRY palents[256];
35 int installed;
36 /* This is to store the palette in 'screen format' */
37 int screen_palents[256];
40 /*****************************************************************************
41 * IDirectDrawClipper implementation structure
43 struct IDirectDrawClipperImpl
45 /* IUnknown fields */
46 ICOM_VTABLE(IDirectDrawClipper)* lpvtbl;
47 DWORD ref;
48 /* IDirectDrawClipper fields */
49 /* none */
52 /*****************************************************************************
53 * IDirectDraw implementation structure
55 struct _common_directdrawdata
57 DDPIXELFORMAT directdraw_pixelformat;
58 DDPIXELFORMAT screen_pixelformat;
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; /* 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) */
67 ATOM winclass;
68 HWND window;
69 Window drawable;
70 PAINTSTRUCT ps;
71 int paintable;
74 struct _dga_directdrawdata
76 DWORD fb_width,fb_height,fb_banksize,fb_memsize;
77 void* fb_addr;
78 unsigned int vpmask;
81 struct _xlib_directdrawdata
83 #ifdef HAVE_LIBXXSHM
84 int xshm_active;
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
94 /* IUnknown fields */
95 ICOM_VTABLE(IDirectDraw)* lpvtbl;
96 DWORD ref;
97 /* IDirectDraw fields */
98 struct _common_directdrawdata d;
99 union {
100 struct _xlib_directdrawdata xlib;
101 struct _dga_directdrawdata dga;
102 } e;
105 /*****************************************************************************
106 * IDirectDraw2 implementation structure
108 struct IDirectDraw2Impl
110 /* IUnknown fields */
111 ICOM_VTABLE(IDirectDraw2)* lpvtbl;
112 DWORD ref;
113 /* IDirectDraw2 fields */
114 struct _common_directdrawdata d;
115 union {
116 struct _xlib_directdrawdata xlib;
117 struct _dga_directdrawdata dga;
118 } e;
121 /*****************************************************************************
122 * IDirectDraw4 implementation structure
124 struct IDirectDraw4Impl
126 /* IUnknown fields */
127 ICOM_VTABLE(IDirectDraw4)* lpvtbl;
128 DWORD ref;
129 /* IDirectDraw4 fields */
130 struct _common_directdrawdata d;
131 union {
132 struct _xlib_directdrawdata xlib;
133 struct _dga_directdrawdata dga;
134 } e;
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 */
150 HBITMAP DIBsection;
151 void *bitmap_data;
152 HDC hdc;
153 HGDIOBJ holdbitmap;
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) */
160 void *d3d_device;
163 struct _dga_directdrawsurface
165 DWORD fb_height;
168 struct _xlib_directdrawsurface
170 XImage *image;
171 #ifdef HAVE_LIBXXSHM
172 XShmSegmentInfo shminfo;
173 #endif
176 struct IDirectDrawSurfaceImpl
178 /* IUnknown fields */
179 ICOM_VTABLE(IDirectDrawSurface)* lpvtbl;
180 DWORD ref;
181 /* IDirectDrawSurface fields */
182 struct _common_directdrawsurface s;
183 union {
184 struct _dga_directdrawsurface dga;
185 struct _xlib_directdrawsurface xlib;
186 } t;
189 /*****************************************************************************
190 * IDirectDrawSurface2 implementation structure
192 struct IDirectDrawSurface2Impl
194 /* IUnknown fields */
195 ICOM_VTABLE(IDirectDrawSurface2)* lpvtbl;
196 DWORD ref;
197 /* IDirectDrawSurface2 fields */
198 struct _common_directdrawsurface s;
199 union {
200 struct _dga_directdrawsurface dga;
201 struct _xlib_directdrawsurface xlib;
202 } t;
205 /*****************************************************************************
206 * IDirectDrawSurface3 implementation structure
208 struct IDirectDrawSurface3Impl
210 /* IUnknown fields */
211 ICOM_VTABLE(IDirectDrawSurface3)* lpvtbl;
212 DWORD ref;
213 /* IDirectDrawSurface3 fields */
214 struct _common_directdrawsurface s;
215 union {
216 struct _dga_directdrawsurface dga;
217 struct _xlib_directdrawsurface xlib;
218 } t;
221 /*****************************************************************************
222 * IDirectDrawSurface4 implementation structure
224 struct IDirectDrawSurface4Impl
226 /* IUnknown fields */
227 ICOM_VTABLE(IDirectDrawSurface4)* lpvtbl;
228 DWORD ref;
229 /* IDirectDrawSurface4 fields */
230 struct _common_directdrawsurface s;
231 union {
232 struct _dga_directdrawsurface dga;
233 struct _xlib_directdrawsurface xlib;
234 } t;
237 struct _surface_chain {
238 IDirectDrawSurface4Impl **surfaces;
239 int nrofsurfaces;
242 /*****************************************************************************
243 * IDirectDrawColorControl implementation structure
245 struct IDirectDrawColorControlImpl
247 /* IUnknown fields */
248 ICOM_VTABLE(IDirectDrawColorControl)* lpvtbl;
249 DWORD ref;
250 /* IDirectDrawColorControl fields */
251 /* none */
255 #endif /* __GRAPHICS_WINE_DDRAW_PRIVATE_H */