Commit e33cdf89 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Use NtGdiResetDC for ResetDCW.

parent c0e7df8b
......@@ -770,17 +770,18 @@ BOOL WINAPI DeleteDC( HDC hdc )
/***********************************************************************
* ResetDCW (GDI32.@)
* NtGdiResetDC (win32u.@)
*/
HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
BOOL WINAPI NtGdiResetDC( HDC hdc, const DEVMODEW *devmode, BOOL *banding,
DRIVER_INFO_2W *driver_info, void *dev )
{
DC *dc;
HDC ret = 0;
BOOL ret = FALSE;
if ((dc = get_dc_ptr( hdc )))
{
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pResetDC );
ret = physdev->funcs->pResetDC( physdev, devmode );
ret = physdev->funcs->pResetDC( physdev, devmode ) != 0;
if (ret) /* reset the visible region */
{
dc->dirty = 0;
......@@ -788,7 +789,7 @@ HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
dc->attr->vis_rect.top = 0;
dc->attr->vis_rect.right = GetDeviceCaps( hdc, DESKTOPHORZRES );
dc->attr->vis_rect.bottom = GetDeviceCaps( hdc, DESKTOPVERTRES );
if (dc->hVisRgn) DeleteObject( dc->hVisRgn );
if (dc->hVisRgn) NtGdiDeleteObjectApp( dc->hVisRgn );
dc->hVisRgn = 0;
update_dc_clipping( dc );
}
......@@ -996,7 +997,7 @@ BOOL WINAPI CombineTransform( LPXFORM xformResult, const XFORM *xform1,
/***********************************************************************
* SetDCHook (GDI32.@)
* SetDCHook (win32u.@)
*
* Note: this doesn't exist in Win32, we add it here because user32 needs it.
*/
......@@ -1014,7 +1015,7 @@ BOOL WINAPI SetDCHook( HDC hdc, DCHOOKPROC hookProc, DWORD_PTR dwHookData )
/***********************************************************************
* GetDCHook (GDI32.@)
* GetDCHook (win32u.@)
*
* Note: this doesn't exist in Win32, we add it here because user32 needs it.
*/
......@@ -1032,7 +1033,7 @@ DWORD_PTR WINAPI GetDCHook( HDC hdc, DCHOOKPROC *proc )
/***********************************************************************
* SetHookFlags (GDI32.@)
* SetHookFlags (win32u.@)
*
* Note: this doesn't exist in Win32, we add it here because user32 needs it.
*/
......
......@@ -720,9 +720,9 @@ static BOOL CDECL nulldrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right,
return TRUE;
}
static HDC CDECL nulldrv_ResetDC( PHYSDEV dev, const DEVMODEW *devmode )
static BOOL CDECL nulldrv_ResetDC( PHYSDEV dev, const DEVMODEW *devmode )
{
return 0;
return FALSE;
}
static BOOL CDECL nulldrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
......
......@@ -113,6 +113,14 @@ HDC WINAPI ResetDCA( HDC hdc, const DEVMODEA *devmode )
}
/***********************************************************************
* ResetDCW (GDI32.@)
*/
HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
{
return NtGdiResetDC( hdc, devmode, NULL, NULL, NULL ) ? hdc : 0;
}
/***********************************************************************
* SaveDC (GDI32.@)
*/
INT WINAPI SaveDC( HDC hdc )
......
......@@ -448,7 +448,7 @@ static BOOL CDECL PSDRV_DeleteDC( PHYSDEV dev )
/**********************************************************************
* ResetDC (WINEPS.@)
*/
static HDC CDECL PSDRV_ResetDC( PHYSDEV dev, const DEVMODEW *lpInitData )
static BOOL CDECL PSDRV_ResetDC( PHYSDEV dev, const DEVMODEW *lpInitData )
{
PSDRV_PDEVICE *physDev = get_psdrv_dev( dev );
......@@ -457,7 +457,7 @@ static HDC CDECL PSDRV_ResetDC( PHYSDEV dev, const DEVMODEW *lpInitData )
PSDRV_MergeDevmodes(physDev->Devmode, (const PSDRV_DEVMODE *)lpInitData, physDev->pi);
PSDRV_UpdateDevCaps(physDev);
}
return dev->hdc;
return TRUE;
}
/***********************************************************************
......
......@@ -20,6 +20,7 @@
#define _NTGDI_
#include <wingdi.h>
#include <winspool.h>
typedef struct _GDI_HANDLE_ENTRY
{
......@@ -268,7 +269,8 @@ BOOL WINAPI NtGdiPtVisible( HDC hdc, INT x, INT y );
BOOL WINAPI NtGdiRectInRegion( HRGN hrgn, const RECT *rect );
BOOL WINAPI NtGdiRectVisible( HDC hdc, const RECT *rect );
BOOL WINAPI NtGdiRectangle( HDC hdc, INT left, INT top, INT right, INT bottom );
HDC WINAPI NtGdiResetDC( HDC hdc, const DEVMODEW *devmode );
BOOL WINAPI NtGdiResetDC( HDC hdc, const DEVMODEW *devmode, BOOL *banding,
DRIVER_INFO_2W *driver_info, void *dev );
BOOL WINAPI NtGdiResizePalette( HPALETTE palette, UINT count );
BOOL WINAPI NtGdiRestoreDC( HDC hdc, INT level );
BOOL WINAPI NtGdiRoundRect( HDC hdc, INT left, INT top, INT right,
......
......@@ -137,7 +137,7 @@ struct gdi_dc_funcs
UINT (CDECL *pRealizeDefaultPalette)(PHYSDEV);
UINT (CDECL *pRealizePalette)(PHYSDEV,HPALETTE,BOOL);
BOOL (CDECL *pRectangle)(PHYSDEV,INT,INT,INT,INT);
HDC (CDECL *pResetDC)(PHYSDEV,const DEVMODEW*);
BOOL (CDECL *pResetDC)(PHYSDEV,const DEVMODEW*);
BOOL (CDECL *pRoundRect)(PHYSDEV,INT,INT,INT,INT,INT,INT);
HBITMAP (CDECL *pSelectBitmap)(PHYSDEV,HBITMAP);
HBRUSH (CDECL *pSelectBrush)(PHYSDEV,HBRUSH,const struct brush_pattern*);
......@@ -169,7 +169,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 63
#define WINE_GDI_DRIVER_VERSION 64
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment