Author: tkreuzer
Date: Tue Mar 10 00:13:17 2015
New Revision: 66648
URL:
http://svn.reactos.org/svn/reactos?rev=66648&view=rev
Log:
[WIN32K]
Annotate rect.c
Modified:
trunk/reactos/win32ss/gdi/ntgdi/rect.c
trunk/reactos/win32ss/gdi/ntgdi/rect.h
Modified: trunk/reactos/win32ss/gdi/ntgdi/rect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/rect.c?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/rect.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/rect.c [iso-8859-1] Tue Mar 10 00:13:17 2015
@@ -15,7 +15,10 @@
BOOL
FASTCALL
-RECTL_bUnionRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2)
+RECTL_bUnionRect(
+ _Out_ RECTL *prclDst,
+ _In_ const RECTL *prcl1,
+ _In_ const RECTL *prcl2)
{
if (RECTL_bIsEmptyRect(prcl1))
{
@@ -47,10 +50,12 @@
return TRUE;
}
-
BOOL
FASTCALL
-RECTL_bIntersectRect(RECTL* prclDst, const RECTL* prcl1, const RECTL* prcl2)
+RECTL_bIntersectRect(
+ _Out_ RECTL* prclDst,
+ _In_ const RECTL* prcl1,
+ _In_ const RECTL* prcl2)
{
prclDst->left = max(prcl1->left, prcl2->left);
prclDst->right = min(prcl1->right, prcl2->right);
@@ -73,26 +78,30 @@
VOID
FASTCALL
-RECTL_vMakeWellOrdered(RECTL *prcl)
+RECTL_vMakeWellOrdered(
+ _Inout_ RECTL *prcl)
{
LONG lTmp;
if (prcl->left > prcl->right)
{
lTmp = prcl->left;
prcl->left = prcl->right;
- prcl->right = lTmp;
+ prcl->right = lTmp;
}
if (prcl->top > prcl->bottom)
{
lTmp = prcl->top;
prcl->top = prcl->bottom;
- prcl->bottom = lTmp;
+ prcl->bottom = lTmp;
}
}
-VOID
+VOID
FASTCALL
-RECTL_vInflateRect(RECTL *rect, INT dx, INT dy)
+RECTL_vInflateRect(
+ _Inout_ RECTL *rect,
+ _In_ INT dx,
+ _In_ INT dy)
{
rect->left -= dx;
rect->top -= dy;
Modified: trunk/reactos/win32ss/gdi/ntgdi/rect.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/rect.h?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/rect.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/rect.h [iso-8859-1] Tue Mar 10 00:13:17 2015
@@ -2,7 +2,12 @@
FORCEINLINE
VOID
-RECTL_vSetRect(RECTL *prcl, LONG left, LONG top, LONG right, LONG bottom)
+RECTL_vSetRect(
+ _Out_ RECTL *prcl,
+ _In_ LONG left,
+ _In_ LONG top,
+ _In_ LONG right,
+ _In_ LONG bottom)
{
prcl->left = left;
prcl->top = top;
@@ -12,7 +17,8 @@
FORCEINLINE
VOID
-RECTL_vSetEmptyRect(RECTL *prcl)
+RECTL_vSetEmptyRect(
+ _Out_ RECTL *prcl)
{
prcl->left = 0;
prcl->top = 0;
@@ -22,7 +28,10 @@
FORCEINLINE
VOID
-RECTL_vOffsetRect(RECTL *prcl, INT cx, INT cy)
+RECTL_vOffsetRect(
+ _Inout_ RECTL *prcl,
+ _In_ INT cx,
+ _In_ INT cy)
{
prcl->left += cx;
prcl->right += cx;
@@ -32,14 +41,18 @@
FORCEINLINE
BOOL
-RECTL_bIsEmptyRect(const RECTL *prcl)
+RECTL_bIsEmptyRect(
+ _In_ const RECTL *prcl)
{
return (prcl->left >= prcl->right || prcl->top >= prcl->bottom);
}
FORCEINLINE
BOOL
-RECTL_bPointInRect(const RECTL *prcl, INT x, INT y)
+RECTL_bPointInRect(
+ _In_ const RECTL *prcl,
+ _In_ INT x,
+ _In_ INT y)
{
return (x >= prcl->left && x < prcl->right &&
y >= prcl->top && y < prcl->bottom);
@@ -47,7 +60,8 @@
FORCEINLINE
BOOL
-RECTL_bIsWellOrdered(const RECTL *prcl)
+RECTL_bIsWellOrdered(
+ _In_ const RECTL *prcl)
{
return ((prcl->left <= prcl->right) &&
(prcl->top <= prcl->bottom));
@@ -55,16 +69,26 @@
BOOL
FASTCALL
-RECTL_bUnionRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2);
+RECTL_bUnionRect(
+ _Out_ RECTL *prclDst,
+ _In_ const RECTL *prcl1,
+ _In_ const RECTL *prcl2);
BOOL
FASTCALL
-RECTL_bIntersectRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2);
+RECTL_bIntersectRect(
+ _Out_ RECTL* prclDst,
+ _In_ const RECTL* prcl1,
+ _In_ const RECTL* prcl2);
VOID
FASTCALL
-RECTL_vMakeWellOrdered(RECTL *prcl);
+RECTL_vMakeWellOrdered(
+ _Inout_ RECTL *prcl);
VOID
FASTCALL
-RECTL_vInflateRect(RECTL *rect, INT dx, INT dy);
+RECTL_vInflateRect(
+ _Inout_ RECTL *rect,
+ _In_ INT dx,
+ _In_ INT dy);