Author: tkreuzer
Date: Thu Mar 19 04:42:34 2009
New Revision: 40100
URL:
http://svn.reactos.org/svn/reactos?rev=40100&view=rev
Log:
win32k RECT/RECTL issues:
- Although RECT and RECTL are defined equal, the compiler treats them as incompatible. MS
has created a lot of definitions with RECT and a lot with RECTL. So far we had to typecast
them. Now with adding some defines into a win32k header file, we can finally treat them as
equal inside win32k and get rid of a lot of type casts. Also use RECTL in favour of RECT
internally, as this is the type that MS uses for the DDI and seems to be the more
appropriate type.
- We had a lot of "const PRECT" stuff inside win32k. Note: there's
difference between "const RECT *" (what you currently want) and "CONST
PRECT" (which you proabably don't want). Despite the fact that CONST is not an
official modifier (please stick to const) the main difference is that the former describes
a pointer to a constant structure, while the latter describes a constant pointer to a
modifyable structure.
- In an attempt to clean up the overpolluted IntGdi namespace, "objectify" the
rect functions, moving them into their own namespace RECTL_Xxx.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/clip.c
trunk/reactos/subsystems/win32/win32k/eng/engwindow.c
trunk/reactos/subsystems/win32/win32k/eng/gradient.c
trunk/reactos/subsystems/win32/win32k/include/cliprgn.h
trunk/reactos/subsystems/win32/win32k/include/desktop.h
trunk/reactos/subsystems/win32/win32k/include/engobjects.h (props changed)
trunk/reactos/subsystems/win32/win32k/include/intgdi.h
trunk/reactos/subsystems/win32/win32k/include/menu.h
trunk/reactos/subsystems/win32/win32k/include/painting.h
trunk/reactos/subsystems/win32/win32k/include/path.h
trunk/reactos/subsystems/win32/win32k/include/rect.h
trunk/reactos/subsystems/win32/win32k/include/region.h
trunk/reactos/subsystems/win32/win32k/include/text.h
trunk/reactos/subsystems/win32/win32k/include/window.h
trunk/reactos/subsystems/win32/win32k/include/winpos.h
trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c
trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c
trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c
trunk/reactos/subsystems/win32/win32k/objects/freetype.c
trunk/reactos/subsystems/win32/win32k/objects/path.c
trunk/reactos/subsystems/win32/win32k/objects/rect.c
trunk/reactos/subsystems/win32/win32k/objects/region.c
trunk/reactos/subsystems/win32/win32k/pch.h
Modified: trunk/reactos/subsystems/win32/win32k/eng/clip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/clip.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/clip.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -34,8 +34,8 @@
static __inline int
CompareRightDown(
- const PRECT r1,
- const PRECT r2)
+ const RECTL *r1,
+ const RECTL *r2)
{
int Cmp;
@@ -70,8 +70,8 @@
static __inline int
CompareRightUp(
- const PRECT r1,
- const PRECT r2)
+ const RECTL *r1,
+ const RECTL *r2)
{
int Cmp;
@@ -106,8 +106,8 @@
static __inline int
CompareLeftDown(
- const PRECT r1,
- const PRECT r2)
+ const RECTL *r1,
+ const RECTL *r2)
{
int Cmp;
@@ -142,8 +142,8 @@
static __inline int
CompareLeftUp(
- const PRECT r1,
- const PRECT r2)
+ const RECTL *r1,
+ const RECTL *r2)
{
int Cmp;
@@ -177,8 +177,8 @@
static __inline int
CompareSpans(
- const PSPAN Span1,
- const PSPAN Span2)
+ const SPAN *Span1,
+ const SPAN *Span2)
{
int Cmp;
Modified: trunk/reactos/subsystems/win32/win32k/eng/engwindow.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/engwindow.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/engwindow.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -91,8 +91,8 @@
{
if (visRgn->rdh.nCount > 0)
{
- ClipObj = IntEngCreateClipRegion(visRgn->rdh.nCount,
(PRECTL)visRgn->Buffer,
- (PRECTL)&visRgn->rdh.rcBound);
+ ClipObj = IntEngCreateClipRegion(visRgn->rdh.nCount, visRgn->Buffer,
+ &visRgn->rdh.rcBound);
DPRINT("Created visible region with %d rects\n",
visRgn->rdh.nCount);
DPRINT(" BoundingRect: %d, %d %d, %d\n",
visRgn->rdh.rcBound.left, visRgn->rdh.rcBound.top,
@@ -122,8 +122,8 @@
if (ClipObj == NULL)
{
/* Fall back to client rect */
- ClipObj = IntEngCreateClipRegion(1, (PRECTL)&Window->Wnd->ClientRect,
- (PRECTL)&Window->Wnd->ClientRect);
+ ClipObj = IntEngCreateClipRegion(1, &Window->Wnd->ClientRect,
+ &Window->Wnd->ClientRect);
}
if (ClipObj == NULL)
Modified: trunk/reactos/subsystems/win32/win32k/eng/gradient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/gradient.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/gradient.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -43,11 +43,6 @@
#define VCMPCLRS(a,b,c) \
!(!VCMPCLR(a,b,c,Red) || !VCMPCLR(a,b,c,Green) || !VCMPCLR(a,b,c,Blue))
-#define MOVERECT(r,x,y) \
- r.left += x; r.right += x; \
- r.top += y; r.bottom += y
-
-
/* Horizontal/Vertical gradients */
#define HVINITCOL(Col, id) \
c[id] = v1->Col >> 8; \
@@ -94,7 +89,7 @@
rcGradient.top = min(v1->y, v2->y);
rcGradient.bottom = max(v1->y, v2->y);
rcSG = rcGradient;
- MOVERECT(rcSG, pptlDitherOrg->x, pptlDitherOrg->y);
+ RECTL_vOffsetRect(&rcSG, pptlDitherOrg->x, pptlDitherOrg->y);
if(Horizontal)
{
@@ -115,7 +110,7 @@
CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
do
{
- RECT FillRect;
+ RECTL FillRect;
ULONG Color;
if(Horizontal)
@@ -123,7 +118,7 @@
EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom;
i++)
{
- if(IntGdiIntersectRect(&FillRect, (PRECT)&RectEnum.arcl[i],
(PRECT)&rcSG))
+ if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
{
HVINITCOL(Red, 0);
HVINITCOL(Green, 1);
@@ -151,7 +146,7 @@
EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom;
i++)
{
- if(IntGdiIntersectRect(&FillRect, (PRECT)&RectEnum.arcl[i],
(PRECT)&rcSG))
+ if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
{
HVINITCOL(Red, 0);
HVINITCOL(Green, 1);
@@ -181,13 +176,13 @@
CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
do
{
- RECT FillRect;
+ RECTL FillRect;
ULONG Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red, v1->Green, v1->Blue));
EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom;
i++)
{
- if(IntGdiIntersectRect(&FillRect, (PRECT)&RectEnum.arcl[i],
(PRECT)&rcSG))
+ if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], &rcSG))
{
for(; FillRect.top < FillRect.bottom; FillRect.top++)
{
@@ -369,7 +364,7 @@
// EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
// for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <=
prclExtents->bottom; i++)
// {
- // if(IntGdiIntersectRect((PRECT)&FillRect, (PRECT)&RectEnum.arcl[i],
(PRECT)prclExtents))
+ // if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
// {
// BOOL InY;
@@ -417,7 +412,7 @@
// EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
// for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <=
prclExtents->bottom; i++)
// {
- // if(IntGdiIntersectRect((PRECT)&FillRect, (PRECT)&RectEnum.arcl[i],
(PRECT)prclExtents))
+ // if(RECTL_bIntersectRect(&FillRect, &RectEnum.arcl[i], prclExtents))
// {
// S_INITLINE(v1, v3, 0);
// S_INITLINE(v1, v2, 1);
Modified: trunk/reactos/subsystems/win32/win32k/include/cliprgn.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/cliprgn.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/cliprgn.h [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -4,10 +4,10 @@
#include <include/dc.h>
#include <include/region.h>
-INT FASTCALL IntGdiGetClipBox(PDC, LPRECT rc);
+INT FASTCALL IntGdiGetClipBox(PDC, RECTL* rc);
INT FASTCALL IntGdiExtSelectClipRgn (PDC, PROSRGNDATA, int);
-INT FASTCALL GdiGetClipBox(HDC hDC, LPRECT rc);
+INT FASTCALL GdiGetClipBox(HDC hDC, RECTL *rc);
INT FASTCALL GdiSelectVisRgn(HDC hdc, HRGN hrgn);
INT FASTCALL GdiExtSelectClipRgn (PDC dc, HRGN hrgn, int fnMode);
Modified: trunk/reactos/subsystems/win32/win32k/include/desktop.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/desktop.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/desktop.h [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -17,7 +17,7 @@
/* Pointer to the active queue. */
PVOID ActiveMessageQueue;
/* Rectangle of the work area */
- RECT WorkArea;
+ RECTL WorkArea;
/* Handle of the desktop window. */
HANDLE DesktopWindow;
/* Thread blocking input */
@@ -65,7 +65,7 @@
IntDesktopObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters);
VOID FASTCALL
-IntGetDesktopWorkArea(PDESKTOP Desktop, PRECT Rect);
+IntGetDesktopWorkArea(PDESKTOP Desktop, RECTL *Rect);
LRESULT CALLBACK
IntDesktopWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
Propchange: trunk/reactos/subsystems/win32/win32k/include/engobjects.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 19 04:42:34 2009
@@ -1,0 +1,1 @@
+/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/engobjects.h:40095
Modified: trunk/reactos/subsystems/win32/win32k/include/intgdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -155,26 +155,6 @@
LPXFORM xform1,
LPXFORM xform2);
-/* RECT functions */
-
-VOID FASTCALL
-IntGdiSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom);
-
-VOID FASTCALL
-IntGdiSetEmptyRect(PRECT Rect);
-
-BOOL FASTCALL
-IntGdiIsEmptyRect(const RECT* Rect);
-
-VOID FASTCALL
-IntGdiOffsetRect(LPRECT Rect, INT x, INT y);
-
-BOOL FASTCALL
-IntGdiUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
-
-BOOL FASTCALL
-IntGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
-
/* Stock objects */
BOOL FASTCALL
Modified: trunk/reactos/subsystems/win32/win32k/include/menu.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/menu.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/menu.h [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -23,7 +23,7 @@
ULONG_PTR dwItemData;
UNICODE_STRING Text;
HBITMAP hbmpItem;
- RECT Rect;
+ RECTL Rect;
UINT XTab;
} MENU_ITEM, *PMENU_ITEM;
@@ -40,7 +40,7 @@
{
UINT uItem;
BOOL fByPosition;
- RECT rcRect;
+ RECTL rcRect;
} SETMENUITEMRECT, *PSETMENUITEMRECT;
PMENU_OBJECT FASTCALL
@@ -95,7 +95,7 @@
IntCheckMenuItem(PMENU_OBJECT MenuObject, UINT uIDCheckItem, UINT uCheck);
BOOL FASTCALL
-IntSetMenuItemRect(PMENU_OBJECT MenuObject, UINT Item, BOOL fByPos, RECT *rcRect);
+IntSetMenuItemRect(PMENU_OBJECT MenuObject, UINT Item, BOOL fByPos, RECTL *rcRect);
DWORD APIENTRY UserInsertMenuItem(HMENU hMenu, UINT uItem, BOOL fByPosition,
LPCMENUITEMINFOW lpmii);
Modified: trunk/reactos/subsystems/win32/win32k/include/painting.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/painting.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/painting.h [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -6,7 +6,7 @@
#include <include/window.h>
BOOL FASTCALL
-co_UserRedrawWindow(PWINDOW_OBJECT Wnd, const RECT* UpdateRect, HRGN UpdateRgn, ULONG
Flags);
+co_UserRedrawWindow(PWINDOW_OBJECT Wnd, const RECTL* UpdateRect, HRGN UpdateRgn, ULONG
Flags);
VOID FASTCALL
IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags);
BOOL FASTCALL
Modified: trunk/reactos/subsystems/win32/win32k/include/path.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/path.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/path.h [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -67,7 +67,7 @@
BOOL FASTCALL PATH_Rectangle (PDC dc, INT x1, INT y1, INT x2, INT y2);
BOOL FASTCALL PATH_RoundRect(DC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT
ell_height);
BOOL FASTCALL PATH_PathToRegion (PPATH pPath, INT nPolyFillMode, HRGN *pHrgn);
-BOOL FASTCALL PATH_ExtTextOut(PDC dc,INT x,INT y,UINT flags,const RECT *lprc,LPCWSTR
str,UINT count,const INT *dx);
+BOOL FASTCALL PATH_ExtTextOut(PDC dc,INT x,INT y,UINT flags,const RECTL *lprc,LPCWSTR
str,UINT count,const INT *dx);
VOID FASTCALL IntGdiCloseFigure(PPATH pPath);
BOOL FASTCALL PATH_Delete(HPATH hPath);
Modified: trunk/reactos/subsystems/win32/win32k/include/rect.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/rect.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/rect.h [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -1,17 +1,60 @@
#ifndef _WIN32K_RECT_H
#define _WIN32K_RECT_H
-BOOL APIENTRY
-NtGdiUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
-BOOL APIENTRY
-NtGdiSetRect(PRECT Rect, int left, int top, int right, int bottom);
-BOOL APIENTRY
-NtGdiSetEmptyRect(PRECT Rect);
-BOOL APIENTRY
-NtGdiIsEmptyRect(const RECT* Rect);
-BOOL APIENTRY
-NtGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
-BOOL APIENTRY
-NtGdiOffsetRect(LPRECT Rect, int x, int y);
+VOID
+FORCEINLINE
+RECTL_vSetRect(RECTL *prcl, LONG left, LONG top, LONG right, LONG bottom)
+{
+ prcl->left = left;
+ prcl->top = top;
+ prcl->right = right;
+ prcl->bottom = bottom;
+}
+
+VOID
+FORCEINLINE
+RECTL_vSetEmptyRect(RECTL *prcl)
+{
+ prcl->left = 0;
+ prcl->top = 0;
+ prcl->right = 0;
+ prcl->bottom = 0;
+}
+
+VOID
+FORCEINLINE
+RECTL_vOffsetRect(RECTL *prcl, INT cx, INT cy)
+{
+ prcl->left += cx;
+ prcl->right += cx;
+ prcl->top += cy;
+ prcl->bottom += cy;
+}
+
+BOOL
+FORCEINLINE
+RECTL_bIsEmptyRect(const RECTL *prcl)
+{
+ return (prcl->left >= prcl->right || prcl->top >= prcl->bottom);
+}
+
+BOOL
+FORCEINLINE
+RECTL_bPointInRect(const RECTL *prcl, INT x, INT y)
+{
+ return (x >= prcl->left && x <= prcl->right &&
+ y >= prcl->top && y <= prcl->bottom);
+}
+
+BOOL
+FASTCALL
+RECTL_bUnionRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2);
+
+BOOL
+FASTCALL
+RECTL_bIntersectRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2);
+
+
+
#endif /* _WIN32K_RECT_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/region.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -15,7 +15,7 @@
BASEOBJECT BaseObject;
RGNDATAHEADER rdh;
- PRECT Buffer;
+ RECTL *Buffer;
} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
@@ -27,10 +27,10 @@
#define REGION_UnlockRgn(pRgn) GDIOBJ_UnlockObjByPtr((POBJ)pRgn)
PROSRGNDATA FASTCALL REGION_AllocRgnWithHandle(INT n);
-VOID FASTCALL REGION_UnionRectWithRgn(ROSRGNDATA *rgn, CONST RECT *rect);
-INT FASTCALL REGION_GetRgnBox(PROSRGNDATA Rgn, LPRECT pRect);
-BOOL FASTCALL REGION_RectInRegion(PROSRGNDATA Rgn, CONST LPRECT rc);
-BOOL FASTCALL REGION_CropAndOffsetRegion(PROSRGNDATA rgnDst, PROSRGNDATA rgnSrc, const
PRECT rect, const PPOINT off);
+VOID FASTCALL REGION_UnionRectWithRgn(ROSRGNDATA *rgn, const RECTL *rect);
+INT FASTCALL REGION_GetRgnBox(PROSRGNDATA Rgn, RECTL *pRect);
+BOOL FASTCALL REGION_RectInRegion(PROSRGNDATA Rgn, const RECTL *rc);
+BOOL FASTCALL REGION_CropAndOffsetRegion(PROSRGNDATA rgnDst, PROSRGNDATA rgnSrc, const
RECTL *rect, const POINT *off);
VOID FASTCALL REGION_SetRectRgn(PROSRGNDATA pRgn, INT LeftRect, INT TopRect, INT
RightRect, INT BottomRect);
BOOL INTERNAL_CALL REGION_Cleanup(PVOID ObjectBody);
@@ -41,7 +41,7 @@
VOID FASTCALL IntGdiReleaseRaoRgn(PDC);
VOID FASTCALL IntGdiReleaseVisRgn(PDC);
-INT APIENTRY IntGdiGetRgnBox(HRGN, LPRECT);
+INT APIENTRY IntGdiGetRgnBox(HRGN, RECTL*);
BOOL FASTCALL IntGdiPaintRgn(PDC, HRGN );
HRGN FASTCALL IntCreatePolyPolygonRgn(PPOINT, PULONG, INT, INT);
Modified: trunk/reactos/subsystems/win32/win32k/include/text.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/text.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/text.h [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -106,7 +106,7 @@
BOOL FASTCALL IntGdiGetFontResourceInfo(PUNICODE_STRING,PVOID,DWORD*,DWORD);
BOOL FASTCALL ftGdiRealizationInfo(PFONTGDI,PREALIZATION_INFO);
DWORD FASTCALL ftGdiGetKerningPairs(PFONTGDI,DWORD,LPKERNINGPAIR);
-BOOL NTAPI GreExtTextOutW(IN HDC,IN INT,IN INT,IN UINT,IN OPTIONAL LPRECT,
+BOOL NTAPI GreExtTextOutW(IN HDC,IN INT,IN INT,IN UINT,IN OPTIONAL RECTL*,
IN LPWSTR, IN INT, IN OPTIONAL LPINT, IN DWORD);
DWORD FASTCALL IntGetCharDimensions(HDC, PTEXTMETRICW, PDWORD);
Modified: trunk/reactos/subsystems/win32/win32k/include/window.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -116,7 +116,7 @@
CleanupWindowImpl (VOID);
VOID FASTCALL
-IntGetClientRect (PWINDOW_OBJECT WindowObject, PRECT Rect);
+IntGetClientRect (PWINDOW_OBJECT WindowObject, RECTL *Rect);
HWND FASTCALL
IntGetActiveWindow (VOID);
@@ -147,7 +147,7 @@
IntGetWindowRgn(PWINDOW_OBJECT Window, HRGN hRgn);
INT FASTCALL
-IntGetWindowRgnBox(PWINDOW_OBJECT Window, RECT *Rect);
+IntGetWindowRgnBox(PWINDOW_OBJECT Window, RECTL *Rect);
BOOL FASTCALL
IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi);
Modified: trunk/reactos/subsystems/win32/win32k/include/winpos.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/winpos.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/winpos.h [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -21,12 +21,12 @@
BOOL FASTCALL
IntGetClientOrigin(PWINDOW_OBJECT Window, LPPOINT Point);
LRESULT FASTCALL
-co_WinPosGetNonClientSize(PWINDOW_OBJECT Window, RECT* WindowRect, RECT* ClientRect);
+co_WinPosGetNonClientSize(PWINDOW_OBJECT Window, RECTL* WindowRect, RECTL* ClientRect);
UINT FASTCALL
co_WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos,
POINT* MinTrack, POINT* MaxTrack);
UINT FASTCALL
-co_WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos);
+co_WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECTL* NewPos);
BOOLEAN FASTCALL
co_WinPosSetWindowPos(PWINDOW_OBJECT Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
INT cy, UINT flags);
@@ -38,6 +38,6 @@
VOID FASTCALL co_WinPosActivateOtherWindow(PWINDOW_OBJECT Window);
VOID FASTCALL WinPosInitInternalPos(PWINDOW_OBJECT WindowObject,
- POINT *pt, PRECT RestoreRect);
+ POINT *pt, RECTL *RestoreRect);
#endif /* _WIN32K_WINPOS_H */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -840,13 +840,13 @@
BOOL
APIENTRY
NtUserClipCursor(
- RECT *UnsafeRect)
+ RECTL *UnsafeRect)
{
/* FIXME - check if process has WINSTA_WRITEATTRIBUTES */
PWINSTATION_OBJECT WinSta;
PSYSTEM_CURSORINFO CurInfo;
- RECT Rect;
+ RECTL Rect;
PWINDOW_OBJECT DesktopWindow = NULL;
POINT MousePos = {0};
DECLARE_RETURN(BOOL);
@@ -1001,12 +1001,12 @@
BOOL
APIENTRY
NtUserGetClipCursor(
- RECT *lpRect)
+ RECTL *lpRect)
{
/* FIXME - check if process has WINSTA_READATTRIBUTES */
PSYSTEM_CURSORINFO CurInfo;
PWINSTATION_OBJECT WinSta;
- RECT Rect;
+ RECTL Rect;
NTSTATUS Status;
DECLARE_RETURN(BOOL);
@@ -1038,7 +1038,7 @@
Rect.bottom = UserGetSystemMetrics(SM_CYSCREEN);
}
- Status = MmCopyToCaller((PRECT)lpRect, &Rect, sizeof(RECT));
+ Status = MmCopyToCaller(lpRect, &Rect, sizeof(RECT));
if(!NT_SUCCESS(Status))
{
ObDereferenceObject(WinSta);
@@ -1491,7 +1491,7 @@
if (DoFlickerFree || bAlpha)
{
- RECT r;
+ RECTL r;
BITMAP bm;
SURFACE *psurfOff = NULL;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -439,9 +439,9 @@
}
VOID FASTCALL
-IntGetDesktopWorkArea(PDESKTOP Desktop, PRECT Rect)
-{
- PRECT Ret;
+IntGetDesktopWorkArea(PDESKTOP Desktop, RECTL *Rect)
+{
+ RECTL *Ret;
ASSERT(Desktop);
@@ -1358,7 +1358,7 @@
BOOL APIENTRY
NtUserPaintDesktop(HDC hDC)
{
- RECT Rect;
+ RECTL Rect;
HBRUSH DesktopBrush, PreviousBrush;
HWND hWndDesktop;
BOOL doPatBlt = TRUE;
@@ -1513,7 +1513,7 @@
if (g_PaintDesktopVersion)
{
static WCHAR s_wszVersion[256] = {0};
- RECT rect;
+ RECTL rect;
if (*s_wszVersion)
{
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -734,7 +734,7 @@
case HCBT_MOVESIZE:
{
- RECT rt;
+ RECTL rt;
DPRINT1("HOOK HCBT_MOVESIZE\n");
if (lParam)
{
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/menu.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -1265,14 +1265,14 @@
INT FASTCALL
IntTrackMenu(PMENU_OBJECT Menu, PWINDOW_OBJECT Window, INT x, INT y,
- RECT lprect)
+ RECTL lprect)
{
return 0;
}
BOOL FASTCALL
co_IntTrackPopupMenu(PMENU_OBJECT Menu, PWINDOW_OBJECT Window,
- UINT Flags, POINT *Pos, UINT MenuPos, RECT *ExcludeRect)
+ UINT Flags, POINT *Pos, UINT MenuPos, RECTL *ExcludeRect)
{
co_IntInitTracking(Window, Menu, TRUE, Flags);
@@ -1281,7 +1281,7 @@
}
BOOL FASTCALL
-IntSetMenuItemRect(PMENU_OBJECT Menu, UINT Item, BOOL fByPos, RECT *rcRect)
+IntSetMenuItemRect(PMENU_OBJECT Menu, UINT Item, BOOL fByPos, RECTL *rcRect)
{
PMENU_ITEM mi;
if(IntGetMenuItemByFlag(Menu, Item, (fByPos ? MF_BYPOSITION : MF_BYCOMMAND),
@@ -1327,7 +1327,7 @@
}
VOID APIENTRY
-co_InflateRect(LPRECT rect, int dx, int dy)
+co_InflateRect(RECTL *rect, int dx, int dy)
{
rect->left -= dx;
rect->top -= dy;
@@ -1876,7 +1876,7 @@
PWINDOW_OBJECT WindowObject;
HMENU hMenu;
POINT Offset;
- RECT Rect;
+ RECTL Rect;
MENUBARINFO kmbi;
DECLARE_RETURN(BOOL);
@@ -2098,12 +2098,12 @@
HWND hWnd,
HMENU hMenu,
UINT uItem,
- LPRECT lprcItem)
+ PRECTL lprcItem)
{
ROSMENUINFO mi;
PWINDOW_OBJECT ReferenceWnd;
LONG XMove, YMove;
- RECT Rect;
+ RECTL Rect;
NTSTATUS Status;
PMENU_OBJECT Menu;
PMENU_ITEM MenuItem;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -316,9 +316,9 @@
*/
static
UINT
-IntGetMonitorsFromRect(OPTIONAL IN LPCRECT pRect,
+IntGetMonitorsFromRect(OPTIONAL IN LPCRECTL pRect,
OPTIONAL OUT HMONITOR *hMonitorList,
- OPTIONAL OUT LPRECT monitorRectList,
+ OPTIONAL OUT PRECTL monitorRectList,
OPTIONAL IN DWORD listSize,
OPTIONAL IN DWORD flags)
{
@@ -329,7 +329,7 @@
/* find monitors which intersect the rectangle */
for (Monitor = gMonitorList; Monitor != NULL; Monitor = Monitor->Next)
{
- RECT MonitorRect, IntersectionRect;
+ RECTL MonitorRect, IntersectionRect;
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&Monitor->Lock);
MonitorRect.left = 0; /* FIXME: get origin */
@@ -456,16 +456,16 @@
APIENTRY
NtUserEnumDisplayMonitors(
OPTIONAL IN HDC hDC,
- OPTIONAL IN LPCRECT pRect,
+ OPTIONAL IN LPCRECTL pRect,
OPTIONAL OUT HMONITOR *hMonitorList,
- OPTIONAL OUT LPRECT monitorRectList,
+ OPTIONAL OUT PRECTL monitorRectList,
OPTIONAL IN DWORD listSize)
{
INT numMonitors, i;
HMONITOR *safeHMonitorList = NULL;
- LPRECT safeRectList = NULL;
- RECT rect, *myRect;
- RECT dcRect;
+ PRECTL safeRectList = NULL;
+ RECTL rect, *myRect;
+ RECTL dcRect;
NTSTATUS status;
/* get rect */
@@ -729,7 +729,7 @@
IN DWORD dwFlags)
{
INT NumMonitors;
- RECT InRect;
+ RECTL InRect;
HMONITOR hMonitor = NULL;
/* fill inRect */
@@ -783,14 +783,14 @@
HMONITOR
APIENTRY
NtUserMonitorFromRect(
- IN LPCRECT pRect,
+ IN LPCRECTL pRect,
IN DWORD dwFlags)
{
INT numMonitors, iLargestArea = -1, i;
- LPRECT rectList;
+ PRECTL rectList;
HMONITOR *hMonitorList;
HMONITOR hMonitor = NULL;
- RECT rect;
+ RECTL rect;
NTSTATUS status;
/* get rect */
@@ -883,7 +883,7 @@
{
PWINDOW_OBJECT Window;
HMONITOR hMonitor = NULL;
- RECT Rect;
+ RECTL Rect;
DECLARE_RETURN(HMONITOR);
DPRINT("Enter NtUserMonitorFromWindow\n");
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -1092,7 +1092,7 @@
APIENTRY
NtUserValidateRect(
HWND hWnd,
- CONST RECT *lpRect)
+ const RECT *lpRect)
{
UNIMPLEMENTED;
return 0;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -55,7 +55,7 @@
*/
BOOL FASTCALL
-IntIntersectWithParents(PWINDOW_OBJECT Child, PRECT WindowRect)
+IntIntersectWithParents(PWINDOW_OBJECT Child, RECTL *WindowRect)
{
PWINDOW_OBJECT ParentWindow;
PWINDOW ParentWnd;
@@ -70,7 +70,7 @@
return FALSE;
}
- if (!IntGdiIntersectRect(WindowRect, WindowRect, &ParentWnd->ClientRect))
+ if (!RECTL_bIntersectRect(WindowRect, WindowRect, &ParentWnd->ClientRect))
{
return FALSE;
}
@@ -534,7 +534,7 @@
*/
BOOL FASTCALL
-co_UserRedrawWindow(PWINDOW_OBJECT Window, const RECT* UpdateRect, HRGN UpdateRgn,
+co_UserRedrawWindow(PWINDOW_OBJECT Window, const RECTL* UpdateRect, HRGN UpdateRgn,
ULONG Flags)
{
HRGN hRgn = NULL;
@@ -572,21 +572,21 @@
}
else if (UpdateRect != NULL)
{
- if (!IntGdiIsEmptyRect(UpdateRect))
+ if (!RECTL_bIsEmptyRect(UpdateRect))
{
- hRgn = UnsafeIntCreateRectRgnIndirect((RECT *)UpdateRect);
+ hRgn = UnsafeIntCreateRectRgnIndirect((RECTL *)UpdateRect);
NtGdiOffsetRgn(hRgn, Window->Wnd->ClientRect.left,
Window->Wnd->ClientRect.top);
}
}
else if ((Flags & (RDW_INVALIDATE | RDW_FRAME)) == (RDW_INVALIDATE | RDW_FRAME)
||
(Flags & (RDW_VALIDATE | RDW_NOFRAME)) == (RDW_VALIDATE |
RDW_NOFRAME))
{
- if (!IntGdiIsEmptyRect(&Window->Wnd->WindowRect))
+ if (!RECTL_bIsEmptyRect(&Window->Wnd->WindowRect))
hRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect);
}
else
{
- if (!IntGdiIsEmptyRect(&Window->Wnd->ClientRect))
+ if (!RECTL_bIsEmptyRect(&Window->Wnd->ClientRect))
hRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->ClientRect);
}
}
@@ -712,7 +712,7 @@
static
HWND FASTCALL
-co_IntFixCaret(PWINDOW_OBJECT Window, LPRECT lprc, UINT flags)
+co_IntFixCaret(PWINDOW_OBJECT Window, RECTL *lprc, UINT flags)
{
PDESKTOP Desktop;
PTHRDCARETINFO CaretInfo;
@@ -732,7 +732,7 @@
((flags & SW_SCROLLCHILDREN) && IntIsChildWindow(Window,
WndCaret)))
{
POINT pt, FromOffset, ToOffset, Offset;
- RECT rcCaret;
+ RECTL rcCaret;
pt.x = CaretInfo->Pos.x;
pt.y = CaretInfo->Pos.y;
@@ -744,7 +744,7 @@
rcCaret.top = pt.y;
rcCaret.right = pt.x + CaretInfo->Size.cx;
rcCaret.bottom = pt.y + CaretInfo->Size.cy;
- if (IntGdiIntersectRect(lprc, lprc, &rcCaret))
+ if (RECTL_bIntersectRect(lprc, lprc, &rcCaret))
{
co_UserHideCaret(0);
lprc->left = pt.x;
@@ -927,7 +927,7 @@
co_UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase)
{
int RegionType;
- RECT Rect;
+ RECTL Rect;
ASSERT_REFS_CO(Window);
@@ -998,7 +998,7 @@
NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
{
PWINDOW_OBJECT Window;
- RECT Rect;
+ RECTL Rect;
INT RegionType;
PROSRGNDATA RgnData;
NTSTATUS Status;
@@ -1031,12 +1031,12 @@
REGION_UnlockRgn(RgnData);
if (RegionType != ERROR && RegionType != NULLREGION)
- IntGdiIntersectRect(&Rect, &Rect,
&Window->Wnd->ClientRect);
+ RECTL_bIntersectRect(&Rect, &Rect,
&Window->Wnd->ClientRect);
}
if (IntIntersectWithParents(Window, &Rect))
{
- IntGdiOffsetRect(&Rect,
+ RECTL_vOffsetRect(&Rect,
-Window->Wnd->ClientRect.left,
-Window->Wnd->ClientRect.top);
} else
@@ -1045,7 +1045,7 @@
}
}
- if (bErase && !IntGdiIsEmptyRect(&Rect))
+ if (bErase && !RECTL_bIsEmptyRect(&Rect))
{
USER_REFERENCE_ENTRY Ref;
UserRefObjectCo(Window, &Ref);
@@ -1055,7 +1055,7 @@
if (UnsafeRect != NULL)
{
- Status = MmCopyToCaller(UnsafeRect, &Rect, sizeof(RECT));
+ Status = MmCopyToCaller(UnsafeRect, &Rect, sizeof(RECTL));
if (!NT_SUCCESS(Status))
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
@@ -1063,7 +1063,7 @@
}
}
- RETURN(!IntGdiIsEmptyRect(&Rect));
+ RETURN(!RECTL_bIsEmptyRect(&Rect));
CLEANUP:
DPRINT("Leave NtUserGetUpdateRect, ret=%i\n",_ret_);
@@ -1082,7 +1082,7 @@
NtUserRedrawWindow(HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate,
UINT flags)
{
- RECT SafeUpdateRect;
+ RECTL SafeUpdateRect;
NTSTATUS Status;
PWINDOW_OBJECT Wnd;
DECLARE_RETURN(BOOL);
@@ -1098,8 +1098,8 @@
if (lprcUpdate != NULL)
{
- Status = MmCopyFromCaller(&SafeUpdateRect, (PRECT)lprcUpdate,
- sizeof(RECT));
+ Status = MmCopyFromCaller(&SafeUpdateRect, lprcUpdate,
+ sizeof(RECTL));
if (!NT_SUCCESS(Status))
{
@@ -1134,24 +1134,24 @@
static
INT FASTCALL
-UserScrollDC(HDC hDC, INT dx, INT dy, const RECT *prcScroll,
- const RECT *prcClip, HRGN hrgnUpdate, LPRECT prcUpdate)
+UserScrollDC(HDC hDC, INT dx, INT dy, const RECTL *prcScroll,
+ const RECTL *prcClip, HRGN hrgnUpdate, RECTL *prcUpdate)
{
PDC pDC;
- RECT rcScroll, rcClip, rcSrc, rcDst;
+ RECTL rcScroll, rcClip, rcSrc, rcDst;
INT Result;
GdiGetClipBox(hDC, &rcClip);
rcScroll = rcClip;
if (prcClip)
{
- IntGdiIntersectRect(&rcClip, &rcClip, prcClip);
+ RECTL_bIntersectRect(&rcClip, &rcClip, prcClip);
}
if (prcScroll)
{
rcScroll = *prcScroll;
- IntGdiIntersectRect(&rcSrc, &rcClip, prcScroll);
+ RECTL_bIntersectRect(&rcSrc, &rcClip, prcScroll);
}
else
{
@@ -1159,8 +1159,8 @@
}
rcDst = rcSrc;
- IntGdiOffsetRect(&rcDst, dx, dy);
- IntGdiIntersectRect(&rcDst, &rcDst, &rcClip);
+ RECTL_vOffsetRect(&rcDst, dx, dy);
+ RECTL_bIntersectRect(&rcDst, &rcDst, &rcClip);
if (!NtGdiBitBlt(hDC, rcDst.left, rcDst.top,
rcDst.right - rcDst.left, rcDst.bottom - rcDst.top,
@@ -1185,8 +1185,8 @@
/* Begin with the shifted and then clipped scroll rect */
rcDst = rcScroll;
- IntGdiOffsetRect(&rcDst, dx, dy);
- IntGdiIntersectRect(&rcDst, &rcDst, &rcClip);
+ RECTL_vOffsetRect(&rcDst, dx, dy);
+ RECTL_bIntersectRect(&rcDst, &rcDst, &rcClip);
if (hrgnUpdate)
{
hrgnOwn = hrgnUpdate;
@@ -1242,7 +1242,7 @@
const RECT *prcUnsafeClip, HRGN hrgnUpdate, LPRECT prcUnsafeUpdate)
{
DECLARE_RETURN(DWORD);
- RECT rcScroll, rcClip, rcUpdate;
+ RECTL rcScroll, rcClip, rcUpdate;
NTSTATUS Status = STATUS_SUCCESS;
DWORD Result;
@@ -1325,7 +1325,7 @@
NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *prcUnsafeScroll,
const RECT *prcUnsafeClip, HRGN hrgnUpdate, LPRECT prcUnsafeUpdate,
UINT flags)
{
- RECT rcScroll, rcClip, rcCaret, rcUpdate;
+ RECTL rcScroll, rcClip, rcCaret, rcUpdate;
INT Result;
PWINDOW_OBJECT Window = NULL, CaretWnd;
HDC hDC;
@@ -1353,7 +1353,7 @@
if (prcUnsafeScroll)
{
ProbeForRead(prcUnsafeScroll, sizeof(*prcUnsafeScroll), 1);
- IntGdiIntersectRect(&rcScroll, &rcClip, prcUnsafeScroll);
+ RECTL_bIntersectRect(&rcScroll, &rcClip, prcUnsafeScroll);
}
else
rcScroll = rcClip;
@@ -1361,7 +1361,7 @@
if (prcUnsafeClip)
{
ProbeForRead(prcUnsafeClip, sizeof(*prcUnsafeClip), 1);
- IntGdiIntersectRect(&rcClip, &rcClip, prcUnsafeClip);
+ RECTL_bIntersectRect(&rcClip, &rcClip, prcUnsafeClip);
}
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
@@ -1419,10 +1419,10 @@
if (flags & SW_SCROLLCHILDREN)
{
PWINDOW_OBJECT Child;
- RECT rcChild;
+ RECTL rcChild;
POINT ClientOrigin;
USER_REFERENCE_ENTRY WndRef;
- RECT rcDummy;
+ RECTL rcDummy;
IntGetClientOrigin(Window, &ClientOrigin);
for (Child = Window->FirstChild; Child; Child = Child->NextSibling)
@@ -1433,7 +1433,7 @@
rcChild.right -= ClientOrigin.x;
rcChild.bottom -= ClientOrigin.y;
- if (! prcUnsafeScroll || IntGdiIntersectRect(&rcDummy, &rcChild,
&rcScroll))
+ if (! prcUnsafeScroll || RECTL_bIntersectRect(&rcDummy, &rcChild,
&rcScroll))
{
UserRefObjectCo(Child, &WndRef);
co_WinPosSetWindowPos(Child, 0, rcChild.left + dx, rcChild.top + dy, 0, 0,
@@ -1503,7 +1503,7 @@
UserDrawSysMenuButton(
PWINDOW_OBJECT pWnd,
HDC hDc,
- LPRECT lpRc,
+ RECTL *lpRc,
BOOL Down)
{
HICON hIcon;
@@ -1543,7 +1543,7 @@
BOOL
UserDrawCaptionText(HDC hDc,
const PUNICODE_STRING Text,
- const LPRECT lpRc,
+ const RECTL *lpRc,
UINT uFlags)
{
HFONT hOldFont = NULL, hFont = NULL;
@@ -1608,7 +1608,7 @@
BOOL UserDrawCaption(
PWINDOW_OBJECT pWnd,
HDC hDc,
- LPCRECT lpRc,
+ RECTL *lpRc,
HFONT hFont,
HICON hIcon,
const PUNICODE_STRING str,
@@ -1620,7 +1620,7 @@
HDC hMemDc = NULL;
ULONG Height;
UINT VCenter = 0, Padding = 0;
- RECT r = *lpRc;
+ RECTL r = *lpRc;
LONG ButtonWidth, IconWidth;
BOOL HasIcon;
PWINDOW Wnd = NULL;
@@ -1901,7 +1901,7 @@
UINT uFlags)
{
PWINDOW_OBJECT pWnd = NULL;
- RECT SafeRect;
+ RECTL SafeRect;
UNICODE_STRING SafeStr = {0};
BOOL Ret = FALSE;
@@ -1918,8 +1918,8 @@
_SEH2_TRY
{
- ProbeForRead(lpRc, sizeof(RECT), sizeof(ULONG));
- RtlCopyMemory(&SafeRect, lpRc, sizeof(RECT));
+ ProbeForRead(lpRc, sizeof(RECTL), sizeof(ULONG));
+ RtlCopyMemory(&SafeRect, lpRc, sizeof(RECTL));
if (str != NULL)
{
SafeStr = ProbeForReadUnicodeString(str);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -57,12 +57,12 @@
* the top. Return TRUE if the scrollbar is vertical, FALSE if horizontal.
*/
BOOL FASTCALL
-IntGetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect)
+IntGetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, RECTL *lprect)
{
BOOL vertical;
PWINDOW Wnd = Window->Wnd;
- RECT ClientRect = Window->Wnd->ClientRect;
- RECT WindowRect = Window->Wnd->WindowRect;
+ RECTL ClientRect = Window->Wnd->ClientRect;
+ RECTL WindowRect = Window->Wnd->WindowRect;
switch (nBar)
{
@@ -107,7 +107,7 @@
{
PWINDOW Wnd = Window->Wnd;
INT Thumb, ThumbBox, ThumbPos, cxy, mx;
- RECT ClientRect;
+ RECTL ClientRect;
switch(idObject)
{
@@ -120,7 +120,7 @@
cxy = psbi->rcScrollBar.bottom - psbi->rcScrollBar.top;
break;
case SB_CTL:
- IntGetClientRect (Window, &ClientRect);
+ IntGetClientRect(Window, &ClientRect);
if(Wnd->Style & SBS_VERT)
{
Thumb = UserGetSystemMetrics(SM_CYVSCROLL);
@@ -391,7 +391,7 @@
if (bRedraw)
{
- RECT UpdateRect = psbi->rcScrollBar;
+ RECTL UpdateRect = psbi->rcScrollBar;
UpdateRect.left -= Window->Wnd->ClientRect.left -
Window->Wnd->WindowRect.left;
UpdateRect.right -= Window->Wnd->ClientRect.left -
Window->Wnd->WindowRect.left;
UpdateRect.top -= Window->Wnd->ClientRect.top -
Window->Wnd->WindowRect.top;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -453,7 +453,7 @@
case TWOPARAM_ROUTINE_GETWINDOWRGNBOX:
{
DWORD Ret;
- RECT rcRect;
+ RECTL rcRect;
Window = UserGetWindowObject((HWND)Param1);
if (!Window) RETURN(ERROR);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -506,7 +506,7 @@
}
case SPI_SETWORKAREA:
{
- RECT *rc;
+ RECTL *rc;
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
PDESKTOP Desktop = pti->Desktop;
@@ -517,7 +517,7 @@
}
ASSERT(pvParam);
- rc = (RECT*)pvParam;
+ rc = pvParam;
Desktop->WorkArea = *rc;
bChanged = TRUE;
@@ -535,7 +535,7 @@
}
ASSERT(pvParam);
- IntGetDesktopWorkArea(Desktop, (PRECT)pvParam);
+ IntGetDesktopWorkArea(Desktop, pvParam);
break;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -739,7 +739,7 @@
* \note Does not check the validity of the parameters
*/
VOID FASTCALL
-IntGetClientRect(PWINDOW_OBJECT Window, PRECT Rect)
+IntGetClientRect(PWINDOW_OBJECT Window, RECTL *Rect)
{
ASSERT( Window );
ASSERT( Rect );
@@ -1484,14 +1484,14 @@
* calculates the default position of a window
*/
BOOL FASTCALL
-IntCalcDefPosSize(PWINDOW_OBJECT Parent, PWINDOW_OBJECT Window, RECT *rc, BOOL IncPos)
+IntCalcDefPosSize(PWINDOW_OBJECT Parent, PWINDOW_OBJECT Window, RECTL *rc, BOOL IncPos)
{
SIZE Sz;
POINT Pos = {0, 0};
if(Parent != NULL)
{
- IntGdiIntersectRect(rc, rc, &Parent->Wnd->ClientRect);
+ RECTL_bIntersectRect(rc, rc, &Parent->Wnd->ClientRect);
if(IncPos)
{
@@ -1899,7 +1899,7 @@
/* default positioning for overlapped windows */
if(!(Wnd->Style & (WS_POPUP | WS_CHILD)))
{
- RECT rc, WorkArea;
+ RECTL rc, WorkArea;
PRTL_USER_PROCESS_PARAMETERS ProcessParams;
BOOL CalculatedDefPosSize = FALSE;
@@ -1997,7 +1997,7 @@
Wnd->WindowRect.bottom = Pos.y + Size.cy;
if (0 != (Wnd->Style & WS_CHILD) && ParentWindow)
{
- IntGdiOffsetRect(&(Wnd->WindowRect),
ParentWindow->Wnd->ClientRect.left,
+ RECTL_vOffsetRect(&(Wnd->WindowRect),
ParentWindow->Wnd->ClientRect.left,
ParentWindow->Wnd->ClientRect.top);
}
Wnd->ClientRect = Wnd->WindowRect;
@@ -2032,7 +2032,7 @@
Wnd->WindowRect.bottom = Pos.y + Size.cy;
if (0 != (Wnd->Style & WS_CHILD) && ParentWindow)
{
- IntGdiOffsetRect(&(Wnd->WindowRect),
ParentWindow->Wnd->ClientRect.left,
+ RECTL_vOffsetRect(&(Wnd->WindowRect),
ParentWindow->Wnd->ClientRect.left,
ParentWindow->Wnd->ClientRect.top);
}
Wnd->ClientRect = Wnd->WindowRect;
@@ -2067,7 +2067,7 @@
&Window->Wnd->WindowRect,
&Window->Wnd->ClientRect);
- IntGdiOffsetRect(&Window->Wnd->WindowRect,
+ RECTL_vOffsetRect(&Window->Wnd->WindowRect,
MaxPos.x - Window->Wnd->WindowRect.left,
MaxPos.y - Window->Wnd->WindowRect.top);
@@ -2172,7 +2172,7 @@
/* Show or maybe minimize or maximize the window. */
if (Wnd->Style & (WS_MINIMIZE | WS_MAXIMIZE))
{
- RECT NewPos;
+ RECTL NewPos;
UINT16 SwFlag;
SwFlag = (Wnd->Style & WS_MINIMIZE) ? SW_MINIMIZE :
@@ -4484,7 +4484,7 @@
}
INT FASTCALL
-IntGetWindowRgnBox(PWINDOW_OBJECT Window, RECT *Rect)
+IntGetWindowRgnBox(PWINDOW_OBJECT Window, RECTL *Rect)
{
INT Ret;
HRGN VisRgn;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -191,7 +191,7 @@
FASTCALL
co_WinPosArrangeIconicWindows(PWINDOW_OBJECT parent)
{
- RECT rectParent;
+ RECTL rectParent;
INT i, x, y, xspacing, yspacing;
HWND *List = IntWinListChildren(parent);
@@ -248,7 +248,7 @@
}
VOID FASTCALL
-WinPosInitInternalPos(PWINDOW_OBJECT Window, POINT *pt, PRECT RestoreRect)
+WinPosInitInternalPos(PWINDOW_OBJECT Window, POINT *pt, RECTL *RestoreRect)
{
PWINDOW_OBJECT Parent;
UINT XInc, YInc;
@@ -256,7 +256,7 @@
if (!Wnd->InternalPosInitialized)
{
- RECT WorkArea;
+ RECTL WorkArea;
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
PDESKTOP Desktop = pti->Desktop; /* Or rather get it from the window? */
@@ -333,7 +333,7 @@
RDW_NOINTERNALPAINT);
Wnd->Style |= WS_MINIMIZE;
WinPosFindIconPos(Window, &Wnd->InternalPos.IconPos);
- IntGdiSetRect(NewPos, Wnd->InternalPos.IconPos.x,
Wnd->InternalPos.IconPos.y,
+ RECTL_vSetRect(NewPos, Wnd->InternalPos.IconPos.x,
Wnd->InternalPos.IconPos.y,
UserGetSystemMetrics(SM_CXMINIMIZED),
UserGetSystemMetrics(SM_CYMINIMIZED));
SwpFlags |= SWP_NOCOPYBITS;
@@ -351,7 +351,7 @@
Wnd->Style &= ~WS_MINIMIZE;
}
Wnd->Style |= WS_MAXIMIZE;
- IntGdiSetRect(NewPos, Wnd->InternalPos.MaxPos.x,
Wnd->InternalPos.MaxPos.y,
+ RECTL_vSetRect(NewPos, Wnd->InternalPos.MaxPos.x,
Wnd->InternalPos.MaxPos.y,
Size.x, Size.y);
break;
}
@@ -366,7 +366,7 @@
co_WinPosGetMinMaxInfo(Window, &Size,
&Wnd->InternalPos.MaxPos, NULL,
NULL);
Wnd->Style |= WS_MAXIMIZE;
- IntGdiSetRect(NewPos, Wnd->InternalPos.MaxPos.x,
+ RECTL_vSetRect(NewPos, Wnd->InternalPos.MaxPos.x,
Wnd->InternalPos.MaxPos.y, Size.x, Size.y);
break;
}
@@ -401,7 +401,7 @@
WinPosFillMinMaxInfoStruct(PWINDOW_OBJECT Window, MINMAXINFO *Info)
{
UINT XInc, YInc;
- RECT WorkArea;
+ RECTL WorkArea;
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
PDESKTOP Desktop = pti->Desktop; /* Or rather get it from the window? */
@@ -459,7 +459,7 @@
static
VOID FASTCALL
-FixClientRect(PRECT ClientRect, PRECT WindowRect)
+FixClientRect(PRECTL ClientRect, PRECTL WindowRect)
{
if (ClientRect->left < WindowRect->left)
{
@@ -519,11 +519,11 @@
Parent = Window->Parent;
if (0 != (Wnd->Style & WS_CHILD) && Parent)
{
- IntGdiOffsetRect(&(params.rgrc[0]), - Parent->Wnd->ClientRect.left,
+ RECTL_vOffsetRect(&(params.rgrc[0]), - Parent->Wnd->ClientRect.left,
- Parent->Wnd->ClientRect.top);
- IntGdiOffsetRect(&(params.rgrc[1]), - Parent->Wnd->ClientRect.left,
+ RECTL_vOffsetRect(&(params.rgrc[1]), - Parent->Wnd->ClientRect.left,
- Parent->Wnd->ClientRect.top);
- IntGdiOffsetRect(&(params.rgrc[2]), - Parent->Wnd->ClientRect.left,
+ RECTL_vOffsetRect(&(params.rgrc[2]), - Parent->Wnd->ClientRect.left,
- Parent->Wnd->ClientRect.top);
}
params.lppos = &winposCopy;
@@ -538,7 +538,7 @@
*ClientRect = params.rgrc[0];
if ((Wnd->Style & WS_CHILD) && Parent)
{
- IntGdiOffsetRect(ClientRect, Parent->Wnd->ClientRect.left,
+ RECTL_vOffsetRect(ClientRect, Parent->Wnd->ClientRect.left,
Parent->Wnd->ClientRect.top);
}
FixClientRect(ClientRect, WindowRect);
@@ -577,8 +577,8 @@
BOOL FASTCALL
co_WinPosDoWinPosChanging(PWINDOW_OBJECT Window,
PWINDOWPOS WinPos,
- PRECT WindowRect,
- PRECT ClientRect)
+ PRECTL WindowRect,
+ PRECTL ClientRect)
{
INT X, Y;
PWINDOW Wnd;
@@ -616,7 +616,7 @@
WindowRect->top = Y;
WindowRect->right += X - Wnd->WindowRect.left;
WindowRect->bottom += Y - Wnd->WindowRect.top;
- IntGdiOffsetRect(ClientRect,
+ RECTL_vOffsetRect(ClientRect,
X - Wnd->WindowRect.left,
Y - Wnd->WindowRect.top);
}
@@ -871,8 +871,8 @@
)
{
WINDOWPOS WinPos;
- RECT NewWindowRect;
- RECT NewClientRect;
+ RECTL NewWindowRect;
+ RECTL NewClientRect;
PROSRGNDATA VisRgn;
HRGN VisBefore = NULL;
HRGN VisAfter = NULL;
@@ -880,11 +880,11 @@
HRGN ExposedRgn = NULL;
HRGN CopyRgn = NULL;
ULONG WvrFlags = 0;
- RECT OldWindowRect, OldClientRect;
+ RECTL OldWindowRect, OldClientRect;
int RgnType;
HDC Dc;
- RECT CopyRect;
- RECT TempRect;
+ RECTL CopyRect;
+ RECTL TempRect;
PWINDOW_OBJECT Ancestor;
ASSERT_REFS_CO(Window);
@@ -1132,11 +1132,11 @@
RgnType != NULLREGION)
{
PROSRGNDATA pCopyRgn;
- RECT ORect = OldClientRect;
- RECT NRect = NewClientRect;
- IntGdiOffsetRect(&ORect, - OldWindowRect.left, - OldWindowRect.top);
- IntGdiOffsetRect(&NRect, - NewWindowRect.left, - NewWindowRect.top);
- IntGdiIntersectRect(&CopyRect, &ORect, &NRect);
+ RECTL ORect = OldClientRect;
+ RECTL NRect = NewClientRect;
+ RECTL_vOffsetRect(&ORect, - OldWindowRect.left, - OldWindowRect.top);
+ RECTL_vOffsetRect(&NRect, - NewWindowRect.left, - NewWindowRect.top);
+ RECTL_bIntersectRect(&CopyRect, &ORect, &NRect);
pCopyRgn = REGION_LockRgn(CopyRgn);
REGION_CropAndOffsetRegion(pCopyRgn, pCopyRgn, &CopyRect, NULL);
REGION_UnlockRgn(pCopyRgn);
@@ -1316,7 +1316,7 @@
{
BOOLEAN WasVisible;
UINT Swp = 0;
- RECT NewPos;
+ RECTL NewPos;
BOOLEAN ShowFlag;
// HRGN VisibleRgn;
PWINDOW Wnd;
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -23,14 +23,6 @@
#define NDEBUG
#include <debug.h>
-#define IN_RECT(r,x,y) \
-( \
- (x) >= (r).left && \
- (y) >= (r).top && \
- (x) < (r).right && \
- (y) < (r).bottom \
-)
-
HBITMAP APIENTRY
IntGdiCreateBitmap(
INT Width,
@@ -366,7 +358,7 @@
XPos += dc->ptlDCOrig.x;
YPos += dc->ptlDCOrig.y;
- if (IN_RECT(dc->CombinedClip->rclBounds,XPos,YPos))
+ if (RECTL_bPointInRect(&dc->CombinedClip->rclBounds, XPos, YPos))
{
bInRect = TRUE;
psurf = SURFACE_LockSurface(dc->w.hBitmap);
Modified: trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -43,8 +43,8 @@
Dc->CombinedClip = IntEngCreateClipRegion(
CombinedRegion->rdh.nCount,
- (PRECTL)CombinedRegion->Buffer,
- (PRECTL)&CombinedRegion->rdh.rcBound);
+ CombinedRegion->Buffer,
+ &CombinedRegion->rdh.rcBound);
REGION_UnlockRgn(CombinedRegion);
}
@@ -124,7 +124,7 @@
if (!dc->w.hClipRgn)
{
PROSRGNDATA Rgn;
- RECT rect;
+ RECTL rect;
if((Rgn = REGION_LockRgn(dc->w.hVisRgn)))
{
REGION_GetRgnBox(Rgn, &rect);
@@ -169,7 +169,7 @@
}
INT FASTCALL
-GdiGetClipBox(HDC hDC, LPRECT rc)
+GdiGetClipBox(HDC hDC, PRECTL rc)
{
PROSRGNDATA Rgn;
INT retval;
@@ -194,11 +194,11 @@
}
INT APIENTRY
-NtGdiGetAppClipBox(HDC hDC, LPRECT rc)
+NtGdiGetAppClipBox(HDC hDC, PRECTL rc)
{
INT Ret;
NTSTATUS Status = STATUS_SUCCESS;
- RECT Saferect;
+ RECTL Saferect;
Ret = GdiGetClipBox(hDC, &Saferect);
@@ -231,7 +231,7 @@
int BottomRect)
{
INT Result;
- RECT Rect;
+ RECTL Rect;
HRGN NewRgn;
PDC dc = DC_LockDc(hDC);
@@ -282,7 +282,7 @@
int BottomRect)
{
INT Result;
- RECT Rect;
+ RECTL Rect;
HRGN NewRgn;
PDC dc = DC_LockDc(hDC);
@@ -374,13 +374,13 @@
}
BOOL APIENTRY NtGdiRectVisible(HDC hDC,
- CONST PRECT UnsafeRect)
+ LPRECT UnsafeRect)
{
NTSTATUS Status = STATUS_SUCCESS;
PROSRGNDATA Rgn;
PDC dc = DC_LockDc(hDC);
BOOL Result = FALSE;
- RECT Rect;
+ RECTL Rect;
if (!dc)
{
@@ -545,8 +545,8 @@
// if (Dc->CombinedClip != NULL) IntEngDeleteClipRegion(Dc->CombinedClip);
co = IntEngCreateClipRegion( ((PROSRGNDATA)pDC->prgnRao)->rdh.nCount,
- (PRECTL)((PROSRGNDATA)pDC->prgnRao)->Buffer,
- (PRECTL)&pDC->erclClip);
+ ((PROSRGNDATA)pDC->prgnRao)->Buffer,
+ &pDC->erclClip);
return REGION_Complexity(pDC->prgnRao);
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -3105,7 +3105,7 @@
IN INT XStart,
IN INT YStart,
IN UINT fuOptions,
- IN OPTIONAL LPRECT lprc,
+ IN OPTIONAL PRECTL lprc,
IN LPWSTR String,
IN INT Count,
IN OPTIONAL LPINT Dx,
@@ -3188,7 +3188,7 @@
XStart,
YStart,
fuOptions,
- (const RECT *)lprc,
+ (const RECTL *)lprc,
String,
Count,
(const INT *)Dx)) goto fail;
@@ -3694,7 +3694,7 @@
{
BOOL Result = FALSE;
NTSTATUS Status = STATUS_SUCCESS;
- RECT SafeRect;
+ RECTL SafeRect;
BYTE LocalBuffer[STACK_TEXT_BUFFER_SIZE];
PVOID Buffer = LocalBuffer;
LPWSTR SafeString = NULL;
Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -2025,7 +2025,7 @@
*/
BOOL
FASTCALL
-PATH_ExtTextOut(PDC dc, INT x, INT y, UINT flags, const RECT *lprc,
+PATH_ExtTextOut(PDC dc, INT x, INT y, UINT flags, const RECTL *lprc,
LPCWSTR str, UINT count, const INT *dx)
{
unsigned int idx;
Modified: trunk/reactos/subsystems/win32/win32k/objects/rect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/rect.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/rect.c [iso-8859-1] Thu Mar 19 04:42:34
2009
@@ -25,87 +25,61 @@
/* FUNCTIONS *****************************************************************/
-VOID FASTCALL
-IntGdiSetEmptyRect(PRECT Rect)
+BOOL
+FASTCALL
+RECTL_bUnionRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2)
{
- Rect->left = Rect->right = Rect->top = Rect->bottom = 0;
-}
-
-BOOL FASTCALL
-IntGdiIsEmptyRect(const RECT* Rect)
-{
- return(Rect->left >= Rect->right || Rect->top >= Rect->bottom);
-}
-
-VOID FASTCALL
-IntGdiOffsetRect(LPRECT Rect, INT x, INT y)
-{
- Rect->left += x;
- Rect->right += x;
- Rect->top += y;
- Rect->bottom += y;
-}
-
-BOOL FASTCALL
-IntGdiUnionRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
-{
- if (IntGdiIsEmptyRect(Src1))
+ if (RECTL_bIsEmptyRect(prcl1))
{
- if (IntGdiIsEmptyRect(Src2))
- {
- IntGdiSetEmptyRect(Dest);
- return FALSE;
- }
- else
- {
- *Dest = *Src2;
- }
+ if (RECTL_bIsEmptyRect(prcl2))
+ {
+ RECTL_vSetEmptyRect(prclDst);
+ return FALSE;
+ }
+ else
+ {
+ *prclDst = *prcl2;
+ }
}
- else
+ else
{
- if (IntGdiIsEmptyRect(Src2))
- {
- *Dest = *Src1;
- }
- else
- {
- Dest->left = min(Src1->left, Src2->left);
- Dest->top = min(Src1->top, Src2->top);
- Dest->right = max(Src1->right, Src2->right);
- Dest->bottom = max(Src1->bottom, Src2->bottom);
- }
+ if (RECTL_bIsEmptyRect(prcl2))
+ {
+ *prclDst = *prcl1;
+ }
+ else
+ {
+ prclDst->left = min(prcl1->left, prcl2->left);
+ prclDst->top = min(prcl1->top, prcl2->top);
+ prclDst->right = max(prcl1->right, prcl2->right);
+ prclDst->bottom = max(prcl1->bottom, prcl2->bottom);
+ }
}
- return TRUE;
-}
-
-VOID FASTCALL
-IntGdiSetRect(PRECT Rect, INT left, INT top, INT right, INT bottom)
-{
- Rect->left = left;
- Rect->top = top;
- Rect->right = right;
- Rect->bottom = bottom;
-}
-
-BOOL FASTCALL
-IntGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2)
-{
- if (IntGdiIsEmptyRect(Src1) || IntGdiIsEmptyRect(Src2) ||
- Src1->left >= Src2->right || Src2->left >= Src1->right ||
- Src1->top >= Src2->bottom || Src2->top >= Src1->bottom)
- {
- IntGdiSetEmptyRect(Dest);
- return FALSE;
- }
-
- Dest->left = max(Src1->left, Src2->left);
- Dest->right = min(Src1->right, Src2->right);
- Dest->top = max(Src1->top, Src2->top);
- Dest->bottom = min(Src1->bottom, Src2->bottom);
-
- return TRUE;
+ return TRUE;
}
+BOOL
+FASTCALL
+RECTL_bIntersectRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2)
+{
+ if (RECTL_bIsEmptyRect(prcl1) || RECTL_bIsEmptyRect(prcl2) ||
+ prcl1->left >= prcl2->right || prcl2->left >= prcl1->right ||
+ prcl1->top >= prcl2->bottom || prcl2->top >= prcl1->bottom)
+ {
+ RECTL_vSetEmptyRect(prclDst);
+ return FALSE;
+ }
+
+ prclDst->left = max(prcl1->left, prcl2->left);
+ prclDst->right = min(prcl1->right, prcl2->right);
+ prclDst->top = max(prcl1->top, prcl2->top);
+ prclDst->bottom = min(prcl1->bottom, prcl2->bottom);
+
+ return TRUE;
+}
+
+
+
/* EOF */
Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Thu Mar 19
04:42:34 2009
@@ -126,15 +126,15 @@
#if 1
#define COPY_RECTS(dest, src, nRects) \
do { \
- PRECT xDest = (dest); \
- PRECT xSrc = (src); \
+ PRECTL xDest = (dest); \
+ PRECTL xSrc = (src); \
UINT xRects = (nRects); \
while(xRects-- > 0) { \
*(xDest++) = *(xSrc++); \
} \
} while(0)
#else
-#define COPY_RECTS(dest, src, nRects) RtlCopyMemory(dest, src, (nRects) * sizeof(RECT))
+#define COPY_RECTS(dest, src, nRects) RtlCopyMemory(dest, src, (nRects) * sizeof(RECTL))
#endif
#define EMPTY_REGION(pReg) { \
@@ -408,11 +408,11 @@
/*
* Check to see if there is enough memory in the present region.
*/
-static __inline int xmemcheck(ROSRGNDATA *reg, PRECT *rect, PRECT *firstrect)
+static __inline int xmemcheck(ROSRGNDATA *reg, PRECTL *rect, PRECTL *firstrect)
{
if ( (reg->rdh.nCount+1) * sizeof(RECT) >= reg->rdh.nRgnSize )
{
- PRECT temp;
+ PRECTL temp;
DWORD NewSize = 2 * reg->rdh.nRgnSize;
if (NewSize < (reg->rdh.nCount + 1) * sizeof(RECT))
{
@@ -439,7 +439,7 @@
return 1;
}
-#define MEMCHECK(reg, rect, firstrect) xmemcheck(reg,&(rect),(LPRECT
*)&(firstrect))
+#define MEMCHECK(reg, rect, firstrect) xmemcheck(reg,&(rect),(PRECTL
*)&(firstrect))
typedef void (FASTCALL *overlapProcp)(PROSRGNDATA, PRECT, PRECT, PRECT, PRECT, INT,
INT);
typedef void (FASTCALL *nonOverlapProcp)(PROSRGNDATA, PRECT, PRECT, INT, INT);
@@ -513,7 +513,7 @@
{
if (dst->rdh.nRgnSize < src->rdh.nCount * sizeof(RECT))
{
- PRECT temp;
+ PRECTL temp;
temp = ExAllocatePoolWithTag(PagedPool, src->rdh.nCount * sizeof(RECT),
TAG_REGION );
if (!temp)
@@ -538,7 +538,7 @@
static void FASTCALL
REGION_SetExtents(ROSRGNDATA *pReg)
{
- RECT *pRect, *pRectEnd, *pExtents;
+ RECTL *pRect, *pRectEnd, *pExtents;
if (pReg->rdh.nCount == 0)
{
@@ -551,8 +551,8 @@
}
pExtents = &pReg->rdh.rcBound;
- pRect = (PRECT)pReg->Buffer;
- pRectEnd = (PRECT)pReg->Buffer + pReg->rdh.nCount - 1;
+ pRect = pReg->Buffer;
+ pRectEnd = pReg->Buffer + pReg->rdh.nCount - 1;
/*
* Since pRect is the first rectangle in the region, it must have the
@@ -585,22 +585,22 @@
REGION_CropAndOffsetRegion(
PROSRGNDATA rgnDst,
PROSRGNDATA rgnSrc,
- const PRECT rect,
- const PPOINT offset
+ const RECTL *rect,
+ const POINTL *offset
)
{
POINT pt = {0,0};
- PPOINT off = offset;
+ const POINT *off = offset;
if (!off) off = &pt;
if (!rect) // just copy and offset
{
- PRECT xrect;
+ PRECTL xrect;
if (rgnDst == rgnSrc)
{
if (off->x || off->y)
- xrect = (PRECT)rgnDst->Buffer;
+ xrect = rgnDst->Buffer;
else
return TRUE;
}
@@ -624,10 +624,10 @@
{
for (i = 0; i < rgnDst->rdh.nCount; i++)
{
- xrect[i].left = ((PRECT)rgnSrc->Buffer + i)->left + off->x;
- xrect[i].right = ((PRECT)rgnSrc->Buffer + i)->right +
off->x;
- xrect[i].top = ((PRECT)rgnSrc->Buffer + i)->top + off->y;
- xrect[i].bottom = ((PRECT)rgnSrc->Buffer + i)->bottom +
off->y;
+ xrect[i].left = (rgnSrc->Buffer + i)->left + off->x;
+ xrect[i].right = (rgnSrc->Buffer + i)->right + off->x;
+ xrect[i].top = (rgnSrc->Buffer + i)->top + off->y;
+ xrect[i].bottom = (rgnSrc->Buffer + i)->bottom + off->y;
}
rgnDst->rdh.rcBound.left += off->x;
rgnDst->rdh.rcBound.right += off->x;
@@ -652,17 +652,17 @@
}
else // region box and clipping rect appear to intersect
{
- PRECT lpr, rpr;
+ PRECTL lpr, rpr;
ULONG i, j, clipa, clipb;
INT left = rgnSrc->rdh.rcBound.right + off->x;
INT right = rgnSrc->rdh.rcBound.left + off->x;
- for (clipa = 0; ((PRECT)rgnSrc->Buffer + clipa)->bottom <= rect->top;
clipa++)
+ for (clipa = 0; (rgnSrc->Buffer + clipa)->bottom <= rect->top;
clipa++)
//region and rect intersect so we stop before clipa >
rgnSrc->rdh.nCount
; // skip bands above the clipping rectangle
for (clipb = clipa; clipb < rgnSrc->rdh.nCount; clipb++)
- if (((PRECT)rgnSrc->Buffer + clipb)->top >= rect->bottom)
+ if ((rgnSrc->Buffer + clipb)->top >= rect->bottom)
break; // and below it
// clipa - index of the first rect in the first intersecting band
@@ -670,7 +670,7 @@
if ((rgnDst != rgnSrc) && (rgnDst->rdh.nCount < (i = (clipb -
clipa))))
{
- PRECT temp;
+ PRECTL temp;
temp = ExAllocatePoolWithTag(PagedPool, i * sizeof(RECT), TAG_REGION);
if (!temp)
return FALSE;
@@ -686,11 +686,11 @@
{
// i - src index, j - dst index, j is always <= i for obvious reasons
- lpr = (PRECT)rgnSrc->Buffer + i;
+ lpr = rgnSrc->Buffer + i;
if (lpr->left < rect->right && lpr->right >
rect->left)
{
- rpr = (PRECT)rgnDst->Buffer + j;
+ rpr = rgnDst->Buffer + j;
rpr->top = lpr->top + off->y;
rpr->bottom = lpr->bottom + off->y;
@@ -720,13 +720,13 @@
break;
for (i = j; i > 0; i--) // fixup bottom band
- if (((PRECT)rgnDst->Buffer + i)->bottom > right)
- ((PRECT)rgnDst->Buffer + i)->bottom = right;
+ if ((rgnDst->Buffer + i)->bottom > right)
+ (rgnDst->Buffer + i)->bottom = right;
else
break;
- rgnDst->rdh.rcBound.top = ((PRECT)rgnDst->Buffer)->top;
- rgnDst->rdh.rcBound.bottom = ((PRECT)rgnDst->Buffer + j)->bottom;
+ rgnDst->rdh.rcBound.top = (rgnDst->Buffer)->top;
+ rgnDst->rdh.rcBound.bottom = (rgnDst->Buffer + j)->bottom;
rgnDst->rdh.iType = RDH_RECTANGLES;
}
@@ -736,7 +736,7 @@
empty:
if (!rgnDst->Buffer)
{
- rgnDst->Buffer = (PRECT)ExAllocatePoolWithTag(PagedPool, RGN_DEFAULT_RECTS *
sizeof(RECT), TAG_REGION);
+ rgnDst->Buffer = ExAllocatePoolWithTag(PagedPool, RGN_DEFAULT_RECTS *
sizeof(RECT), TAG_REGION);
if (rgnDst->Buffer)
{
rgnDst->rdh.nCount = RGN_DEFAULT_RECTS;
@@ -771,15 +771,15 @@
INT curStart /* Index of start of current band */
)
{
- RECT *pPrevRect; /* Current rect in previous band */
- RECT *pCurRect; /* Current rect in current band */
- RECT *pRegEnd; /* End of region */
+ RECTL *pPrevRect; /* Current rect in previous band */
+ RECTL *pCurRect; /* Current rect in current band */
+ RECTL *pRegEnd; /* End of region */
INT curNumRects; /* Number of rectangles in current band */
INT prevNumRects; /* Number of rectangles in previous band */
INT bandtop; /* top coordinate for current band */
- pRegEnd = (PRECT)pReg->Buffer + pReg->rdh.nCount;
- pPrevRect = (PRECT)pReg->Buffer + prevStart;
+ pRegEnd = pReg->Buffer + pReg->rdh.nCount;
+ pPrevRect = pReg->Buffer + prevStart;
prevNumRects = curStart - prevStart;
/*
@@ -787,7 +787,7 @@
* this because multiple bands could have been added in REGION_RegionOp
* at the end when one region has been exhausted.
*/
- pCurRect = (PRECT)pReg->Buffer + curStart;
+ pCurRect = pReg->Buffer + curStart;
bandtop = pCurRect->top;
for (curNumRects = 0;
(pCurRect != pRegEnd) && (pCurRect->top == bandtop);
@@ -809,8 +809,8 @@
{
pRegEnd--;
}
- curStart = pRegEnd - (PRECT)pReg->Buffer;
- pRegEnd = (PRECT)pReg->Buffer + pReg->rdh.nCount;
+ curStart = pRegEnd - pReg->Buffer;
+ pRegEnd = pReg->Buffer + pReg->rdh.nCount;
}
if ((curNumRects == prevNumRects) && (curNumRects != 0))
@@ -921,18 +921,18 @@
nonOverlapProcp nonOverlap2Func /* Function to call for non-overlapping bands in
region 2 */
)
{
- RECT *r1; /* Pointer into first region */
- RECT *r2; /* Pointer into 2d region */
- RECT *r1End; /* End of 1st region */
- RECT *r2End; /* End of 2d region */
+ RECTL *r1; /* Pointer into first region */
+ RECTL *r2; /* Pointer into 2d region */
+ RECTL *r1End; /* End of 1st region */
+ RECTL *r2End; /* End of 2d region */
INT ybot; /* Bottom of intersection */
INT ytop; /* Top of intersection */
- RECT *oldRects; /* Old rects for newReg */
+ RECTL *oldRects; /* Old rects for newReg */
ULONG prevBand; /* Index of start of
* previous band in newReg */
ULONG curBand; /* Index of start of current band in newReg */
- RECT *r1BandEnd; /* End of current band in r1 */
- RECT *r2BandEnd; /* End of current band in r2 */
+ RECTL *r1BandEnd; /* End of current band in r1 */
+ RECTL *r2BandEnd; /* End of current band in r2 */
ULONG top; /* Top of non-overlapping band */
ULONG bot; /* Bottom of non-overlapping band */
@@ -943,8 +943,8 @@
* the two source regions, then mark the "new" region empty, allocating
* another array of rectangles for it to use.
*/
- r1 = (PRECT)reg1->Buffer;
- r2 = (PRECT)reg2->Buffer;
+ r1 = reg1->Buffer;
+ r2 = reg2->Buffer;
r1End = r1 + reg1->rdh.nCount;
r2End = r2 + reg2->rdh.nCount;
@@ -955,7 +955,7 @@
* extents and simply set numRects to zero.
*/
- oldRects = (PRECT)newReg->Buffer;
+ oldRects = newReg->Buffer;
newReg->rdh.nCount = 0;
/*
@@ -1159,7 +1159,7 @@
{
if (REGION_NOT_EMPTY(newReg))
{
- RECT *prev_rects = (PRECT)newReg->Buffer;
+ RECTL *prev_rects = newReg->Buffer;
newReg->Buffer = ExAllocatePoolWithTag(PagedPool,
newReg->rdh.nCount*sizeof(RECT), TAG_REGION);
if (! newReg->Buffer)
@@ -1210,18 +1210,18 @@
static void FASTCALL
REGION_IntersectO(
PROSRGNDATA pReg,
- PRECT r1,
- PRECT r1End,
- PRECT r2,
- PRECT r2End,
+ PRECTL r1,
+ PRECTL r1End,
+ PRECTL r2,
+ PRECTL r2End,
INT top,
INT bottom
)
{
INT left, right;
- RECT *pNextRect;
-
- pNextRect = (PRECT)pReg->Buffer + pReg->rdh.nCount;
+ RECTL *pNextRect;
+
+ pNextRect = pReg->Buffer + pReg->rdh.nCount;
while ((r1 != r1End) && (r2 != r2End))
{
@@ -1317,15 +1317,15 @@
static void FASTCALL
REGION_UnionNonO (
PROSRGNDATA pReg,
- PRECT r,
- PRECT rEnd,
+ PRECTL r,
+ PRECTL rEnd,
INT top,
INT bottom
)
{
- RECT *pNextRect;
-
- pNextRect = (PRECT)pReg->Buffer + pReg->rdh.nCount;
+ RECTL *pNextRect;
+
+ pNextRect = pReg->Buffer + pReg->rdh.nCount;
while (r != rEnd)
{
@@ -1356,17 +1356,17 @@
static void FASTCALL
REGION_UnionO (
PROSRGNDATA pReg,
- PRECT r1,
- PRECT r1End,
- PRECT r2,
- PRECT r2End,
+ PRECTL r1,
+ PRECTL r1End,
+ PRECTL r2,
+ PRECTL r2End,
INT top,
INT bottom
)
{
- RECT *pNextRect;
-
- pNextRect = (PRECT)pReg->Buffer + pReg->rdh.nCount;
+ RECTL *pNextRect;
+
+ pNextRect = pReg->Buffer + pReg->rdh.nCount;
#define MERGERECT(r) \
if ((pReg->rdh.nCount != 0) && \
@@ -1516,15 +1516,15 @@
static void FASTCALL
REGION_SubtractNonO1(
PROSRGNDATA pReg,
- PRECT r,
- PRECT rEnd,
+ PRECTL r,
+ PRECTL rEnd,
INT top,
INT bottom
)
{
- RECT *pNextRect;
-
- pNextRect = (PRECT)pReg->Buffer + pReg->rdh.nCount;
+ RECTL *pNextRect;
+
+ pNextRect = pReg->Buffer + pReg->rdh.nCount;
while (r != rEnd)
{
@@ -1555,19 +1555,19 @@
static void FASTCALL
REGION_SubtractO(
PROSRGNDATA pReg,
- PRECT r1,
- PRECT r1End,
- PRECT r2,
- PRECT r2End,
+ PRECTL r1,
+ PRECTL r1End,
+ PRECTL r2,
+ PRECTL r2End,
INT top,
INT bottom
)
{
- RECT *pNextRect;
+ RECTL *pNextRect;
INT left;
left = r1->left;
- pNextRect = (PRECT)pReg->Buffer + pReg->rdh.nCount;
+ pNextRect = pReg->Buffer + pReg->rdh.nCount;
while ((r1 != r1End) && (r2 != r2End))
{
@@ -1763,7 +1763,7 @@
VOID FASTCALL
REGION_UnionRectWithRgn(
ROSRGNDATA *rgn,
- const RECT *rect
+ const RECTL *rect
)
{
ROSRGNDATA region;
@@ -1782,8 +1782,8 @@
INT y
)
{
- RECT rc[4];
- PRECT prc;
+ RECTL rc[4];
+ PRECTL prc;
if (x != 0 || y != 0)
{
@@ -1860,7 +1860,7 @@
)
{
PROSRGNDATA srcObj, destObj;
- PRECT rc;
+ PRECTL rc;
ULONG i;
if (!(srcObj = REGION_LockRgn(hSrc)))
@@ -1899,7 +1899,7 @@
else
{
/* Original region moved to right */
- rc = (PRECT)srcObj->Buffer;
+ rc = srcObj->Buffer;
for (i = 0; i < srcObj->rdh.nCount; i++)
{
rc->left += x;
@@ -1909,7 +1909,7 @@
REGION_IntersectRegion(destObj, destObj, srcObj);
/* Original region moved to left */
- rc = (PRECT)srcObj->Buffer;
+ rc = srcObj->Buffer;
for (i = 0; i < srcObj->rdh.nCount; i++)
{
rc->left -= 2 * x;
@@ -1919,7 +1919,7 @@
REGION_IntersectRegion(destObj, destObj, srcObj);
/* Original region moved down */
- rc = (PRECT)srcObj->Buffer;
+ rc = srcObj->Buffer;
for (i = 0; i < srcObj->rdh.nCount; i++)
{
rc->left += x;
@@ -1931,7 +1931,7 @@
REGION_IntersectRegion(destObj, destObj, srcObj);
/* Original region moved up */
- rc = (PRECT)srcObj->Buffer;
+ rc = srcObj->Buffer;
for (i = 0; i < srcObj->rdh.nCount; i++)
{
rc->top -= 2 * y;
@@ -1941,7 +1941,7 @@
REGION_IntersectRegion(destObj, destObj, srcObj);
/* Restore the original region */
- rc = (PRECT)srcObj->Buffer;
+ rc = srcObj->Buffer;
for (i = 0; i < srcObj->rdh.nCount; i++)
{
rc->top += y;
@@ -1963,11 +1963,11 @@
HRGN hDest,
HRGN hSrc)
{
- RECT *pCurRect, *pEndRect;
+ RECTL *pCurRect, *pEndRect;
PROSRGNDATA srcObj = NULL;
PROSRGNDATA destObj = NULL;
- RECT tmpRect;
+ RECTL tmpRect;
BOOL ret = FALSE;
PDC_ATTR Dc_Attr;
@@ -1996,8 +1996,8 @@
}
EMPTY_REGION(destObj);
- pEndRect = (PRECT)srcObj->Buffer + srcObj->rdh.nCount;
- for (pCurRect = (PRECT)srcObj->Buffer; pCurRect < pEndRect; pCurRect++)
+ pEndRect = srcObj->Buffer + srcObj->rdh.nCount;
+ for (pCurRect = srcObj->Buffer; pCurRect < pEndRect; pCurRect++)
{
tmpRect = *pCurRect;
tmpRect.left = XLPTODP(Dc_Attr, tmpRect.left);
@@ -2093,7 +2093,7 @@
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
pDC->DC_Flags |= DC_FLAG_DIRTY_RAO;
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS;
- IntGdiSetEmptyRect((PRECT)&pDC->erclClip);
+ RECTL_vSetEmptyRect(&pDC->erclClip);
}
@@ -2104,7 +2104,7 @@
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
pDC->DC_Flags |= DC_FLAG_DIRTY_RAO;
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS;
- IntGdiSetEmptyRect((PRECT)&pDC->erclClip);
+ RECTL_vSetEmptyRect(&pDC->erclClip);
REGION_Delete(pDC->prgnVis);
pDC->prgnVis = prgnDefault;
}
@@ -2137,7 +2137,7 @@
rcl.bottom -= pDC->erclWindow.top;
}
else
- IntGdiSetEmptyRect((PRECT)&rcl);
+ RECTL_vSetEmptyRect(&rcl);
pDc_Attr->VisRectRegion.Rect = rcl;
@@ -2303,7 +2303,7 @@
PROSRGNDATA pRgn;
HRGN hRgn;
- /* Allocate region data structure with space for 1 RECT */
+ /* Allocate region data structure with space for 1 RECTL */
if (!(pRgn = REGION_AllocRgnWithHandle(1)))
{
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
@@ -2332,7 +2332,7 @@
PROSRGNDATA obj;
HRGN hrgn;
int asq, bsq, d, xd, yd;
- RECT rect;
+ RECTL rect;
/* Make the dimensions sensible */
@@ -2444,7 +2444,7 @@
)
{
PROSRGNDATA rgn1, rgn2;
- PRECT tRect1, tRect2;
+ PRECTL tRect1, tRect2;
ULONG i;
BOOL bRet = FALSE;
@@ -2465,8 +2465,8 @@
rgn1->rdh.rcBound.bottom != rgn2->rdh.rcBound.bottom)
goto exit;
- tRect1 = (PRECT)rgn1->Buffer;
- tRect2 = (PRECT)rgn2->Buffer;
+ tRect1 = rgn1->Buffer;
+ tRect2 = rgn2->Buffer;
if (!tRect1 || !tRect2)
goto exit;
@@ -2598,7 +2598,7 @@
{
HBRUSH oldhBrush;
PROSRGNDATA rgn;
- PRECT r;
+ PRECTL r;
if (NULL == (rgn = REGION_LockRgn(hRgn)))
{
@@ -2654,7 +2654,7 @@
INT FASTCALL
REGION_GetRgnBox(
PROSRGNDATA Rgn,
- LPRECT pRect
+ PRECTL pRect
)
{
DWORD ret;
@@ -2754,7 +2754,7 @@
INT APIENTRY
IntGdiGetRgnBox(
HRGN hRgn,
- LPRECT pRect
+ PRECTL pRect
)
{
PROSRGNDATA Rgn;
@@ -2775,11 +2775,11 @@
INT APIENTRY
NtGdiGetRgnBox(
HRGN hRgn,
- LPRECT pRect
+ PRECTL pRect
)
{
PROSRGNDATA Rgn;
- RECT SafeRect;
+ RECTL SafeRect;
DWORD ret;
NTSTATUS Status = STATUS_SUCCESS;
@@ -2822,7 +2822,7 @@
{
PROSRGNDATA RgnData;
ULONG i;
- PRECT rc;
+ PRECTL rc;
if (!(RgnData = REGION_LockRgn(hRgn)))
{
@@ -2830,7 +2830,7 @@
return FALSE;
}
- rc = (PRECT)RgnData->Buffer;
+ rc = RgnData->Buffer;
for (i = 0; i < RgnData->rdh.nCount; i++)
{
@@ -2868,7 +2868,7 @@
if (XOffset || YOffset)
{
int nbox = rgn->rdh.nCount;
- PRECT pbox = (PRECT)rgn->Buffer;
+ PRECTL pbox = rgn->Buffer;
if (nbox && pbox)
{
@@ -2935,8 +2935,8 @@
}
ClipRegion = IntEngCreateClipRegion(visrgn->rdh.nCount,
- (PRECTL)visrgn->Buffer,
- (PRECTL)&visrgn->rdh.rcBound );
+ visrgn->Buffer,
+ &visrgn->rdh.rcBound );
ASSERT(ClipRegion);
pBrush = BRUSHOBJ_LockBrush(Dc_Attr->hbrush);
ASSERT(pBrush);
@@ -2972,14 +2972,14 @@
{
PROSRGNDATA rgn;
ULONG i;
- PRECT r;
+ PRECTL r;
if (!(rgn = REGION_LockRgn(hRgn) ) )
return FALSE;
if (rgn->rdh.nCount > 0 && INRECT(rgn->rdh.rcBound, X, Y))
{
- r = (PRECT) rgn->Buffer;
+ r = rgn->Buffer;
for (i = 0; i < rgn->rdh.nCount; i++)
{
if (INRECT(*r, X, Y))
@@ -2998,15 +2998,15 @@
FASTCALL
REGION_RectInRegion(
PROSRGNDATA Rgn,
- CONST LPRECT rc
-)
-{
- PRECT pCurRect, pRectEnd;
+ const RECTL *rc
+)
+{
+ PRECTL pCurRect, pRectEnd;
// this is (just) a useful optimization
if ((Rgn->rdh.nCount > 0) && EXTENTCHECK(&Rgn->rdh.rcBound,
rc))
{
- for (pCurRect = (PRECT)Rgn->Buffer, pRectEnd = pCurRect + Rgn->rdh.nCount;
pCurRect < pRectEnd; pCurRect++)
+ for (pCurRect = Rgn->Buffer, pRectEnd = pCurRect + Rgn->rdh.nCount;
pCurRect < pRectEnd; pCurRect++)
{
if (pCurRect->bottom <= rc->top) continue; // not far enough down
yet
if (pCurRect->top >= rc->bottom) break; // too far down
@@ -3023,11 +3023,11 @@
APIENTRY
NtGdiRectInRegion(
HRGN hRgn,
- LPRECT unsaferc
+ LPRECTL unsaferc
)
{
PROSRGNDATA Rgn;
- RECT rc = {0};
+ RECTL rc = {0};
BOOL Ret;
NTSTATUS Status = STATUS_SUCCESS;
@@ -3070,7 +3070,7 @@
INT BottomRect
)
{
- PRECT firstRect;
+ PRECTL firstRect;
if (LeftRect > RightRect)
{
@@ -3087,7 +3087,7 @@
if ((LeftRect != RightRect) && (TopRect != BottomRect))
{
- firstRect = (PRECT)rgn->Buffer;
+ firstRect = rgn->Buffer;
ASSERT(firstRect);
firstRect->left = rgn->rdh.rcBound.left = LeftRect;
firstRect->top = rgn->rdh.rcBound.top = TopRect;
@@ -3126,10 +3126,10 @@
HRGN APIENTRY
NtGdiUnionRectWithRgn(
HRGN hDest,
- CONST PRECT UnsafeRect
-)
-{
- RECT SafeRect = {0};
+ const RECTL *UnsafeRect
+)
+{
+ RECTL SafeRect = {0};
PROSRGNDATA Rgn;
NTSTATUS Status = STATUS_SUCCESS;
@@ -3457,11 +3457,11 @@
POINTBLOCK *FirstPtBlock,
ROSRGNDATA *reg)
{
- RECT *rects;
+ RECTL *rects;
POINT *pts;
POINTBLOCK *CurPtBlock;
int i;
- RECT *extents, *temp;
+ RECTL *extents, *temp;
INT numRects;
extents = ®->rdh.rcBound;
Modified: trunk/reactos/subsystems/win32/win32k/pch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/pc…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/pch.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/pch.h [iso-8859-1] Thu Mar 19 04:42:34 2009
@@ -27,6 +27,13 @@
#define STARTF_USEPOSITION 4
#include <stdarg.h>
#include <windef.h>
+
+/* Avoid type casting, by defining RECT to RECTL */
+#define RECT RECTL
+#define PRECT PRECTL
+#define LPRECT LPRECTL
+#define LPCRECT LPCRECTL
+
#include <winerror.h>
#include <wingdi.h>
#include <winddi.h>