moved USER32_DevModeA2W to lib/rosrtl/misc/devmode.c and renamed to RosRtlDevModeA2W...
[reactos.git] / reactos / lib / gdi32 / misc / stubsa.c
1 /* $Id: stubsa.c,v 1.12 2003/07/21 01:59:51 royce Exp $
2 *
3 * reactos/lib/gdi32/misc/stubs.c
4 *
5 * GDI32.DLL Stubs for ANSI functions
6 *
7 * When you implement one of these functions,
8 * remove its stub from this file.
9 *
10 */
11 #ifdef UNICODE
12 #undef UNICODE
13 #endif
14
15 #undef WIN32_LEAN_AND_MEAN
16 #include <windows.h>
17 #include <ddk/ntddk.h>
18 #include <win32k/text.h>
19 #include <win32k/metafile.h>
20
21 /*
22 * @implemented
23 */
24 int
25 STDCALL
26 AddFontResourceExA ( LPCSTR lpszFilename, DWORD fl, PVOID pvReserved )
27 {
28 NTSTATUS Status;
29 UNICODE_STRING FilenameU;
30 int rc;
31
32 Status = RtlCreateUnicodeStringFromAsciiz ( &FilenameU,
33 (PCSZ)lpszFilename );
34 if (!NT_SUCCESS (Status))
35 {
36 SetLastError (RtlNtStatusToDosError(Status));
37 return 0;
38 }
39
40 rc = AddFontResourceExW ( FilenameU.Buffer, fl, pvReserved );
41
42 RtlFreeUnicodeString ( &FilenameU );
43
44 return rc;
45 }
46
47 /*
48 * @implemented
49 */
50 int
51 STDCALL
52 AddFontResourceA ( LPCSTR lpszFilename )
53 {
54 return AddFontResourceExA ( lpszFilename, 0, 0 );
55 }
56
57
58 /*
59 * @implemented
60 */
61 HMETAFILE
62 STDCALL
63 CopyMetaFileA(
64 HMETAFILE Src,
65 LPCSTR lpszFile
66 )
67 {
68 NTSTATUS Status;
69 UNICODE_STRING FileU;
70 HMETAFILE rc;
71
72 Status = RtlCreateUnicodeStringFromAsciiz ( &FileU,
73 (PCSZ)lpszFile );
74 if (!NT_SUCCESS (Status))
75 {
76 SetLastError (RtlNtStatusToDosError(Status));
77 return 0;
78 }
79
80 rc = W32kCopyMetaFile ( Src, FileU.Buffer );
81
82 RtlFreeUnicodeString ( &FileU );
83
84 return rc;
85 }
86
87
88 /*
89 * @unimplemented
90 */
91 HDC
92 STDCALL
93 CreateICA(
94 LPCSTR lpszDriver,
95 LPCSTR lpszDevice,
96 LPCSTR lpszOutput,
97 CONST DEVMODEA * lpdvmInit
98 )
99 {
100 NTSTATUS Status;
101 UNICODE_STRING Driver, Device, Output;
102 DEVMODEW dvmInitW;
103 HDC rc;
104
105 Status = RtlCreateUnicodeStringFromAsciiz ( &Driver,
106 (PCSZ)lpszDriver );
107 if (!NT_SUCCESS (Status))
108 {
109 SetLastError (RtlNtStatusToDosError(Status));
110 return 0;
111 }
112
113 Status = RtlCreateUnicodeStringFromAsciiz ( &Device,
114 (PCSZ)lpszDevice );
115 if (!NT_SUCCESS (Status))
116 {
117 SetLastError (RtlNtStatusToDosError(Status));
118 return 0;
119 }
120
121 Status = RtlCreateUnicodeStringFromAsciiz ( &Output,
122 (PCSZ)lpszOutput );
123 if (!NT_SUCCESS (Status))
124 {
125 SetLastError (RtlNtStatusToDosError(Status));
126 return 0;
127 }
128
129 if ( lpdvmInit )
130 RosRtlDevModeA2W ( &dvmInitW, lpdvmInit );
131
132 return 0;
133 }
134
135
136 /*
137 * @unimplemented
138 */
139 HDC
140 STDCALL
141 CreateMetaFileA(
142 LPCSTR a0
143 )
144 {
145 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
146 return 0;
147 }
148
149
150 /*
151 * @unimplemented
152 */
153 BOOL
154 STDCALL
155 CreateScalableFontResourceA(
156 DWORD a0,
157 LPCSTR a1,
158 LPCSTR a2,
159 LPCSTR a3
160 )
161 {
162 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
163 return FALSE;
164 }
165
166
167 /*
168 * @unimplemented
169 */
170 int
171 STDCALL
172 DeviceCapabilitiesExA(
173 LPCSTR a0,
174 LPCSTR a1,
175 WORD a2,
176 LPSTR a3,
177 CONST DEVMODEA *a4
178 )
179 {
180 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
181 return 0;
182 }
183
184
185 /*
186 * @unimplemented
187 */
188 int
189 STDCALL
190 EnumFontFamiliesExA(
191 HDC a0,
192 LPLOGFONT a1,
193 FONTENUMEXPROC a2,
194 LPARAM a3,
195 DWORD a4
196 )
197 {
198 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
199 return 0;
200 }
201
202
203 /*
204 * @unimplemented
205 */
206 int
207 STDCALL
208 EnumFontFamiliesA(
209 HDC a0,
210 LPCSTR a1,
211 FONTENUMPROC a2,
212 LPARAM a3
213 )
214 {
215 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
216 return 0;
217 }
218
219
220 /*
221 * @unimplemented
222 */
223 int
224 STDCALL
225 EnumFontsA(
226 HDC a0,
227 LPCSTR a1,
228 ENUMFONTSPROC a2,
229 LPARAM a3
230 )
231 {
232 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
233 return 0;
234 }
235
236
237 /*
238 * @unimplemented
239 */
240 BOOL
241 STDCALL
242 GetCharWidthA(
243 HDC a0,
244 UINT a1,
245 UINT a2,
246 LPINT a3
247 )
248 {
249 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
250 return FALSE;
251 }
252
253
254 /*
255 * @unimplemented
256 */
257 BOOL
258 STDCALL
259 GetCharWidth32A(
260 HDC a0,
261 UINT a1,
262 UINT a2,
263 LPINT a3
264 )
265 {
266 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
267 return FALSE;
268 }
269
270
271 /*
272 * @unimplemented
273 */
274 BOOL
275 APIENTRY
276 GetCharWidthFloatA(
277 HDC a0,
278 UINT a1,
279 UINT a2,
280 PFLOAT a3
281 )
282 {
283 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
284 return FALSE;
285 }
286
287
288 /*
289 * @unimplemented
290 */
291 BOOL
292 APIENTRY
293 GetCharABCWidthsA(
294 HDC a0,
295 UINT a1,
296 UINT a2,
297 LPABC a3
298 )
299 {
300 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
301 return FALSE;
302 }
303
304
305 /*
306 * @unimplemented
307 */
308 BOOL
309 APIENTRY
310 GetCharABCWidthsFloatA(
311 HDC a0,
312 UINT a1,
313 UINT a2,
314 LPABCFLOAT a3
315 )
316 {
317 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
318 return FALSE;
319 }
320
321
322 /*
323 * @unimplemented
324 */
325 DWORD
326 STDCALL
327 GetGlyphOutlineA(
328 HDC a0,
329 UINT a1,
330 UINT a2,
331 LPGLYPHMETRICS a3,
332 DWORD a4,
333 LPVOID a5,
334 CONST MAT2 *a6
335 )
336 {
337 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
338 return 0;
339 }
340
341
342 /*
343 * @unimplemented
344 */
345 HMETAFILE
346 STDCALL
347 GetMetaFileA(
348 LPCSTR a0
349 )
350 {
351 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
352 return 0;
353 }
354
355
356 /*
357 * @unimplemented
358 */
359 UINT
360 APIENTRY
361 GetOutlineTextMetricsA(
362 HDC a0,
363 UINT a1,
364 LPOUTLINETEXTMETRICA a2
365 )
366 {
367 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
368 return 0;
369 }
370
371
372 /*
373 * @unimplemented
374 */
375 BOOL
376 APIENTRY
377 GetTextExtentExPointA(
378 HDC hDc,
379 LPCSTR a1,
380 int a2,
381 int a3,
382 LPINT a4,
383 LPINT a5,
384 LPSIZE a6
385 )
386 {
387 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
388 return FALSE;
389 }
390
391
392 /*
393 * @unimplemented
394 */
395 DWORD
396 STDCALL
397 GetCharacterPlacementA(
398 HDC hDc,
399 LPCSTR a1,
400 int a2,
401 int a3,
402 LPGCP_RESULTS a4,
403 DWORD a5
404 )
405 {
406 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
407 return 0;
408 }
409
410
411 /*
412 * @unimplemented
413 */
414 HDC
415 STDCALL
416 ResetDCA(
417 HDC a0,
418 CONST DEVMODEA *a1
419 )
420 {
421 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
422 return 0;
423 }
424
425
426 /*
427 * @unimplemented
428 */
429 BOOL
430 STDCALL
431 RemoveFontResourceA(
432 LPCSTR a0
433 )
434 {
435 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
436 return FALSE;
437 }
438
439
440 /*
441 * @unimplemented
442 */
443 HENHMETAFILE
444 STDCALL
445 CopyEnhMetaFileA(
446 HENHMETAFILE a0,
447 LPCSTR a1
448 )
449 {
450 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
451 return 0;
452 }
453
454
455 /*
456 * @unimplemented
457 */
458 HDC
459 STDCALL
460 CreateEnhMetaFileA(
461 HDC a0,
462 LPCSTR a1,
463 CONST RECT *a2,
464 LPCSTR a3
465 )
466 {
467 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
468 return 0;
469 }
470
471
472 /*
473 * @unimplemented
474 */
475 HENHMETAFILE
476 STDCALL
477 GetEnhMetaFileA(
478 LPCSTR a0
479 )
480 {
481 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
482 return 0;
483 }
484
485
486 /*
487 * @unimplemented
488 */
489 UINT
490 STDCALL
491 GetEnhMetaFileDescriptionA(
492 HENHMETAFILE a0,
493 UINT a1,
494 LPSTR a2
495 )
496 {
497 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
498 return 0;
499 }
500
501
502 /*
503 * @unimplemented
504 */
505 int
506 STDCALL
507 StartDocA(
508 HDC hdc,
509 CONST DOCINFO *a1
510 )
511 {
512 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
513 return 0;
514 }
515
516
517 /*
518 * @unimplemented
519 */
520 int
521 STDCALL
522 GetObjectA(
523 HGDIOBJ a0,
524 int a1,
525 LPVOID a2
526 )
527 {
528 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
529 return 0;
530 }
531
532
533 /*
534 * @unimplemented
535 */
536 BOOL
537 STDCALL
538 PolyTextOutA(
539 HDC hdc,
540 CONST POLYTEXT *a1,
541 int a2
542 )
543 {
544 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
545 return FALSE;
546 }
547
548
549 /*
550 * @unimplemented
551 */
552 int
553 STDCALL
554 GetTextFaceA(
555 HDC a0,
556 int a1,
557 LPSTR a2
558 )
559 {
560 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
561 return FALSE;
562 }
563
564
565 /*
566 * @unimplemented
567 */
568 DWORD
569 STDCALL
570 GetKerningPairsA(
571 HDC a0,
572 DWORD a1,
573 LPKERNINGPAIR a2
574 )
575 {
576 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
577 return 0;
578 }
579
580
581 /*
582 * @unimplemented
583 */
584 BOOL
585 STDCALL
586 GetLogColorSpaceA(
587 HCOLORSPACE a0,
588 LPLOGCOLORSPACE a1,
589 DWORD a2
590 )
591 {
592 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
593 return FALSE;
594 }
595
596
597 /*
598 * @unimplemented
599 */
600 HCOLORSPACE
601 STDCALL
602 CreateColorSpaceA(
603 LPLOGCOLORSPACE a0
604 )
605 {
606 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
607 return 0;
608 }
609
610
611 /*
612 * @unimplemented
613 */
614 WINBOOL
615 STDCALL
616 GetICMProfileA(
617 HDC a0,
618 DWORD a1, /* MS says LPDWORD! */
619 LPSTR a2
620 )
621 {
622 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
623 return FALSE;
624 }
625
626
627 /*
628 * @unimplemented
629 */
630 BOOL
631 STDCALL
632 SetICMProfileA(
633 HDC a0,
634 LPSTR a1
635 )
636 {
637 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
638 return FALSE;
639 }
640
641
642 /*
643 * @unimplemented
644 */
645 int
646 STDCALL
647 EnumICMProfilesA(
648 HDC a0,
649 ICMENUMPROC a1,
650 LPARAM a2
651 )
652 {
653 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
654 return 0;
655 }
656
657
658 /*
659 * @unimplemented
660 */
661 BOOL
662 STDCALL
663 wglUseFontBitmapsA(
664 HDC a0,
665 DWORD a1,
666 DWORD a2,
667 DWORD a3
668 )
669 {
670 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
671 return FALSE;
672 }
673
674
675 /*
676 * @unimplemented
677 */
678 BOOL
679 STDCALL
680 wglUseFontOutlinesA(
681 HDC a0,
682 DWORD a1,
683 DWORD a2,
684 DWORD a3,
685 FLOAT a4,
686 FLOAT a5,
687 int a6,
688 LPGLYPHMETRICSFLOAT a7
689 )
690 {
691 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
692 return FALSE;
693 }
694
695
696 /*
697 * @unimplemented
698 */
699 WINBOOL
700 STDCALL
701 UpdateICMRegKeyA(
702 DWORD a0,
703 DWORD a1,
704 LPSTR a2,
705 UINT a3
706 )
707 {
708 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
709 return FALSE;
710 }
711
712
713 /* EOF */