mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
Fix formatting add a FIXME comment, no code change
svn path=/trunk/; revision=40202
This commit is contained in:
parent
0a1914e0b7
commit
65ce2884da
1 changed files with 460 additions and 457 deletions
|
@ -26,7 +26,7 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
||||||
if (Driver != NULL)
|
if (Driver != NULL)
|
||||||
{
|
{
|
||||||
Buf = ExAllocatePoolWithTag(PagedPool, Driver->MaximumLength, TAG_DC);
|
Buf = ExAllocatePoolWithTag(PagedPool, Driver->MaximumLength, TAG_DC);
|
||||||
if(!Buf)
|
if (!Buf)
|
||||||
{
|
{
|
||||||
DPRINT1("ExAllocatePoolWithTag failed\n");
|
DPRINT1("ExAllocatePoolWithTag failed\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -35,9 +35,9 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
||||||
}
|
}
|
||||||
|
|
||||||
NewDC = (PDC)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_DC);
|
NewDC = (PDC)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_DC);
|
||||||
if(!NewDC)
|
if (!NewDC)
|
||||||
{
|
{
|
||||||
if(Buf)
|
if (Buf)
|
||||||
{
|
{
|
||||||
ExFreePoolWithTag(Buf, TAG_DC);
|
ExFreePoolWithTag(Buf, TAG_DC);
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ VOID FASTCALL
|
||||||
DC_FreeDC(HDC DCToFree)
|
DC_FreeDC(HDC DCToFree)
|
||||||
{
|
{
|
||||||
DC_FreeDcAttr(DCToFree);
|
DC_FreeDcAttr(DCToFree);
|
||||||
if(!IsObjectDead( DCToFree ))
|
if (!IsObjectDead( DCToFree ))
|
||||||
{
|
{
|
||||||
if (!GDIOBJ_FreeObjByHandle(DCToFree, GDI_OBJECT_TYPE_DC))
|
if (!GDIOBJ_FreeObjByHandle(DCToFree, GDI_OBJECT_TYPE_DC))
|
||||||
{
|
{
|
||||||
|
@ -150,25 +150,25 @@ DC_SetOwnership(HDC hDC, PEPROCESS Owner)
|
||||||
{
|
{
|
||||||
PDC pDC;
|
PDC pDC;
|
||||||
|
|
||||||
if(!GDIOBJ_SetOwnership(hDC, Owner)) return FALSE;
|
if (!GDIOBJ_SetOwnership(hDC, Owner)) return FALSE;
|
||||||
pDC = DC_LockDc(hDC);
|
pDC = DC_LockDc(hDC);
|
||||||
if (pDC)
|
if (pDC)
|
||||||
{
|
{
|
||||||
if (pDC->rosdc.hClipRgn)
|
if (pDC->rosdc.hClipRgn)
|
||||||
{
|
{
|
||||||
if(!GDIOBJ_SetOwnership(pDC->rosdc.hClipRgn, Owner)) return FALSE;
|
if (!GDIOBJ_SetOwnership(pDC->rosdc.hClipRgn, Owner)) return FALSE;
|
||||||
}
|
}
|
||||||
if (pDC->rosdc.hVisRgn)
|
if (pDC->rosdc.hVisRgn)
|
||||||
{
|
{
|
||||||
if(!GDIOBJ_SetOwnership(pDC->rosdc.hVisRgn, Owner)) return FALSE;
|
if (!GDIOBJ_SetOwnership(pDC->rosdc.hVisRgn, Owner)) return FALSE;
|
||||||
}
|
}
|
||||||
if (pDC->rosdc.hGCClipRgn)
|
if (pDC->rosdc.hGCClipRgn)
|
||||||
{
|
{
|
||||||
if(!GDIOBJ_SetOwnership(pDC->rosdc.hGCClipRgn, Owner)) return FALSE;
|
if (!GDIOBJ_SetOwnership(pDC->rosdc.hGCClipRgn, Owner)) return FALSE;
|
||||||
}
|
}
|
||||||
if (pDC->dclevel.hPath)
|
if (pDC->dclevel.hPath)
|
||||||
{
|
{
|
||||||
if(!GDIOBJ_SetOwnership(pDC->dclevel.hPath, Owner)) return FALSE;
|
if (!GDIOBJ_SetOwnership(pDC->dclevel.hPath, Owner)) return FALSE;
|
||||||
}
|
}
|
||||||
DC_UnlockDc(pDC);
|
DC_UnlockDc(pDC);
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,8 @@ DC_SetOwnership(HDC hDC, PEPROCESS Owner)
|
||||||
|
|
||||||
|
|
||||||
HDC FASTCALL
|
HDC FASTCALL
|
||||||
IntGdiCreateDC(PUNICODE_STRING Driver,
|
IntGdiCreateDC(
|
||||||
|
PUNICODE_STRING Driver,
|
||||||
PUNICODE_STRING Device,
|
PUNICODE_STRING Device,
|
||||||
PVOID pUMdhpdev,
|
PVOID pUMdhpdev,
|
||||||
CONST PDEVMODEW InitData,
|
CONST PDEVMODEW InitData,
|
||||||
|
@ -214,20 +215,23 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
calledFromUser = UserIsEntered();
|
calledFromUser = UserIsEntered();
|
||||||
if (!calledFromUser){
|
if (!calledFromUser)
|
||||||
|
{
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! co_IntGraphicsCheck(TRUE))
|
if (! co_IntGraphicsCheck(TRUE))
|
||||||
{
|
{
|
||||||
if (!calledFromUser){
|
if (!calledFromUser)
|
||||||
|
{
|
||||||
UserLeave();
|
UserLeave();
|
||||||
}
|
}
|
||||||
DPRINT1("Unable to initialize graphics, returning NULL dc\n");
|
DPRINT1("Unable to initialize graphics, returning NULL dc\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!calledFromUser){
|
if (!calledFromUser)
|
||||||
|
{
|
||||||
UserLeave();
|
UserLeave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +267,7 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
pdc->dctype = DC_TYPE_DIRECT;
|
pdc->dctype = DC_TYPE_DIRECT;
|
||||||
|
|
||||||
pdc->dhpdev = PrimarySurface.hPDev;
|
pdc->dhpdev = PrimarySurface.hPDev;
|
||||||
if(pUMdhpdev) pUMdhpdev = pdc->dhpdev; // set DHPDEV for device.
|
if (pUMdhpdev) pUMdhpdev = pdc->dhpdev; // set DHPDEV for device.
|
||||||
pdc->ppdev = (PVOID)&PrimarySurface;
|
pdc->ppdev = (PVOID)&PrimarySurface;
|
||||||
pdc->rosdc.hBitmap = (HBITMAP)PrimarySurface.pSurface; // <- what kind of haxx0ry is that?
|
pdc->rosdc.hBitmap = (HBITMAP)PrimarySurface.pSurface; // <- what kind of haxx0ry is that?
|
||||||
// ATM we only have one display.
|
// ATM we only have one display.
|
||||||
|
@ -331,7 +335,8 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
|
|
||||||
|
|
||||||
HDC APIENTRY
|
HDC APIENTRY
|
||||||
NtGdiOpenDCW( PUNICODE_STRING Device,
|
NtGdiOpenDCW(
|
||||||
|
PUNICODE_STRING Device,
|
||||||
DEVMODEW *InitData,
|
DEVMODEW *InitData,
|
||||||
PUNICODE_STRING pustrLogAddr,
|
PUNICODE_STRING pustrLogAddr,
|
||||||
ULONG iType,
|
ULONG iType,
|
||||||
|
@ -345,29 +350,24 @@ NtGdiOpenDCW( PUNICODE_STRING Device,
|
||||||
HDC Ret;
|
HDC Ret;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
if(InitData)
|
if (InitData)
|
||||||
{
|
{
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
if (pUMdhpdev)
|
if (pUMdhpdev)
|
||||||
{
|
{
|
||||||
ProbeForWrite(pUMdhpdev,
|
ProbeForWrite(pUMdhpdev, sizeof(PVOID), 1);
|
||||||
sizeof(PVOID),
|
|
||||||
1);
|
|
||||||
}
|
}
|
||||||
ProbeForRead(InitData,
|
ProbeForRead(InitData, sizeof(DEVMODEW), 1);
|
||||||
sizeof(DEVMODEW),
|
RtlCopyMemory(&SafeInitData, InitData, sizeof(DEVMODEW));
|
||||||
1);
|
|
||||||
RtlCopyMemory(&SafeInitData,
|
|
||||||
InitData,
|
|
||||||
sizeof(DEVMODEW));
|
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
Status = _SEH2_GetExceptionCode();
|
Status = _SEH2_GetExceptionCode();
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
if(!NT_SUCCESS(Status))
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -375,10 +375,10 @@ NtGdiOpenDCW( PUNICODE_STRING Device,
|
||||||
/* FIXME - InitData can have some more bytes! */
|
/* FIXME - InitData can have some more bytes! */
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Device)
|
if (Device)
|
||||||
{
|
{
|
||||||
Status = IntSafeCopyUnicodeString(&SafeDevice, Device);
|
Status = IntSafeCopyUnicodeString(&SafeDevice, Device);
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -391,10 +391,10 @@ NtGdiOpenDCW( PUNICODE_STRING Device,
|
||||||
InitData ? &SafeInitData : NULL,
|
InitData ? &SafeInitData : NULL,
|
||||||
(BOOL) iType); // FALSE 0 DCW, TRUE 1 ICW
|
(BOOL) iType); // FALSE 0 DCW, TRUE 1 ICW
|
||||||
|
|
||||||
|
// FIXME!!!!
|
||||||
if (pUMdhpdev) pUMdhpdev = Dhpdev;
|
if (pUMdhpdev) pUMdhpdev = Dhpdev;
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HDC FASTCALL
|
HDC FASTCALL
|
||||||
|
@ -444,7 +444,7 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Force)
|
if (!Force)
|
||||||
{
|
{
|
||||||
if (DCToDelete->fs & DC_FLAG_PERMANENT)
|
if (DCToDelete->fs & DC_FLAG_PERMANENT)
|
||||||
{
|
{
|
||||||
|
@ -528,18 +528,18 @@ DC_InitDC(HDC DCHandle)
|
||||||
////
|
////
|
||||||
//NtGdiSelectFont(DCHandle, hFont);
|
//NtGdiSelectFont(DCHandle, hFont);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
res = CLIPPING_UpdateGCRegion(DCToInit);
|
res = CLIPPING_UpdateGCRegion(DCToInit);
|
||||||
ASSERT ( res != ERROR );
|
ASSERT ( res != ERROR );
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
BOOL
|
BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtGdiMakeInfoDC(
|
NtGdiMakeInfoDC(
|
||||||
|
@ -596,7 +596,7 @@ NtGdiCreateCompatibleDC(HDC hDC)
|
||||||
}
|
}
|
||||||
NewDC = DC_LockDc( hNewDC );
|
NewDC = DC_LockDc( hNewDC );
|
||||||
|
|
||||||
if(!NewDC)
|
if (!NewDC)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to lock hNewDC\n");
|
DPRINT1("Failed to lock hNewDC\n");
|
||||||
NtGdiDeleteObjectApp(hNewDC);
|
NtGdiDeleteObjectApp(hNewDC);
|
||||||
|
@ -634,7 +634,10 @@ NtGdiCreateCompatibleDC(HDC hDC)
|
||||||
pdcattrNew->ulDirty_ = pdcattrOld->ulDirty_;
|
pdcattrNew->ulDirty_ = pdcattrOld->ulDirty_;
|
||||||
pdcattrNew->iCS_CP = pdcattrOld->iCS_CP;
|
pdcattrNew->iCS_CP = pdcattrOld->iCS_CP;
|
||||||
|
|
||||||
NewDC->erclWindow = (RECTL){0,0,1,1};
|
NewDC->erclWindow = (RECTL)
|
||||||
|
{
|
||||||
|
0,0,1,1
|
||||||
|
};
|
||||||
|
|
||||||
DC_UnlockDc(NewDC);
|
DC_UnlockDc(NewDC);
|
||||||
DC_UnlockDc(OrigDC);
|
DC_UnlockDc(OrigDC);
|
||||||
|
@ -668,7 +671,7 @@ NtGdiDeleteObjectApp(HANDLE DCHandle)
|
||||||
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 NtGdiDeleteObject((HGDIOBJ) DCHandle);
|
||||||
|
|
||||||
if(IsObjectDead((HGDIOBJ)DCHandle)) return TRUE;
|
if (IsObjectDead((HGDIOBJ)DCHandle)) return TRUE;
|
||||||
|
|
||||||
if (!GDIOBJ_OwnedByCurrentProcess(DCHandle))
|
if (!GDIOBJ_OwnedByCurrentProcess(DCHandle))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue