Author: jimtabor
Date: Tue Aug 7 09:58:29 2007
New Revision: 28209
URL:
http://svn.reactos.org/svn/reactos?rev=28209&view=rev
Log:
Removed NtGdiGetDCOrgEx, GetViewportExt/OrgEx, GetWindowExt/OrgEx. Added NtGdiGetDCPoint.
Will update ntgdibad.h once we sort out the internal use of these functions.
Modified:
trunk/reactos/dll/win32/gdi32/gdi32.def
trunk/reactos/dll/win32/gdi32/misc/stubs.c
trunk/reactos/dll/win32/gdi32/objects/dc.c
trunk/reactos/subsystems/win32/win32k/objects/dc.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/gdi32/gdi32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.def?…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/gdi32.def (original)
+++ trunk/reactos/dll/win32/gdi32/gdi32.def Tue Aug 7 09:58:29 2007
@@ -366,7 +366,7 @@
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 @@
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
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Tue Aug 7 09:58:29 2007
@@ -94,22 +94,6 @@
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetAspectRatioFilterEx(
- HDC a0,
- LPSIZE a1
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
}
Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/dc.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/dc.c Tue Aug 7 09:58:29 2007
@@ -356,9 +356,34 @@
}
-/*
- * @implemented
-*/
+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 @@
{
// 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 @@
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 );
+}
+
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Tue Aug 7 09:58:29 2007
@@ -1162,11 +1162,12 @@
}
BOOL STDCALL
-NtGdiGetDCOrgEx(HDC hDC, LPPOINT Point)
-{
- BOOL Ret;
+NtGdiGetDCPoint( HDC hDC, UINT iPoint, PPOINTL Point)
+{
+ BOOL Ret = TRUE;
DC *dc;
POINT SafePoint;
+ SIZE Size;
NTSTATUS Status = STATUS_SUCCESS;
if(!Point)
@@ -1182,8 +1183,33 @@
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,
Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original)
+++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Tue Aug 7 09:58:29 2007
@@ -176,7 +176,7 @@
# NtGdiGetDCDword 3
# NtGdiGetDCforBitmap 1
# NtGdiGetDCObject 2
-# NtGdiGetDCPoint 3
+NtGdiGetDCPoint 3
NtGdiGetDeviceCaps 2
NtGdiGetDeviceGammaRamp 2
# NtGdiGetDeviceCapsAll 2
@@ -799,7 +799,6 @@
NtGdiGetColorSpace 1
NtGdiGetCurrentObject 2
NtGdiGetCurrentPositionEx 2
-NtGdiGetDCOrgEx 2
NtGdiGetDIBColorTable 4
NtGdiGetDIBits 7
NtGdiGetEnhMetaFile 1
@@ -825,10 +824,6 @@
NtGdiGetTextAlign 1
NtGdiGetTextColor 1
NtGdiGetTextExtentPoint32 4
-NtGdiGetViewportExtEx 2
-NtGdiGetViewportOrgEx 2
-NtGdiGetWindowExtEx 2
-NtGdiGetWindowOrgEx 2
NtGdiGetWorldTransform 2
NtGdiLPtoDP 3
NtGdiMoveToEx 4