update for HEAD-2003091401
[reactos.git] / subsys / win32k / objects / rect.c
index fdc11e3..b1e4c00 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ *  ReactOS W32 Subsystem
+ *  Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id$ */
 #include <windows.h>
 #include <ddk/ntddk.h>
 #include <win32k/region.h>
@@ -9,8 +28,21 @@
 
 /* FUNCTIONS *****************************************************************/
 
-BOOL
-W32kOffsetRect(LPRECT Rect, INT x, INT y)
+BOOL STDCALL
+NtGdiSetEmptyRect(PRECT Rect)
+{
+  Rect->left = Rect->right = Rect->top = Rect->bottom = 0;
+  return(TRUE);
+}
+
+BOOL STDCALL
+NtGdiIsEmptyRect(const RECT* Rect)
+{
+  return(Rect->left >= Rect->right || Rect->top >= Rect->bottom);
+}
+
+BOOL STDCALL
+NtGdiOffsetRect(LPRECT Rect, INT x, INT y)
 {
   Rect->left += x;
   Rect->right += x;
@@ -21,13 +53,13 @@ W32kOffsetRect(LPRECT Rect, INT x, INT y)
 
 
 BOOL STDCALL
-W32kUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
+NtGdiUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
 {
-  if (W32kIsEmptyRect(Src1))
+  if (NtGdiIsEmptyRect(Src1))
     {
-      if (W32kIsEmptyRect(Src2))
+      if (NtGdiIsEmptyRect(Src2))
        {
-         W32kSetEmptyRect(Dest);
+         NtGdiSetEmptyRect(Dest);
          return(FALSE);
        }
       else
@@ -37,7 +69,7 @@ W32kUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
     }
   else
     {
-      if (W32kIsEmptyRect(Src2))
+      if (NtGdiIsEmptyRect(Src2))
        {
          *Dest = *Src1;
        }
@@ -53,20 +85,7 @@ W32kUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
 }
 
 BOOL STDCALL
-W32kSetEmptyRect(PRECT Rect)
-{
-  Rect->left = Rect->right = Rect->top = Rect->bottom = 0;
-  return(TRUE);
-}
-
-BOOL STDCALL
-W32kIsEmptyRect(PRECT Rect)
-{
-  return(Rect->left >= Rect->right || Rect->top >= Rect->bottom);
-}
-
-BOOL STDCALL
-W32kSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom)
+NtGdiSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom)
 {
   Rect->left = left;
   Rect->top = top;
@@ -76,13 +95,13 @@ W32kSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom)
 }
 
 BOOL STDCALL
-W32kIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
+NtGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
 {
-  if (W32kIsEmptyRect(Src1) || W32kIsEmptyRect(Src2) ||
+  if (NtGdiIsEmptyRect(Src1) || NtGdiIsEmptyRect(Src2) ||
       Src1->left >= Src2->right || Src2->left >= Src1->right ||
       Src1->top >= Src2->bottom || Src2->top >= Src1->bottom)
     {
-      W32kSetEmptyRect(Dest);
+      NtGdiSetEmptyRect(Dest);
       return(FALSE);
     }
   Dest->left = max(Src1->left, Src2->left);
@@ -91,3 +110,4 @@ W32kIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
   Dest->bottom = min(Src1->bottom, Src2->bottom);
   return(TRUE);
 }
+/* EOF */