Remove the no longer needed DCE_ExcludeRgn function and
DCX_KEEPCLIPRGN style.
This commit is contained in:
parent
aef0d18d97
commit
1e48f0970c
|
@ -28,8 +28,6 @@
|
||||||
#define DCX_DCEBUSY 0x00001000
|
#define DCX_DCEBUSY 0x00001000
|
||||||
#define DCX_DCEDIRTY 0x00002000
|
#define DCX_DCEDIRTY 0x00002000
|
||||||
#define DCX_WINDOWPAINT 0x00020000
|
#define DCX_WINDOWPAINT 0x00020000
|
||||||
#define DCX_KEEPCLIPRGN 0x00040000
|
|
||||||
#define DCX_NOCLIPCHILDREN 0x00080000
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
@ -53,7 +51,6 @@ typedef struct tagDCE
|
||||||
extern DCE* DCE_AllocDCE( HWND hWnd, DCE_TYPE type );
|
extern DCE* DCE_AllocDCE( HWND hWnd, DCE_TYPE type );
|
||||||
extern DCE* DCE_FreeDCE( DCE *dce );
|
extern DCE* DCE_FreeDCE( DCE *dce );
|
||||||
extern void DCE_FreeWindowDCE( HWND );
|
extern void DCE_FreeWindowDCE( HWND );
|
||||||
extern INT DCE_ExcludeRgn( HDC, HWND, HRGN );
|
|
||||||
extern BOOL DCE_InvalidateDCE( HWND, const RECT* );
|
extern BOOL DCE_InvalidateDCE( HWND, const RECT* );
|
||||||
|
|
||||||
#endif /* __WINE_DCE_H */
|
#endif /* __WINE_DCE_H */
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
* DCX_DCEEMPTY - dce is uninitialized
|
* DCX_DCEEMPTY - dce is uninitialized
|
||||||
* DCX_DCEBUSY - dce is in use
|
* DCX_DCEBUSY - dce is in use
|
||||||
* DCX_DCEDIRTY - ReleaseDC() should wipe instead of caching
|
* DCX_DCEDIRTY - ReleaseDC() should wipe instead of caching
|
||||||
* DCX_KEEPCLIPRGN - ReleaseDC() should not delete the clipping region
|
|
||||||
* DCX_WINDOWPAINT - BeginPaint() is in effect
|
* DCX_WINDOWPAINT - BeginPaint() is in effect
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -143,8 +142,7 @@ DCE* DCE_FreeDCE( DCE *dce )
|
||||||
SetDCHook(dce->hDC, NULL, 0L);
|
SetDCHook(dce->hDC, NULL, 0L);
|
||||||
|
|
||||||
DeleteDC( dce->hDC );
|
DeleteDC( dce->hDC );
|
||||||
if( dce->hClipRgn && !(dce->DCXflags & DCX_KEEPCLIPRGN) )
|
if (dce->hClipRgn) DeleteObject(dce->hClipRgn);
|
||||||
DeleteObject(dce->hClipRgn);
|
|
||||||
HeapFree( GetProcessHeap(), 0, dce );
|
HeapFree( GetProcessHeap(), 0, dce );
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -216,12 +214,7 @@ static void DCE_DeleteClipRgn( DCE* dce )
|
||||||
{
|
{
|
||||||
dce->DCXflags &= ~(DCX_EXCLUDERGN | DCX_INTERSECTRGN | DCX_WINDOWPAINT);
|
dce->DCXflags &= ~(DCX_EXCLUDERGN | DCX_INTERSECTRGN | DCX_WINDOWPAINT);
|
||||||
|
|
||||||
if( dce->DCXflags & DCX_KEEPCLIPRGN )
|
if (dce->hClipRgn) DeleteObject( dce->hClipRgn );
|
||||||
dce->DCXflags &= ~DCX_KEEPCLIPRGN;
|
|
||||||
else
|
|
||||||
if( dce->hClipRgn > (HRGN)1 )
|
|
||||||
DeleteObject( dce->hClipRgn );
|
|
||||||
|
|
||||||
dce->hClipRgn = 0;
|
dce->hClipRgn = 0;
|
||||||
|
|
||||||
/* make it dirty so that the vis rgn gets recomputed next time */
|
/* make it dirty so that the vis rgn gets recomputed next time */
|
||||||
|
@ -336,34 +329,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.@)
|
* GetDCEx (USER32.@)
|
||||||
*
|
*
|
||||||
|
@ -514,7 +479,7 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
|
||||||
dce->hClipRgn = hrgnClip;
|
dce->hClipRgn = hrgnClip;
|
||||||
dce->DCXflags = flags & (DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN |
|
dce->DCXflags = flags & (DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN |
|
||||||
DCX_CACHE | DCX_WINDOW | DCX_WINDOWPAINT |
|
DCX_CACHE | DCX_WINDOW | DCX_WINDOWPAINT |
|
||||||
DCX_KEEPCLIPRGN | DCX_INTERSECTRGN | DCX_EXCLUDERGN);
|
DCX_INTERSECTRGN | DCX_EXCLUDERGN);
|
||||||
dce->DCXflags |= DCX_DCEBUSY;
|
dce->DCXflags |= DCX_DCEBUSY;
|
||||||
dce->DCXflags &= ~DCX_DCEDIRTY;
|
dce->DCXflags &= ~DCX_DCEDIRTY;
|
||||||
hdc = dce->hDC;
|
hdc = dce->hDC;
|
||||||
|
@ -540,9 +505,8 @@ END:
|
||||||
* Success: Handle to the device context
|
* Success: Handle to the device context
|
||||||
* Failure: NULL.
|
* Failure: NULL.
|
||||||
*/
|
*/
|
||||||
HDC WINAPI GetDC(
|
HDC WINAPI GetDC( HWND hwnd )
|
||||||
HWND hwnd /* [in] handle of window - may be NULL */
|
{
|
||||||
) {
|
|
||||||
if (!hwnd)
|
if (!hwnd)
|
||||||
return GetDCEx( 0, 0, DCX_CACHE | DCX_WINDOW );
|
return GetDCEx( 0, 0, DCX_CACHE | DCX_WINDOW );
|
||||||
return GetDCEx( hwnd, 0, DCX_USESTYLE );
|
return GetDCEx( hwnd, 0, DCX_USESTYLE );
|
||||||
|
@ -567,10 +531,8 @@ HDC WINAPI GetWindowDC( HWND hwnd )
|
||||||
* Success: Non-zero. Resources used by hdc are released.
|
* Success: Non-zero. Resources used by hdc are released.
|
||||||
* Failure: 0.
|
* Failure: 0.
|
||||||
*/
|
*/
|
||||||
INT WINAPI ReleaseDC(
|
INT WINAPI ReleaseDC( HWND hwnd, HDC hdc )
|
||||||
HWND hwnd, /* [in] Handle of window - ignored */
|
{
|
||||||
HDC hdc /* [in] Handle of device context */
|
|
||||||
) {
|
|
||||||
DCE * dce;
|
DCE * dce;
|
||||||
INT nRet = 0;
|
INT nRet = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue