Added regedit unit test, a couple minor changes to regedit.
[wine] / dlls / ddraw / dsurface / user.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_USER_H_INCLUDED
20 #define DDRAW_DSURFACE_USER_H_INCLUDED
21
22 #define USER_PRIV(surf) ((User_DirectDrawSurfaceImpl*)((surf)->private))
23
24 #define USER_PRIV_VAR(name,surf) \
25         User_DirectDrawSurfaceImpl* name = USER_PRIV(surf)
26
27 struct User_DirectDrawSurfaceImpl_Part
28 {
29     HWND window;
30     HDC cached_dc;
31     HANDLE update_thread, update_event;
32 };
33
34 typedef struct
35 {
36     struct DIB_DirectDrawSurfaceImpl_Part dib;
37     struct User_DirectDrawSurfaceImpl_Part user;
38 } User_DirectDrawSurfaceImpl;
39
40 HRESULT
41 User_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl* This,
42                                  IDirectDrawImpl* pDD,
43                                  const DDSURFACEDESC2* pDDSD);
44
45 HRESULT
46 User_DirectDrawSurface_Create(IDirectDrawImpl *pDD,
47                               const DDSURFACEDESC2 *pDDSD,
48                               LPDIRECTDRAWSURFACE7 *ppSurf,
49                               IUnknown *pUnkOuter);
50
51 void User_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This);
52
53 void User_DirectDrawSurface_lock_update(IDirectDrawSurfaceImpl* This,
54                                         LPCRECT pRect, DWORD dwFlags);
55 void User_DirectDrawSurface_unlock_update(IDirectDrawSurfaceImpl* This,
56                                           LPCRECT pRect);
57 void User_DirectDrawSurface_set_palette(IDirectDrawSurfaceImpl* This,
58                                         IDirectDrawPaletteImpl* pal);
59 void User_DirectDrawSurface_update_palette(IDirectDrawSurfaceImpl* This,
60                                            IDirectDrawPaletteImpl* pal,
61                                            DWORD dwStart, DWORD dwCount,
62                                            LPPALETTEENTRY palent);
63 HRESULT User_DirectDrawSurface_duplicate_surface(IDirectDrawSurfaceImpl* This,
64                                                  LPDIRECTDRAWSURFACE7* ppDup);
65 BOOL User_DirectDrawSurface_flip_data(IDirectDrawSurfaceImpl* front,
66                                       IDirectDrawSurfaceImpl* back,
67                                       DWORD dwFlags);
68 void User_DirectDrawSurface_flip_update(IDirectDrawSurfaceImpl* This,
69                                         DWORD dwFlags);
70 HWND User_DirectDrawSurface_get_display_window(IDirectDrawSurfaceImpl* This);
71
72 HRESULT User_DirectDrawSurface_get_dc(IDirectDrawSurfaceImpl* This, HDC* phDC);
73 HRESULT User_DirectDrawSurface_release_dc(IDirectDrawSurfaceImpl* This,
74                                           HDC hDC);
75
76 HRESULT User_DirectDrawSurface_get_gamma_ramp(IDirectDrawSurfaceImpl* This,
77                                               DWORD dwFlags,
78                                               LPDDGAMMARAMP lpGammaRamp);
79 HRESULT User_DirectDrawSurface_set_gamma_ramp(IDirectDrawSurfaceImpl* This,
80                                               DWORD dwFlags,
81                                               LPDDGAMMARAMP lpGammaRamp);
82
83 #endif