ReactOS  0.4.11-dev-721-g95bc44e
rect.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FORCEINLINE VOID RECTL_vSetRect (_Out_ RECTL *prcl, _In_ LONG left, _In_ LONG top, _In_ LONG right, _In_ LONG bottom)
 
FORCEINLINE VOID RECTL_vSetEmptyRect (_Out_ RECTL *prcl)
 
FORCEINLINE VOID RECTL_vOffsetRect (_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
 
FORCEINLINE BOOL RECTL_bIsEmptyRect (_In_ const RECTL *prcl)
 
FORCEINLINE BOOL RECTL_bPointInRect (_In_ const RECTL *prcl, _In_ INT x, _In_ INT y)
 
FORCEINLINE BOOL RECTL_bIsWellOrdered (_In_ const RECTL *prcl)
 
FORCEINLINE BOOL RECTL_bClipRectBySize (_Out_ RECTL *prclDst, _In_ const RECTL *prclSrc, _In_ const SIZEL *pszl)
 
BOOL FASTCALL RECTL_bUnionRect (_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
 
BOOL FASTCALL RECTL_bIntersectRect (_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
 
VOID FASTCALL RECTL_vMakeWellOrdered (_Inout_ RECTL *prcl)
 
VOID FASTCALL RECTL_vInflateRect (_Inout_ RECTL *rect, _In_ INT dx, _In_ INT dy)
 

Function Documentation

FORCEINLINE BOOL RECTL_bClipRectBySize ( _Out_ RECTL prclDst,
_In_ const RECTL prclSrc,
_In_ const SIZEL pszl 
)

Definition at line 72 of file rect.h.

Referenced by IntEngBitBlt().

76 {
77  prclDst->left = max(prclSrc->left, 0);
78  prclDst->top = max(prclSrc->top, 0);
79  prclDst->right = min(prclSrc->right, pszl->cx);
80  prclDst->bottom = min(prclSrc->bottom, pszl->cy);
81  return !RECTL_bIsEmptyRect(prclDst);
82 }
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44
#define max(a, b)
Definition: svc.c:63
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL * prclSrc
Definition: winddi.h:3414
#define min(a, b)
Definition: monoChain.cc:55
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDst
Definition: winddi.h:4190
BOOL FASTCALL RECTL_bIntersectRect ( _Out_ RECTL prclDst,
_In_ const RECTL prcl1,
_In_ const RECTL prcl2 
)

Definition at line 55 of file rect.c.

Referenced by AddPenLinesBounds(), co_IntFixCaret(), co_UserGetUpdateRect(), EngAlphaBlend(), EngBitBlt(), EngCopyBits(), EngMaskBitBlt(), EngStretchBltROP(), EngTransparentBlt(), get_valid_rects(), IntBeginPaint(), IntEngBitBlt(), IntEngGradientFillRect(), IntEngGradientFillTriangle(), IntEngMaskBlt(), IntEngStretchBlt(), IntEngTransparentBlt(), IntFillWindow(), IntGetMonitorsFromRect(), IntIntersectWithParents(), IntScrollWindowEx(), IntUpdateLayeredWindowI(), and UserScrollDC().

59 {
60  prclDst->left = max(prcl1->left, prcl2->left);
61  prclDst->right = min(prcl1->right, prcl2->right);
62 
63  if (prclDst->left < prclDst->right)
64  {
65  prclDst->top = max(prcl1->top, prcl2->top);
66  prclDst->bottom = min(prcl1->bottom, prcl2->bottom);
67 
68  if (prclDst->top < prclDst->bottom)
69  {
70  return TRUE;
71  }
72  }
73 
75 
76  return FALSE;
77 }
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20
#define FALSE
Definition: types.h:117
#define min(a, b)
Definition: monoChain.cc:55
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDst
Definition: winddi.h:4190
FORCEINLINE BOOL RECTL_bIsEmptyRect ( _In_ const RECTL prcl)

Definition at line 44 of file rect.h.

Referenced by co_UserRedrawWindow(), EngCopyBits(), GreGradientFill(), IntDefWindowProc(), IntDrawScrollBar(), NtGdiGetBoundsRect(), NtGdiSetBoundsRect(), NtUserDrawCaptionTemp(), NtUserGetComboBoxInfo(), RECTL_bClipRectBySize(), and RECTL_bUnionRect().

46 {
47  return (prcl->left >= prcl->right || prcl->top >= prcl->bottom);
48 }
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
FORCEINLINE BOOL RECTL_bIsWellOrdered ( _In_ const RECTL prcl)

Definition at line 63 of file rect.h.

Referenced by DbgDrvBitBlt().

65 {
66  return ((prcl->left <= prcl->right) &&
67  (prcl->top <= prcl->bottom));
68 }
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
FORCEINLINE BOOL RECTL_bPointInRect ( _In_ const RECTL prcl,
_In_ INT  x,
_In_ INT  y 
)

Definition at line 52 of file rect.h.

Referenced by addItemFlood(), co_WinPosSearchChildren(), GetNCHitEx(), IntPtInWindow(), IntTrackMouseMove(), MENU_FindItemByCoords(), NtUserDragDetect(), NtUserMenuItemFromPoint(), and SystemTimerProc().

56 {
57  return (x >= prcl->left && x < prcl->right &&
58  y >= prcl->top && y < prcl->bottom);
59 }
GLint GLint bottom
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
INT INT y
Definition: msvc.h:62
INT x
Definition: msvc.h:62
BOOL FASTCALL RECTL_bUnionRect ( _Out_ RECTL prclDst,
_In_ const RECTL prcl1,
_In_ const RECTL prcl2 
)

Definition at line 18 of file rect.c.

Referenced by AddPenLinesBounds(), IntUpdateBoundsRect(), NtGdiSetBoundsRect(), and REGION_bXformRgn().

22 {
23  if (RECTL_bIsEmptyRect(prcl1))
24  {
25  if (RECTL_bIsEmptyRect(prcl2))
26  {
28  return FALSE;
29  }
30  else
31  {
32  *prclDst = *prcl2;
33  }
34  }
35  else
36  {
37  if (RECTL_bIsEmptyRect(prcl2))
38  {
39  *prclDst = *prcl1;
40  }
41  else
42  {
43  prclDst->left = min(prcl1->left, prcl2->left);
44  prclDst->top = min(prcl1->top, prcl2->top);
45  prclDst->right = max(prcl1->right, prcl2->right);
46  prclDst->bottom = max(prcl1->bottom, prcl2->bottom);
47  }
48  }
49 
50  return TRUE;
51 }
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20
#define FALSE
Definition: types.h:117
#define min(a, b)
Definition: monoChain.cc:55
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDst
Definition: winddi.h:4190
VOID FASTCALL RECTL_vInflateRect ( _Inout_ RECTL rect,
_In_ INT  dx,
_In_ INT  dy 
)

Definition at line 101 of file rect.c.

Referenced by GetNCHitEx(), intGetTitleBarInfo(), MENU_DrawBitmapItem(), MENU_DrawMenuItem(), MENU_DrawPopupGlyph(), NC_DoNCPaint(), NC_DrawFrame(), NC_GetInsideRect(), NC_HandleNCCalcSize(), UserAdjustWindowRectEx(), UserDrawCaptionBar(), and UserDrawCaptionButtonWnd().

105 {
106  rect->left -= dx;
107  rect->top -= dy;
108  rect->right += dx;
109  rect->bottom += dy;
110 }
& rect
Definition: startmenu.cpp:1413
INT INT dy
Definition: msvc.h:65
INT dx
Definition: msvc.h:65
VOID FASTCALL RECTL_vMakeWellOrdered ( _Inout_ RECTL prcl)

Definition at line 81 of file rect.c.

Referenced by EngAlphaBlend(), EngBitBlt(), IntEngBitBlt(), NtGdiExcludeClipRect(), NtGdiSetBoundsRect(), REGION_bXformRgn(), and UserDrawCaption().

83 {
84  LONG lTmp;
85  if (prcl->left > prcl->right)
86  {
87  lTmp = prcl->left;
88  prcl->left = prcl->right;
89  prcl->right = lTmp;
90  }
91  if (prcl->top > prcl->bottom)
92  {
93  lTmp = prcl->top;
94  prcl->top = prcl->bottom;
95  prcl->bottom = lTmp;
96  }
97 }
long LONG
Definition: pedump.c:60
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
FORCEINLINE VOID RECTL_vSetEmptyRect ( _Out_ RECTL prcl)

Definition at line 20 of file rect.h.

Referenced by co_WinPosDoNCCALCSize(), get_valid_rects(), IntGdiReleaseRaoRgn(), IntGdiReleaseVisRgn(), NtUserGetMenuBarInfo(), RECTL_bIntersectRect(), RECTL_bUnionRect(), and REGION_bXformRgn().

22 {
23  prcl->left = 0;
24  prcl->top = 0;
25  prcl->right = 0;
26  prcl->bottom = 0;
27 }
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
FORCEINLINE VOID RECTL_vSetRect ( _Out_ RECTL prcl,
_In_ LONG  left,
_In_ LONG  top,
_In_ LONG  right,
_In_ LONG  bottom 
)

Definition at line 5 of file rect.h.

Referenced by co_WinPosMinMaximize(), DefWndDoSizeMove(), GreGetDIBitsInternal(), IntTrackMouseEvent(), IntTrackMouseMove(), make_point_onscreen(), MENU_CalcItemSize(), NtGdiExtFloodFill(), NtGdiSetPixel(), and UserDrawIconEx().

11 {
12  prcl->left = left;
13  prcl->top = top;
14  prcl->right = right;
15  prcl->bottom = bottom;
16 }
GLint GLint bottom
Definition: glext.h:7726
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859