Rename NtGdiDeleteObject to GreDeleteObject

svn path=/trunk/; revision=40240
This commit is contained in:
Timo Kreuzer 2009-03-25 20:24:34 +00:00
parent 5a37c1fdad
commit ea055dde70
22 changed files with 99 additions and 99 deletions

View file

@ -132,7 +132,7 @@ SURFACE_Cleanup(PVOID ObjectBody)
if (psurf->hDIBPalette != NULL) if (psurf->hDIBPalette != NULL)
{ {
NtGdiDeleteObject(psurf->hDIBPalette); GreDeleteObject(psurf->hDIBPalette);
} }
} }

View file

@ -79,7 +79,7 @@ PVOID INTERNAL_CALL GDI_MapHandleTable(PSECTION_OBJECT SectionObject, PEPROCES
#define GDIOBJFLAG_IGNOREPID (0x1) #define GDIOBJFLAG_IGNOREPID (0x1)
#define GDIOBJFLAG_IGNORELOCK (0x2) #define GDIOBJFLAG_IGNORELOCK (0x2)
BOOL FASTCALL NtGdiDeleteObject(HGDIOBJ hObject); BOOL FASTCALL GreDeleteObject(HGDIOBJ hObject);
BOOL FASTCALL IsObjectDead(HGDIOBJ); BOOL FASTCALL IsObjectDead(HGDIOBJ);
BOOL FASTCALL IntGdiSetDCOwnerEx( HDC, DWORD, BOOL); BOOL FASTCALL IntGdiSetDCOwnerEx( HDC, DWORD, BOOL);

View file

@ -470,13 +470,13 @@ IntDestroyCurIconObject(PWINSTATION_OBJECT WinSta, PCURICON_OBJECT CurIcon, BOOL
if(bmpMask) if(bmpMask)
{ {
GDIOBJ_SetOwnership(bmpMask, PsGetCurrentProcess()); GDIOBJ_SetOwnership(bmpMask, PsGetCurrentProcess());
NtGdiDeleteObject(bmpMask); GreDeleteObject(bmpMask);
CurIcon->IconInfo.hbmMask = NULL; CurIcon->IconInfo.hbmMask = NULL;
} }
if(bmpColor) if(bmpColor)
{ {
GDIOBJ_SetOwnership(bmpColor, PsGetCurrentProcess()); GDIOBJ_SetOwnership(bmpColor, PsGetCurrentProcess());
NtGdiDeleteObject(bmpColor); GreDeleteObject(bmpColor);
CurIcon->IconInfo.hbmColor = NULL; CurIcon->IconInfo.hbmColor = NULL;
} }
@ -1152,11 +1152,11 @@ NtUserSetCursorContents(
/* Delete old bitmaps */ /* Delete old bitmaps */
if (CurIcon->IconInfo.hbmColor != IconInfo.hbmColor) if (CurIcon->IconInfo.hbmColor != IconInfo.hbmColor)
{ {
NtGdiDeleteObject(CurIcon->IconInfo.hbmColor); GreDeleteObject(CurIcon->IconInfo.hbmColor);
} }
if (CurIcon->IconInfo.hbmMask != IconInfo.hbmMask) if (CurIcon->IconInfo.hbmMask != IconInfo.hbmMask)
{ {
NtGdiDeleteObject(CurIcon->IconInfo.hbmMask); GreDeleteObject(CurIcon->IconInfo.hbmMask);
} }
/* Copy new IconInfo field */ /* Copy new IconInfo field */
@ -1683,7 +1683,7 @@ cleanup:
{ {
if(hOldOffBmp) NtGdiSelectBitmap(hdcOff, hOldOffBmp); if(hOldOffBmp) NtGdiSelectBitmap(hdcOff, hOldOffBmp);
if(hOldOffBrush) NtGdiSelectBrush(hdcOff, hOldOffBrush); if(hOldOffBrush) NtGdiSelectBrush(hdcOff, hOldOffBrush);
if(hbmOff) NtGdiDeleteObject(hbmOff); if(hbmOff) GreDeleteObject(hbmOff);
if(hdcOff) NtGdiDeleteObjectApp(hdcOff); if(hdcOff) NtGdiDeleteObjectApp(hdcOff);
} }

View file

@ -398,7 +398,7 @@ IntDispatchMessage(PMSG pMsg)
/* send a WM_NCPAINT and WM_ERASEBKGND if the non-client area is still invalid */ /* send a WM_NCPAINT and WM_ERASEBKGND if the non-client area is still invalid */
HRGN hrgn = NtGdiCreateRectRgn( 0, 0, 0, 0 ); HRGN hrgn = NtGdiCreateRectRgn( 0, 0, 0, 0 );
co_UserGetUpdateRgn( Window, hrgn, TRUE ); co_UserGetUpdateRgn( Window, hrgn, TRUE );
NtGdiDeleteObject( hrgn ); GreDeleteObject( hrgn );
} }
return retval; return retval;
} }

View file

