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_DIB_H_INCLUDED
20 #define DDRAW_DSURFACE_DIB_H_INCLUDED
22 #define DIB_PRIV(surf) ((DIB_DirectDrawSurfaceImpl*)((surf)->private))
24 #define DIB_PRIV_VAR(name, surf) \
25 DIB_DirectDrawSurfaceImpl* name = DIB_PRIV(surf)
28 struct DIB_DirectDrawSurfaceImpl_Part
34 DWORD d3d_data
[4]; /* room for Direct3D driver data */
39 struct DIB_DirectDrawSurfaceImpl_Part dib
;
40 } DIB_DirectDrawSurfaceImpl
;
43 DIB_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl
*This
,
45 const DDSURFACEDESC2
*pDDSD
);
47 DIB_DirectDrawSurface_Create(IDirectDrawImpl
*pDD
,
48 const DDSURFACEDESC2
*pDDSD
,
49 LPDIRECTDRAWSURFACE7
*ppSurf
,
52 void DIB_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl
* This
);
53 BOOL
DIB_DirectDrawSurface_flip_data(IDirectDrawSurfaceImpl
* front
,
54 IDirectDrawSurfaceImpl
* back
,
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
);
64 HRESULT
DIB_DirectDrawSurface_get_dc(IDirectDrawSurfaceImpl
* This
, HDC
* phDC
);
65 HRESULT
DIB_DirectDrawSurface_release_dc(IDirectDrawSurfaceImpl
* This
,HDC hDC
);
67 HRESULT
DIB_DirectDrawSurface_alloc_dc(IDirectDrawSurfaceImpl
* This
,HDC
* phDC
);
68 HRESULT
DIB_DirectDrawSurface_free_dc(IDirectDrawSurfaceImpl
* This
, HDC hDC
);
72 DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface
, LPRECT prcDest
,
73 LPDIRECTDRAWSURFACE7 pSrcSurf
, LPRECT prcSrc
,
74 DWORD dwFlags
, LPDDBLTFX pBltFx
);
76 DIB_DirectDrawSurface_BltFast(LPDIRECTDRAWSURFACE7 iface
, DWORD dwX
,
77 DWORD dwY
, LPDIRECTDRAWSURFACE7 pSrcSurf
,
78 LPRECT prcSrc
, DWORD dwTrans
);
80 DIB_DirectDrawSurface_Restore(LPDIRECTDRAWSURFACE7 iface
);
82 DIB_DirectDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface
,
83 LPDDSURFACEDESC2 pDDSD
, DWORD dwFlags
);