[WIN32K:NTUSER] Correctly delete menus in failure cases in MENU_GetSystemMenu. CORE...
[reactos.git] / win32ss / gdi / gdi32 / objects / path.c
1 /*
2 * reactos/lib/gdi32/objects/path.c
3 *
4 * GDI32.DLL Path
5 *
6 * When you implement one of these functions,
7 * remove its stub from this file.
8 *
9 */
10
11 #include <precomp.h>
12
13 /*
14 * @implemented
15 */
16 BOOL
17 WINAPI
18 AbortPath(
19 HDC hdc)
20 {
21 HANDLE_METADC0P(BOOL, AbortPath, FALSE, hdc);
22 return NtGdiAbortPath(hdc);
23 }
24
25
26 /*
27 * @implemented
28 */
29 BOOL
30 WINAPI
31 BeginPath(
32 HDC hdc)
33 {
34 HANDLE_METADC0P(BOOL, BeginPath, FALSE, hdc);
35 return NtGdiBeginPath(hdc);
36 }
37
38 /*
39 * @implemented
40 */
41 BOOL
42 WINAPI
43 CloseFigure(
44 HDC hdc)
45 {
46 HANDLE_METADC0P(BOOL, CloseFigure, FALSE, hdc);
47 return NtGdiCloseFigure(hdc);
48 }
49
50
51 /*
52 * @implemented
53 */
54 BOOL
55 WINAPI
56 EndPath(
57 HDC hdc)
58 {
59 HANDLE_METADC0P(BOOL, EndPath, FALSE, hdc);
60 return NtGdiEndPath( hdc );
61 }
62
63
64 /*
65 * @implemented
66 */
67 BOOL
68 WINAPI
69 FillPath(
70 HDC hdc)
71 {
72 HANDLE_METADC0P(BOOL, FillPath, FALSE, hdc);
73 return NtGdiFillPath( hdc );
74 }
75
76
77 /*
78 * @implemented
79 */
80 BOOL
81 WINAPI
82 FlattenPath(
83 HDC hdc)
84 {
85 HANDLE_METADC0P(BOOL, FlattenPath, FALSE, hdc);
86 return NtGdiFlattenPath ( hdc );
87 }
88
89
90 /*
91 * @implemented
92 */
93 INT
94 WINAPI
95 GetPath(HDC hdc,
96 LPPOINT pptlBuf,
97 LPBYTE pjTypes,
98 INT cptBuf)
99 {
100 INT retValue = -1;
101
102 if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
103 {
104 SetLastError(ERROR_INVALID_PARAMETER);
105 }
106 else
107 {
108 retValue = NtGdiGetPath(hdc,pptlBuf,pjTypes,cptBuf);
109 }
110
111 return retValue;
112 }
113
114
115 /*
116 * @implemented
117 */
118 HRGN
119 WINAPI
120 PathToRegion(
121 HDC hdc)
122 {
123 HANDLE_METADC0P(HRGN, PathToRegion, NULL, hdc);
124 return NtGdiPathToRegion(hdc);
125 }
126
127 /*
128 * @implemented
129 */
130 BOOL
131 WINAPI
132 SetMiterLimit(
133 HDC hdc,
134 FLOAT a1,
135 PFLOAT a2
136 )
137 {
138 BOOL Ret;
139 gxf_long worker, worker1;
140
141 worker.f = a1;
142 Ret = NtGdiSetMiterLimit ( hdc, worker.l, a2 ? &worker1.l : NULL );
143 if (a2 && Ret) *a2 = worker1.f;
144 return Ret;
145 }
146
147
148 /*
149 * @implemented
150 */
151 BOOL
152 WINAPI
153 StrokeAndFillPath(
154 HDC hdc)
155 {
156 HANDLE_METADC0P(BOOL, StrokeAndFillPath, FALSE, hdc);
157 return NtGdiStrokeAndFillPath ( hdc );
158 }
159
160
161 /*
162 * @implemented
163 */
164 BOOL
165 WINAPI
166 StrokePath(
167 HDC hdc)
168 {
169 HANDLE_METADC0P(BOOL, StrokePath, FALSE, hdc);
170 return NtGdiStrokePath ( hdc );
171 }
172
173
174 /*
175 * @implemented
176 */
177 BOOL
178 WINAPI
179 WidenPath(
180 HDC hdc)
181 {
182 HANDLE_METADC0P(BOOL, WidenPath, FALSE, hdc);
183 return NtGdiWidenPath ( hdc );
184 }
185
186 /*
187 * @implemented
188 */
189 BOOL
190 WINAPI
191 SelectClipPath(
192 HDC hdc,
193 int iMode)
194 {
195 HANDLE_METADC(BOOL, SelectClipPath, FALSE, hdc, iMode);
196 return NtGdiSelectClipPath(hdc, iMode);
197 }