Removed NtGdiGetDCOrgEx, GetViewportExt/OrgEx, GetWindowExt/OrgEx. Added NtGdiGetDCPoint.

Will update ntgdibad.h once we sort out the internal use of these functions.

svn path=/trunk/; revision=28209
This commit is contained in:
James Tabor 2007-08-07 05:58:29 +00:00
parent e54ae7b31f
commit 914d831991
5 changed files with 149 additions and 33 deletions

View file

@ -366,7 +366,7 @@ GetColorSpace@4
GetCurrentObject@8=NtGdiGetCurrentObject@8
GetCurrentPositionEx@8=NtGdiGetCurrentPositionEx@8
GetDCBrushColor@4
GetDCOrgEx@8=NtGdiGetDCOrgEx@8
GetDCOrgEx@8
GetDCPenColor@4
GetDIBColorTable@16=NtGdiGetDIBColorTable@16
GetDIBits@28=NtGdiGetDIBits@28
@ -454,11 +454,11 @@ GetTextFaceAliasW@12
GetTextMetricsA@8
GetTextMetricsW@8
GetTransform@12
GetViewportExtEx@8=NtGdiGetViewportExtEx@8
GetViewportOrgEx@8=NtGdiGetViewportOrgEx@8
GetViewportExtEx@8
GetViewportOrgEx@8
GetWinMetaFileBits@20
GetWindowExtEx@8=NtGdiGetWindowExtEx@8
GetWindowOrgEx@8=NtGdiGetWindowOrgEx@8
GetWindowExtEx@8
GetWindowOrgEx@8
GetWorldTransform@8=NtGdiGetWorldTransform@8
HT_Get8BPPFormatPalette@16
HT_Get8BPPMaskPalette@24

View file

