Added regedit unit test, a couple minor changes to regedit.
[wine] / dlls / ddraw / dsurface / dib.h
1 /*
2  * Copyright 2000-2001 TransGaming Technologies Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef DDRAW_DSURFACE_DIB_H_INCLUDED
20 #define DDRAW_DSURFACE_DIB_H_INCLUDED
21
22 #define DIB_PRIV(surf) ((DIB_DirectDrawSurfaceImpl*)((surf)->private))
23
24 #define DIB_PRIV_VAR(name, surf) \
25         DIB_DirectDrawSurfaceImpl* name = DIB_PRIV(surf)
26
27
28 struct DIB_DirectDrawSurfaceImpl_Part
29 {
30     HBITMAP DIBsection;
31     void* bitmap_data;
32     HGDIOBJ holdbitmap;
33     BOOL client_memory;
34     DWORD d3d_data[4]; /* room for Direct3D driver data */
35 };
36
37 typedef struct
38 {
39     struct DIB_DirectDrawSurfaceImpl_Part dib;
40 } DIB_DirectDrawSurfaceImpl;
41
42 HRESULT
43 DIB_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl *This,
44                                 IDirectDrawImpl *pDD,
45                                 const DDSURFACEDESC2 *pDDSD);
46 HRESULT
47 DIB_DirectDrawSurface_Create(IDirectDrawImpl *pDD,
48                              const DDSURFACEDESC2 *pDDSD,
49                              LPDIRECTDRAWSURFACE7 *ppSurf,
50                              IUnknown *pUnkOuter);
51
52 void DIB_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This);
53 BOOL DIB_DirectDrawSurface_flip_data(IDirectDrawSurfaceImpl* front,
54                                      IDirectDrawSurfaceImpl* back,
55                                      DWORD dwFlags);
56
57 void DIB_DirectDrawSurface_set_palette(IDirectDrawSurfaceImpl* This,
58                                        IDirectDrawPaletteImpl* pal);
59 void DIB_DirectDrawSurface_update_palette(IDirectDrawSurfaceImpl* This,
60                                           IDirectDrawPaletteImpl* pal,
61                                           DWORD dwStart, DWORD dwCount,
62                                           LPPALETTEENTRY palent);
63
64 HRESULT DIB_DirectDrawSurface_get_dc(IDirectDrawSurfaceImpl* This, HDC* phDC);
65 HRESULT DIB_DirectDrawSurface_release_dc(IDirectDrawSurfaceImpl* This,HDC hDC);
66
67 HRESULT DIB_DirectDrawSurface_alloc_dc(IDirectDrawSurfaceImpl* This,HDC* phDC);
68 HRESULT DIB_DirectDrawSurface_free_dc(IDirectDrawSurfaceImpl* This, HDC hDC);
69
70
71 HRESULT WINAPI
72 DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT prcDest,
73                           LPDIRECTDRAWSURFACE7 pSrcSurf, LPRECT prcSrc,
74                           DWORD dwFlags, LPDDBLTFX pBltFx);
75 HRESULT WINAPI
76 DIB_DirectDrawSurface_BltFast(LPDIRECTDRAWSURFACE7 iface, DWORD dwX,
77                               DWORD dwY, LPDIRECTDRAWSURFACE7 pSrcSurf,
78                               LPRECT prcSrc, DWORD dwTrans);
79 HRESULT WINAPI
80 DIB_DirectDrawSurface_Restore(LPDIRECTDRAWSURFACE7 iface);
81 HRESULT WINAPI
82 DIB_DirectDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
83                                      LPDDSURFACEDESC2 pDDSD, DWORD dwFlags);
84 #endif