mirror of
https://github.com/reactos/reactos.git
synced 2024-07-05 12:15:46 +00:00
[WIN32K]
- Formatting only, no code change svn path=/trunk/; revision=61540
This commit is contained in:
parent
c3b566e4d8
commit
ade300cb46
|
@ -16,29 +16,29 @@ INT
|
|||
FASTCALL
|
||||
IntGetipfdDevMax(PDC pdc)
|
||||
{
|
||||
INT Ret = 0;
|
||||
PPDEVOBJ ppdev = pdc->ppdev;
|
||||
INT Ret = 0;
|
||||
PPDEVOBJ ppdev = pdc->ppdev;
|
||||
|
||||
if (ppdev->flFlags & PDEV_META_DEVICE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (ppdev->flFlags & PDEV_META_DEVICE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ppdev->DriverFunctions.DescribePixelFormat)
|
||||
{
|
||||
Ret = ppdev->DriverFunctions.DescribePixelFormat(
|
||||
if (ppdev->DriverFunctions.DescribePixelFormat)
|
||||
{
|
||||
Ret = ppdev->DriverFunctions.DescribePixelFormat(
|
||||
ppdev->dhpdev,
|
||||
1,
|
||||
0,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (Ret) pdc->ipfdDevMax = Ret;
|
||||
if (Ret) pdc->ipfdDevMax = Ret;
|
||||
|
||||
return Ret;
|
||||
return Ret;
|
||||
}
|
||||
|
||||
_Success_(return != 0)
|
||||
_Success_(return != 0)
|
||||
INT
|
||||
APIENTRY
|
||||
NtGdiDescribePixelFormat(
|
||||
|
@ -47,142 +47,145 @@ NtGdiDescribePixelFormat(
|
|||
_In_ UINT cjpfd,
|
||||
_When_(cjpfd != 0, _Out_) PPIXELFORMATDESCRIPTOR ppfd)
|
||||
{
|
||||
PDC pdc;
|
||||
PPDEVOBJ ppdev;
|
||||
INT Ret = 0;
|
||||
PIXELFORMATDESCRIPTOR pfdSafe;
|
||||
PDC pdc;
|
||||
PPDEVOBJ ppdev;
|
||||
INT Ret = 0;
|
||||
PIXELFORMATDESCRIPTOR pfdSafe;
|
||||
|
||||
if ((ppfd == NULL) && (cjpfd != 0)) return 0;
|
||||
if ((ppfd == NULL) && (cjpfd != 0)) return 0;
|
||||
|
||||
pdc = DC_LockDc(hdc);
|
||||
if (!pdc)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
pdc = DC_LockDc(hdc);
|
||||
if (!pdc)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!pdc->ipfdDevMax) IntGetipfdDevMax(pdc);
|
||||
if (!pdc->ipfdDevMax)
|
||||
IntGetipfdDevMax(pdc);
|
||||
|
||||
if ((ipfd < 1) || (ipfd > pdc->ipfdDevMax))
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto Exit;
|
||||
}
|
||||
if ((ipfd < 1) || (ipfd > pdc->ipfdDevMax))
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
ppdev = pdc->ppdev;
|
||||
ppdev = pdc->ppdev;
|
||||
|
||||
if (ppdev->flFlags & PDEV_META_DEVICE)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
goto Exit;
|
||||
}
|
||||
if (ppdev->flFlags & PDEV_META_DEVICE)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
if (ppdev->DriverFunctions.DescribePixelFormat)
|
||||
{
|
||||
Ret = ppdev->DriverFunctions.DescribePixelFormat(
|
||||
ppdev->dhpdev,
|
||||
ipfd,
|
||||
sizeof(pfdSafe),
|
||||
&pfdSafe);
|
||||
}
|
||||
if (ppdev->DriverFunctions.DescribePixelFormat)
|
||||
{
|
||||
Ret = ppdev->DriverFunctions.DescribePixelFormat(
|
||||
ppdev->dhpdev,
|
||||
ipfd,
|
||||
sizeof(pfdSafe),
|
||||
&pfdSafe);
|
||||
}
|
||||
|
||||
if (Ret && cjpfd)
|
||||
{
|
||||
_SEH2_TRY
|
||||
{
|
||||
cjpfd = min(cjpfd, sizeof(PIXELFORMATDESCRIPTOR));
|
||||
ProbeForWrite(ppfd, cjpfd, 1);
|
||||
RtlCopyMemory(ppfd, &pfdSafe, cjpfd);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
SetLastNtError(_SEH2_GetExceptionCode());
|
||||
}
|
||||
_SEH2_END;
|
||||
}
|
||||
if (Ret && cjpfd)
|
||||
{
|
||||
_SEH2_TRY
|
||||
{
|
||||
cjpfd = min(cjpfd, sizeof(PIXELFORMATDESCRIPTOR));
|
||||
ProbeForWrite(ppfd, cjpfd, 1);
|
||||
RtlCopyMemory(ppfd, &pfdSafe, cjpfd);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
SetLastNtError(_SEH2_GetExceptionCode());
|
||||
}
|
||||
_SEH2_END;
|
||||
}
|
||||
|
||||
Exit:
|
||||
DC_UnlockDc(pdc);
|
||||
return Ret;
|
||||
DC_UnlockDc(pdc);
|
||||
return Ret;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
NtGdiSetPixelFormat(
|
||||
IN HDC hdc,
|
||||
IN INT ipfd)
|
||||
_In_ HDC hdc,
|
||||
_In_ INT ipfd)
|
||||
{
|
||||
PDC pdc;
|
||||
PPDEVOBJ ppdev;
|
||||
HWND hWnd;
|
||||
PWNDOBJ pWndObj;
|
||||
SURFOBJ *pso = NULL;
|
||||
BOOL Ret = FALSE;
|
||||
PDC pdc;
|
||||
PPDEVOBJ ppdev;
|
||||
HWND hWnd;
|
||||
PWNDOBJ pWndObj;
|
||||
SURFOBJ *pso = NULL;
|
||||
BOOL Ret = FALSE;
|
||||
|
||||
pdc = DC_LockDc(hdc);
|
||||
if (!pdc)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdc = DC_LockDc(hdc);
|
||||
if (!pdc)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!pdc->ipfdDevMax) IntGetipfdDevMax(pdc);
|
||||
if (!pdc->ipfdDevMax) IntGetipfdDevMax(pdc);
|
||||
|
||||
if ( ipfd < 1 ||
|
||||
ipfd > pdc->ipfdDevMax )
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto Exit;
|
||||
}
|
||||
if ( ipfd < 1 ||
|
||||
ipfd > pdc->ipfdDevMax )
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
UserEnterExclusive();
|
||||
hWnd = UserGethWnd(hdc, &pWndObj);
|
||||
UserLeave();
|
||||
UserEnterExclusive();
|
||||
hWnd = UserGethWnd(hdc, &pWndObj);
|
||||
UserLeave();
|
||||
|
||||
if (!hWnd)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_STYLE);
|
||||
goto Exit;
|
||||
}
|
||||
if (!hWnd)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_STYLE);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
ppdev = pdc->ppdev;
|
||||
ppdev = pdc->ppdev;
|
||||
|
||||
/*
|
||||
WndObj is needed so exit on NULL pointer.
|
||||
*/
|
||||
if (pWndObj) pso = pWndObj->psoOwner;
|
||||
else
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_PIXEL_FORMAT);
|
||||
goto Exit;
|
||||
}
|
||||
/*
|
||||
WndObj is needed so exit on NULL pointer.
|
||||
*/
|
||||
if (pWndObj)
|
||||
pso = pWndObj->psoOwner;
|
||||
else
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_PIXEL_FORMAT);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
if (ppdev->flFlags & PDEV_META_DEVICE)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
goto Exit;
|
||||
}
|
||||
if (ppdev->flFlags & PDEV_META_DEVICE)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
if (ppdev->DriverFunctions.SetPixelFormat)
|
||||
{
|
||||
Ret = ppdev->DriverFunctions.SetPixelFormat(
|
||||
if (ppdev->DriverFunctions.SetPixelFormat)
|
||||
{
|
||||
Ret = ppdev->DriverFunctions.SetPixelFormat(
|
||||
pso,
|
||||
ipfd,
|
||||
hWnd);
|
||||
}
|
||||
}
|
||||
|
||||
Exit:
|
||||
DC_UnlockDc(pdc);
|
||||
return Ret;
|
||||
DC_UnlockDc(pdc);
|
||||
return Ret;
|
||||
}
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
NtGdiSwapBuffers(HDC hDC)
|
||||
NtGdiSwapBuffers(
|
||||
_In_ HDC hDC)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue