[ros-diffs] [jimtabor] 28209: Removed NtGdiGetDCOrgEx, GetViewportExt/OrgEx, GetWindowExt/OrgEx. Added NtGdiGetDCPoint. Will update ntgdibad.h once we sort out the internal use of these functions.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Tue Aug 7 07:58:29 CEST 2007


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?rev=28209&r1=28208&r2=28209&view=diff
==============================================================================
--- 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 at 8=NtGdiGetCurrentObject at 8
 GetCurrentPositionEx at 8=NtGdiGetCurrentPositionEx at 8
 GetDCBrushColor at 4
-GetDCOrgEx at 8=NtGdiGetDCOrgEx at 8
+GetDCOrgEx at 8
 GetDCPenColor at 4
 GetDIBColorTable at 16=NtGdiGetDIBColorTable at 16
 GetDIBits at 28=NtGdiGetDIBits at 28
@@ -454,11 +454,11 @@
 GetTextMetricsA at 8
 GetTextMetricsW at 8
 GetTransform at 12
-GetViewportExtEx at 8=NtGdiGetViewportExtEx at 8
-GetViewportOrgEx at 8=NtGdiGetViewportOrgEx at 8
+GetViewportExtEx at 8
+GetViewportOrgEx at 8
 GetWinMetaFileBits at 20
-GetWindowExtEx at 8=NtGdiGetWindowExtEx at 8
-GetWindowOrgEx at 8=NtGdiGetWindowOrgEx at 8
+GetWindowExtEx at 8
+GetWindowOrgEx at 8
 GetWorldTransform at 8=NtGdiGetWorldTransform at 8
 HT_Get8BPPFormatPalette at 16
 HT_Get8BPPMaskPalette at 24

Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs.c?rev=28209&r1=28208&r2=28209&view=diff
==============================================================================
--- 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.c?rev=28209&r1=28208&r2=28209&view=diff
==============================================================================
--- 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/objects/dc.c?rev=28209&r1=28208&r2=28209&view=diff
==============================================================================
--- 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/w32ksvc.db?rev=28209&r1=28208&r2=28209&view=diff
==============================================================================
--- 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




More information about the Ros-diffs mailing list