/* Copyright 2001 TransGaming Technologies, Inc. */
#ifndef WINE_DDRAW_DDRAW_HAL_H_INCLUDED
#define WINE_DDRAW_DDRAW_HAL_H_INCLUDED

#define HAL_DDRAW_PRIV(ddraw) \
	((HAL_DirectDrawImpl*)((ddraw)->private))
#define HAL_DDRAW_PRIV_VAR(name,ddraw) \
	HAL_DirectDrawImpl* name = HAL_DDRAW_PRIV(ddraw)

typedef struct
{
    DWORD next_vofs;
} HAL_DirectDrawImpl_Part;

typedef struct
{
    User_DirectDrawImpl_Part user;
    HAL_DirectDrawImpl_Part hal;
} HAL_DirectDrawImpl;

void HAL_DirectDraw_final_release(IDirectDrawImpl* This);
HRESULT HAL_DirectDraw_create_primary(IDirectDrawImpl* This,
				      const DDSURFACEDESC2* pDDSD,
				      LPDIRECTDRAWSURFACE7* ppSurf,
				      LPUNKNOWN pUnkOuter);
HRESULT HAL_DirectDraw_create_backbuffer(IDirectDrawImpl* This,
					 const DDSURFACEDESC2* pDDSD,
					 LPDIRECTDRAWSURFACE7* ppSurf,
					 LPUNKNOWN pUnkOuter,
					 IDirectDrawSurfaceImpl* primary);
HRESULT HAL_DirectDraw_create_offscreen(IDirectDrawImpl* This,
					const DDSURFACEDESC2* pDDSD,
					LPDIRECTDRAWSURFACE7* ppSurf,
					LPUNKNOWN pUnkOuter);
HRESULT HAL_DirectDraw_create_texture(IDirectDrawImpl* This,
				      const DDSURFACEDESC2* pDDSD,
				      LPDIRECTDRAWSURFACE7* ppSurf,
				      LPUNKNOWN pUnkOuter,
				      DWORD dwMipMapLevel);
HRESULT HAL_DirectDraw_create_zbuffer(IDirectDrawImpl* This,
				      const DDSURFACEDESC2* pDDSD,
				      LPDIRECTDRAWSURFACE7* ppSurf,
				      LPUNKNOWN pUnkOuter);
HRESULT HAL_DirectDraw_create_exebuffer(IDirectDrawImpl* This,
					const DDSURFACEDESC2* pDDSD,
					LPDIRECTDRAWSURFACE7* ppSurf,
					LPUNKNOWN pUnkOuter);
HRESULT HAL_DirectDraw_enum_3ddevices(IDirectDrawImpl *This, LPVOID lpContext,
				      enum_3ddevice_cb cb);
HRESULT HAL_DirectDraw_create_3ddevice(IDirectDrawImpl *This, REFCLSID rclsid,
				       LPDIRECTDRAWSURFACE7 pSurf,
				       LPDIRECT3DDEVICE7* ppd3dd,
				       LPUNKNOWN pUnkOuter);

HRESULT HAL_DirectDraw_Construct(IDirectDrawImpl *This, BOOL ex);
HRESULT HAL_DirectDraw_Create(const GUID* pGUID, LPDIRECTDRAW7* pIface,
				   IUnknown* pUnkOuter, BOOL ex);


HRESULT WINAPI
HAL_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
					LPDDDEVICEIDENTIFIER2 pDDDI,
					DWORD dwFlags);
HRESULT WINAPI
HAL_DirectDraw_SetDisplayMode(LPDIRECTDRAW7 iface, DWORD dwWidth,
				   DWORD dwHeight, DWORD dwBPP,
				   DWORD dwRefreshRate, DWORD dwFlags);
HRESULT WINAPI
HAL_DirectDraw_RestoreDisplayMode(LPDIRECTDRAW7 iface);

BOOL HAL_DirectDraw_GetDriverInfo(IDirectDrawImpl* This,
				  const GUID* guidInfo,
				  LPVOID lpData,
				  DWORD dwExpectedSize);

#endif
