mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 15:03:00 +00:00
[WIN32K]
Formatting only. Add a space after if/for/while. svn path=/trunk/; revision=66527
This commit is contained in:
parent
5e781d44e0
commit
b288b023a8
1 changed files with 122 additions and 123 deletions
|
@ -105,7 +105,7 @@ IntLoadSystenIcons(HICON hcur, DWORD id)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0 ; i < 6; i++)
|
for (i = 0 ; i < 6; i++)
|
||||||
{
|
{
|
||||||
if (gasysico[i].type == id)
|
if (gasysico[i].type == id)
|
||||||
{
|
{
|
||||||
|
@ -177,7 +177,7 @@ BOOL UserSetCursorPos( INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Ho
|
||||||
RECTL rcClip;
|
RECTL rcClip;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
|
|
||||||
if(!(DesktopWindow = UserGetDesktopWindow()))
|
if (!(DesktopWindow = UserGetDesktopWindow()))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -190,10 +190,10 @@ BOOL UserSetCursorPos( INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Ho
|
||||||
else
|
else
|
||||||
rcClip = CurInfo->rcClip;
|
rcClip = CurInfo->rcClip;
|
||||||
|
|
||||||
if(x >= rcClip.right) x = rcClip.right - 1;
|
if (x >= rcClip.right) x = rcClip.right - 1;
|
||||||
if(x < rcClip.left) x = rcClip.left;
|
if (x < rcClip.left) x = rcClip.left;
|
||||||
if(y >= rcClip.bottom) y = rcClip.bottom - 1;
|
if (y >= rcClip.bottom) y = rcClip.bottom - 1;
|
||||||
if(y < rcClip.top) y = rcClip.top;
|
if (y < rcClip.top) y = rcClip.top;
|
||||||
|
|
||||||
pt.x = x;
|
pt.x = x;
|
||||||
pt.y = y;
|
pt.y = y;
|
||||||
|
@ -285,7 +285,7 @@ FreeCurIconObject(
|
||||||
{
|
{
|
||||||
PCURICON_OBJECT CurIcon = Object;
|
PCURICON_OBJECT CurIcon = Object;
|
||||||
|
|
||||||
if(!(CurIcon->CURSORF_flags & CURSORF_ACON))
|
if (!(CurIcon->CURSORF_flags & CURSORF_ACON))
|
||||||
{
|
{
|
||||||
HBITMAP bmpMask = CurIcon->hbmMask;
|
HBITMAP bmpMask = CurIcon->hbmMask;
|
||||||
HBITMAP bmpColor = CurIcon->hbmColor;
|
HBITMAP bmpColor = CurIcon->hbmColor;
|
||||||
|
@ -316,7 +316,7 @@ FreeCurIconObject(
|
||||||
PACON AniCurIcon = (PACON)CurIcon;
|
PACON AniCurIcon = (PACON)CurIcon;
|
||||||
UINT i;
|
UINT i;
|
||||||
|
|
||||||
for(i = 0; i < AniCurIcon->cpcur; i++)
|
for (i = 0; i < AniCurIcon->cpcur; i++)
|
||||||
{
|
{
|
||||||
UserDereferenceObject(AniCurIcon->aspcur[i]);
|
UserDereferenceObject(AniCurIcon->aspcur[i]);
|
||||||
IntDestroyCurIconObject(AniCurIcon->aspcur[i]);
|
IntDestroyCurIconObject(AniCurIcon->aspcur[i]);
|
||||||
|
@ -391,10 +391,10 @@ NtUserGetIconInfo(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Give back the icon information */
|
/* Give back the icon information */
|
||||||
if(IconInfo)
|
if (IconInfo)
|
||||||
{
|
{
|
||||||
PCURICON_OBJECT FrameCurIcon = CurIcon;
|
PCURICON_OBJECT FrameCurIcon = CurIcon;
|
||||||
if(CurIcon->CURSORF_flags & CURSORF_ACON)
|
if (CurIcon->CURSORF_flags & CURSORF_ACON)
|
||||||
{
|
{
|
||||||
/* Get information from first frame. */
|
/* Get information from first frame. */
|
||||||
FrameCurIcon = ((PACON)CurIcon)->aspcur[0];
|
FrameCurIcon = ((PACON)CurIcon)->aspcur[0];
|
||||||
|
@ -439,7 +439,7 @@ NtUserGetIconInfo(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Give back the module name */
|
/* Give back the module name */
|
||||||
if(lpModule)
|
if (lpModule)
|
||||||
{
|
{
|
||||||
ULONG BufLen = 0;
|
ULONG BufLen = 0;
|
||||||
if (!CurIcon->atomModName)
|
if (!CurIcon->atomModName)
|
||||||
|
@ -551,7 +551,7 @@ NtUserGetIconSize(
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CurIcon->CURSORF_flags & CURSORF_ACON)
|
if (CurIcon->CURSORF_flags & CURSORF_ACON)
|
||||||
{
|
{
|
||||||
/* Use first frame for animated cursors */
|
/* Use first frame for animated cursors */
|
||||||
PACON AniCurIcon = (PACON)CurIcon;
|
PACON AniCurIcon = (PACON)CurIcon;
|
||||||
|
@ -823,7 +823,6 @@ NtUserFindExistingCursorIcon(
|
||||||
|
|
||||||
TRACE("Enter NtUserFindExistingCursorIcon\n");
|
TRACE("Enter NtUserFindExistingCursorIcon\n");
|
||||||
|
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
ProbeForRead(param, sizeof(*param), 1);
|
ProbeForRead(param, sizeof(*param), 1);
|
||||||
|
@ -837,14 +836,14 @@ NtUserFindExistingCursorIcon(
|
||||||
|
|
||||||
/* Capture resource name (it can be an INTRESOURCE == ATOM) */
|
/* Capture resource name (it can be an INTRESOURCE == ATOM) */
|
||||||
Status = ProbeAndCaptureUnicodeStringOrAtom(&ustrRsrcSafe, pustrRsrc);
|
Status = ProbeAndCaptureUnicodeStringOrAtom(&ustrRsrcSafe, pustrRsrc);
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return NULL;
|
return NULL;
|
||||||
Status = ProbeAndCaptureUnicodeString(&ustrModuleSafe, UserMode, pustrModule);
|
Status = ProbeAndCaptureUnicodeString(&ustrModuleSafe, UserMode, pustrModule);
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
Status = RtlLookupAtomInAtomTable(gAtomTable, ustrModuleSafe.Buffer, &atomModName);
|
Status = RtlLookupAtomInAtomTable(gAtomTable, ustrModuleSafe.Buffer, &atomModName);
|
||||||
ReleaseCapturedUnicodeString(&ustrModuleSafe, UserMode);
|
ReleaseCapturedUnicodeString(&ustrModuleSafe, UserMode);
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* The module is not in the atom table. No chance to find the cursor */
|
/* The module is not in the atom table. No chance to find the cursor */
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -852,7 +851,7 @@ NtUserFindExistingCursorIcon(
|
||||||
|
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
CurIcon = pProcInfo->pCursorCache;
|
CurIcon = pProcInfo->pCursorCache;
|
||||||
while(CurIcon)
|
while (CurIcon)
|
||||||
{
|
{
|
||||||
/* Icon/cursor */
|
/* Icon/cursor */
|
||||||
if (paramSafe.bIcon != is_icon(CurIcon))
|
if (paramSafe.bIcon != is_icon(CurIcon))
|
||||||
|
@ -890,10 +889,10 @@ NtUserFindExistingCursorIcon(
|
||||||
//
|
//
|
||||||
// Now search Global Cursors or Icons.
|
// Now search Global Cursors or Icons.
|
||||||
//
|
//
|
||||||
if(CurIcon == NULL)
|
if (CurIcon == NULL)
|
||||||
{
|
{
|
||||||
CurIcon = gcurFirst;
|
CurIcon = gcurFirst;
|
||||||
while(CurIcon)
|
while (CurIcon)
|
||||||
{
|
{
|
||||||
/* Icon/cursor */
|
/* Icon/cursor */
|
||||||
if (paramSafe.bIcon != is_icon(CurIcon))
|
if (paramSafe.bIcon != is_icon(CurIcon))
|
||||||
|
@ -928,12 +927,12 @@ NtUserFindExistingCursorIcon(
|
||||||
CurIcon = CurIcon->pcurNext;
|
CurIcon = CurIcon->pcurNext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(CurIcon)
|
if (CurIcon)
|
||||||
Ret = CurIcon->head.h;
|
Ret = CurIcon->head.h;
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if(!IS_INTRESOURCE(ustrRsrcSafe.Buffer))
|
if (!IS_INTRESOURCE(ustrRsrcSafe.Buffer))
|
||||||
ExFreePoolWithTag(ustrRsrcSafe.Buffer, TAG_STRING);
|
ExFreePoolWithTag(ustrRsrcSafe.Buffer, TAG_STRING);
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
|
@ -1100,7 +1099,7 @@ NtUserSetCursorIconData(
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
ProbeForRead(pCursorData, sizeof(*pCursorData), 1);
|
ProbeForRead(pCursorData, sizeof(*pCursorData), 1);
|
||||||
if(pCursorData->CURSORF_flags & CURSORF_ACON)
|
if (pCursorData->CURSORF_flags & CURSORF_ACON)
|
||||||
{
|
{
|
||||||
/* This is an animated cursor */
|
/* This is an animated cursor */
|
||||||
PACON AniCurIcon = (PACON)CurIcon;
|
PACON AniCurIcon = (PACON)CurIcon;
|
||||||
|
@ -1156,48 +1155,48 @@ NtUserSetCursorIconData(
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IsAnim)
|
if (IsAnim)
|
||||||
{
|
{
|
||||||
PACON AniCurIcon = (PACON)CurIcon;
|
PACON AniCurIcon = (PACON)CurIcon;
|
||||||
/* This is an animated cursor. Create a cursor object for each frame and set up the data */
|
/* This is an animated cursor. Create a cursor object for each frame and set up the data */
|
||||||
for(i = 0; i < numFrames; i++)
|
for (i = 0; i < numFrames; i++)
|
||||||
{
|
{
|
||||||
HANDLE hCurFrame = IntCreateCurIconHandle(FALSE);
|
HANDLE hCurFrame = IntCreateCurIconHandle(FALSE);
|
||||||
if(!NtUserSetCursorIconData(hCurFrame, NULL, NULL, pCursorData))
|
if (!NtUserSetCursorIconData(hCurFrame, NULL, NULL, pCursorData))
|
||||||
goto done;
|
goto done;
|
||||||
AniCurIcon->aspcur[i] = UserGetCurIconObject(hCurFrame);
|
AniCurIcon->aspcur[i] = UserGetCurIconObject(hCurFrame);
|
||||||
if(!AniCurIcon->aspcur[i])
|
if (!AniCurIcon->aspcur[i])
|
||||||
goto done;
|
goto done;
|
||||||
pCursorData++;
|
pCursorData++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CurIcon->CURSORF_flags & CURSORF_LRSHARED)
|
if (CurIcon->CURSORF_flags & CURSORF_LRSHARED)
|
||||||
{
|
{
|
||||||
IsShared = TRUE;
|
IsShared = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support global public cursors and icons too.
|
// Support global public cursors and icons too.
|
||||||
if(!IsAnim || IsShared)
|
if (!IsAnim || IsShared)
|
||||||
{
|
{
|
||||||
if(pustrRsrc && pustrModule)
|
if (pustrRsrc && pustrModule)
|
||||||
{
|
{
|
||||||
UNICODE_STRING ustrModuleSafe;
|
UNICODE_STRING ustrModuleSafe;
|
||||||
/* We use this convenient function, because INTRESOURCEs and ATOMs are the same */
|
/* We use this convenient function, because INTRESOURCEs and ATOMs are the same */
|
||||||
Status = ProbeAndCaptureUnicodeStringOrAtom(&CurIcon->strName, pustrRsrc);
|
Status = ProbeAndCaptureUnicodeStringOrAtom(&CurIcon->strName, pustrRsrc);
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
Status = ProbeAndCaptureUnicodeString(&ustrModuleSafe, UserMode, pustrModule);
|
Status = ProbeAndCaptureUnicodeString(&ustrModuleSafe, UserMode, pustrModule);
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
Status = RtlAddAtomToAtomTable(gAtomTable, ustrModuleSafe.Buffer, &CurIcon->atomModName);
|
Status = RtlAddAtomToAtomTable(gAtomTable, ustrModuleSafe.Buffer, &CurIcon->atomModName);
|
||||||
ReleaseCapturedUnicodeString(&ustrModuleSafe, UserMode);
|
ReleaseCapturedUnicodeString(&ustrModuleSafe, UserMode);
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!CurIcon->hbmMask)
|
if (!CurIcon->hbmMask)
|
||||||
{
|
{
|
||||||
ERR("NtUserSetCursorIconData was got no hbmMask.\n");
|
ERR("NtUserSetCursorIconData was got no hbmMask.\n");
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
@ -1206,13 +1205,13 @@ NtUserSetCursorIconData(
|
||||||
|
|
||||||
GreSetObjectOwner(CurIcon->hbmMask, GDI_OBJ_HMGR_PUBLIC);
|
GreSetObjectOwner(CurIcon->hbmMask, GDI_OBJ_HMGR_PUBLIC);
|
||||||
|
|
||||||
if(CurIcon->hbmColor)
|
if (CurIcon->hbmColor)
|
||||||
GreSetObjectOwner(CurIcon->hbmColor, GDI_OBJ_HMGR_PUBLIC);
|
GreSetObjectOwner(CurIcon->hbmColor, GDI_OBJ_HMGR_PUBLIC);
|
||||||
|
|
||||||
if(CurIcon->hbmAlpha)
|
if (CurIcon->hbmAlpha)
|
||||||
GreSetObjectOwner(CurIcon->hbmAlpha, GDI_OBJ_HMGR_PUBLIC);
|
GreSetObjectOwner(CurIcon->hbmAlpha, GDI_OBJ_HMGR_PUBLIC);
|
||||||
|
|
||||||
if(IsShared)
|
if (IsShared)
|
||||||
{
|
{
|
||||||
/* Update process cache in case of shared cursor */
|
/* Update process cache in case of shared cursor */
|
||||||
PPROCESSINFO ppi = CurIcon->head.ppi;
|
PPROCESSINFO ppi = CurIcon->head.ppi;
|
||||||
|
@ -1225,18 +1224,18 @@ NtUserSetCursorIconData(
|
||||||
Ret = TRUE;
|
Ret = TRUE;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if(!Ret && (!IsAnim || IsShared))
|
if (!Ret && (!IsAnim || IsShared))
|
||||||
{
|
{
|
||||||
if(!IS_INTRESOURCE(CurIcon->strName.Buffer))
|
if (!IS_INTRESOURCE(CurIcon->strName.Buffer))
|
||||||
ExFreePoolWithTag(CurIcon->strName.Buffer, TAG_STRING);
|
ExFreePoolWithTag(CurIcon->strName.Buffer, TAG_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Ret && IsAnim)
|
if (!Ret && IsAnim)
|
||||||
{
|
{
|
||||||
PACON AniCurIcon = (PACON)CurIcon;
|
PACON AniCurIcon = (PACON)CurIcon;
|
||||||
for(i = 0; i < numFrames; i++)
|
for (i = 0; i < numFrames; i++)
|
||||||
{
|
{
|
||||||
if(AniCurIcon->aspcur[i])
|
if (AniCurIcon->aspcur[i])
|
||||||
{
|
{
|
||||||
UserDereferenceObject(AniCurIcon->aspcur[i]);
|
UserDereferenceObject(AniCurIcon->aspcur[i]);
|
||||||
IntDestroyCurIconObject(AniCurIcon->aspcur[i]);
|
IntDestroyCurIconObject(AniCurIcon->aspcur[i]);
|
||||||
|
@ -1287,7 +1286,7 @@ UserDrawIconEx(
|
||||||
EXLATEOBJ exlo;
|
EXLATEOBJ exlo;
|
||||||
|
|
||||||
/* Stupid case */
|
/* Stupid case */
|
||||||
if((diFlags & DI_NORMAL) == 0)
|
if ((diFlags & DI_NORMAL) == 0)
|
||||||
{
|
{
|
||||||
ERR("DrawIconEx called without mask or color bitmap to draw.\n");
|
ERR("DrawIconEx called without mask or color bitmap to draw.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1296,7 +1295,7 @@ UserDrawIconEx(
|
||||||
if (pIcon->CURSORF_flags & CURSORF_ACON)
|
if (pIcon->CURSORF_flags & CURSORF_ACON)
|
||||||
{
|
{
|
||||||
ACON* pAcon = (ACON*)pIcon;
|
ACON* pAcon = (ACON*)pIcon;
|
||||||
if(istepIfAniCur >= pAcon->cicur)
|
if (istepIfAniCur >= pAcon->cicur)
|
||||||
{
|
{
|
||||||
ERR("NtUserDrawIconEx: istepIfAniCur too big!\n");
|
ERR("NtUserDrawIconEx: istepIfAniCur too big!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1313,14 +1312,14 @@ UserDrawIconEx(
|
||||||
* Shared locks are enough, we are only reading those bitmaps
|
* Shared locks are enough, we are only reading those bitmaps
|
||||||
*/
|
*/
|
||||||
psurfMask = SURFACE_ShareLockSurface(hbmMask);
|
psurfMask = SURFACE_ShareLockSurface(hbmMask);
|
||||||
if(psurfMask == NULL)
|
if (psurfMask == NULL)
|
||||||
{
|
{
|
||||||
ERR("Unable to lock the mask surface.\n");
|
ERR("Unable to lock the mask surface.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Color bitmap is not mandatory */
|
/* Color bitmap is not mandatory */
|
||||||
if(hbmColor == NULL)
|
if (hbmColor == NULL)
|
||||||
{
|
{
|
||||||
/* But then the mask bitmap must have the information in it's bottom half */
|
/* But then the mask bitmap must have the information in it's bottom half */
|
||||||
ASSERT(psurfMask->SurfObj.sizlBitmap.cy == 2*pIcon->cy);
|
ASSERT(psurfMask->SurfObj.sizlBitmap.cy == 2*pIcon->cy);
|
||||||
|
@ -1334,18 +1333,18 @@ UserDrawIconEx(
|
||||||
}
|
}
|
||||||
|
|
||||||
pdc = DC_LockDc(hDc);
|
pdc = DC_LockDc(hDc);
|
||||||
if(!pdc)
|
if (!pdc)
|
||||||
{
|
{
|
||||||
ERR("Could not lock the destination DC.\n");
|
ERR("Could not lock the destination DC.\n");
|
||||||
SURFACE_ShareUnlockSurface(psurfMask);
|
SURFACE_ShareUnlockSurface(psurfMask);
|
||||||
if(psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
|
if (psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fix width parameter, if needed */
|
/* Fix width parameter, if needed */
|
||||||
if (!cxWidth)
|
if (!cxWidth)
|
||||||
{
|
{
|
||||||
if(diFlags & DI_DEFAULTSIZE)
|
if (diFlags & DI_DEFAULTSIZE)
|
||||||
cxWidth = is_icon(pIcon) ?
|
cxWidth = is_icon(pIcon) ?
|
||||||
UserGetSystemMetrics(SM_CXICON) : UserGetSystemMetrics(SM_CXCURSOR);
|
UserGetSystemMetrics(SM_CXICON) : UserGetSystemMetrics(SM_CXCURSOR);
|
||||||
else
|
else
|
||||||
|
@ -1355,7 +1354,7 @@ UserDrawIconEx(
|
||||||
/* Fix height parameter, if needed */
|
/* Fix height parameter, if needed */
|
||||||
if (!cyHeight)
|
if (!cyHeight)
|
||||||
{
|
{
|
||||||
if(diFlags & DI_DEFAULTSIZE)
|
if (diFlags & DI_DEFAULTSIZE)
|
||||||
cyHeight = is_icon(pIcon) ?
|
cyHeight = is_icon(pIcon) ?
|
||||||
UserGetSystemMetrics(SM_CYICON) : UserGetSystemMetrics(SM_CYCURSOR);
|
UserGetSystemMetrics(SM_CYICON) : UserGetSystemMetrics(SM_CYCURSOR);
|
||||||
else
|
else
|
||||||
|
@ -1373,13 +1372,13 @@ UserDrawIconEx(
|
||||||
/* We now have our destination surface and rectangle */
|
/* We now have our destination surface and rectangle */
|
||||||
psurfDest = pdc->dclevel.pSurface;
|
psurfDest = pdc->dclevel.pSurface;
|
||||||
|
|
||||||
if(psurfDest == NULL)
|
if (psurfDest == NULL)
|
||||||
{
|
{
|
||||||
/* Empty DC */
|
/* Empty DC */
|
||||||
DC_vFinishBlit(pdc, NULL);
|
DC_vFinishBlit(pdc, NULL);
|
||||||
DC_UnlockDc(pdc);
|
DC_UnlockDc(pdc);
|
||||||
SURFACE_ShareUnlockSurface(psurfMask);
|
SURFACE_ShareUnlockSurface(psurfMask);
|
||||||
if(psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
|
if (psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1398,7 +1397,7 @@ UserDrawIconEx(
|
||||||
|
|
||||||
TRACE("Performing off-screen rendering.\n");
|
TRACE("Performing off-screen rendering.\n");
|
||||||
|
|
||||||
if(!pbrush)
|
if (!pbrush)
|
||||||
{
|
{
|
||||||
ERR("Failed to get brush object.\n");
|
ERR("Failed to get brush object.\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
@ -1408,7 +1407,7 @@ UserDrawIconEx(
|
||||||
psurfOffScreen = SURFACE_AllocSurface(STYPE_BITMAP,
|
psurfOffScreen = SURFACE_AllocSurface(STYPE_BITMAP,
|
||||||
cxWidth, cyHeight, psurfDest->SurfObj.iBitmapFormat,
|
cxWidth, cyHeight, psurfDest->SurfObj.iBitmapFormat,
|
||||||
0, 0, NULL);
|
0, 0, NULL);
|
||||||
if(!psurfOffScreen)
|
if (!psurfOffScreen)
|
||||||
{
|
{
|
||||||
ERR("Failed to allocate the off-screen surface.\n");
|
ERR("Failed to allocate the off-screen surface.\n");
|
||||||
BRUSH_ShareUnlockBrush(pbrush);
|
BRUSH_ShareUnlockBrush(pbrush);
|
||||||
|
@ -1435,7 +1434,7 @@ UserDrawIconEx(
|
||||||
EBRUSHOBJ_vCleanup(&eboFill);
|
EBRUSHOBJ_vCleanup(&eboFill);
|
||||||
BRUSH_ShareUnlockBrush(pbrush);
|
BRUSH_ShareUnlockBrush(pbrush);
|
||||||
|
|
||||||
if(!Ret)
|
if (!Ret)
|
||||||
{
|
{
|
||||||
ERR("Failed to paint the off-screen surface.\n");
|
ERR("Failed to paint the off-screen surface.\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
@ -1464,7 +1463,7 @@ UserDrawIconEx(
|
||||||
EBRUSHOBJ_vCleanup(&eboFill);
|
EBRUSHOBJ_vCleanup(&eboFill);
|
||||||
BRUSH_ShareUnlockBrush(pbrush);
|
BRUSH_ShareUnlockBrush(pbrush);
|
||||||
|
|
||||||
if(!Ret)
|
if (!Ret)
|
||||||
{
|
{
|
||||||
ERR("Failed to paint the off-screen surface.\n");
|
ERR("Failed to paint the off-screen surface.\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
@ -1480,13 +1479,13 @@ UserDrawIconEx(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now do the rendering */
|
/* Now do the rendering */
|
||||||
if(hbmAlpha && ((diFlags & DI_NORMAL) == DI_NORMAL))
|
if (hbmAlpha && ((diFlags & DI_NORMAL) == DI_NORMAL))
|
||||||
{
|
{
|
||||||
BLENDOBJ blendobj = { {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA } };
|
BLENDOBJ blendobj = { {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA } };
|
||||||
PSURFACE psurf = NULL;
|
PSURFACE psurf = NULL;
|
||||||
|
|
||||||
psurf = SURFACE_ShareLockSurface(hbmAlpha);
|
psurf = SURFACE_ShareLockSurface(hbmAlpha);
|
||||||
if(!psurf)
|
if (!psurf)
|
||||||
{
|
{
|
||||||
ERR("SURFACE_LockSurface failed!\n");
|
ERR("SURFACE_LockSurface failed!\n");
|
||||||
goto NoAlpha;
|
goto NoAlpha;
|
||||||
|
@ -1506,7 +1505,7 @@ UserDrawIconEx(
|
||||||
|
|
||||||
EXLATEOBJ_vCleanup(&exlo);
|
EXLATEOBJ_vCleanup(&exlo);
|
||||||
SURFACE_ShareUnlockSurface(psurf);
|
SURFACE_ShareUnlockSurface(psurf);
|
||||||
if(Ret) goto done;
|
if (Ret) goto done;
|
||||||
ERR("NtGdiAlphaBlend failed!\n");
|
ERR("NtGdiAlphaBlend failed!\n");
|
||||||
}
|
}
|
||||||
NoAlpha:
|
NoAlpha:
|
||||||
|
@ -1531,14 +1530,14 @@ NoAlpha:
|
||||||
|
|
||||||
EXLATEOBJ_vCleanup(&exlo);
|
EXLATEOBJ_vCleanup(&exlo);
|
||||||
|
|
||||||
if(!Ret)
|
if (!Ret)
|
||||||
{
|
{
|
||||||
ERR("Failed to mask the bitmap data.\n");
|
ERR("Failed to mask the bitmap data.\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(diFlags & DI_IMAGE)
|
if (diFlags & DI_IMAGE)
|
||||||
{
|
{
|
||||||
if (psurfColor)
|
if (psurfColor)
|
||||||
{
|
{
|
||||||
|
@ -1561,7 +1560,7 @@ NoAlpha:
|
||||||
|
|
||||||
EXLATEOBJ_vCleanup(&exlo);
|
EXLATEOBJ_vCleanup(&exlo);
|
||||||
|
|
||||||
if(!Ret)
|
if (!Ret)
|
||||||
{
|
{
|
||||||
ERR("Failed to render the icon bitmap.\n");
|
ERR("Failed to render the icon bitmap.\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
@ -1590,7 +1589,7 @@ NoAlpha:
|
||||||
|
|
||||||
EXLATEOBJ_vCleanup(&exlo);
|
EXLATEOBJ_vCleanup(&exlo);
|
||||||
|
|
||||||
if(!Ret)
|
if (!Ret)
|
||||||
{
|
{
|
||||||
ERR("Failed to render the icon bitmap.\n");
|
ERR("Failed to render the icon bitmap.\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
@ -1601,7 +1600,7 @@ NoAlpha:
|
||||||
done:
|
done:
|
||||||
#if 0
|
#if 0
|
||||||
/* We're done. Was it a double buffered draw ? */
|
/* We're done. Was it a double buffered draw ? */
|
||||||
if(bOffScreen)
|
if (bOffScreen)
|
||||||
{
|
{
|
||||||
/* Yes. Draw it back to our DC */
|
/* Yes. Draw it back to our DC */
|
||||||
POINTL ptSrc = {0, 0};
|
POINTL ptSrc = {0, 0};
|
||||||
|
@ -1637,7 +1636,7 @@ done:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
Cleanup:
|
Cleanup:
|
||||||
if(pdc)
|
if (pdc)
|
||||||
{
|
{
|
||||||
DC_vFinishBlit(pdc, NULL);
|
DC_vFinishBlit(pdc, NULL);
|
||||||
DC_UnlockDc(pdc);
|
DC_UnlockDc(pdc);
|
||||||
|
@ -1645,13 +1644,13 @@ Cleanup:
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Delete off screen rendering surface */
|
/* Delete off screen rendering surface */
|
||||||
if(psurfOffScreen)
|
if (psurfOffScreen)
|
||||||
GDIOBJ_vDeleteObject(&psurfOffScreen->BaseObject);
|
GDIOBJ_vDeleteObject(&psurfOffScreen->BaseObject);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Unlock other surfaces */
|
/* Unlock other surfaces */
|
||||||
SURFACE_ShareUnlockSurface(psurfMask);
|
SURFACE_ShareUnlockSurface(psurfMask);
|
||||||
if(psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
|
if (psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -1731,10 +1730,10 @@ NtUserGetCursorFrameInfo(
|
||||||
|
|
||||||
ret = CurIcon->head.h;
|
ret = CurIcon->head.h;
|
||||||
|
|
||||||
if(CurIcon->CURSORF_flags & CURSORF_ACON)
|
if (CurIcon->CURSORF_flags & CURSORF_ACON)
|
||||||
{
|
{
|
||||||
PACON AniCurIcon = (PACON)CurIcon;
|
PACON AniCurIcon = (PACON)CurIcon;
|
||||||
if(istep >= AniCurIcon->cicur)
|
if (istep >= AniCurIcon->cicur)
|
||||||
{
|
{
|
||||||
UserDereferenceObject(CurIcon);
|
UserDereferenceObject(CurIcon);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
@ -1804,7 +1803,7 @@ NtUserSetSystemCursor(
|
||||||
|
|
||||||
ppi = PsGetCurrentProcessWin32Process();
|
ppi = PsGetCurrentProcessWin32Process();
|
||||||
|
|
||||||
for(i = 0 ; i < 16; i++)
|
for (i = 0 ; i < 16; i++)
|
||||||
{
|
{
|
||||||
if (gasyscur[i].type == id)
|
if (gasyscur[i].type == id)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue