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