From 1e48f0970cbd70182d901545aa850d7ac1bd0559 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 4 Jan 2005 12:12:19 +0000 Subject: [PATCH] Remove the no longer needed DCE_ExcludeRgn function and DCX_KEEPCLIPRGN style. --- include/dce.h | 3 --- windows/dce.c | 52 +++++++--------------------------------------------- 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/include/dce.h b/include/dce.h index 3e6555b7835..0fc81751681 100644 --- a/include/dce.h +++ b/include/dce.h @@ -28,8 +28,6 @@ #define DCX_DCEBUSY 0x00001000 #define DCX_DCEDIRTY 0x00002000 #define DCX_WINDOWPAINT 0x00020000 -#define DCX_KEEPCLIPRGN 0x00040000 -#define DCX_NOCLIPCHILDREN 0x00080000 typedef enum { @@ -53,7 +51,6 @@ typedef struct tagDCE extern DCE* DCE_AllocDCE( HWND hWnd, DCE_TYPE type ); extern DCE* DCE_FreeDCE( DCE *dce ); extern void DCE_FreeWindowDCE( HWND ); -extern INT DCE_ExcludeRgn( HDC, HWND, HRGN ); extern BOOL DCE_InvalidateDCE( HWND, const RECT* ); #endif /* __WINE_DCE_H */ diff --git a/windows/dce.c b/windows/dce.c index 79f46d84ee4..8f0c63e68bc 100644 --- a/windows/dce.c +++ b/windows/dce.c @@ -27,7 +27,6 @@ * DCX_DCEEMPTY - dce is uninitialized * DCX_DCEBUSY - dce is in use * DCX_DCEDIRTY - ReleaseDC() should wipe instead of caching - * DCX_KEEPCLIPRGN - ReleaseDC() should not delete the clipping region * DCX_WINDOWPAINT - BeginPaint() is in effect */ @@ -143,8 +142,7 @@ DCE* DCE_FreeDCE( DCE *dce ) SetDCHook(dce->hDC, NULL, 0L); DeleteDC( dce->hDC ); - if( dce->hClipRgn && !(dce->DCXflags & DCX_KEEPCLIPRGN) ) - DeleteObject(dce->hClipRgn); + if (dce->hClipRgn) DeleteObject(dce->hClipRgn); HeapFree( GetProcessHeap(), 0, dce ); return ret; @@ -216,12 +214,7 @@ static void DCE_DeleteClipRgn( DCE* dce ) { dce->DCXflags &= ~(DCX_EXCLUDERGN | DCX_INTERSECTRGN | DCX_WINDOWPAINT); - if( dce->DCXflags & DCX_KEEPCLIPRGN ) - dce->DCXflags &= ~DCX_KEEPCLIPRGN; - else - if( dce->hClipRgn > (HRGN)1 ) - DeleteObject( dce->hClipRgn ); - + if (dce->hClipRgn) DeleteObject( dce->hClipRgn ); dce->hClipRgn = 0; /* make it dirty so that the vis rgn gets recomputed next time */ @@ -337,34 +330,6 @@ BOOL DCE_InvalidateDCE(HWND hwnd, const RECT* pRectUpdate) /*********************************************************************** - * DCE_ExcludeRgn - * - * Translate given region from the wnd client to the DC coordinates - * and add it to the clipping region. - */ -INT DCE_ExcludeRgn( HDC hDC, HWND hwnd, HRGN hRgn ) -{ - POINT pt = {0, 0}; - DCE *dce = firstDCE; - - while (dce && (dce->hDC != hDC)) dce = dce->next; - if (!dce) return ERROR; - - MapWindowPoints( hwnd, dce->hwndCurrent, &pt, 1); - if( dce->DCXflags & DCX_WINDOW ) - { - WND *wnd = WIN_FindWndPtr(dce->hwndCurrent); - pt.x += wnd->rectClient.left - wnd->rectWindow.left; - pt.y += wnd->rectClient.top - wnd->rectWindow.top; - WIN_ReleaseWndPtr(wnd); - } - OffsetRgn(hRgn, pt.x, pt.y); - - return ExtSelectClipRgn( hDC, hRgn, RGN_DIFF ); -} - - -/*********************************************************************** * GetDCEx (USER32.@) * * Unimplemented flags: DCX_LOCKWINDOWUPDATE @@ -514,7 +479,7 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags ) dce->hClipRgn = hrgnClip; dce->DCXflags = flags & (DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_CACHE | DCX_WINDOW | DCX_WINDOWPAINT | - DCX_KEEPCLIPRGN | DCX_INTERSECTRGN | DCX_EXCLUDERGN); + DCX_INTERSECTRGN | DCX_EXCLUDERGN); dce->DCXflags |= DCX_DCEBUSY; dce->DCXflags &= ~DCX_DCEDIRTY; hdc = dce->hDC; @@ -540,9 +505,8 @@ END: * Success: Handle to the device context * Failure: NULL. */ -HDC WINAPI GetDC( - HWND hwnd /* [in] handle of window - may be NULL */ -) { +HDC WINAPI GetDC( HWND hwnd ) +{ if (!hwnd) return GetDCEx( 0, 0, DCX_CACHE | DCX_WINDOW ); return GetDCEx( hwnd, 0, DCX_USESTYLE ); @@ -567,10 +531,8 @@ HDC WINAPI GetWindowDC( HWND hwnd ) * Success: Non-zero. Resources used by hdc are released. * Failure: 0. */ -INT WINAPI ReleaseDC( - HWND hwnd, /* [in] Handle of window - ignored */ - HDC hdc /* [in] Handle of device context */ -) { +INT WINAPI ReleaseDC( HWND hwnd, HDC hdc ) +{ DCE * dce; INT nRet = 0; -- 2.11.4.GIT