@ -97,22 +97,6 @@ ExtCreateRegion(
}
/*
* @unimplemented
*/
BOOL
STDCALL
GetAspectRatioFilterEx(
HDC a0,
LPSIZE a1
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/

View file

@ -356,9 +356,34 @@ GetDCDWord( HDC hDC, INT u, DWORD Result )
}
BOOL
STDCALL
GetAspectRatioFilterEx(
HDC hdc,
LPSIZE lpAspectRatio
)
{
return NtGdiGetDCPoint( hdc, GdiGetAspectRatioFilter, (LPPOINT) lpAspectRatio );
}
/*
* @implemented
*/
*/
BOOL
STDCALL
GetDCOrgEx(
HDC hdc,
LPPOINT lpPoint
)
{
return NtGdiGetDCPoint( hdc, GdiGetDCOrg, lpPoint );
}
/*
* @implemented
*/
LONG
STDCALL
GetDCOrg(
@ -367,7 +392,7 @@ GetDCOrg(
{
// Officially obsolete by Microsoft
POINT Pt;
if (!NtGdiGetDCOrgEx(hdc, &Pt))
if (!GetDCOrgEx(hdc, &Pt))
return 0;
return(MAKELONG(Pt.x, Pt.y));
}
@ -781,3 +806,89 @@ GetStockObject(
return Ret;
}
BOOL
STDCALL
GetViewportExtEx(
HDC hdc,
LPSIZE lpSize
)
{
#if 0
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return FALSE;
if ( Dc_Attr->flXform & PAGE_EXTENTS_CHANGED ) // Something was updated, go to kernel.
#endif
return NtGdiGetDCPoint( hdc, GdiGetViewPortExt, (LPPOINT) lpSize );
#if 0
else
{
lpSize->cx = Dc_Attr->szlViewportExt.cx;
lpSize->cy = Dc_Attr->szlViewportExt.cy;
}
return TRUE;
#endif
}
BOOL
STDCALL
GetViewportOrgEx(
HDC hdc,
LPPOINT lpPoint
)
{
#if 0
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return FALSE;
lpPoint->x = Dc_Attr->ptlViewportOrg.x;
lpPoint->x = Dc_Attr->ptlViewportOrg.x;
return TRUE;
#endif
// Do it this way for now.
return NtGdiGetDCPoint( hdc, GdiGetViewPortOrg, lpPoint );
}
BOOL
STDCALL
GetWindowExtEx(
HDC hdc,
LPSIZE lpSize
)
{
#if 0
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return FALSE;
lpSize->cx = Dc_Attr->szlWindowExt.cx;
lpSize->cy = Dc_Attr->szlWindowExt.cy;
return TRUE;
#endif
// Do it this way for now.
return NtGdiGetDCPoint( hdc, GdiGetWindowExt, (LPPOINT) lpSize );
}
BOOL
STDCALL
GetWindowOrgEx(
HDC hdc,
LPPOINT lpPoint
)
{
#if 0
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return FALSE;
lpPoint->x = Dc_Attr->ptlWindowOrg.x;
lpPoint->x = Dc_Attr->ptlWindowOrg.x;
return TRUE;
#endif
// Do it this way for now.
return NtGdiGetDCPoint( hdc, GdiGetWindowOrg, lpPoint );
}

View file

@ -1162,11 +1162,12 @@ IntGdiGetDCOrgEx(DC *dc, LPPOINT Point)
}
BOOL STDCALL
NtGdiGetDCOrgEx(HDC hDC, LPPOINT Point)
NtGdiGetDCPoint( HDC hDC, UINT iPoint, PPOINTL Point)
{
BOOL Ret;
BOOL Ret = TRUE;
DC *dc;
POINT SafePoint;
SIZE Size;
NTSTATUS Status = STATUS_SUCCESS;
if(!Point)
@ -1182,8 +1183,33 @@ NtGdiGetDCOrgEx(HDC hDC, LPPOINT Point)
return FALSE;
}
Ret = IntGdiGetDCOrgEx(dc, &SafePoint);
switch (iPoint)
{
case GdiGetViewPortExt:
IntGetViewportExtEx(dc, &Size);
SafePoint.x = Size.cx;
SafePoint.y = Size.cy;
break;
case GdiGetWindowExt:
IntGetWindowExtEx(dc, &Size);
SafePoint.x = Size.cx;
SafePoint.y = Size.cy;
break;
case GdiGetViewPortOrg:
IntGetViewportOrgEx(dc, &SafePoint);
break;
case GdiGetWindowOrg:
IntGetWindowOrgEx(dc, &SafePoint);
break;
case GdiGetDCOrg:
Ret = IntGdiGetDCOrgEx(dc, &SafePoint);
break;
case GdiGetAspectRatioFilter:
default:
SetLastWin32Error(ERROR_INVALID_PARAMETER);
Ret = FALSE;
break;
}
_SEH_TRY
{
ProbeForWrite(Point,

View file

@ -176,7 +176,7 @@ NtGdiGetColorAdjustment 2
# NtGdiGetDCDword 3
# NtGdiGetDCforBitmap 1
# NtGdiGetDCObject 2
# NtGdiGetDCPoint 3
NtGdiGetDCPoint 3
NtGdiGetDeviceCaps 2
NtGdiGetDeviceGammaRamp 2
# NtGdiGetDeviceCapsAll 2
@ -799,7 +799,6 @@ NtGdiGetClipRgn 1
NtGdiGetColorSpace 1
NtGdiGetCurrentObject 2
NtGdiGetCurrentPositionEx 2
NtGdiGetDCOrgEx 2
NtGdiGetDIBColorTable 4
NtGdiGetDIBits 7
NtGdiGetEnhMetaFile 1
@ -825,10 +824,6 @@ NtGdiGetSystemPaletteEntries 4
NtGdiGetTextAlign 1
NtGdiGetTextColor 1
NtGdiGetTextExtentPoint32 4
NtGdiGetViewportExtEx 2
NtGdiGetViewportOrgEx 2
NtGdiGetWindowExtEx 2
NtGdiGetWindowOrgEx 2
NtGdiGetWorldTransform 2
NtGdiLPtoDP 3
NtGdiMoveToEx 4