2002-03-10 00:29:33 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2000-2001 TransGaming Technologies Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
2001-01-04 23:44:55 +01:00
|
|
|
|
|
|
|
#ifndef DDRAW_DSURFACE_USER_H_INCLUDED
|
|
|
|
#define DDRAW_DSURFACE_USER_H_INCLUDED
|
|
|
|
|
|
|
|
#define USER_PRIV(surf) ((User_DirectDrawSurfaceImpl*)((surf)->private))
|
|
|
|
|
|
|
|
#define USER_PRIV_VAR(name,surf) \
|
|
|
|
User_DirectDrawSurfaceImpl* name = USER_PRIV(surf)
|
|
|
|
|
|
|
|
struct User_DirectDrawSurfaceImpl_Part
|
|
|
|
{
|
|
|
|
HWND window;
|
|
|
|
HDC cached_dc;
|
2002-07-20 22:01:57 +02:00
|
|
|
HANDLE update_thread, update_event, refresh_event;
|
|
|
|
volatile int wait_count, in_refresh;
|
|
|
|
CRITICAL_SECTION crit;
|
2001-01-04 23:44:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
struct DIB_DirectDrawSurfaceImpl_Part dib;
|
|
|
|
struct User_DirectDrawSurfaceImpl_Part user;
|
|
|
|
} User_DirectDrawSurfaceImpl;
|
|
|
|
|
|
|
|
HRESULT
|
|
|
|
User_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl* This,
|
|
|
|
IDirectDrawImpl* pDD,
|
|
|
|
const DDSURFACEDESC2* pDDSD);
|
|
|
|
|
|
|
|
HRESULT
|
|
|
|
User_DirectDrawSurface_Create(IDirectDrawImpl *pDD,
|
|
|
|
const DDSURFACEDESC2 *pDDSD,
|
|
|
|
LPDIRECTDRAWSURFACE7 *ppSurf,
|
|
|
|
IUnknown *pUnkOuter);
|
|
|
|
|
|
|
|
void User_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This);
|
|
|
|
|
|
|
|
void User_DirectDrawSurface_lock_update(IDirectDrawSurfaceImpl* This,
|
2001-09-11 01:12:16 +02:00
|
|
|
LPCRECT pRect, DWORD dwFlags);
|
2001-01-04 23:44:55 +01:00
|
|
|
void User_DirectDrawSurface_unlock_update(IDirectDrawSurfaceImpl* This,
|
|
|
|
LPCRECT pRect);
|
|
|
|
void User_DirectDrawSurface_set_palette(IDirectDrawSurfaceImpl* This,
|
|
|
|
IDirectDrawPaletteImpl* pal);
|
|
|
|
void User_DirectDrawSurface_update_palette(IDirectDrawSurfaceImpl* This,
|
|
|
|
IDirectDrawPaletteImpl* pal,
|
|
|
|
DWORD dwStart, DWORD dwCount,
|
|
|
|
LPPALETTEENTRY palent);
|
|
|
|
HRESULT User_DirectDrawSurface_duplicate_surface(IDirectDrawSurfaceImpl* This,
|
|
|
|
LPDIRECTDRAWSURFACE7* ppDup);
|
2001-04-16 21:06:13 +02:00
|
|
|
BOOL User_DirectDrawSurface_flip_data(IDirectDrawSurfaceImpl* front,
|
|
|
|
IDirectDrawSurfaceImpl* back,
|
|
|
|
DWORD dwFlags);
|
|
|
|
void User_DirectDrawSurface_flip_update(IDirectDrawSurfaceImpl* This,
|
|
|
|
DWORD dwFlags);
|
2001-01-04 23:44:55 +01:00
|
|
|
HWND User_DirectDrawSurface_get_display_window(IDirectDrawSurfaceImpl* This);
|
|
|
|
|
|
|
|
HRESULT User_DirectDrawSurface_get_dc(IDirectDrawSurfaceImpl* This, HDC* phDC);
|
|
|
|
HRESULT User_DirectDrawSurface_release_dc(IDirectDrawSurfaceImpl* This,
|
|
|
|
HDC hDC);
|
|
|
|
|
2001-04-17 19:34:11 +02:00
|
|
|
HRESULT User_DirectDrawSurface_get_gamma_ramp(IDirectDrawSurfaceImpl* This,
|
|
|
|
DWORD dwFlags,
|
|
|
|
LPDDGAMMARAMP lpGammaRamp);
|
|
|
|
HRESULT User_DirectDrawSurface_set_gamma_ramp(IDirectDrawSurfaceImpl* This,
|
|
|
|
DWORD dwFlags,
|
|
|
|
LPDDGAMMARAMP lpGammaRamp);
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
#endif
|