@ -182,7 +182,7 @@ IntGetNCUpdateRgn(PWINDOW_OBJECT Window, BOOL Validate)
hRgnWindow = IntCalcWindowRgn(Window, TRUE); hRgnWindow = IntCalcWindowRgn(Window, TRUE);
if (hRgnWindow == NULL) if (hRgnWindow == NULL)
{ {
NtGdiDeleteObject(hRgnNonClient); GreDeleteObject(hRgnNonClient);
return (HRGN)1; return (HRGN)1;
} }
@ -190,14 +190,14 @@ IntGetNCUpdateRgn(PWINDOW_OBJECT Window, BOOL Validate)
hRgnWindow, RGN_DIFF); hRgnWindow, RGN_DIFF);
if (RgnType == ERROR) if (RgnType == ERROR)
{ {
NtGdiDeleteObject(hRgnWindow); GreDeleteObject(hRgnWindow);
NtGdiDeleteObject(hRgnNonClient); GreDeleteObject(hRgnNonClient);
return (HRGN)1; return (HRGN)1;
} }
else if (RgnType == NULLREGION) else if (RgnType == NULLREGION)
{ {
NtGdiDeleteObject(hRgnWindow); GreDeleteObject(hRgnWindow);
NtGdiDeleteObject(hRgnNonClient); GreDeleteObject(hRgnNonClient);
return NULL; return NULL;
} }
@ -212,14 +212,14 @@ IntGetNCUpdateRgn(PWINDOW_OBJECT Window, BOOL Validate)
hRgnWindow, RGN_AND) == NULLREGION) hRgnWindow, RGN_AND) == NULLREGION)
{ {
GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess()); GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
NtGdiDeleteObject(Window->UpdateRegion); GreDeleteObject(Window->UpdateRegion);
Window->UpdateRegion = NULL; Window->UpdateRegion = NULL;
if (!(Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT)) if (!(Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT))
MsqDecPaintCountQueue(Window->MessageQueue); MsqDecPaintCountQueue(Window->MessageQueue);
} }
} }
NtGdiDeleteObject(hRgnWindow); GreDeleteObject(hRgnWindow);
return hRgnNonClient; return hRgnNonClient;
} }
@ -355,7 +355,7 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
hRgnClient = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->ClientRect); hRgnClient = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->ClientRect);
RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnClient, RGN_AND); RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnClient, RGN_AND);
NtGdiDeleteObject(hRgnClient); GreDeleteObject(hRgnClient);
} }
/* /*
@ -368,7 +368,7 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect); hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect);
RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnWindow, RGN_AND); RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnWindow, RGN_AND);
NtGdiDeleteObject(hRgnWindow); GreDeleteObject(hRgnWindow);
} }
else else
{ {
@ -405,7 +405,7 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
hRgn, RGN_OR) == NULLREGION) hRgn, RGN_OR) == NULLREGION)
{ {
GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess()); GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
NtGdiDeleteObject(Window->UpdateRegion); GreDeleteObject(Window->UpdateRegion);
Window->UpdateRegion = NULL; Window->UpdateRegion = NULL;
} }
@ -425,7 +425,7 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
hRgn, RGN_DIFF) == NULLREGION) hRgn, RGN_DIFF) == NULLREGION)
{ {
GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess()); GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
NtGdiDeleteObject(Window->UpdateRegion); GreDeleteObject(Window->UpdateRegion);
Window->UpdateRegion = NULL; Window->UpdateRegion = NULL;
} }
} }
@ -467,7 +467,7 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
HRGN hRgnTemp = NtGdiCreateRectRgn(0, 0, 0, 0); HRGN hRgnTemp = NtGdiCreateRectRgn(0, 0, 0, 0);
NtGdiCombineRgn(hRgnTemp, hRgn, 0, RGN_COPY); NtGdiCombineRgn(hRgnTemp, hRgn, 0, RGN_COPY);
IntInvalidateWindows(Child, hRgnTemp, Flags); IntInvalidateWindows(Child, hRgnTemp, Flags);
NtGdiDeleteObject(hRgnTemp); GreDeleteObject(hRgnTemp);
} }
} }
@ -564,7 +564,7 @@ co_UserRedrawWindow(PWINDOW_OBJECT Window, const RECTL* UpdateRect, HRGN UpdateR
hRgn = NtGdiCreateRectRgn(0, 0, 0, 0); hRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
if (NtGdiCombineRgn(hRgn, UpdateRgn, NULL, RGN_COPY) == NULLREGION) if (NtGdiCombineRgn(hRgn, UpdateRgn, NULL, RGN_COPY) == NULLREGION)
{ {
NtGdiDeleteObject(hRgn); GreDeleteObject(hRgn);
hRgn = NULL; hRgn = NULL;
} }
else else
@ -619,7 +619,7 @@ co_UserRedrawWindow(PWINDOW_OBJECT Window, const RECTL* UpdateRect, HRGN UpdateR
if (hRgn != NULL) if (hRgn != NULL)
{ {
NtGdiDeleteObject(hRgn); GreDeleteObject(hRgn);
} }
return TRUE; return TRUE;
@ -1209,7 +1209,7 @@ UserScrollDC(HDC hDC, INT dx, INT dy, const RECTL *prcScroll,
NtGdiOffsetRgn(hrgnTmp, dx, dy); NtGdiOffsetRgn(hrgnTmp, dx, dy);
Result = NtGdiCombineRgn(hrgnOwn, hrgnOwn, hrgnTmp, RGN_DIFF); Result = NtGdiCombineRgn(hrgnOwn, hrgnOwn, hrgnTmp, RGN_DIFF);
NtGdiDeleteObject(hrgnTmp); GreDeleteObject(hrgnTmp);
if (prcUpdate) if (prcUpdate)
{ {
@ -1218,7 +1218,7 @@ UserScrollDC(HDC hDC, INT dx, INT dy, const RECTL *prcScroll,
if (!hrgnUpdate) if (!hrgnUpdate)
{ {
NtGdiDeleteObject(hrgnOwn); GreDeleteObject(hrgnOwn);
} }
} }
else else
@ -1412,9 +1412,9 @@ NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *prcUnsafeScroll,
NtGdiOffsetRgn(hrgnTemp, dx, dy); NtGdiOffsetRgn(hrgnTemp, dx, dy);
NtGdiCombineRgn(hrgnTemp, hrgnTemp, hrgnClip, RGN_AND); NtGdiCombineRgn(hrgnTemp, hrgnTemp, hrgnClip, RGN_AND);
co_UserRedrawWindow(Window, NULL, hrgnTemp, RDW_INVALIDATE | RDW_ERASE); co_UserRedrawWindow(Window, NULL, hrgnTemp, RDW_INVALIDATE | RDW_ERASE);
NtGdiDeleteObject(hrgnClip); GreDeleteObject(hrgnClip);
} }
NtGdiDeleteObject(hrgnTemp); GreDeleteObject(hrgnTemp);
if (flags & SW_SCROLLCHILDREN) if (flags & SW_SCROLLCHILDREN)
{ {
@ -1487,7 +1487,7 @@ NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *prcUnsafeScroll,
CLEANUP: CLEANUP:
if (hrgnOwn && !hrgnUpdate) if (hrgnOwn && !hrgnUpdate)
{ {
NtGdiDeleteObject(hrgnOwn); GreDeleteObject(hrgnOwn);
} }
if (Window) if (Window)
@ -1583,7 +1583,7 @@ UserDrawCaptionText(HDC hDc,
if(!hOldFont) if(!hOldFont)
{ {
DPRINT1("%s: SelectFont() failed!\n", __FUNCTION__); DPRINT1("%s: SelectFont() failed!\n", __FUNCTION__);
NtGdiDeleteObject(hFont); GreDeleteObject(hFont);
return FALSE; return FALSE;
} }
@ -1600,7 +1600,7 @@ UserDrawCaptionText(HDC hDc,
IntGdiSetTextColor(hDc, OldTextColor); IntGdiSetTextColor(hDc, OldTextColor);
NtGdiSelectFont(hDc, hOldFont); NtGdiSelectFont(hDc, hOldFont);
NtGdiDeleteObject(hFont); GreDeleteObject(hFont);
return TRUE; return TRUE;
} }
@ -1864,7 +1864,7 @@ BOOL UserDrawCaption(
cleanup: cleanup:
if (hOldBrush) NtGdiSelectBrush(hMemDc, hOldBrush); if (hOldBrush) NtGdiSelectBrush(hMemDc, hOldBrush);
if (hOldBmp) NtGdiSelectBitmap(hMemDc, hOldBmp); if (hOldBmp) NtGdiSelectBitmap(hMemDc, hOldBmp);
if (hMemBmp) NtGdiDeleteObject(hMemBmp); if (hMemBmp) GreDeleteObject(hMemBmp);
if (hMemDc) NtGdiDeleteObjectApp(hMemDc); if (hMemDc) NtGdiDeleteObjectApp(hMemDc);
return Ret; return Ret;

View file

@ -376,7 +376,7 @@ IntSystemParametersInfo(
if(hOldBitmap != NULL) if(hOldBitmap != NULL)
{ {
/* delete the old wallpaper */ /* delete the old wallpaper */
NtGdiDeleteObject(hOldBitmap); GreDeleteObject(hOldBitmap);
} }
/* Set the style */ /* Set the style */

View file

@ -71,13 +71,13 @@ VIS_ComputeVisibleRegion(
CurrentWnd = CurrentWindow->Wnd; CurrentWnd = CurrentWindow->Wnd;
if (!(CurrentWnd) || !(CurrentWnd->Style & WS_VISIBLE)) if (!(CurrentWnd) || !(CurrentWnd->Style & WS_VISIBLE))
{ {
NtGdiDeleteObject(VisRgn); GreDeleteObject(VisRgn);
return NULL; return NULL;
} }
ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->ClientRect); ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->ClientRect);
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_AND); NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_AND);
NtGdiDeleteObject(ClipRgn); GreDeleteObject(ClipRgn);
if ((PreviousWnd->Style & WS_CLIPSIBLINGS) || if ((PreviousWnd->Style & WS_CLIPSIBLINGS) ||
(PreviousWnd == Wnd && ClipSiblings)) (PreviousWnd == Wnd && ClipSiblings))
@ -98,7 +98,7 @@ VIS_ComputeVisibleRegion(
NtGdiOffsetRgn(ClipRgn, CurrentSiblingWnd->WindowRect.left, CurrentSiblingWnd->WindowRect.top); NtGdiOffsetRgn(ClipRgn, CurrentSiblingWnd->WindowRect.left, CurrentSiblingWnd->WindowRect.top);
} }
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF); NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF);
NtGdiDeleteObject(ClipRgn); GreDeleteObject(ClipRgn);
} }
CurrentSibling = CurrentSibling->NextSibling; CurrentSibling = CurrentSibling->NextSibling;
} }
@ -127,7 +127,7 @@ VIS_ComputeVisibleRegion(
NtGdiOffsetRgn(ClipRgn, CurrentWnd->WindowRect.left, CurrentWnd->WindowRect.top); NtGdiOffsetRgn(ClipRgn, CurrentWnd->WindowRect.left, CurrentWnd->WindowRect.top);
} }
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF); NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF);
NtGdiDeleteObject(ClipRgn); GreDeleteObject(ClipRgn);
} }
CurrentWindow = CurrentWindow->NextSibling; CurrentWindow = CurrentWindow->NextSibling;
} }
@ -174,7 +174,7 @@ co_VIS_WindowLayoutChanged(
RDW_ALLCHILDREN); RDW_ALLCHILDREN);
UserDerefObjectCo(Parent); UserDerefObjectCo(Parent);
} }
NtGdiDeleteObject(Temp); GreDeleteObject(Temp);
} }
/* EOF */ /* EOF */

View file

@ -176,7 +176,7 @@ DceDeleteClipRgn(DCE* Dce)
} }
else if (Dce->hClipRgn != NULL) else if (Dce->hClipRgn != NULL)
{ {
NtGdiDeleteObject(Dce->hClipRgn); GreDeleteObject(Dce->hClipRgn);
} }
Dce->hClipRgn = NULL; Dce->hClipRgn = NULL;
@ -290,7 +290,7 @@ noparent:
{ {
if(hRgnVisible != NULL) if(hRgnVisible != NULL)
{ {
NtGdiDeleteObject(hRgnVisible); GreDeleteObject(hRgnVisible);
} }
hRgnVisible = NtGdiCreateRectRgn(0, 0, 0, 0); hRgnVisible = NtGdiCreateRectRgn(0, 0, 0, 0);
} }
@ -311,7 +311,7 @@ noparent:
if (hRgnVisible != NULL) if (hRgnVisible != NULL)
{ {
NtGdiDeleteObject(hRgnVisible); GreDeleteObject(hRgnVisible);
} }
} }
@ -519,7 +519,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
if (!(Flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN)) && ClipRegion) if (!(Flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN)) && ClipRegion)
{ {
if (!(Flags & DCX_KEEPCLIPRGN)) if (!(Flags & DCX_KEEPCLIPRGN))
NtGdiDeleteObject(ClipRegion); GreDeleteObject(ClipRegion);
ClipRegion = NULL; ClipRegion = NULL;
} }
@ -609,7 +609,7 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
if (pdce->hClipRgn && ! (pdce->DCXFlags & DCX_KEEPCLIPRGN)) if (pdce->hClipRgn && ! (pdce->DCXFlags & DCX_KEEPCLIPRGN))
{ {
NtGdiDeleteObject(pdce->hClipRgn); GreDeleteObject(pdce->hClipRgn);
} }
RemoveEntryList(&pdce->List); RemoveEntryList(&pdce->List);

View file

@ -505,7 +505,7 @@ static LRESULT co_UserFreeWindow(PWINDOW_OBJECT Window,
if(Window->WindowRegion) if(Window->WindowRegion)
{ {
NtGdiDeleteObject(Window->WindowRegion); GreDeleteObject(Window->WindowRegion);
} }
ASSERT(Window->Wnd != NULL); ASSERT(Window->Wnd != NULL);
@ -4478,7 +4478,7 @@ IntGetWindowRgn(PWINDOW_OBJECT Window, HRGN hRgn)
else else
Ret = ERROR; Ret = ERROR;
NtGdiDeleteObject(VisRgn); GreDeleteObject(VisRgn);
return Ret; return Ret;
} }
@ -4518,7 +4518,7 @@ IntGetWindowRgnBox(PWINDOW_OBJECT Window, RECTL *Rect)
else else
Ret = ERROR; Ret = ERROR;
NtGdiDeleteObject(VisRgn); GreDeleteObject(VisRgn);
return Ret; return Ret;
} }
@ -4550,7 +4550,7 @@ NtUserSetWindowRgn(
if(Window->WindowRegion) if(Window->WindowRegion)
{ {
/* Delete no longer needed region handle */ /* Delete no longer needed region handle */
NtGdiDeleteObject(Window->WindowRegion); GreDeleteObject(Window->WindowRegion);
} }
Window->WindowRegion = hRgn; Window->WindowRegion = hRgn;

View file

@ -947,7 +947,7 @@ co_WinPosSetWindowPos(
REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION) REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION)
{ {
REGION_UnlockRgn(VisRgn); REGION_UnlockRgn(VisRgn);
NtGdiDeleteObject(VisBefore); GreDeleteObject(VisBefore);
VisBefore = NULL; VisBefore = NULL;
} }
else if(VisRgn) else if(VisRgn)
@ -1097,7 +1097,7 @@ co_WinPosSetWindowPos(
REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION) REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION)
{ {
REGION_UnlockRgn(VisRgn); REGION_UnlockRgn(VisRgn);
NtGdiDeleteObject(VisAfter); GreDeleteObject(VisAfter);
VisAfter = NULL; VisAfter = NULL;
} }
else if(VisRgn) else if(VisRgn)
@ -1160,7 +1160,7 @@ co_WinPosSetWindowPos(
{ {
/* Nothing to copy, clean up */ /* Nothing to copy, clean up */
REGION_UnlockRgn(VisRgn); REGION_UnlockRgn(VisRgn);
NtGdiDeleteObject(CopyRgn); GreDeleteObject(CopyRgn);
CopyRgn = NULL; CopyRgn = NULL;
} }
else if (OldWindowRect.left != NewWindowRect.left || else if (OldWindowRect.left != NewWindowRect.left ||
@ -1222,7 +1222,7 @@ co_WinPosSetWindowPos(
IntInvalidateWindows(Window, DirtyRgn, IntInvalidateWindows(Window, DirtyRgn,
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
} }
NtGdiDeleteObject(DirtyRgn); GreDeleteObject(DirtyRgn);
*/ */
PWINDOW_OBJECT Parent = Window->Parent; PWINDOW_OBJECT Parent = Window->Parent;
@ -1244,12 +1244,12 @@ co_WinPosSetWindowPos(
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
} }
} }
NtGdiDeleteObject(DirtyRgn); GreDeleteObject(DirtyRgn);
} }
if (CopyRgn != NULL) if (CopyRgn != NULL)
{ {
NtGdiDeleteObject(CopyRgn); GreDeleteObject(CopyRgn);
} }
/* Expose what was covered before but not covered anymore */ /* Expose what was covered before but not covered anymore */
@ -1268,13 +1268,13 @@ co_WinPosSetWindowPos(
{ {
co_VIS_WindowLayoutChanged(Window, ExposedRgn); co_VIS_WindowLayoutChanged(Window, ExposedRgn);
} }
NtGdiDeleteObject(ExposedRgn); GreDeleteObject(ExposedRgn);
NtGdiDeleteObject(VisBefore); GreDeleteObject(VisBefore);
} }
if (VisAfter != NULL) if (VisAfter != NULL)
{ {
NtGdiDeleteObject(VisAfter); GreDeleteObject(VisAfter);
} }
if (!(WinPos.flags & SWP_NOACTIVATE)) if (!(WinPos.flags & SWP_NOACTIVATE))

