update for HEAD-2003091401
[reactos.git] / lib / gdi32 / objects / region.c
1 #ifdef UNICODE
2 #undef UNICODE
3 #endif
4
5 #undef WIN32_LEAN_AND_MEAN
6 #include <windows.h>
7 #include <ddk/ntddk.h>
8 #include <win32k/kapi.h>
9
10
11 /*
12  * @implemented
13  */
14 int
15 STDCALL
16 OffsetClipRgn(
17         HDC     a0,
18         int     a1,
19         int     a2
20         )
21 {
22         return NtGdiOffsetClipRgn(a0, a1, a2);
23 }
24
25
26 /*
27  * @implemented
28  */
29 int
30 STDCALL
31 GetClipRgn(
32         HDC     a0,
33         HRGN    a1
34         )
35 {
36         HRGN rgn = NtGdiGetClipRgn(a0);
37         if(rgn)
38         {
39                 if(NtGdiCombineRgn(a1, rgn, 0, RGN_COPY) != ERROR) return 1;
40                 else
41                         return -1;
42         }
43         else    return 0;
44 }
45
46
47 /*
48  * @implemented
49  */
50 HRGN
51 STDCALL
52 CreatePolyPolygonRgn(
53         CONST POINT     *lppt,
54         CONST INT       *lpPolyCounts,
55         int             nCount,
56         int             fnPolyFillMode
57         )
58 {
59   return NtGdiCreatePolyPolygonRgn ( (CONST PPOINT)lppt,
60     (CONST PINT)lpPolyCounts, nCount, fnPolyFillMode );
61 }
62
63
64 /*
65  * @implemented
66  */
67 HBRUSH
68 STDCALL
69 CreatePatternBrush(
70         HBITMAP         hbmp
71         )
72 {
73   return NtGdiCreatePatternBrush ( hbmp );
74 }
75
76
77 /*
78  * @implemented
79  */
80 HRGN
81 STDCALL
82 CreateRectRgn(
83         int             a0,
84         int             a1,
85         int             a2,
86         int             a3
87         )
88 {
89         return NtGdiCreateRectRgn(a0,a1,a2,a3);
90 }
91
92
93 /*
94  * @implemented
95  */
96 HRGN
97 STDCALL
98 CreateRectRgnIndirect(
99         CONST RECT      *a0
100         )
101 {
102         return NtGdiCreateRectRgnIndirect((RECT *)a0);
103 }
104
105
106 /*
107  * @implemented
108  */
109 HRGN
110 STDCALL
111 CreateRoundRectRgn(
112         int     nLeftRect,
113         int     nTopRect,
114         int     nRightRect,
115         int     nBottomRect,
116         int     nWidthEllipse,
117         int     nHeightEllipse
118         )
119 {
120   return NtGdiCreateRoundRectRgn (
121     nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse );
122 }
123
124
125 /*
126  * @implemented
127  */
128 BOOL
129 STDCALL
130 EqualRgn(
131         HRGN            a0,
132         HRGN            a1
133         )
134 {
135         return NtGdiEqualRgn(a0,a1);
136 }
137
138
139 /*
140  * @implemented
141  */
142 int
143 STDCALL
144 OffsetRgn(
145         HRGN    a0,
146         int     a1,
147         int     a2
148         )
149 {
150         return NtGdiOffsetRgn(a0,a1,a2);
151 }
152
153
154 /*
155  * @implemented
156  */
157 int
158 STDCALL
159 GetRgnBox(
160         HRGN    a0,
161         LPRECT  a1
162         )
163 {
164         return NtGdiGetRgnBox(a0,a1);
165 }
166
167
168 /*
169  * @implemented
170  */
171 BOOL
172 STDCALL
173 SetRectRgn(
174         HRGN    a0,
175         int     a1,
176         int     a2,
177         int     a3,
178         int     a4
179         )
180 {
181         return NtGdiSetRectRgn(a0,a1,a2,a3,a4);
182 }
183
184
185 /*
186  * @implemented
187  */
188 int
189 STDCALL
190 CombineRgn(
191         HRGN    a0,
192         HRGN    a1,
193         HRGN    a2,
194         int     a3
195         )
196 {
197         return NtGdiCombineRgn(a0,a1,a2,a3);
198 }
199
200
201 /*
202  * @implemented
203  */
204 DWORD
205 STDCALL
206 GetRegionData(
207         HRGN            a0,
208         DWORD           a1,
209         LPRGNDATA       a2
210         )
211 {
212         return NtGdiGetRegionData(a0,a1,a2);
213 }
214
215
216 /*
217  * @implemented
218  */
219 BOOL
220 STDCALL
221 PaintRgn(
222         HDC     a0,
223         HRGN    a1
224         )
225 {
226         return NtGdiPaintRgn( a0, a1 );
227 }
228
229
230 /*
231  * @implemented
232  */
233 BOOL
234 STDCALL
235 FillRgn(
236         HDC     a0,
237         HRGN    a1,
238         HBRUSH  a2
239         )
240 {
241         return NtGdiFillRgn(a0, a1, a2);
242 }
243
244 /*
245  * @implemented
246  */
247 BOOL
248 STDCALL
249 PtInRegion(
250         HRGN    a0,
251         int     a1,
252         int     a2
253         )
254 {
255         return NtGdiPtInRegion(a0,a1,a2);
256 }
257
258 /*
259  * @implemented
260  */
261 BOOL
262 STDCALL
263 RectInRegion(
264         HRGN            a0,
265         CONST RECT      *a1
266         )
267 {
268         return NtGdiRectInRegion(a0,(CONST PRECT)a1);
269 }