2 * Copyright 2000-2001 TransGaming Technologies Inc.
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.
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.
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
19 #ifndef DDRAW_DSURFACE_USER_H_INCLUDED
20 #define DDRAW_DSURFACE_USER_H_INCLUDED
22 #define USER_PRIV(surf) ((User_DirectDrawSurfaceImpl*)((surf)->private))
24 #define USER_PRIV_VAR(name,surf) \
25 User_DirectDrawSurfaceImpl* name = USER_PRIV(surf)
27 struct User_DirectDrawSurfaceImpl_Part
31 HANDLE update_thread, update_event;
36 struct DIB_DirectDrawSurfaceImpl_Part dib;
37 struct User_DirectDrawSurfaceImpl_Part user;
38 } User_DirectDrawSurfaceImpl;
41 User_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl* This,
43 const DDSURFACEDESC2* pDDSD);
46 User_DirectDrawSurface_Create(IDirectDrawImpl *pDD,
47 const DDSURFACEDESC2 *pDDSD,
48 LPDIRECTDRAWSURFACE7 *ppSurf,
51 void User_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This);
53 void User_DirectDrawSurface_lock_update(IDirectDrawSurfaceImpl* This,
54 LPCRECT pRect, DWORD dwFlags);
55 void User_DirectDrawSurface_unlock_update(IDirectDrawSurfaceImpl* This,
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,
68 void User_DirectDrawSurface_flip_update(IDirectDrawSurfaceImpl* This,
70 HWND User_DirectDrawSurface_get_display_window(IDirectDrawSurfaceImpl* This);
72 HRESULT User_DirectDrawSurface_get_dc(IDirectDrawSurfaceImpl* This, HDC* phDC);
73 HRESULT User_DirectDrawSurface_release_dc(IDirectDrawSurfaceImpl* This,
76 HRESULT User_DirectDrawSurface_get_gamma_ramp(IDirectDrawSurfaceImpl* This,
78 LPDDGAMMARAMP lpGammaRamp);
79 HRESULT User_DirectDrawSurface_set_gamma_ramp(IDirectDrawSurfaceImpl* This,
81 LPDDGAMMARAMP lpGammaRamp);