Changes for multiple window support
[reactos.git] / reactos / include / win32k / region.h
1
2 #ifndef __WIN32K_REGION_H
3 #define __WIN32K_REGION_H
4
5 #include <win32k/gdiobj.h>
6
7 //Internal region data. Can't use RGNDATA structure because buffer is allocated statically
8 typedef struct _ROSRGNDATA {
9 RGNDATAHEADER rdh;
10 char* Buffer;
11 } ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
12
13
14 #define RGNDATA_FreeRgn(hRgn) GDIOBJ_FreeObj((HGDIOBJ)hRgn, GO_REGION_MAGIC, GDIOBJFLAG_DEFAULT)
15 #define RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GO_REGION_MAGIC))
16 #define RGNDATA_UnlockRgn(hRgn) GDIOBJ_UnlockObj((HGDIOBJ)hRgn, GO_REGION_MAGIC)
17 HRGN FASTCALL RGNDATA_AllocRgn(INT n);
18
19 BOOL FASTCALL RGNDATA_InternalDelete( PROSRGNDATA Obj );
20
21 /* User entry points */
22 HRGN STDCALL
23 W32kUnionRectWithRgn(HRGN hDest, CONST PRECT Rect);
24
25 INT
26 STDCALL
27 W32kCombineRgn(HRGN hDest,
28 HRGN hSrc1,
29 HRGN hSrc2,
30 INT CombineMode);
31
32 HRGN
33 STDCALL
34 W32kCreateEllipticRgn(INT LeftRect,
35 INT TopRect,
36 INT RightRect,
37 INT BottomRect);
38
39 HRGN
40 STDCALL
41 W32kCreateEllipticRgnIndirect(CONST PRECT rc);
42
43 HRGN
44 STDCALL
45 W32kCreatePolygonRgn(CONST PPOINT pt,
46 INT Count,
47 INT PolyFillMode);
48
49 HRGN
50 STDCALL
51 W32kCreatePolyPolygonRgn(CONST PPOINT pt,
52 CONST PINT PolyCounts,
53 INT Count,
54 INT PolyFillMode);
55
56 HRGN
57 STDCALL
58 W32kCreateRectRgn(INT LeftRect,
59 INT TopRect,
60 INT RightRect,
61 INT BottomRect);
62
63 HRGN
64 STDCALL
65 W32kCreateRectRgnIndirect(CONST PRECT rc);
66
67 HRGN
68 STDCALL
69 W32kCreateRoundRectRgn(INT LeftRect,
70 INT TopRect,
71 INT RightRect,
72 INT BottomRect,
73 INT WidthEllipse,
74 INT HeightEllipse);
75
76 BOOL
77 STDCALL
78 W32kEqualRgn(HRGN hSrcRgn1,
79 HRGN hSrcRgn2);
80
81 HRGN
82 STDCALL
83 W32kExtCreateRegion(CONST PXFORM Xform,
84 DWORD Count,
85 CONST PROSRGNDATA RgnData);
86
87 BOOL
88 STDCALL
89 W32kFillRgn(HDC hDC,
90 HRGN hRgn,
91 HBRUSH hBrush);
92
93 BOOL
94 STDCALL
95 W32kFrameRgn(HDC hDC,
96 HRGN hRgn,
97 HBRUSH hBrush,
98 INT Width,
99 INT Height);
100
101 INT
102 STDCALL
103 W32kGetRgnBox(HRGN hRgn,
104 LPRECT Rect);
105
106 BOOL
107 STDCALL
108 W32kInvertRgn(HDC hDC,
109 HRGN hRgn);
110
111 INT
112 STDCALL
113 W32kOffsetRgn(HRGN hRgn,
114 INT XOffset,
115 INT YOffset);
116
117 BOOL
118 STDCALL
119 W32kPaintRgn(HDC hDC,
120 HRGN hRgn);
121
122 BOOL
123 STDCALL
124 W32kPtInRegion(HRGN hRgn,
125 INT X,
126 INT Y);
127
128 BOOL
129 STDCALL
130 W32kRectInRegion(HRGN hRgn,
131 CONST LPRECT rc);
132
133 INT
134 STDCALL
135 W32kSelectVisRgn(HDC hdc,
136 HRGN hrgn);
137
138 BOOL
139 STDCALL
140 W32kSetRectRgn(HRGN hRgn,
141 INT LeftRect,
142 INT TopRect,
143 INT RightRect,
144 INT BottomRect);
145
146 DWORD
147 STDCALL
148 W32kGetRegionData(HRGN hrgn,
149 DWORD count,
150 LPRGNDATA rgndata);
151
152 HRGN STDCALL REGION_CropRgn(HRGN hDst, HRGN hSrc, const PRECT lpRect, PPOINT lpPt);
153
154 HRGN STDCALL UnsafeW32kCreateRectRgnIndirect(CONST PRECT rc);
155 INT STDCALL UnsafeW32kGetRgnBox(HRGN hRgn, LPRECT pRect);
156 HRGN FASTCALL UnsafeW32kUnionRectWithRgn(HRGN hDest, CONST PRECT Rect);
157 #endif
158