Implement Win32k-Gdi32: GetAspectRatioFilter and SetMapperFlags.
[reactos.git] / reactos / dll / win32 / gdi32 / misc / stubs.c
1 /* $Id$
2 *
3 * reactos/lib/gdi32/misc/stubs.c
4 *
5 * GDI32.DLL Stubs
6 *
7 * When you implement one of these functions,
8 * remove its stub from this file.
9 *
10 */
11
12 #include "precomp.h"
13
14 #define SIZEOF_DEVMODEA_300 124
15 #define SIZEOF_DEVMODEA_400 148
16 #define SIZEOF_DEVMODEA_500 156
17 #define SIZEOF_DEVMODEW_300 188
18 #define SIZEOF_DEVMODEW_400 212
19 #define SIZEOF_DEVMODEW_500 220
20
21 #define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__);
22
23
24 /*
25 * @unimplemented
26 */
27 int
28 STDCALL
29 StretchDIBits(HDC hdc,
30 int XDest,
31 int YDest,
32 int nDestWidth,
33 int nDestHeight,
34 int XSrc,
35 int YSrc,
36 int nSrcWidth,
37 int nSrcHeight,
38 CONST VOID *lpBits,
39 CONST BITMAPINFO *lpBitsInfo,
40 UINT iUsage,
41 DWORD dwRop)
42
43 {
44 /* FIXME share memory */
45 return NtGdiStretchDIBitsInternal(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc, YSrc,
46 nSrcWidth, nSrcHeight, (LPBYTE)lpBits, (LPBITMAPINFO)lpBitsInfo, (DWORD)iUsage, dwRop, 0, 0, NULL);
47 }
48
49 /*
50 * @implemented
51 *
52 */
53 INT
54 STDCALL
55 SetDIBitsToDevice(
56 HDC hDC,
57 int XDest,
58 int YDest,
59 DWORD Width,
60 DWORD Height,
61 int XSrc,
62 int YSrc,
63 UINT StartScan,
64 UINT ScanLines,
65 CONST VOID *Bits,
66 CONST BITMAPINFO *lpbmi,
67 UINT ColorUse)
68 {
69 return NtGdiSetDIBitsToDeviceInternal(hDC,
70 XDest,
71 YDest,
72 Width,
73 Height,
74 XSrc,
75 YSrc,
76 StartScan,
77 ScanLines,
78 (LPBYTE)Bits,
79 (LPBITMAPINFO)lpbmi,
80 ColorUse,
81 lpbmi->bmiHeader.biSizeImage,
82 lpbmi->bmiHeader.biSize,
83 FALSE,
84 NULL);
85 }
86
87 /*
88 * @unimplemented
89 */
90 BOOL
91 STDCALL
92 PtInRegion(IN HRGN hrgn,
93 int x,
94 int y)
95 {
96 /* FIXME some stuff at user mode need be fixed */
97 return NtGdiPtInRegion(hrgn,x,y);
98 }
99
100 /*
101 * @unimplemented
102 */
103 BOOL
104 STDCALL
105 RectInRegion(HRGN hrgn,
106 LPCRECT prcl)
107 {
108 /* FIXME some stuff at user mode need be fixed */
109 return NtGdiRectInRegion(hrgn, (LPRECT) prcl);
110 }
111
112 /*
113 * @unimplemented
114 */
115 BOOL
116 STDCALL
117 RestoreDC(IN HDC hdc,
118 IN INT iLevel)
119 {
120 /* FIXME Sharememory */
121 return NtGdiRestoreDC(hdc, iLevel);
122 }
123
124 /*
125 * @unimplemented
126 */
127 INT
128 STDCALL
129 SaveDC(IN HDC hdc)
130 {
131 /* FIXME Sharememory */
132 return NtGdiSaveDC(hdc);
133 }
134
135
136
137 /*
138 * @unimplemented
139 */
140 BOOL
141 STDCALL
142 CancelDC(HDC hdc)
143 {
144 UNIMPLEMENTED;
145 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
146 return FALSE;
147 }
148
149
150 /*
151 * @unimplemented
152 */
153 int
154 STDCALL
155 DrawEscape(HDC hdc,
156 int a1,
157 int a2,
158 LPCSTR a3)
159 {
160 UNIMPLEMENTED;
161 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
162 return 0;
163 }
164
165
166 /*
167 * @unimplemented
168 */
169 int
170 STDCALL
171 EnumObjects(HDC hdc,
172 int a1,
173 GOBJENUMPROC a2,
174 LPARAM a3)
175 {
176 UNIMPLEMENTED;
177 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
178 return 0;
179 }
180
181
182
183 /*
184 * @implemented
185 */
186 UINT
187 STDCALL
188 GetBoundsRect(
189 HDC hdc,
190 LPRECT lprcBounds,
191 UINT flags
192 )
193 {
194 return NtGdiGetBoundsRect(hdc,lprcBounds,flags & DCB_RESET);
195 }
196
197
198 /*
199 * @unimplemented
200 */
201 UINT
202 STDCALL
203 GetMetaFileBitsEx(
204 HMETAFILE a0,
205 UINT a1,
206 LPVOID a2
207 )
208 {
209 UNIMPLEMENTED;
210 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
211 return 0;
212 }
213
214
215 /*
216 * @unimplemented
217 */
218 DWORD
219 STDCALL
220 GetFontLanguageInfo(
221 HDC hDc
222 )
223 {
224 UNIMPLEMENTED;
225 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
226 return 0;
227 }
228
229 /*
230 * @unimplemented
231 */
232 BOOL
233 STDCALL
234 PlayMetaFile(
235 HDC a0,
236 HMETAFILE a1
237 )
238 {
239 UNIMPLEMENTED;
240 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
241 return FALSE;
242 }
243
244 /*
245 * @implemented
246 */
247 UINT
248 STDCALL
249 SetBoundsRect(HDC hdc,
250 CONST RECT *prc,
251 UINT flags)
252 {
253 /* FIXME add check for vaildate the flags */
254 return NtGdiSetBoundsRect(hdc, (LPRECT)prc, flags);
255 }
256
257 /*
258 * @unimplemented
259 */
260 HMETAFILE
261 STDCALL
262 SetMetaFileBitsEx(
263 UINT a0,
264 CONST BYTE *a1
265 )
266 {
267 UNIMPLEMENTED;
268 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
269 return 0;
270 }
271
272 /*
273 * @unimplemented
274 */
275 BOOL
276 STDCALL
277 PlayMetaFileRecord(
278 HDC a0,
279 LPHANDLETABLE a1,
280 LPMETARECORD a2,
281 UINT a3
282 )
283 {
284 UNIMPLEMENTED;
285 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
286 return FALSE;
287 }
288
289
290 /*
291 * @unimplemented
292 */
293 BOOL
294 STDCALL
295 EnumMetaFile(
296 HDC a0,
297 HMETAFILE a1,
298 MFENUMPROC a2,
299 LPARAM a3
300 )
301 {
302 UNIMPLEMENTED;
303 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
304 return FALSE;
305 }
306
307 /*
308 * @unimplemented
309 */
310 BOOL
311 STDCALL
312 DeleteEnhMetaFile(
313 HENHMETAFILE a0
314 )
315 {
316 UNIMPLEMENTED;
317 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
318 return FALSE;
319 }
320
321 /*
322 * @unimplemented
323 */
324 BOOL
325 STDCALL
326 EnumEnhMetaFile(
327 HDC a0,
328 HENHMETAFILE a1,
329 ENHMFENUMPROC a2,
330 LPVOID a3,
331 CONST RECT *a4
332 )
333 {
334 UNIMPLEMENTED;
335 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
336 return FALSE;
337 }
338
339 /*
340 * @unimplemented
341 */
342 UINT
343 STDCALL
344 GetEnhMetaFileBits(
345 HENHMETAFILE a0,
346 UINT a1,
347 LPBYTE a2
348 )
349 {
350 UNIMPLEMENTED;
351 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
352 return 0;
353 }
354
355
356 /*
357 * @unimplemented
358 */
359 UINT
360 STDCALL
361 GetEnhMetaFileHeader(
362 HENHMETAFILE a0,
363 UINT a1,
364 LPENHMETAHEADER a2
365 )
366 {
367 UNIMPLEMENTED;
368 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
369 return 0;
370 }
371
372 /*
373 * @unimplemented
374 */
375 UINT
376 STDCALL
377 GetEnhMetaFilePaletteEntries(
378 HENHMETAFILE a0,
379 UINT a1,
380 LPPALETTEENTRY a2
381 )
382 {
383 UNIMPLEMENTED;
384 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
385 return 0;
386 }
387
388 /*
389 * @unimplemented
390 */
391 UINT
392 STDCALL
393 GetWinMetaFileBits(
394 HENHMETAFILE a0,
395 UINT a1,
396 LPBYTE a2,
397 INT a3,
398 HDC a4
399 )
400 {
401 UNIMPLEMENTED;
402 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
403 return 0;
404 }
405
406
407 /*
408 * @unimplemented
409 */
410 BOOL
411 STDCALL
412 PlayEnhMetaFile(
413 HDC a0,
414 HENHMETAFILE a1,
415 CONST RECT *a2
416 )
417 {
418 UNIMPLEMENTED;
419 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
420 return FALSE;
421 }
422
423
424 /*
425 * @unimplemented
426 */
427 BOOL
428 STDCALL
429 PlayEnhMetaFileRecord(
430 HDC a0,
431 LPHANDLETABLE a1,
432 CONST ENHMETARECORD *a2,
433 UINT a3
434 )
435 {
436 UNIMPLEMENTED;
437 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
438 return FALSE;
439 }
440
441
442 /*
443 * @unimplemented
444 */
445 HENHMETAFILE
446 STDCALL
447 SetEnhMetaFileBits(
448 UINT a0,
449 CONST BYTE *a1
450 )
451 {
452 UNIMPLEMENTED;
453 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
454 return 0;
455 }
456
457
458 /*
459 * @unimplemented
460 */
461 HENHMETAFILE
462 STDCALL
463 SetWinMetaFileBits(
464 UINT a0,
465 CONST BYTE *a1,
466 HDC a2,
467 CONST METAFILEPICT *a3)
468 {
469 UNIMPLEMENTED;
470 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
471 return 0;
472 }
473
474
475 /*
476 * @unimplemented
477 */
478 BOOL
479 STDCALL
480 GdiComment(
481 HDC hDC,
482 UINT bytes,
483 CONST BYTE *buffer
484 )
485 {
486 #if 0
487 if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_EMF)
488 {
489 PLDC pLDC = GdiGetLDC(hDC);
490 if ( !pLDC )
491 {
492 SetLastError(ERROR_INVALID_HANDLE);
493 return FALSE;
494 }
495 if (pLDC->iType == LDC_EMFLDC)
496 { // Wine port
497 return EMFDRV_GdiComment( hDC, bytes, buffer );
498 }
499 }
500 #endif
501 return FALSE;
502 }
503
504
505 /*
506 * @unimplemented
507 */
508 BOOL
509 STDCALL
510 AngleArc(
511 HDC hdc,
512 int a1,
513 int a2,
514 DWORD a3,
515 FLOAT a4,
516 FLOAT a5
517 )
518 {
519 UNIMPLEMENTED;
520 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
521 return FALSE;
522 }
523
524
525 /*
526 * @unimplemented
527 */
528 BOOL
529 STDCALL
530 SetColorAdjustment(
531 HDC hdc,
532 CONST COLORADJUSTMENT *a1
533 )
534 {
535 UNIMPLEMENTED;
536 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
537 return FALSE;
538 }
539
540 /*
541 * @unimplemented
542 */
543 int
544 STDCALL
545 EndDoc(
546 HDC hdc
547 )
548 {
549 UNIMPLEMENTED;
550 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
551 return 0;
552 }
553
554
555 /*
556 * @unimplemented
557 */
558 int
559 STDCALL
560 StartPage(
561 HDC hdc
562 )
563 {
564 UNIMPLEMENTED;
565 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
566 return 0;
567 }
568
569
570 /*
571 * @unimplemented
572 */
573 int
574 STDCALL
575 EndPage(
576 HDC hdc
577 )
578 {
579 UNIMPLEMENTED;
580 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
581 return 0;
582 }
583
584
585 /*
586 * @unimplemented
587 */
588 int
589 STDCALL
590 AbortDoc(
591 HDC hdc
592 )
593 {
594 UNIMPLEMENTED;
595 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
596 return 0;
597 }
598
599
600 /*
601 * @unimplemented
602 */
603 int
604 STDCALL
605 SetAbortProc(
606 HDC hdc,
607 ABORTPROC lpAbortProc)
608 {
609 UNIMPLEMENTED;
610 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
611 return 0;
612 }
613
614 /*
615 * @implemented
616 */
617 BOOL
618 STDCALL
619 UnrealizeObject(HGDIOBJ hgdiobj)
620 {
621 BOOL retValue = TRUE;
622
623 if (GDI_HANDLE_GET_TYPE(hgdiobj) != GDI_OBJECT_TYPE_BRUSH)
624 {
625 retValue = NtGdiUnrealizeObject(hgdiobj);
626 }
627
628 return retValue;
629 }
630
631
632 /*
633 * @implemented
634 */
635 BOOL
636 STDCALL
637 GdiFlush()
638 {
639 NtGdiFlush();
640 return TRUE;
641 }
642
643
644 /*
645 * @unimplemented
646 */
647 int
648 STDCALL
649 SetICMMode(
650 HDC a0,
651 int a1
652 )
653 {
654 UNIMPLEMENTED;
655 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
656 return 0;
657 }
658
659
660 /*
661 * @unimplemented
662 */
663 BOOL
664 STDCALL
665 CheckColorsInGamut(
666 HDC a0,
667 LPVOID a1,
668 LPVOID a2,
669 DWORD a3
670 )
671 {
672 UNIMPLEMENTED;
673 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
674 return FALSE;
675 }
676
677
678 /*
679 * @unimplemented
680 */
681 HCOLORSPACE
682 STDCALL
683 GetColorSpace(HDC hDc)
684 {
685 UNIMPLEMENTED;
686 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
687 return 0;
688 }
689
690
691 /*
692 * @unimplemented
693 */
694 HCOLORSPACE
695 STDCALL
696 SetColorSpace(
697 HDC a0,
698 HCOLORSPACE a1
699 )
700 {
701 UNIMPLEMENTED;
702 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
703 return FALSE;
704 }
705
706 /*
707 * @implemented
708 */
709 BOOL
710 STDCALL
711 GetDeviceGammaRamp( HDC hdc,
712 LPVOID lpGammaRamp)
713 {
714 BOOL retValue = FALSE;
715 if (lpGammaRamp == NULL)
716 {
717 SetLastError(ERROR_INVALID_PARAMETER);
718 }
719 else
720 {
721 retValue = NtGdiGetDeviceGammaRamp(hdc,lpGammaRamp);
722 }
723
724 return retValue;
725 }
726
727 /*
728 * @implemented
729 */
730 BOOL
731 STDCALL
732 SetDeviceGammaRamp(HDC hdc,
733 LPVOID lpGammaRamp)
734 {
735 BOOL retValue = FALSE;
736
737 if (lpGammaRamp)
738 {
739 retValue = NtGdiSetDeviceGammaRamp(hdc, lpGammaRamp);
740 }
741 else
742 {
743 SetLastError(ERROR_INVALID_PARAMETER);
744 }
745
746 return retValue;
747 }
748
749
750 /*
751 * @unimplemented
752 */
753 BOOL
754 STDCALL
755 ColorMatchToTarget(
756 HDC a0,
757 HDC a1,
758 DWORD a2
759 )
760 {
761 UNIMPLEMENTED;
762 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
763 return FALSE;
764 }
765
766
767 /*
768 * @unimplemented
769 */
770 BOOL
771 STDCALL
772 wglCopyContext(
773 HGLRC a0,
774 HGLRC a1,
775 UINT a2
776 )
777 {
778 UNIMPLEMENTED;
779 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
780 return FALSE;
781 }
782
783
784 /*
785 * @unimplemented
786 */
787 HGLRC
788 STDCALL
789 wglCreateContext(
790 HDC hDc
791 )
792 {
793 UNIMPLEMENTED;
794 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
795 return 0;
796 }
797
798
799 /*
800 * @unimplemented
801 */
802 HGLRC
803 STDCALL
804 wglCreateLayerContext(
805 HDC hDc,
806 int a1
807 )
808 {
809 UNIMPLEMENTED;
810 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
811 return 0;
812 }
813
814
815 /*
816 * @unimplemented
817 */
818 BOOL
819 STDCALL
820 wglDeleteContext(
821 HGLRC a
822 )
823 {
824 UNIMPLEMENTED;
825 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
826 return FALSE;
827 }
828
829
830 /*
831 * @unimplemented
832 */
833 HGLRC
834 STDCALL
835 wglGetCurrentContext(VOID)
836 {
837 UNIMPLEMENTED;
838 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
839 return 0;
840 }
841
842
843 /*
844 * @unimplemented
845 */
846 HDC
847 STDCALL
848 wglGetCurrentDC(VOID)
849 {
850 UNIMPLEMENTED;
851 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
852 return 0;
853 }
854
855
856 /*
857 * @unimplemented
858 */
859 PROC
860 STDCALL
861 wglGetProcAddress(
862 LPCSTR a0
863 )
864 {
865 UNIMPLEMENTED;
866 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
867 return 0;
868 }
869
870
871 /*
872 * @unimplemented
873 */
874 BOOL
875 STDCALL
876 wglMakeCurrent(
877 HDC a0,
878 HGLRC a1
879 )
880 {
881 UNIMPLEMENTED;
882 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
883 return FALSE;
884 }
885
886
887 /*
888 * @unimplemented
889 */
890 BOOL
891 STDCALL
892 wglShareLists(
893 HGLRC a0,
894 HGLRC a1
895 )
896 {
897 UNIMPLEMENTED;
898 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
899 return FALSE;
900 }
901
902
903 /*
904 * @unimplemented
905 */
906 BOOL
907 STDCALL
908 wglDescribeLayerPlane(
909 HDC a0,
910 int a1,
911 int a2,
912 UINT a3,
913 LPLAYERPLANEDESCRIPTOR a4
914 )
915 {
916 UNIMPLEMENTED;
917 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
918 return FALSE;
919 }
920
921
922 /*
923 * @unimplemented
924 */
925 int
926 STDCALL
927 wglSetLayerPaletteEntries(
928 HDC a0,
929 int a1,
930 int a2,
931 int a3,
932 CONST COLORREF *a4
933 )
934 {
935 UNIMPLEMENTED;
936 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
937 return 0;
938 }
939
940
941 /*
942 * @unimplemented
943 */
944 int
945 STDCALL
946 wglGetLayerPaletteEntries(
947 HDC a0,
948 int a1,
949 int a2,
950 int a3,
951 COLORREF *a4
952 )
953 {
954 UNIMPLEMENTED;
955 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
956 return 0;
957 }
958
959
960 /*
961 * @unimplemented
962 */
963 BOOL
964 STDCALL
965 wglRealizeLayerPalette(
966 HDC a0,
967 int a1,
968 BOOL a2
969 )
970 {
971 UNIMPLEMENTED;
972 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
973 return FALSE;
974 }
975
976
977 /*
978 * @unimplemented
979 */
980 BOOL
981 STDCALL
982 wglSwapLayerBuffers(
983 HDC a0,
984 UINT a1
985 )
986 {
987 UNIMPLEMENTED;
988 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
989 return FALSE;
990 }
991
992
993 /* === AFTER THIS POINT I GUESS... =========
994 * (based on stack size in Norlander's .def)
995 * === WHERE ARE THEY DEFINED? =============
996 */
997
998 /*
999 * @unimplemented
1000 */
1001 DWORD
1002 STDCALL
1003 IsValidEnhMetaRecord(
1004 DWORD a0,
1005 DWORD a1
1006 )
1007 {
1008 UNIMPLEMENTED;
1009 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1010 return 0;
1011
1012 }
1013
1014 /*
1015 * @unimplemented
1016 */
1017 DWORD
1018 STDCALL
1019 IsValidEnhMetaRecordOffExt(
1020 DWORD a0,
1021 DWORD a1,
1022 DWORD a2,
1023 DWORD a3
1024 )
1025 {
1026 UNIMPLEMENTED;
1027 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1028 return 0;
1029
1030 }
1031
1032 /*
1033 * @unimplemented
1034 */
1035 DWORD
1036 STDCALL
1037 GetGlyphOutlineWow(
1038 DWORD a0,
1039 DWORD a1,
1040 DWORD a2,
1041 DWORD a3,
1042 DWORD a4,
1043 DWORD a5,
1044 DWORD a6
1045 )
1046 {
1047 UNIMPLEMENTED;
1048 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1049 return 0;
1050 }
1051
1052 /*
1053 * @unimplemented
1054 */
1055 DWORD
1056 STDCALL
1057 gdiPlaySpoolStream(
1058 DWORD a0,
1059 DWORD a1,
1060 DWORD a2,
1061 DWORD a3,
1062 DWORD a4,
1063 DWORD a5
1064 )
1065 {
1066 UNIMPLEMENTED;
1067 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1068 return 0;
1069 }
1070
1071 /*
1072 * @unimplemented
1073 */
1074 HANDLE
1075 STDCALL
1076 AddFontMemResourceEx(
1077 PVOID pbFont,
1078 DWORD cbFont,
1079 PVOID pdv,
1080 DWORD *pcFonts
1081 )
1082 {
1083 UNIMPLEMENTED;
1084 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1085 return 0;
1086 }
1087
1088 /*
1089 * @unimplemented
1090 */
1091 int
1092 STDCALL
1093 AddFontResourceTracking(
1094 LPCSTR lpString,
1095 int unknown
1096 )
1097 {
1098 UNIMPLEMENTED;
1099 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1100 return 0;
1101 }
1102
1103
1104
1105 /*
1106 * @unimplemented
1107 */
1108 HBITMAP
1109 STDCALL
1110 ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
1111 {
1112 UNIMPLEMENTED;
1113 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1114 return 0;
1115 }
1116
1117 /*
1118 * @unimplemented
1119 */
1120 HBRUSH
1121 STDCALL
1122 ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags)
1123 {
1124 UNIMPLEMENTED;
1125 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1126 return 0;
1127 }
1128
1129 /*
1130 * @unimplemented
1131 */
1132 BOOL
1133 STDCALL
1134 ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries)
1135 {
1136 UNIMPLEMENTED;
1137 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1138 return 0;
1139 }
1140
1141 /*
1142 * @unimplemented
1143 */
1144 int
1145 STDCALL
1146 EndFormPage(HDC hdc)
1147 {
1148 UNIMPLEMENTED;
1149 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1150 return 0;
1151 }
1152
1153
1154
1155 /*
1156 * @unimplemented
1157 */
1158 DWORD
1159 STDCALL
1160 GdiAddGlsBounds(HDC hdc,LPRECT prc)
1161 {
1162 UNIMPLEMENTED;
1163 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1164 return 0;
1165 }
1166
1167 /*
1168 * @unimplemented
1169 */
1170 BOOL
1171 STDCALL
1172 GdiArtificialDecrementDriver(LPWSTR pDriverName,BOOL unknown)
1173 {
1174 UNIMPLEMENTED;
1175 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1176 return 0;
1177 }
1178
1179 /*
1180 * @unimplemented
1181 */
1182 BOOL
1183 STDCALL
1184 GdiCleanCacheDC(HDC hdc)
1185 {
1186 UNIMPLEMENTED;
1187 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1188 return 0;
1189 }
1190
1191 /*
1192 * @unimplemented
1193 */
1194 HDC
1195 STDCALL
1196 GdiConvertAndCheckDC(HDC hdc)
1197 {
1198 UNIMPLEMENTED;
1199 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1200 return 0;
1201 }
1202
1203 /*
1204 * @unimplemented
1205 */
1206 HENHMETAFILE
1207 STDCALL
1208 GdiConvertEnhMetaFile(HENHMETAFILE hmf)
1209 {
1210 UNIMPLEMENTED;
1211 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1212 return 0;
1213 }
1214
1215 /*
1216 * @unimplemented
1217 */
1218 BOOL
1219 STDCALL
1220 GdiDrawStream(HDC dc, ULONG l, VOID *v)
1221 {
1222 UNIMPLEMENTED;
1223 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1224 return 0;
1225 }
1226
1227 /*
1228 * @unimplemented
1229 */
1230 BOOL
1231 STDCALL
1232 GdiIsMetaFileDC(HDC hdc)
1233 {
1234 UNIMPLEMENTED;
1235 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1236 return 0;
1237 }
1238
1239 /*
1240 * @unimplemented
1241 */
1242 BOOL
1243 STDCALL
1244 GdiIsMetaPrintDC(HDC hdc)
1245 {
1246 UNIMPLEMENTED;
1247 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1248 return 0;
1249 }
1250
1251 /*
1252 * @unimplemented
1253 */
1254 BOOL
1255 STDCALL
1256 GdiIsPlayMetafileDC(HDC hdc)
1257 {
1258 UNIMPLEMENTED;
1259 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1260 return 0;
1261 }
1262
1263 /*
1264 * @unimplemented
1265 */
1266 BOOL
1267 STDCALL
1268 GdiValidateHandle(HGDIOBJ hobj)
1269 {
1270 UNIMPLEMENTED;
1271 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1272 return 0;
1273 }
1274
1275 /*
1276 * @unimplemented
1277 */
1278 DWORD
1279 STDCALL
1280 GetBitmapAttributes(HBITMAP hbm)
1281 {
1282 UNIMPLEMENTED;
1283 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1284 return 0;
1285 }
1286
1287 /*
1288 * @unimplemented
1289 */
1290 DWORD
1291 STDCALL
1292 GetBrushAttributes(HBRUSH hbr)
1293 {
1294 UNIMPLEMENTED;
1295 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1296 return 0;
1297 }
1298
1299 /*
1300 * @implemented
1301 */
1302 ULONG
1303 STDCALL
1304 GetEUDCTimeStamp(VOID)
1305 {
1306 return NtGdiGetEudcTimeStampEx(NULL,0,TRUE);
1307 }
1308
1309 /*
1310 * @implemented
1311 */
1312 ULONG
1313 STDCALL
1314 GetFontAssocStatus(HDC hdc)
1315 {
1316 ULONG retValue = 0;
1317
1318 if (hdc)
1319 {
1320 retValue = NtGdiQueryFontAssocInfo(hdc);
1321 }
1322
1323 return retValue;
1324 }
1325
1326 /*
1327 * @implemented
1328 */
1329 BOOL
1330 STDCALL
1331 GetTextExtentExPointWPri(HDC hdc,
1332 LPWSTR lpwsz,
1333 ULONG cwc,
1334 ULONG dxMax,
1335 ULONG *pcCh,
1336 PULONG pdxOut,
1337 LPSIZE psize)
1338 {
1339 return NtGdiGetTextExtentExW(hdc,lpwsz,cwc,dxMax,pcCh,pdxOut,psize,0);
1340 }
1341
1342 /*
1343 * @implemented
1344 */
1345 INT
1346 STDCALL
1347 GetTextFaceAliasW(HDC hdc,
1348 int cChar,
1349 LPWSTR pszOut)
1350 {
1351 INT retValue = 0;
1352 if ((!pszOut) || (cChar))
1353 {
1354 retValue = NtGdiGetTextFaceW(hdc,cChar,pszOut,TRUE);
1355 }
1356 else
1357 {
1358 SetLastError(ERROR_INVALID_PARAMETER);
1359 }
1360 return retValue;
1361 }
1362
1363 /*
1364 * @unimplemented
1365 */
1366 DWORD
1367 STDCALL
1368 QueryFontAssocStatus(VOID)
1369 {
1370 UNIMPLEMENTED;
1371 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1372 return 0;
1373 }
1374
1375 /*
1376 * @implemented
1377 */
1378 BOOL
1379 STDCALL
1380 RemoveFontMemResourceEx(HANDLE fh)
1381 {
1382 BOOL retValue=0;
1383
1384 if (fh)
1385 {
1386 retValue = NtGdiRemoveFontMemResourceEx(fh);
1387 }
1388 else
1389 {
1390 SetLastError(ERROR_INVALID_PARAMETER);
1391 }
1392 return retValue;
1393 }
1394
1395 /*
1396 * @unimplemented
1397 */
1398 int
1399 STDCALL
1400 RemoveFontResourceTracking(LPCSTR lpString,int unknown)
1401 {
1402 UNIMPLEMENTED;
1403 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1404 return 0;
1405 }
1406
1407 /*
1408 * @unimplemented
1409 */
1410 HBITMAP
1411 STDCALL
1412 SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
1413 {
1414 UNIMPLEMENTED;
1415 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1416 return 0;
1417 }
1418
1419 /*
1420 * @unimplemented
1421 */
1422 HBRUSH
1423 STDCALL
1424 SetBrushAttributes(HBRUSH hbm, DWORD dwFlags)
1425 {
1426 UNIMPLEMENTED;
1427 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1428 return 0;
1429 }
1430
1431 /*
1432 * @implemented
1433 */
1434 int
1435 STDCALL
1436 StartFormPage(HDC hdc)
1437 {
1438 return StartPage(hdc);
1439 }
1440
1441 /*
1442 * @unimplemented
1443 */
1444 VOID
1445 STDCALL
1446 UnloadNetworkFonts(DWORD unknown)
1447 {
1448 UNIMPLEMENTED;
1449 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1450 }
1451
1452 /*
1453 * @unimplemented
1454 */
1455 BOOL
1456 STDCALL
1457 GdiRealizationInfo(HDC hdc,
1458 PREALIZATION_INFO pri)
1459 {
1460 // ATM we do not support local font data and Language Pack.
1461 return NtGdiGetRealizationInfo(hdc, pri, (HFONT) NULL);
1462 }
1463
1464 /*
1465 * @implemented
1466 */
1467 BOOL
1468 STDCALL
1469 GetETM(HDC hdc,
1470 EXTTEXTMETRIC *petm)
1471 {
1472 BOOL Ret = NtGdiGetETM(hdc, petm);
1473
1474 if (Ret && petm)
1475 petm->emKernPairs = GetKerningPairsA(hdc, 0, 0);
1476
1477 return Ret;
1478 }
1479
1480 /*
1481 * @unimplemented
1482 */
1483 int
1484 STDCALL
1485 Escape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpvInData, LPVOID lpvOutData)
1486 {
1487 int retValue = SP_ERROR;
1488 HGDIOBJ hObject = hdc;
1489 UINT Type = 0;
1490 LPVOID pUserData = NULL;
1491
1492 Type = GDI_HANDLE_GET_TYPE(hObject);
1493
1494 if (Type == GDI_OBJECT_TYPE_METADC)
1495 {
1496 /* FIXME we do not support metafile */
1497 UNIMPLEMENTED;
1498 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1499 }
1500 else
1501 {
1502 switch (nEscape)
1503 {
1504 case ABORTDOC:
1505 /* Note Winodws check see if the handle have any user data for ABORTDOC command
1506 * ReactOS copy this behavior to be compatible with windows 2003
1507 */
1508 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
1509 (pUserData == NULL) )
1510 {
1511 GdiSetLastError(ERROR_INVALID_HANDLE);
1512 retValue = FALSE;
1513 }
1514 else
1515 {
1516 retValue = AbortDoc(hdc);
1517 }
1518 break;
1519
1520 case DRAFTMODE:
1521 case FLUSHOUTPUT:
1522 case SETCOLORTABLE:
1523 /* Note 1: DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE is outdated and been replace with other api */
1524 /* Note 2: Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
1525 * ReactOS copy this behavior to be compatible with windows 2003
1526 */
1527 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
1528 (pUserData == NULL) )
1529 {
1530 GdiSetLastError(ERROR_INVALID_HANDLE);
1531 }
1532 retValue = FALSE;
1533 break;
1534
1535 case SETABORTPROC:
1536 /* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
1537 * ReactOS copy this behavior to be compatible with windows 2003
1538 */
1539 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
1540 (pUserData == NULL) )
1541 {
1542 GdiSetLastError(ERROR_INVALID_HANDLE);
1543 retValue = FALSE;
1544 }
1545 retValue = SetAbortProc(hdc, (ABORTPROC)lpvInData);
1546 break;
1547
1548 case GETCOLORTABLE:
1549 retValue = GetSystemPaletteEntries(hdc, (UINT)*lpvInData, 1, (LPPALETTEENTRY)lpvOutData);
1550 if ( !retValue )
1551 {
1552 retValue = SP_ERROR;
1553 }
1554 break;
1555
1556 case ENDDOC:
1557 /* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
1558 * ReactOS copy this behavior to be compatible with windows 2003
1559 */
1560 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
1561 (pUserData == NULL) )
1562 {
1563 GdiSetLastError(ERROR_INVALID_HANDLE);
1564 retValue = FALSE;
1565 }
1566 retValue = EndDoc(hdc);
1567 break;
1568
1569
1570 case GETSCALINGFACTOR:
1571 /* Note GETSCALINGFACTOR is outdated have been replace by GetDeviceCaps */
1572 if ( Type == GDI_OBJECT_TYPE_DC )
1573 {
1574 if ( lpvOutData )
1575 {
1576 PPOINT ptr = (PPOINT) lpvOutData;
1577 ptr->x = 0;
1578 ptr->y = 0;
1579 }
1580 }
1581 retValue = FALSE;
1582 break;
1583
1584 case GETEXTENDEDTEXTMETRICS:
1585 retValue = (int) GetETM( hdc, (EXTTEXTMETRIC *) lpvOutData) != 0;
1586 break;
1587
1588 case STARTDOC:
1589 {
1590 DOCINFOA *pUserDatalpdi;
1591 DOCINFOA lpdi;
1592
1593 /* Note : Winodws check see if the handle have any user data for STARTDOC command
1594 * ReactOS copy this behavior to be compatible with windows 2003
1595 */
1596 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserDatalpdi)) ||
1597 (pUserData == NULL) )
1598 {
1599 GdiSetLastError(ERROR_INVALID_HANDLE);
1600 retValue = FALSE;
1601 }
1602
1603 lpdi.cbSize = sizeof(DOCINFOA);
1604
1605 /* NOTE lpszOutput will be store in handle userdata */
1606 lpdi.lpszOutput = 0;
1607
1608 lpdi.lpszDatatype = 0;
1609 lpdi.fwType = 0;
1610 lpdi.lpszDocName = lpvInData;
1611
1612 /* NOTE : doc for StartDocA/W at msdn http://msdn2.microsoft.com/en-us/library/ms535793(VS.85).aspx */
1613 retValue = StartDocA(hdc, &lpdi);
1614
1615 /* StartDocA fail */
1616 if (retValue < 0)
1617 {
1618 /* check see if outbuffer contain any data, if it does abort */
1619 if ( (pUserDatalpdi->lpszOutput != 0) &&
1620 ( (*(WCHAR *)pUserDatalpdi->lpszOutput) != UNICODE_NULL) )
1621 {
1622 retValue = SP_APPABORT;
1623 }
1624 else
1625 {
1626 retValue = GetLastError();
1627
1628 /* Translate StartDocA error code to STARTDOC error code
1629 * see msdn http://msdn2.microsoft.com/en-us/library/ms535472.aspx
1630 */
1631 switch(retValue)
1632 {
1633 case ERROR_NOT_ENOUGH_MEMORY:
1634 retValue = SP_OUTOFMEMORY;
1635 break;
1636
1637 case ERROR_PRINT_CANCELLED:
1638 retValue = SP_USERABORT;
1639 break;
1640
1641 case ERROR_DISK_FULL:
1642 retValue = SP_OUTOFDISK;
1643 break;
1644
1645 default:
1646 retValue = SP_ERROR;
1647 break;
1648 }
1649 }
1650 }
1651 }
1652 break;
1653
1654
1655
1656
1657 default:
1658 UNIMPLEMENTED;
1659 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1660 }
1661 }
1662
1663 return retValue;
1664 }
1665
1666 /*
1667 * @unimplemented
1668 */
1669 BOOL
1670 STDCALL
1671 GdiAddGlsRecord(HDC hdc,
1672 DWORD unknown1,
1673 LPCSTR unknown2,
1674 LPRECT unknown3)
1675 {
1676 UNIMPLEMENTED;
1677 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1678 return 0;
1679 }
1680
1681 /*
1682 * @unimplemented
1683 */
1684 HANDLE
1685 STDCALL
1686 GdiConvertMetaFilePict(HGLOBAL hMem)
1687 {
1688 UNIMPLEMENTED;
1689 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1690 return 0;
1691 }
1692
1693 /*
1694 * @implemented
1695 */
1696 DEVMODEW *
1697 STDCALL
1698 GdiConvertToDevmodeW(DEVMODEA *dm)
1699 {
1700 LPDEVMODEW dmw;
1701
1702 dmw = HEAP_alloc(sizeof(DEVMODEW));
1703 #define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, (LPSTR)dm->f, len, dmw->f, len )
1704 #define COPYN(f) dmw->f = dm->f
1705 COPYS(dmDeviceName, CCHDEVICENAME );
1706 COPYN(dmSpecVersion);
1707 COPYN(dmDriverVersion);
1708 switch ( dm->dmSize )
1709 {
1710 case SIZEOF_DEVMODEA_300:
1711 dmw->dmSize = SIZEOF_DEVMODEW_300;
1712 break;
1713 case SIZEOF_DEVMODEA_400:
1714 dmw->dmSize = SIZEOF_DEVMODEW_400;
1715 break;
1716 case SIZEOF_DEVMODEA_500:
1717 default: /* FIXME what to do??? */
1718 dmw->dmSize = SIZEOF_DEVMODEW_500;
1719 break;
1720 }
1721 COPYN(dmDriverExtra);
1722 COPYN(dmFields);
1723 COPYN(dmPosition.x);
1724 COPYN(dmPosition.y);
1725 COPYN(dmScale);
1726 COPYN(dmCopies);
1727 COPYN(dmDefaultSource);
1728 COPYN(dmPrintQuality);
1729 COPYN(dmColor);
1730 COPYN(dmDuplex);
1731 COPYN(dmYResolution);
1732 COPYN(dmTTOption);
1733 COPYN(dmCollate);
1734 COPYS(dmFormName,CCHFORMNAME);
1735 COPYN(dmLogPixels);
1736 COPYN(dmBitsPerPel);
1737 COPYN(dmPelsWidth);
1738 COPYN(dmPelsHeight);
1739 COPYN(dmDisplayFlags); // aka dmNup
1740 COPYN(dmDisplayFrequency);
1741
1742 if ( dm->dmSize <= SIZEOF_DEVMODEA_300 )
1743 {
1744 return dmw; // we're done with 0x300 fields
1745 }
1746
1747 COPYN(dmICMMethod);
1748 COPYN(dmICMIntent);
1749 COPYN(dmMediaType);
1750 COPYN(dmDitherType);
1751 COPYN(dmReserved1);
1752 COPYN(dmReserved2);
1753
1754 if ( dm->dmSize <= SIZEOF_DEVMODEA_400 )
1755 {
1756 return dmw; // we're done with 0x400 fields
1757 }
1758
1759 COPYN(dmPanningWidth);
1760 COPYN(dmPanningHeight);
1761
1762 return dmw;
1763
1764 #undef COPYN
1765 #undef COPYS
1766 }
1767
1768 /*
1769 * @unimplemented
1770 */
1771 HENHMETAFILE
1772 STDCALL
1773 GdiCreateLocalEnhMetaFile(HENHMETAFILE hmo)
1774 {
1775 UNIMPLEMENTED;
1776 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1777 return 0;
1778 }
1779
1780 /*
1781 * @unimplemented
1782 */
1783 METAFILEPICT *
1784 STDCALL
1785 GdiCreateLocalMetaFilePict(HENHMETAFILE hmo)
1786 {
1787 UNIMPLEMENTED;
1788 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1789 return 0;
1790 }
1791
1792
1793 /*
1794 * @unimplemented
1795 */
1796 HANDLE
1797 STDCALL
1798 GdiGetSpoolFileHandle(LPWSTR pwszPrinterName,
1799 LPDEVMODEW pDevmode,
1800 LPWSTR pwszDocName)
1801 {
1802 UNIMPLEMENTED;
1803 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1804 return 0;
1805 }
1806
1807 /*
1808 * @unimplemented
1809 */
1810 BOOL
1811 STDCALL
1812 GdiDeleteSpoolFileHandle(HANDLE SpoolFileHandle)
1813 {
1814 UNIMPLEMENTED;
1815 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1816 return 0;
1817 }
1818
1819 /*
1820 * @unimplemented
1821 */
1822 DWORD
1823 STDCALL
1824 GdiGetPageCount(HANDLE SpoolFileHandle)
1825 {
1826 UNIMPLEMENTED;
1827 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1828 return 0;
1829 }
1830
1831 /*
1832 * @unimplemented
1833 */
1834 HDC
1835 STDCALL
1836 GdiGetDC(HANDLE SpoolFileHandle)
1837 {
1838 UNIMPLEMENTED;
1839 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1840 return 0;
1841 }
1842
1843 /*
1844 * @unimplemented
1845 */
1846 HANDLE
1847 STDCALL
1848 GdiGetPageHandle(HANDLE SpoolFileHandle,
1849 DWORD Page,
1850 LPDWORD pdwPageType)
1851 {
1852 UNIMPLEMENTED;
1853 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1854 return 0;
1855 }
1856
1857 /*
1858 * @unimplemented
1859 */
1860 BOOL
1861 STDCALL
1862 GdiStartDocEMF(HANDLE SpoolFileHandle,
1863 DOCINFOW *pDocInfo)
1864 {
1865 UNIMPLEMENTED;
1866 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1867 return 0;
1868 }
1869
1870 /*
1871 * @unimplemented
1872 */
1873 BOOL
1874 STDCALL
1875 GdiStartPageEMF(HANDLE SpoolFileHandle)
1876 {
1877 UNIMPLEMENTED;
1878 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1879 return 0;
1880 }
1881
1882 /*
1883 * @unimplemented
1884 */
1885 BOOL
1886 STDCALL
1887 GdiPlayPageEMF(HANDLE SpoolFileHandle,
1888 HANDLE hemf,
1889 RECT *prectDocument,
1890 RECT *prectBorder,
1891 RECT *prectClip)
1892 {
1893 UNIMPLEMENTED;
1894 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1895 return 0;
1896 }
1897
1898 /*
1899 * @unimplemented
1900 */
1901 BOOL
1902 STDCALL
1903 GdiEndPageEMF(HANDLE SpoolFileHandle,
1904 DWORD dwOptimization)
1905 {
1906 UNIMPLEMENTED;
1907 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1908 return 0;
1909 }
1910
1911 /*
1912 * @unimplemented
1913 */
1914 BOOL
1915 STDCALL
1916 GdiEndDocEMF(HANDLE SpoolFileHandle)
1917 {
1918 UNIMPLEMENTED;
1919 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1920 return 0;
1921 }
1922
1923 /*
1924 * @unimplemented
1925 */
1926 BOOL
1927 STDCALL
1928 GdiGetDevmodeForPage(HANDLE SpoolFileHandle,
1929 DWORD dwPageNumber,
1930 PDEVMODEW *pCurrDM,
1931 PDEVMODEW *pLastDM)
1932 {
1933 UNIMPLEMENTED;
1934 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1935 return 0;
1936 }
1937
1938 /*
1939 * @unimplemented
1940 */
1941 BOOL
1942 STDCALL
1943 GdiResetDCEMF(HANDLE SpoolFileHandle,
1944 PDEVMODEW pCurrDM)
1945 {
1946 UNIMPLEMENTED;
1947 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1948 return 0;
1949 }
1950
1951
1952 /*
1953 * @unimplemented
1954 */
1955 INT
1956 STDCALL
1957 CombineRgn(HRGN hDest,
1958 HRGN hSrc1,
1959 HRGN hSrc2,
1960 INT CombineMode)
1961 {
1962 /* FIXME some part should be done in user mode */
1963 return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
1964 }
1965
1966 /*
1967 * @unimplemented
1968 */
1969 HBITMAP STDCALL
1970 CreateBitmap(INT Width,
1971 INT Height,
1972 UINT Planes,
1973 UINT BitsPixel,
1974 PCVOID pUnsafeBits)
1975 {
1976 /* FIXME some part should be done in user mode */
1977 return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
1978 }
1979
1980 /*
1981 * @unimplemented
1982 */
1983 LPWSTR STDCALL
1984 EngGetDriverName(HDEV hdev)
1985 {
1986 UNIMPLEMENTED;
1987 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1988 return 0;
1989 }
1990
1991 /*
1992 * @unimplemented
1993 */
1994 ULONG STDCALL
1995 XLATEOBJ_iXlate(XLATEOBJ *XlateObj,
1996 ULONG Color)
1997 {
1998 UNIMPLEMENTED;
1999 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2000 return 0;
2001 }
2002
2003 /*
2004 * @unimplemented
2005 */
2006 ULONG *
2007 STDCALL
2008 XLATEOBJ_piVector(XLATEOBJ *XlateObj)
2009 {
2010 return XlateObj->pulXlate;
2011 }
2012
2013 /*
2014 * @unimplemented
2015 */
2016 BOOL
2017 STDCALL
2018 GdiPlayEMF(LPWSTR pwszPrinterName,
2019 LPDEVMODEW pDevmode,
2020 LPWSTR pwszDocName,
2021 EMFPLAYPROC pfnEMFPlayFn,
2022 HANDLE hPageQuery
2023 )
2024 {
2025 UNIMPLEMENTED;
2026 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2027 return 0;
2028 }
2029
2030
2031
2032 /*
2033 * @unimplemented
2034 */
2035 BOOL
2036 STDCALL
2037 GdiPlayPrivatePageEMF(HANDLE SpoolFileHandle,
2038 DWORD unknown,
2039 RECT *prectDocument)
2040 {
2041 UNIMPLEMENTED;
2042 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2043 return 0;
2044 }
2045
2046 /*
2047 * @unimplemented
2048 */
2049 VOID STDCALL GdiInitializeLanguagePack(DWORD InitParam)
2050 {
2051 UNIMPLEMENTED;
2052 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2053 }
2054
2055
2056 /*
2057 * @implemented
2058 */
2059 INT
2060 STDCALL
2061 ExcludeClipRect(IN HDC hdc, IN INT xLeft, IN INT yTop, IN INT xRight, IN INT yBottom)
2062 {
2063 /* FIXME some part need be done on user mode size */
2064 return NtGdiExcludeClipRect(hdc, xLeft, yTop, xRight, yBottom);
2065 }
2066
2067 /*
2068 * @implemented
2069 */
2070 INT
2071 STDCALL
2072 ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode)
2073 {
2074 /* FIXME some part need be done on user mode size */
2075 return NtGdiExtSelectClipRgn(hdc,hrgn, iMode);
2076 }
2077
2078 /*
2079 * @implemented
2080 */
2081 BOOL
2082 STDCALL
2083 GdiGradientFill(
2084 IN HDC hdc,
2085 IN PTRIVERTEX pVertex,
2086 IN ULONG nVertex,
2087 IN PVOID pMesh,
2088 IN ULONG nMesh,
2089 IN ULONG ulMode)
2090 {
2091 /* FIXME some part need be done in user mode */
2092 return NtGdiGradientFill(hdc, pVertex, nVertex, pMesh, nMesh, ulMode);
2093 }
2094
2095
2096 /*
2097 * @implemented
2098 */
2099 BOOL
2100 STDCALL
2101 GdiTransparentBlt(IN HDC hdcDst,
2102 IN INT xDst,
2103 IN INT yDst,
2104 IN INT cxDst,
2105 IN INT cyDst,
2106 IN HDC hdcSrc,
2107 IN INT xSrc,
2108 IN INT ySrc,
2109 IN INT cxSrc,
2110 IN INT cySrc,
2111 IN COLORREF TransColor
2112 )
2113 {
2114 /* FIXME some part need be done in user mode */
2115 return NtGdiTransparentBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcSrc, xSrc, ySrc, cxSrc, cySrc, TransColor);
2116 }
2117
2118 /*
2119 * @unimplemented
2120 */
2121 BOOL
2122 STDCALL
2123 GdiPrinterThunk(
2124 IN HUMPD humpd,
2125 DWORD *status,
2126 DWORD unuse)
2127 {
2128 /* FIXME figout the protypes, the HUMPD are a STRUCT or COM object */
2129 /* status contain some form of return value that being save, what it is I do not known */
2130 /* unsue seam have zero effect, what it is for I do not known */
2131
2132 // ? return NtGdiSetPUMPDOBJ(humpd->0x10,TRUE, humpd, ?) <- blackbox, OpenRCE info, and api hooks for anylaysing;
2133 return FALSE;
2134 }
2135
2136 /*
2137 * @unimplemented
2138 *
2139 */
2140 HBITMAP
2141 STDCALL
2142 GdiConvertBitmapV5(
2143 HBITMAP in_format_BitMap,
2144 HBITMAP src_BitMap,
2145 INT bpp,
2146 INT unuse)
2147 {
2148 /* FIXME guessing the prototypes */
2149
2150 /*
2151 * it have create a new bitmap with desired in format,
2152 * then convert it src_bitmap to new format
2153 * and return it as HBITMAP
2154 */
2155
2156 return FALSE;
2157 }
2158
2159
2160 /*
2161 * @implemented
2162 *
2163 */
2164 int
2165 STDCALL
2166 GetDeviceCaps(HDC hdc,
2167 int i)
2168 {
2169 /* FIXME some part need be done in user mode */
2170 return NtGdiGetDeviceCaps(hdc,i);
2171 }
2172
2173 /*
2174 * @implemented
2175 *
2176 */
2177 int
2178 STDCALL
2179 GetClipBox(HDC hdc,
2180 LPRECT lprc)
2181 {
2182 /* FIXME some part need be done in user mode */
2183 return NtGdiGetAppClipBox(hdc, lprc);
2184 }
2185
2186 /*
2187 * @implemented
2188 *
2189 */
2190 DWORD
2191 STDCALL
2192 GetFontData(HDC hdc,
2193 DWORD dwTable,
2194 DWORD dwOffset,
2195 LPVOID lpvBuffer,
2196 DWORD cbData)
2197 {
2198 if (!lpvBuffer)
2199 {
2200 cbData = 0;
2201 }
2202 return NtGdiGetFontData(hdc, dwTable, dwOffset, lpvBuffer, cbData);
2203 }
2204
2205
2206 /*
2207 * @implemented
2208 *
2209 */
2210 DWORD
2211 STDCALL
2212 GetRegionData(HRGN hrgn,
2213 DWORD nCount,
2214 LPRGNDATA lpRgnData)
2215 {
2216 if (!lpRgnData)
2217 {
2218 nCount = 0;
2219 }
2220
2221 return NtGdiGetRegionData(hrgn,nCount,lpRgnData);
2222 }
2223
2224
2225 /*
2226 * @implemented
2227 *
2228 */
2229 INT
2230 STDCALL
2231 GetRgnBox(HRGN hrgn,
2232 LPRECT prcOut)
2233 {
2234 /* FIXME some stuff need be done in user mode */
2235 return NtGdiGetRgnBox(hrgn, prcOut);
2236 }
2237
2238
2239 /*
2240 * @implemented
2241 *
2242 */
2243 INT
2244 STDCALL
2245 OffsetRgn( HRGN hrgn,
2246 int nXOffset,
2247 int nYOffset)
2248 {
2249 /* FIXME some part are done in user mode */
2250 return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
2251 }
2252
2253
2254 INT
2255 STDCALL
2256 GetTextCharsetInfo(HDC hdc,
2257 LPFONTSIGNATURE lpSig,
2258 DWORD dwFlags)
2259 {
2260 /* FIXME some part are done in user mode */
2261 return NtGdiGetTextCharsetInfo(hdc, lpSig, dwFlags);
2262 }
2263
2264
2265
2266 INT
2267 STDCALL
2268 IntersectClipRect(HDC hdc,
2269 int nLeftRect,
2270 int nTopRect,
2271 int nRightRect,
2272 int nBottomRect)
2273 {
2274 /* FIXME some part are done in user mode */
2275 return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
2276 }
2277
2278 INT
2279 STDCALL
2280 OffsetClipRgn(HDC hdc,
2281 int nXOffset,
2282 int nYOffset)
2283 {
2284 /* FIXME some part are done in user mode */
2285 return NtGdiOffsetClipRgn( hdc, nXOffset, nYOffset);
2286 }
2287
2288
2289 INT
2290 STDCALL
2291 NamedEscape(HDC hdc,
2292 PWCHAR pDriver,
2293 INT iEsc,
2294 INT cjIn,
2295 LPSTR pjIn,
2296 INT cjOut,
2297 LPSTR pjOut)
2298 {
2299 /* FIXME metadc, metadc are done most in user mode, and we do not support it
2300 * Windows 2000/XP/Vista ignore the current hdc, that are being pass and always set hdc to NULL
2301 * when it calls to NtGdiExtEscape from NamedEscape
2302 */
2303 return NtGdiExtEscape(NULL,pDriver,wcslen(pDriver),iEsc,cjIn,pjIn,cjOut,pjOut);
2304 }
2305
2306
2307
2308 /*
2309 * @unimplemented
2310 */
2311
2312 /* FIXME wrong protypes, it is a fastcall api */
2313 DWORD
2314 STDCALL
2315 cGetTTFFromFOT(DWORD x1 ,DWORD x2 ,DWORD x3, DWORD x4, DWORD x5, DWORD x6, DWORD x7)
2316 {
2317 UNIMPLEMENTED;
2318 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2319 return 0;
2320 }
2321