Implement EnumFontFamilies(Ex)A/W() and TranslateCharsetInfo()
[reactos.git] / reactos / lib / gdi32 / misc / stubsw.c
1 /* $Id: stubsw.c,v 1.25 2004/03/23 00:18:54 gvg Exp $
2 *
3 * reactos/lib/gdi32/misc/stubs.c
4 *
5 * GDI32.DLL Stubs for Unicode functions
6 *
7 * When you implement one of these functions,
8 * remove its stub from this file.
9 *
10 */
11 #ifndef UNICODE
12 #define UNICODE
13 #endif//UNICODE
14 #include <windows.h>
15 #include <win32k/kapi.h>
16
17 /*
18 * @implemented
19 */
20 int
21 STDCALL
22 AddFontResourceExW ( LPCWSTR lpszFilename, DWORD fl, PVOID pvReserved )
23 {
24 UNICODE_STRING Filename;
25
26 /* FIXME handle fl parameter */
27 RtlInitUnicodeString(&Filename, lpszFilename);
28 return NtGdiAddFontResource ( &Filename, fl );
29 }
30
31 /*
32 * @implemented
33 */
34 int
35 STDCALL
36 AddFontResourceW ( LPCWSTR lpszFilename )
37 {
38 return AddFontResourceExW ( lpszFilename, 0, 0 );
39 }
40
41
42 /*
43 * @implemented
44 */
45 HDC
46 STDCALL
47 CreateICW(
48 LPCWSTR lpszDriver,
49 LPCWSTR lpszDevice,
50 LPCWSTR lpszOutput,
51 CONST DEVMODEW * lpdvmInit
52 )
53 {
54 UNICODE_STRING Driver, Device, Output;
55
56 if(lpszDriver)
57 RtlInitUnicodeString(&Driver, lpszDriver);
58 if(lpszDevice)
59 RtlInitUnicodeString(&Device, lpszDevice);
60 if(lpszOutput)
61 RtlInitUnicodeString(&Output, lpszOutput);
62 return NtGdiCreateIC ((lpszDriver ? &Driver : NULL),
63 (lpszDevice ? &Device : NULL),
64 (lpszOutput ? &Output : NULL),
65 (CONST PDEVMODEW)lpdvmInit );
66 }
67
68
69 /*
70 * @implemented
71 */
72 BOOL
73 STDCALL
74 CreateScalableFontResourceW(
75 DWORD fdwHidden,
76 LPCWSTR lpszFontRes,
77 LPCWSTR lpszFontFile,
78 LPCWSTR lpszCurrentPath
79 )
80 {
81 return NtGdiCreateScalableFontResource ( fdwHidden,
82 lpszFontRes,
83 lpszFontFile,
84 lpszCurrentPath );
85 }
86
87
88 /*
89 * @unimplemented
90 */
91 int
92 STDCALL
93 DeviceCapabilitiesExW(
94 LPCWSTR pDevice,
95 LPCWSTR pPort,
96 WORD fwCapability,
97 LPWSTR pOutput,
98 CONST DEVMODEW *pDevMode
99 )
100 {
101 #if 0
102 /* FIXME no NtGdiDeviceCapabilities???? */
103 return NtGdiDeviceCapabilities ( pDevice,
104 pPort,
105 fwCapability,
106 pOutput,
107 pDevMode );
108 #else
109 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
110 return 0;
111 #endif
112 }
113
114
115 /*
116 * @unimplemented
117 */
118 int
119 STDCALL
120 EnumFontsW(
121 HDC hDC,
122 LPCWSTR lpFaceName,
123 FONTENUMPROCW FontFunc,
124 LPARAM lParam
125 )
126 {
127 #if 0
128 return NtGdiEnumFonts ( hDC, lpFaceName, FontFunc, lParam );
129 #else
130 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
131 return 0;
132 #endif
133 }
134
135
136 /*
137 * @implemented
138 */
139 BOOL
140 STDCALL
141 GetCharWidthW (
142 HDC hdc,
143 UINT iFirstChar,
144 UINT iLastChar,
145 LPINT lpBuffer
146 )
147 {
148 return NtGdiGetCharWidth ( hdc, iFirstChar, iLastChar, lpBuffer );
149 }
150
151
152 /*
153 * @implemented
154 */
155 BOOL
156 STDCALL
157 GetCharWidth32W(
158 HDC hdc,
159 UINT iFirstChar,
160 UINT iLastChar,
161 LPINT lpBuffer
162 )
163 {
164 return NtGdiGetCharWidth32 ( hdc, iFirstChar, iLastChar, lpBuffer );
165 }
166
167
168 /*
169 * @implemented
170 */
171 BOOL
172 APIENTRY
173 GetCharWidthFloatW(
174 HDC hdc,
175 UINT iFirstChar,
176 UINT iLastChar,
177 PFLOAT pxBuffer
178 )
179 {
180 return NtGdiGetCharWidthFloat ( hdc, iFirstChar, iLastChar, pxBuffer );
181 }
182
183
184 /*
185 * @implemented
186 */
187 BOOL
188 APIENTRY
189 GetCharABCWidthsW(
190 HDC hdc,
191 UINT uFirstChar,
192 UINT uLastChar,
193 LPABC lpabc
194 )
195 {
196 return NtGdiGetCharABCWidths ( hdc, uFirstChar, uLastChar, lpabc );
197 }
198
199
200 /*
201 * @implemented
202 */
203 BOOL
204 APIENTRY
205 GetCharABCWidthsFloatW(
206 HDC hdc,
207 UINT iFirstChar,
208 UINT iLastChar,
209 LPABCFLOAT lpABCF
210 )
211 {
212 return NtGdiGetCharABCWidthsFloat ( hdc, iFirstChar, iLastChar, lpABCF );
213 }
214
215
216 /*
217 * @implemented
218 */
219 DWORD
220 STDCALL
221 GetGlyphOutlineW(
222 HDC hdc,
223 UINT uChar,
224 UINT uFormat,
225 LPGLYPHMETRICS lpgm,
226 DWORD cbBuffer,
227 LPVOID lpvBuffer,
228 CONST MAT2 *lpmat2
229 )
230 {
231 return NtGdiGetGlyphOutline ( hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, (CONST LPMAT2)lpmat2 );
232 }
233
234
235 /*
236 * @unimplemented
237 */
238 UINT
239 APIENTRY
240 GetOutlineTextMetricsW(
241 HDC hdc,
242 UINT cbData,
243 LPOUTLINETEXTMETRICW lpOTM
244 )
245 {
246 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
247 return 0;
248 }
249
250
251 /*
252 * @implemented
253 */
254 BOOL
255 APIENTRY
256 GetTextExtentExPointW(
257 HDC hdc,
258 LPCWSTR lpszStr,
259 int cchString,
260 int nMaxExtent,
261 LPINT lpnFit,
262 LPINT alpDx,
263 LPSIZE lpSize
264 )
265 {
266 return NtGdiGetTextExtentExPoint (
267 hdc, lpszStr, cchString, nMaxExtent, lpnFit, alpDx, lpSize );
268 }
269
270
271 /*
272 * @unimplemented
273 */
274 DWORD
275 STDCALL
276 GetCharacterPlacementW(
277 HDC hDc,
278 LPCWSTR a1,
279 int a2,
280 int a3,
281 LPGCP_RESULTSW a4,
282 DWORD a5
283 )
284 {
285 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
286 return 0;
287 }
288
289
290 /*
291 * @implemented
292 */
293 HDC
294 STDCALL
295 ResetDCW(
296 HDC hdc,
297 CONST DEVMODEW *lpInitData
298 )
299 {
300 return NtGdiResetDC ( hdc, lpInitData );
301 }
302
303
304 /*
305 * @implemented
306 */
307 BOOL
308 STDCALL
309 RemoveFontResourceW(
310 LPCWSTR lpFileName
311 )
312 {
313 return NtGdiRemoveFontResource ( lpFileName );
314 }
315
316
317 /*
318 * @implemented
319 */
320 int
321 STDCALL
322 StartDocW(
323 HDC hdc,
324 CONST DOCINFOW *a1
325 )
326 {
327 return NtGdiStartDoc ( hdc, (CONST PDOCINFOW)a1 );
328 }
329
330
331 /*
332 * @unimplemented
333 */
334 int
335 STDCALL
336 GetObjectW(
337 HGDIOBJ a0,
338 int a1,
339 LPVOID a2
340 )
341 {
342 return NtGdiGetObject ( a0, a1, a2 );
343 }
344
345
346 /*
347 * @unimplemented
348 */
349 BOOL
350 STDCALL
351 PolyTextOutW(
352 HDC hdc,
353 CONST POLYTEXTW *a1,
354 int a2
355 )
356 {
357 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
358 return FALSE;
359 }
360
361
362 /*
363 * @unimplemented
364 */
365 int
366 STDCALL
367 GetTextFaceW(
368 HDC a0,
369 int a1,
370 LPWSTR a2
371 )
372 {
373 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
374 return 0;
375 }
376
377
378 /*
379 * @unimplemented
380 */
381 DWORD
382 STDCALL
383 GetKerningPairsW(
384 HDC a0,
385 DWORD a1,
386 LPKERNINGPAIR a2
387 )
388 {
389 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
390 return 0;
391 }
392
393
394 /*
395 * @unimplemented
396 */
397 BOOL
398 STDCALL
399 GetLogColorSpaceW(
400 HCOLORSPACE a0,
401 LPLOGCOLORSPACEW a1,
402 DWORD a2
403 )
404 {
405 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
406 return FALSE;
407 }
408
409 /*
410 * @unimplemented
411 */
412 HCOLORSPACE
413 STDCALL
414 CreateColorSpaceW(
415 LPLOGCOLORSPACEW a0
416 )
417 {
418 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
419 return 0;
420 }
421
422
423 /*
424 * @unimplemented
425 */
426 BOOL
427 STDCALL
428 GetICMProfileW(
429 HDC a0,
430 DWORD a1, /* MS says LPDWORD! */
431 LPWSTR a2
432 )
433 {
434 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
435 return FALSE;
436 }
437
438
439 /*
440 * @unimplemented
441 */
442 BOOL
443 STDCALL
444 SetICMProfileW(
445 HDC a0,
446 LPWSTR a1
447 )
448 {
449 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
450 return FALSE;
451 }
452
453
454 /*
455 * @unimplemented
456 */
457 int
458 STDCALL
459 EnumICMProfilesW(
460 HDC hDC,
461 ICMENUMPROCW lpEnumICMProfilesFunc,
462 LPARAM lParam
463 )
464 {
465 /*
466 * FIXME - call NtGdiEnumICMProfiles with NULL for lpstrBuffer
467 * to find out how big a buffer we need. Then allocate that buffer
468 * and call NtGdiEnumICMProfiles again to have the buffer filled.
469 *
470 * Finally, step through the buffer ( MULTI-SZ recommended for format ),
471 * and call the user's callback function until we run out of strings or
472 * the user returns FALSE
473 */
474 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
475 return 0;
476 }
477
478
479 /*
480 * @unimplemented
481 */
482 BOOL
483 STDCALL
484 wglUseFontBitmapsW(
485 HDC a0,
486 DWORD a1,
487 DWORD a2,
488 DWORD a3
489 )
490 {
491 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
492 return FALSE;
493 }
494
495
496 /*
497 * @unimplemented
498 */
499 BOOL
500 STDCALL
501 wglUseFontOutlinesW(
502 HDC a0,
503 DWORD a1,
504 DWORD a2,
505 DWORD a3,
506 FLOAT a4,
507 FLOAT a5,
508 int a6,
509 LPGLYPHMETRICSFLOAT a7
510 )
511 {
512 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
513 return FALSE;
514 }
515
516
517 /*
518 * @unimplemented
519 */
520 BOOL
521 STDCALL
522 UpdateICMRegKeyW(
523 DWORD a0,
524 DWORD a1,
525 LPWSTR a2,
526 UINT a3
527 )
528 {
529 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
530 return FALSE;
531 }
532
533
534 /* === AFTER THIS POINT I GUESS... =========
535 * (based on stack size in Norlander's .def)
536 * === WHERE ARE THEY DEFINED? =============
537 */
538
539
540 /*
541 * @unimplemented
542 */
543 DWORD
544 STDCALL
545 GetFontResourceInfoW(
546 DWORD a0,
547 DWORD a1,
548 DWORD a2,
549 DWORD a3
550 )
551 {
552 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
553 return 0;
554 }
555
556
557 /* EOF */