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