View file

@ -703,8 +703,8 @@ NtGdiMaskBlt (
NtGdiSelectBitmap(hDC2, hOldBitmap3); NtGdiSelectBitmap(hDC2, hOldBitmap3);
/* 6. delete all temp objects */ /* 6. delete all temp objects */
NtGdiDeleteObject(hBitmap2); GreDeleteObject(hBitmap2);
NtGdiDeleteObject(hBitmap3); GreDeleteObject(hBitmap3);
NtGdiDeleteObjectApp(hDC1); NtGdiDeleteObjectApp(hDC1);
NtGdiDeleteObjectApp(hDC2); NtGdiDeleteObjectApp(hDC2);

View file

@ -76,7 +76,7 @@ IntGdiCreateBitmap(
psurfBmp = SURFACE_LockSurface(hBitmap); psurfBmp = SURFACE_LockSurface(hBitmap);
if (psurfBmp == NULL) if (psurfBmp == NULL)
{ {
NtGdiDeleteObject(hBitmap); GreDeleteObject(hBitmap);
return NULL; return NULL;
} }
@ -428,7 +428,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
SURFACE_UnlockSurface(psurf); SURFACE_UnlockSurface(psurf);
} }
} }
NtGdiDeleteObject(hBmpTmp); GreDeleteObject(hBmpTmp);
} }
NtGdiDeleteObjectApp(hDCTmp); NtGdiDeleteObjectApp(hDCTmp);
} }
@ -667,13 +667,13 @@ GdiSetPixelV(
OldBrush = NtGdiSelectBrush(hDC, hbrush); OldBrush = NtGdiSelectBrush(hDC, hbrush);
if (OldBrush == NULL) if (OldBrush == NULL)
{ {
NtGdiDeleteObject(hbrush); GreDeleteObject(hbrush);
return(FALSE); return(FALSE);
} }
NtGdiPatBlt(hDC, X, Y, 1, 1, PATCOPY); NtGdiPatBlt(hDC, X, Y, 1, 1, PATCOPY);
NtGdiSelectBrush(hDC, OldBrush); NtGdiSelectBrush(hDC, OldBrush);
NtGdiDeleteObject(hbrush); GreDeleteObject(hbrush);
return TRUE; return TRUE;
} }
@ -801,7 +801,7 @@ BITMAP_CopyBitmap(HBITMAP hBitmap)
{ {
GDIOBJ_UnlockObjByPtr((POBJ)resBitmap); GDIOBJ_UnlockObjByPtr((POBJ)resBitmap);
GDIOBJ_UnlockObjByPtr((POBJ)Bitmap); GDIOBJ_UnlockObjByPtr((POBJ)Bitmap);
NtGdiDeleteObject(res); GreDeleteObject(res);
return 0; return 0;
} }
IntGetBitmapBits(Bitmap, bm.bmWidthBytes * abs(bm.bmHeight), buf); IntGetBitmapBits(Bitmap, bm.bmWidthBytes * abs(bm.bmHeight), buf);
@ -812,7 +812,7 @@ BITMAP_CopyBitmap(HBITMAP hBitmap)
} }
else else
{ {
NtGdiDeleteObject(res); GreDeleteObject(res);
res = NULL; res = NULL;
} }
} }
@ -1025,7 +1025,7 @@ NtGdiSelectBitmap(
if (hVisRgn) if (hVisRgn)
{ {
GdiSelectVisRgn(hDC, hVisRgn); GdiSelectVisRgn(hDC, hVisRgn);
NtGdiDeleteObject(hVisRgn); GreDeleteObject(hVisRgn);
} }
return hOrgBmp; return hOrgBmp;

View file

@ -43,7 +43,7 @@ BRUSH_Cleanup(PVOID ObjectBody)
{ {
ASSERT(pbrush->hbmPattern); ASSERT(pbrush->hbmPattern);
GDIOBJ_SetOwnership(pbrush->hbmPattern, PsGetCurrentProcess()); GDIOBJ_SetOwnership(pbrush->hbmPattern, PsGetCurrentProcess());
NtGdiDeleteObject(pbrush->hbmPattern); GreDeleteObject(pbrush->hbmPattern);
} }
/* Free the kmode styles array of EXTPENS */ /* Free the kmode styles array of EXTPENS */
@ -346,7 +346,7 @@ IntGdiCreateDIBBrush(
pbrush = BRUSH_AllocBrushWithHandle(); pbrush = BRUSH_AllocBrushWithHandle();
if (pbrush == NULL) if (pbrush == NULL)
{ {
NtGdiDeleteObject(hPattern); GreDeleteObject(hPattern);
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
return NULL; return NULL;
} }
@ -387,7 +387,7 @@ IntGdiCreateHatchBrush(
pbrush = BRUSH_AllocBrushWithHandle(); pbrush = BRUSH_AllocBrushWithHandle();
if (pbrush == NULL) if (pbrush == NULL)
{ {
NtGdiDeleteObject(hPattern); GreDeleteObject(hPattern);
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
return NULL; return NULL;
} }
@ -422,7 +422,7 @@ IntGdiCreatePatternBrush(
pbrush = BRUSH_AllocBrushWithHandle(); pbrush = BRUSH_AllocBrushWithHandle();
if (pbrush == NULL) if (pbrush == NULL)
{ {
NtGdiDeleteObject(hPattern); GreDeleteObject(hPattern);
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
return NULL; return NULL;
} }

View file

@ -108,7 +108,7 @@ int FASTCALL GdiExtSelectClipRgn(PDC dc,
{ {
if (dc->rosdc.hClipRgn != NULL) if (dc->rosdc.hClipRgn != NULL)
{ {
NtGdiDeleteObject(dc->rosdc.hClipRgn); GreDeleteObject(dc->rosdc.hClipRgn);
dc->rosdc.hClipRgn = NULL; dc->rosdc.hClipRgn = NULL;
retval = NULLREGION; retval = NULLREGION;
} }
@ -265,7 +265,7 @@ int APIENTRY NtGdiExcludeClipRect(HDC hDC,
{ {
Result = NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, NewRgn, RGN_DIFF); Result = NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, NewRgn, RGN_DIFF);
} }
NtGdiDeleteObject(NewRgn); GreDeleteObject(NewRgn);
} }
if (Result != ERROR) if (Result != ERROR)
CLIPPING_UpdateGCRegion(dc); CLIPPING_UpdateGCRegion(dc);
@ -315,7 +315,7 @@ int APIENTRY NtGdiIntersectClipRect(HDC hDC,
else else
{ {
Result = NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, NewRgn, RGN_AND); Result = NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, NewRgn, RGN_AND);
NtGdiDeleteObject(NewRgn); GreDeleteObject(NewRgn);
} }
if (Result != ERROR) if (Result != ERROR)
CLIPPING_UpdateGCRegion(dc); CLIPPING_UpdateGCRegion(dc);

View file

@ -319,7 +319,7 @@ IntGdiCreateDC(
if (hVisRgn) if (hVisRgn)
{ {
GdiSelectVisRgn(hdc, hVisRgn); GdiSelectVisRgn(hdc, hVisRgn);
NtGdiDeleteObject(hVisRgn); GreDeleteObject(hVisRgn);
} }
IntGdiSetTextAlign(hdc, TA_TOP); IntGdiSetTextAlign(hdc, TA_TOP);
@ -482,11 +482,11 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
} }
if (DCToDelete->rosdc.hClipRgn) if (DCToDelete->rosdc.hClipRgn)
{ {
NtGdiDeleteObject(DCToDelete->rosdc.hClipRgn); GreDeleteObject(DCToDelete->rosdc.hClipRgn);
} }
if (DCToDelete->rosdc.hVisRgn) if (DCToDelete->rosdc.hVisRgn)
{ {
NtGdiDeleteObject(DCToDelete->rosdc.hVisRgn); GreDeleteObject(DCToDelete->rosdc.hVisRgn);
} }
if (NULL != DCToDelete->rosdc.CombinedClip) if (NULL != DCToDelete->rosdc.CombinedClip)
{ {
@ -494,7 +494,7 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
} }
if (DCToDelete->rosdc.hGCClipRgn) if (DCToDelete->rosdc.hGCClipRgn)
{ {
NtGdiDeleteObject(DCToDelete->rosdc.hGCClipRgn); GreDeleteObject(DCToDelete->rosdc.hGCClipRgn);
} }
PATH_Delete(DCToDelete->dclevel.hPath); PATH_Delete(DCToDelete->dclevel.hPath);
@ -635,7 +635,7 @@ NtGdiCreateCompatibleDC(HDC hDC)
if (hVisRgn) if (hVisRgn)
{ {
GdiSelectVisRgn(hdcNew, hVisRgn); GdiSelectVisRgn(hdcNew, hVisRgn);
NtGdiDeleteObject(hVisRgn); GreDeleteObject(hVisRgn);
} }
if (Layout) NtGdiSetLayout(hdcNew, -1, Layout); if (Layout) NtGdiSetLayout(hdcNew, -1, Layout);
@ -654,7 +654,7 @@ NtGdiDeleteObjectApp(HANDLE DCHandle)
if (GDI_HANDLE_IS_STOCKOBJ(DCHandle)) return TRUE; if (GDI_HANDLE_IS_STOCKOBJ(DCHandle)) return TRUE;
if (GDI_HANDLE_GET_TYPE(DCHandle) != GDI_OBJECT_TYPE_DC) if (GDI_HANDLE_GET_TYPE(DCHandle) != GDI_OBJECT_TYPE_DC)
return NtGdiDeleteObject((HGDIOBJ) DCHandle); return GreDeleteObject((HGDIOBJ) DCHandle);
if (IsObjectDead((HGDIOBJ)DCHandle)) return TRUE; if (IsObjectDead((HGDIOBJ)DCHandle)) return TRUE;
@ -689,7 +689,7 @@ NewNtGdiDeleteObjectApp(HANDLE DCHandle)
case GDIObjType_PAL_TYPE: case GDIObjType_PAL_TYPE:
case GDIObjType_LFONT_TYPE: case GDIObjType_LFONT_TYPE:
case GDIObjType_BRUSH_TYPE: case GDIObjType_BRUSH_TYPE:
return NtGdiDeleteObject((HGDIOBJ) DCHandle); return GreDeleteObject((HGDIOBJ) DCHandle);
default: default:
return FALSE; return FALSE;

View file

@ -1,7 +1,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* PURPOSE: Functions for creation and destruction of DCs * PURPOSE: Functions for saving and restoring dc states
* FILE: subsystem/win32/win32k/objects/dcstate.c * FILE: subsystem/win32/win32k/objects/dcstate.c
* PROGRAMER: Timo Kreuzer (timo.kreuzer@rectos.org) * PROGRAMER: Timo Kreuzer (timo.kreuzer@rectos.org)
*/ */

View file

@ -1095,7 +1095,7 @@ NtGdiStretchDIBitsInternal(
NtGdiDeleteObjectApp(hdcMem); NtGdiDeleteObjectApp(hdcMem);
NtGdiDeleteObject(hBitmap); GreDeleteObject(hBitmap);
return SrcHeight; return SrcHeight;
} }
@ -1476,7 +1476,7 @@ DIB_CreateDIBSection(
ExFreePoolWithTag(lpRGB, TAG_COLORMAP); ExFreePoolWithTag(lpRGB, TAG_COLORMAP);
} }
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
NtGdiDeleteObject(bmp); GreDeleteObject(bmp);
return NULL; return NULL;
} }

View file

@ -3641,10 +3641,10 @@ GreExtTextOutW(
if (hbrushBackGnd != NULL) if (hbrushBackGnd != NULL)
{ {
BRUSH_UnlockBrush(pbrushBackGnd); BRUSH_UnlockBrush(pbrushBackGnd);
NtGdiDeleteObject(hbrushBackGnd); GreDeleteObject(hbrushBackGnd);
} }
BRUSH_UnlockBrush(pbrushText); BRUSH_UnlockBrush(pbrushText);
NtGdiDeleteObject(hbrushText); GreDeleteObject(hbrushText);
good: good:
DC_UnlockDc( dc ); DC_UnlockDc( dc );
@ -3662,12 +3662,12 @@ fail:
if (hbrushBackGnd != NULL) if (hbrushBackGnd != NULL)
{ {
BRUSH_UnlockBrush(pbrushBackGnd); BRUSH_UnlockBrush(pbrushBackGnd);
NtGdiDeleteObject(hbrushBackGnd); GreDeleteObject(hbrushBackGnd);
} }
if (hbrushText != NULL) if (hbrushText != NULL)
{ {
BRUSH_UnlockBrush(pbrushText); BRUSH_UnlockBrush(pbrushText);
NtGdiDeleteObject(hbrushText); GreDeleteObject(hbrushText);
} }
DC_UnlockDc(dc); DC_UnlockDc(dc);

View file

@ -102,7 +102,7 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
case GdiBCDelRgn: case GdiBCDelRgn:
{ {
PGDIBSOBJECT pgO = (PGDIBSOBJECT) pHdr; PGDIBSOBJECT pgO = (PGDIBSOBJECT) pHdr;
NtGdiDeleteObject( pgO->hgdiobj ); GreDeleteObject( pgO->hgdiobj );
break; break;
} }
default: default:

View file

@ -661,7 +661,7 @@ IsObjectDead(HGDIOBJ hObject)
*/ */
BOOL BOOL
FASTCALL FASTCALL
NtGdiDeleteObject(HGDIOBJ hObject) GreDeleteObject(HGDIOBJ hObject)
{ {
DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject); DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject);
if (!IsObjectDead(hObject)) if (!IsObjectDead(hObject))

View file

@ -149,7 +149,7 @@ PATH_FillPath( PDC dc, PPATH pPath )
/* Paint the region */ /* Paint the region */
IntGdiPaintRgn( dc, hrgn ); IntGdiPaintRgn( dc, hrgn );
NtGdiDeleteObject( hrgn ); GreDeleteObject( hrgn );
/* Restore the old mapping mode */ /* Restore the old mapping mode */
// IntGdiSetMapMode( dc, mapMode ); // IntGdiSetMapMode( dc, mapMode );
// pdcattr->szlViewportExt = ptViewportExt; // pdcattr->szlViewportExt = ptViewportExt;
@ -2670,7 +2670,7 @@ NtGdiSelectClipPath(HDC hDC,
else if( PATH_PathToRegion( pPath, pdcattr->jFillMode, &hrgnPath ) ) else if( PATH_PathToRegion( pPath, pdcattr->jFillMode, &hrgnPath ) )
{ {
success = GdiExtSelectClipRgn( dc, hrgnPath, Mode ) != ERROR; success = GdiExtSelectClipRgn( dc, hrgnPath, Mode ) != ERROR;
NtGdiDeleteObject( hrgnPath ); GreDeleteObject( hrgnPath );
/* Empty the path */ /* Empty the path */
if( success ) if( success )

View file

@ -1740,7 +1740,7 @@ REGION_XorRegion(
if (!trb) if (!trb)
{ {
REGION_UnlockRgn(tra); REGION_UnlockRgn(tra);
NtGdiDeleteObject(htra); GreDeleteObject(htra);
return; return;
} }
htrb = trb->BaseObject.hHmgr; htrb = trb->BaseObject.hHmgr;
@ -1751,8 +1751,8 @@ REGION_XorRegion(
REGION_UnlockRgn(tra); REGION_UnlockRgn(tra);
REGION_UnlockRgn(trb); REGION_UnlockRgn(trb);
NtGdiDeleteObject(htra); GreDeleteObject(htra);
NtGdiDeleteObject(htrb); GreDeleteObject(htrb);
return; return;
} }
@ -2577,7 +2577,7 @@ NtGdiExtCreateRegion(
{ {
SetLastWin32Error(ERROR_INVALID_PARAMETER); SetLastWin32Error(ERROR_INVALID_PARAMETER);
REGION_UnlockRgn(Region); REGION_UnlockRgn(Region);
NtGdiDeleteObject(hRgn); GreDeleteObject(hRgn);
return NULL; return NULL;
} }
@ -2639,13 +2639,13 @@ NtGdiFrameRgn(
} }
if (!REGION_CreateFrameRgn(FrameRgn, hRgn, Width, Height)) if (!REGION_CreateFrameRgn(FrameRgn, hRgn, Width, Height))
{ {
NtGdiDeleteObject(FrameRgn); GreDeleteObject(FrameRgn);
return FALSE; return FALSE;
} }
Ret = NtGdiFillRgn(hDC, FrameRgn, hBrush); Ret = NtGdiFillRgn(hDC, FrameRgn, hBrush);
NtGdiDeleteObject(FrameRgn); GreDeleteObject(FrameRgn);
return Ret; return Ret;
} }
@ -2918,7 +2918,7 @@ IntGdiPaintRgn(
if (!REGION_LPTODP(dc, tmpVisRgn, hRgn) || if (!REGION_LPTODP(dc, tmpVisRgn, hRgn) ||
NtGdiOffsetRgn(tmpVisRgn, dc->ptlDCOrig.x, dc->ptlDCOrig.y) == ERROR) NtGdiOffsetRgn(tmpVisRgn, dc->ptlDCOrig.x, dc->ptlDCOrig.y) == ERROR)
{ {
NtGdiDeleteObject(tmpVisRgn); GreDeleteObject(tmpVisRgn);
return FALSE; return FALSE;
} }
@ -2927,7 +2927,7 @@ IntGdiPaintRgn(
visrgn = REGION_LockRgn(tmpVisRgn); visrgn = REGION_LockRgn(tmpVisRgn);
if (visrgn == NULL) if (visrgn == NULL)
{ {
NtGdiDeleteObject(tmpVisRgn); GreDeleteObject(tmpVisRgn);
return FALSE; return FALSE;
} }
@ -2953,7 +2953,7 @@ IntGdiPaintRgn(
SURFACE_UnlockSurface(psurf); SURFACE_UnlockSurface(psurf);
BRUSH_UnlockBrush(pbrush); BRUSH_UnlockBrush(pbrush);
REGION_UnlockRgn(visrgn); REGION_UnlockRgn(visrgn);
NtGdiDeleteObject(tmpVisRgn); GreDeleteObject(tmpVisRgn);
// Fill the region // Fill the region
return TRUE; return TRUE;
@ -3708,7 +3708,7 @@ IntCreatePolyPolygonRgn(
total += Count[poly]; total += Count[poly];
if (! (pETEs = ExAllocatePoolWithTag(PagedPool, sizeof(EdgeTableEntry) * total, TAG_REGION)) ) if (! (pETEs = ExAllocatePoolWithTag(PagedPool, sizeof(EdgeTableEntry) * total, TAG_REGION)) )
{ {
NtGdiDeleteObject(hrgn); GreDeleteObject(hrgn);
return 0; return 0;
} }
pts = FirstPtBlock.pts; pts = FirstPtBlock.pts;
@ -3812,7 +3812,7 @@ IntCreatePolyPolygonRgn(
{ {
DPRINT1("Can't alloc tPB\n"); DPRINT1("Can't alloc tPB\n");
ExFreePoolWithTag(pETEs, TAG_REGION); ExFreePoolWithTag(pETEs, TAG_REGION);
NtGdiDeleteObject(hrgn); GreDeleteObject(hrgn);
return 0; return 0;
} }
curPtBlock->next = tmpPtBlock; curPtBlock->next = tmpPtBlock;