forget commit Implement of GdiGetLocalBrush, GdiGetLocalDC, GdiGetLocalFont
[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 BOOL
28 STDCALL
29 TranslateCharsetInfo(DWORD * lpSrc,
30 LPCHARSETINFO lpCs,
31 DWORD dwFlags)
32 {
33 /* FIXME share memory */
34 return NtGdiTranslateCharsetInfo(lpSrc, lpCs, dwFlags );
35 }
36
37 /*
38 * @unimplemented
39 */
40 int
41 STDCALL
42 StretchDIBits(HDC hdc,
43 int XDest,
44 int YDest,
45 int nDestWidth,
46 int nDestHeight,
47 int XSrc,
48 int YSrc,
49 int nSrcWidth,
50 int nSrcHeight,
51 CONST VOID *lpBits,
52 CONST BITMAPINFO *lpBitsInfo,
53 UINT iUsage,
54 DWORD dwRop)
55
56 {
57 /* FIXME share memory */
58 return NtGdiStretchDIBits(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc, YSrc,
59 nSrcWidth, nSrcHeight, lpBits, lpBitsInfo, iUsage, dwRop);
60 }
61
62 /*
63 * @unimplemented
64 */
65 int
66 STDCALL
67 SetDIBits(HDC hdc,
68 HBITMAP hbmp,
69 UINT uStartScan,
70 UINT cScanLines,
71 CONST VOID *lpvBits,
72 CONST BITMAPINFO *lpbmi,
73 UINT fuColorUse)
74 {
75 /* FIXME share memory */
76 return NtGdiSetDIBits(hdc, hbmp, uStartScan, cScanLines, lpvBits, lpbmi, fuColorUse);
77 }
78
79 /*
80 * @unimplemented
81 */
82 int
83 STDCALL
84 SetGraphicsMode(HDC hdc,
85 int iMode)
86 {
87 /* FIXME share memory */
88 return NtGdiSetGraphicsMode(hdc, iMode);
89 }
90
91 /*
92 * @unimplemented
93 */
94 int
95 STDCALL
96 SetPolyFillMode(HDC hdc,
97 int iPolyFillMode)
98 {
99 /* FIXME share memory */
100 return NtGdiSetPolyFillMode(hdc, iPolyFillMode);
101 }
102
103 /*
104 * @unimplemented
105 */
106 int
107 STDCALL
108 SetROP2(HDC hdc,
109 int fnDrawMode)
110 {
111 UNIMPLEMENTED;
112 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
113 return 0;
114 }
115
116 /*
117 * @unimplemented
118 */
119 int
120 STDCALL
121 SetStretchBltMode(HDC hdc, int iStretchMode)
122 {
123 /* FIXME share memory */
124 return NtGdiSetStretchBltMode(hdc, iStretchMode);
125 }
126
127 /*
128 * @unimplemented
129 */
130 BOOL
131 STDCALL
132 SetRectRgn(HRGN hrgn,
133 int nLeftRect,
134 int nTopRect,
135 int nRightRect,
136 int nBottomRect)
137 {
138 /* FIXME metadc stuff */
139 return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
140 }
141
142 /*
143 * @unimplemented
144 */
145 UINT
146 STDCALL
147 SetTextAlign(HDC hdc,
148 UINT fMode)
149 {
150 /* FIXME share memory */
151 return NtGdiSetTextAlign(hdc, fMode);
152 }
153
154 /*
155 * @unimplemented
156 */
157 BOOL
158 STDCALL
159 SetViewportExtEx(HDC hdc,
160 int nXExtent,
161 int nYExtent,
162 LPSIZE lpSize)
163 {
164 /* FIXME share memory */
165 return NtGdiSetViewportExtEx(hdc, nXExtent, nYExtent, lpSize);
166 }
167
168 /*
169 * @unimplemented
170 */
171 BOOL
172 STDCALL
173 SetWindowOrgEx(HDC hdc,
174 int X,
175 int Y,
176 LPPOINT lpPoint)
177 {
178 /* FIXME share memory */
179 return NtGdiSetWindowOrgEx(hdc,X,Y,lpPoint);
180 }
181
182 /*
183 * @unimplemented
184 */
185 BOOL
186 STDCALL
187 SetWindowExtEx(HDC hdc,
188 int nXExtent,
189 int nYExtent,
190 LPSIZE lpSize)
191 {
192 /* FIXME share memory */
193 return NtGdiSetWindowExtEx(hdc, nXExtent, nYExtent, lpSize);
194 }
195
196 /*
197 * @unimplemented
198 */
199 BOOL
200 STDCALL
201 SetViewportOrgEx(HDC hdc,
202 int X,
203 int Y,
204 LPPOINT lpPoint)
205 {
206 /* FIXME share memory */
207 return NtGdiSetViewportOrgEx(hdc,X,Y,lpPoint);
208 }
209
210 /*
211 * @unimplemented
212 */
213 BOOL
214 STDCALL
215 SetBrushOrgEx(HDC hdc,
216 int nXOrg,
217 int nYOrg,
218 LPPOINT lppt)
219 {
220 /* FIXME share memory */
221 return NtGdiSetBrushOrg(hdc,nXOrg,nYOrg,lppt);
222 }
223
224 /*
225 * @unimplemented
226 */
227 BOOL
228 STDCALL
229 PtInRegion(IN HRGN hrgn,
230 int x,
231 int y)
232 {
233 /* FIXME some stuff at user mode need be fixed */
234 return NtGdiPtInRegion(hrgn,x,y);
235 }
236
237 /*
238 * @unimplemented
239 */
240 BOOL
241 STDCALL
242 RectInRegion(HRGN hrgn,
243 LPCRECT prcl)
244 {
245 /* FIXME some stuff at user mode need be fixed */
246 return NtGdiRectInRegion(hrgn, (LPRECT) prcl);
247 }
248
249 /*
250 * @unimplemented
251 */
252 BOOL
253 STDCALL
254 RestoreDC(IN HDC hdc,
255 IN INT iLevel)
256 {
257 /* FIXME Sharememory */
258 return NtGdiRestoreDC(hdc, iLevel);
259 }
260
261 /*
262 * @unimplemented
263 */
264 INT
265 STDCALL
266 SaveDC(IN HDC hdc)
267 {
268 /* FIXME Sharememory */
269 return NtGdiSaveDC(hdc);
270 }
271
272
273
274 /*
275 * @unimplemented
276 */
277 BOOL
278 STDCALL
279 CancelDC(HDC hdc)
280 {
281 UNIMPLEMENTED;
282 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
283 return FALSE;
284 }
285
286
287 /*
288 * @unimplemented
289 */
290 int
291 STDCALL
292 DrawEscape(HDC hdc,
293 int a1,
294 int a2,
295 LPCSTR a3)
296 {
297 UNIMPLEMENTED;
298 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
299 return 0;
300 }
301
302
303 /*
304 * @unimplemented
305 */
306 int
307 STDCALL
308 EnumObjects(HDC hdc,
309 int a1,
310 GOBJENUMPROC a2,
311 LPARAM a3)
312 {
313 UNIMPLEMENTED;
314 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
315 return 0;
316 }
317
318 /*
319 * @unimplemented
320 */
321 int
322 STDCALL
323 Escape(HDC hdc, INT escape, INT in_count, LPCSTR in_data, LPVOID out_data)
324 {
325 UNIMPLEMENTED;
326 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
327 return 0;
328 }
329
330 /*
331 * @unimplemented
332 */
333 HRGN
334 STDCALL
335 ExtCreateRegion(
336 CONST XFORM * a0,
337 DWORD a1,
338 CONST RGNDATA * a2
339 )
340 {
341 UNIMPLEMENTED;
342 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
343 return 0;
344 }
345
346
347 /*
348 * @implemented
349 */
350 UINT
351 STDCALL
352 GetBoundsRect(
353 HDC hdc,
354 LPRECT lprcBounds,
355 UINT flags
356 )
357 {
358 return NtGdiGetBoundsRect(hdc,lprcBounds,flags & DCB_RESET);
359 }
360
361
362 /*
363 * @implemented
364 */
365 int
366 STDCALL
367 GetMetaRgn(HDC hdc,
368 HRGN hrgn)
369 {
370 return NtGdiGetRandomRgn(hdc,hrgn,2);
371 }
372
373
374 /*
375 * @unimplemented
376 */
377 UINT
378 STDCALL
379 GetMetaFileBitsEx(
380 HMETAFILE a0,
381 UINT a1,
382 LPVOID a2
383 )
384 {
385 UNIMPLEMENTED;
386 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
387 return 0;
388 }
389
390
391
392 /*
393 * @unimplemented
394 */
395 DWORD
396 STDCALL
397 GetFontLanguageInfo(
398 HDC hDc
399 )
400 {
401 UNIMPLEMENTED;
402 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
403 return 0;
404 }
405
406 /*
407 * @unimplemented
408 */
409 BOOL
410 STDCALL
411 PlayMetaFile(
412 HDC a0,
413 HMETAFILE a1
414 )
415 {
416 UNIMPLEMENTED;
417 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
418 return FALSE;
419 }
420
421 /*
422 * @unimplemented
423 */
424 BOOL
425 STDCALL
426 ResizePalette(
427 HPALETTE a0,
428 UINT a1
429 )
430 {
431 UNIMPLEMENTED;
432 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
433 return FALSE;
434 }
435
436 /*
437 * @unimplemented
438 */
439 int
440 STDCALL
441 SetMetaRgn(
442 HDC hdc
443 )
444 {
445 UNIMPLEMENTED;
446 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
447 return 0;
448 }
449
450 /*
451 * @implemented
452 */
453 UINT
454 STDCALL
455 SetBoundsRect(HDC hdc,
456 CONST RECT *prc,
457 UINT flags)
458 {
459 /* FIXME add check for vaildate the flags */
460 return NtGdiSetBoundsRect(hdc, (LPRECT)prc, flags);
461 }
462
463
464 /*
465 * @unimplemented
466 */
467 DWORD
468 STDCALL
469 SetMapperFlags(
470 HDC a0,
471 DWORD a1
472 )
473 {
474 UNIMPLEMENTED;
475 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
476 return 0;
477 }
478
479 /*
480 * @unimplemented
481 */
482 HMETAFILE
483 STDCALL
484 SetMetaFileBitsEx(
485 UINT a0,
486 CONST BYTE *a1
487 )
488 {
489 UNIMPLEMENTED;
490 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
491 return 0;
492 }
493
494 /*
495 * @unimplemented
496 */
497 BOOL
498 STDCALL
499 SetTextJustification(
500 HDC a0,
501 int a1,
502 int a2
503 )
504 {
505 UNIMPLEMENTED;
506 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
507 return FALSE;
508 }
509
510 /*
511 * @unimplemented
512 */
513 BOOL
514 STDCALL
515 UpdateColors(
516 HDC hdc
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 PlayMetaFileRecord(
531 HDC a0,
532 LPHANDLETABLE a1,
533 LPMETARECORD a2,
534 UINT a3
535 )
536 {
537 UNIMPLEMENTED;
538 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
539 return FALSE;
540 }
541
542
543 /*
544 * @unimplemented
545 */
546 BOOL
547 STDCALL
548 EnumMetaFile(
549 HDC a0,
550 HMETAFILE a1,
551 MFENUMPROC a2,
552 LPARAM a3
553 )
554 {
555 UNIMPLEMENTED;
556 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
557 return FALSE;
558 }
559
560 /*
561 * @unimplemented
562 */
563 BOOL
564 STDCALL
565 DeleteEnhMetaFile(
566 HENHMETAFILE a0
567 )
568 {
569 UNIMPLEMENTED;
570 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
571 return FALSE;
572 }
573
574 /*
575 * @unimplemented
576 */
577 BOOL
578 STDCALL
579 EnumEnhMetaFile(
580 HDC a0,
581 HENHMETAFILE a1,
582 ENHMFENUMPROC a2,
583 LPVOID a3,
584 CONST RECT *a4
585 )
586 {
587 UNIMPLEMENTED;
588 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
589 return FALSE;
590 }
591
592 /*
593 * @unimplemented
594 */
595 UINT
596 STDCALL
597 GetEnhMetaFileBits(
598 HENHMETAFILE a0,
599 UINT a1,
600 LPBYTE a2
601 )
602 {
603 UNIMPLEMENTED;
604 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
605 return 0;
606 }
607
608
609 /*
610 * @unimplemented
611 */
612 UINT
613 STDCALL
614 GetEnhMetaFileHeader(
615 HENHMETAFILE a0,
616 UINT a1,
617 LPENHMETAHEADER a2
618 )
619 {
620 UNIMPLEMENTED;
621 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
622 return 0;
623 }
624
625 /*
626 * @unimplemented
627 */
628 UINT
629 STDCALL
630 GetEnhMetaFilePaletteEntries(
631 HENHMETAFILE a0,
632 UINT a1,
633 LPPALETTEENTRY a2
634 )
635 {
636 UNIMPLEMENTED;
637 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
638 return 0;
639 }
640
641 /*
642 * @unimplemented
643 */
644 UINT
645 STDCALL
646 GetWinMetaFileBits(
647 HENHMETAFILE a0,
648 UINT a1,
649 LPBYTE a2,
650 INT a3,
651 HDC a4
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 PlayEnhMetaFile(
666 HDC a0,
667 HENHMETAFILE a1,
668 CONST RECT *a2
669 )
670 {
671 UNIMPLEMENTED;
672 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
673 return FALSE;
674 }
675
676
677 /*
678 * @unimplemented
679 */
680 BOOL
681 STDCALL
682 PlayEnhMetaFileRecord(
683 HDC a0,
684 LPHANDLETABLE a1,
685 CONST ENHMETARECORD *a2,
686 UINT a3
687 )
688 {
689 UNIMPLEMENTED;
690 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
691 return FALSE;
692 }
693
694
695 /*
696 * @unimplemented
697 */
698 HENHMETAFILE
699 STDCALL
700 SetEnhMetaFileBits(
701 UINT a0,
702 CONST BYTE *a1
703 )
704 {
705 UNIMPLEMENTED;
706 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
707 return 0;
708 }
709
710
711 /*
712 * @unimplemented
713 */
714 HENHMETAFILE
715 STDCALL
716 SetWinMetaFileBits(
717 UINT a0,
718 CONST BYTE *a1,
719 HDC a2,
720 CONST METAFILEPICT *a3)
721 {
722 UNIMPLEMENTED;
723 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
724 return 0;
725 }
726
727
728 /*
729 * @unimplemented
730 */
731 BOOL
732 STDCALL
733 GdiComment(
734 HDC hDC,
735 UINT bytes,
736 CONST BYTE *buffer
737 )
738 {
739 #if 0
740 if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_EMF)
741 {
742 PLDC pLDC = GdiGetLDC(hDC);
743 if ( !pLDC )
744 {
745 SetLastError(ERROR_INVALID_HANDLE);
746 return FALSE;
747 }
748 if (pLDC->iType == LDC_EMFLDC)
749 { // Wine port
750 return EMFDRV_GdiComment( hDC, bytes, buffer );
751 }
752 }
753 #endif
754 return FALSE;
755 }
756
757
758 /*
759 * @unimplemented
760 */
761 BOOL
762 STDCALL
763 AngleArc(
764 HDC hdc,
765 int a1,
766 int a2,
767 DWORD a3,
768 FLOAT a4,
769 FLOAT a5
770 )
771 {
772 UNIMPLEMENTED;
773 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
774 return FALSE;
775 }
776
777
778 /*
779 * @unimplemented
780 */
781 BOOL
782 STDCALL
783 SetColorAdjustment(
784 HDC hdc,
785 CONST COLORADJUSTMENT *a1
786 )
787 {
788 UNIMPLEMENTED;
789 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
790 return FALSE;
791 }
792
793 /*
794 * @unimplemented
795 */
796 int
797 STDCALL
798 EndDoc(
799 HDC hdc
800 )
801 {
802 UNIMPLEMENTED;
803 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
804 return 0;
805 }
806
807
808 /*
809 * @unimplemented
810 */
811 int
812 STDCALL
813 StartPage(
814 HDC hdc
815 )
816 {
817 UNIMPLEMENTED;
818 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
819 return 0;
820 }
821
822
823 /*
824 * @unimplemented
825 */
826 int
827 STDCALL
828 EndPage(
829 HDC hdc
830 )
831 {
832 UNIMPLEMENTED;
833 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
834 return 0;
835 }
836
837
838 /*
839 * @unimplemented
840 */
841 int
842 STDCALL
843 AbortDoc(
844 HDC hdc
845 )
846 {
847 UNIMPLEMENTED;
848 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
849 return 0;
850 }
851
852
853 /*
854 * @unimplemented
855 */
856 int
857 STDCALL
858 SetAbortProc(
859 HDC hdc,
860 ABORTPROC a1
861 )
862 {
863 UNIMPLEMENTED;
864 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
865 return 0;
866 }
867
868
869 /*
870 * @unimplemented
871 */
872 BOOL
873 STDCALL
874 ScaleViewportExtEx(
875 HDC a0,
876 int a1,
877 int a2,
878 int a3,
879 int a4,
880 LPSIZE a5
881 )
882 {
883 UNIMPLEMENTED;
884 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
885 return FALSE;
886 }
887
888
889 /*
890 * @unimplemented
891 */
892 BOOL
893 STDCALL
894 ScaleWindowExtEx(
895 HDC a0,
896 int a1,
897 int a2,
898 int a3,
899 int a4,
900 LPSIZE a5
901 )
902 {
903 UNIMPLEMENTED;
904 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
905 return FALSE;
906 }
907
908
909 /*
910 * @implemented
911 */
912 BOOL
913 STDCALL
914 UnrealizeObject(HGDIOBJ hgdiobj)
915 {
916 BOOL retValue = TRUE;
917
918 if (GDI_HANDLE_GET_TYPE(hgdiobj) != GDI_OBJECT_TYPE_BRUSH)
919 {
920 retValue = NtGdiUnrealizeObject(hgdiobj);
921 }
922
923 return retValue;
924 }
925
926
927 /*
928 * @implemented
929 */
930 BOOL
931 STDCALL
932 GdiFlush()
933 {
934 NtGdiFlush();
935 return TRUE;
936 }
937
938
939 /*
940 * @unimplemented
941 */
942 int
943 STDCALL
944 SetICMMode(
945 HDC a0,
946 int a1
947 )
948 {
949 UNIMPLEMENTED;
950 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
951 return 0;
952 }
953
954
955 /*
956 * @unimplemented
957 */
958 BOOL
959 STDCALL
960 CheckColorsInGamut(
961 HDC a0,
962 LPVOID a1,
963 LPVOID a2,
964 DWORD a3
965 )
966 {
967 UNIMPLEMENTED;
968 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
969 return FALSE;
970 }
971
972
973 /*
974 * @unimplemented
975 */
976 HCOLORSPACE
977 STDCALL
978 GetColorSpace(HDC hDc)
979 {
980 UNIMPLEMENTED;
981 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
982 return 0;
983 }
984
985
986 /*
987 * @unimplemented
988 */
989 HCOLORSPACE
990 STDCALL
991 SetColorSpace(
992 HDC a0,
993 HCOLORSPACE a1
994 )
995 {
996 UNIMPLEMENTED;
997 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
998 return FALSE;
999 }
1000
1001 /*
1002 * @implemented
1003 */
1004 BOOL
1005 STDCALL
1006 GetDeviceGammaRamp( HDC hdc,
1007 LPVOID lpGammaRamp)
1008 {
1009 BOOL retValue = FALSE;
1010 if (lpGammaRamp == NULL)
1011 {
1012 SetLastError(ERROR_INVALID_PARAMETER);
1013 }
1014 else
1015 {
1016 retValue = NtGdiGetDeviceGammaRamp(hdc,lpGammaRamp);
1017 }
1018
1019 return retValue;
1020 }
1021
1022 /*
1023 * @implemented
1024 */
1025 BOOL
1026 STDCALL
1027 SetDeviceGammaRamp(HDC hdc,
1028 LPVOID lpGammaRamp)
1029 {
1030 BOOL retValue = FALSE;
1031
1032 if (lpGammaRamp)
1033 {
1034 retValue = NtGdiSetDeviceGammaRamp(hdc, lpGammaRamp);
1035 }
1036 else
1037 {
1038 SetLastError(ERROR_INVALID_PARAMETER);
1039 }
1040
1041 return retValue;
1042 }
1043
1044
1045 /*
1046 * @unimplemented
1047 */
1048 BOOL
1049 STDCALL
1050 ColorMatchToTarget(
1051 HDC a0,
1052 HDC a1,
1053 DWORD a2
1054 )
1055 {
1056 UNIMPLEMENTED;
1057 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1058 return FALSE;
1059 }
1060
1061
1062 /*
1063 * @unimplemented
1064 */
1065 BOOL
1066 STDCALL
1067 wglCopyContext(
1068 HGLRC a0,
1069 HGLRC a1,
1070 UINT a2
1071 )
1072 {
1073 UNIMPLEMENTED;
1074 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1075 return FALSE;
1076 }
1077
1078
1079 /*
1080 * @unimplemented
1081 */
1082 HGLRC
1083 STDCALL
1084 wglCreateContext(
1085 HDC hDc
1086 )
1087 {
1088 UNIMPLEMENTED;
1089 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1090 return 0;
1091 }
1092
1093
1094 /*
1095 * @unimplemented
1096 */
1097 HGLRC
1098 STDCALL
1099 wglCreateLayerContext(
1100 HDC hDc,
1101 int a1
1102 )
1103 {
1104 UNIMPLEMENTED;
1105 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1106 return 0;
1107 }
1108
1109
1110 /*
1111 * @unimplemented
1112 */
1113 BOOL
1114 STDCALL
1115 wglDeleteContext(
1116 HGLRC a
1117 )
1118 {
1119 UNIMPLEMENTED;
1120 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1121 return FALSE;
1122 }
1123
1124
1125 /*
1126 * @unimplemented
1127 */
1128 HGLRC
1129 STDCALL
1130 wglGetCurrentContext(VOID)
1131 {
1132 UNIMPLEMENTED;
1133 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1134 return 0;
1135 }
1136
1137
1138 /*
1139 * @unimplemented
1140 */
1141 HDC
1142 STDCALL
1143 wglGetCurrentDC(VOID)
1144 {
1145 UNIMPLEMENTED;
1146 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1147 return 0;
1148 }
1149
1150
1151 /*
1152 * @unimplemented
1153 */
1154 PROC
1155 STDCALL
1156 wglGetProcAddress(
1157 LPCSTR a0
1158 )
1159 {
1160 UNIMPLEMENTED;
1161 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1162 return 0;
1163 }
1164
1165
1166 /*
1167 * @unimplemented
1168 */
1169 BOOL
1170 STDCALL
1171 wglMakeCurrent(
1172 HDC a0,
1173 HGLRC a1
1174 )
1175 {
1176 UNIMPLEMENTED;
1177 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1178 return FALSE;
1179 }
1180
1181
1182 /*
1183 * @unimplemented
1184 */
1185 BOOL
1186 STDCALL
1187 wglShareLists(
1188 HGLRC a0,
1189 HGLRC a1
1190 )
1191 {
1192 UNIMPLEMENTED;
1193 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1194 return FALSE;
1195 }
1196
1197
1198 /*
1199 * @unimplemented
1200 */
1201 BOOL
1202 STDCALL
1203 wglDescribeLayerPlane(
1204 HDC a0,
1205 int a1,
1206 int a2,
1207 UINT a3,
1208 LPLAYERPLANEDESCRIPTOR a4
1209 )
1210 {
1211 UNIMPLEMENTED;
1212 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1213 return FALSE;
1214 }
1215
1216
1217 /*
1218 * @unimplemented
1219 */
1220 int
1221 STDCALL
1222 wglSetLayerPaletteEntries(
1223 HDC a0,
1224 int a1,
1225 int a2,
1226 int a3,
1227 CONST COLORREF *a4
1228 )
1229 {
1230 UNIMPLEMENTED;
1231 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1232 return 0;
1233 }
1234
1235
1236 /*
1237 * @unimplemented
1238 */
1239 int
1240 STDCALL
1241 wglGetLayerPaletteEntries(
1242 HDC a0,
1243 int a1,
1244 int a2,
1245 int a3,
1246 COLORREF *a4
1247 )
1248 {
1249 UNIMPLEMENTED;
1250 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1251 return 0;
1252 }
1253
1254
1255 /*
1256 * @unimplemented
1257 */
1258 BOOL
1259 STDCALL
1260 wglRealizeLayerPalette(
1261 HDC a0,
1262 int a1,
1263 BOOL a2
1264 )
1265 {
1266 UNIMPLEMENTED;
1267 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1268 return FALSE;
1269 }
1270
1271
1272 /*
1273 * @unimplemented
1274 */
1275 BOOL
1276 STDCALL
1277 wglSwapLayerBuffers(
1278 HDC a0,
1279 UINT a1
1280 )
1281 {
1282 UNIMPLEMENTED;
1283 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1284 return FALSE;
1285 }
1286
1287
1288 /* === AFTER THIS POINT I GUESS... =========
1289 * (based on stack size in Norlander's .def)
1290 * === WHERE ARE THEY DEFINED? =============
1291 */
1292
1293 /*
1294 * @unimplemented
1295 */
1296 DWORD
1297 STDCALL
1298 IsValidEnhMetaRecord(
1299 DWORD a0,
1300 DWORD a1
1301 )
1302 {
1303 UNIMPLEMENTED;
1304 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1305 return 0;
1306
1307 }
1308
1309 /*
1310 * @unimplemented
1311 */
1312 DWORD
1313 STDCALL
1314 IsValidEnhMetaRecordOffExt(
1315 DWORD a0,
1316 DWORD a1,
1317 DWORD a2,
1318 DWORD a3
1319 )
1320 {
1321 UNIMPLEMENTED;
1322 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1323 return 0;
1324
1325 }
1326
1327 /*
1328 * @unimplemented
1329 */
1330 DWORD
1331 STDCALL
1332 GetGlyphOutlineWow(
1333 DWORD a0,
1334 DWORD a1,
1335 DWORD a2,
1336 DWORD a3,
1337 DWORD a4,
1338 DWORD a5,
1339 DWORD a6
1340 )
1341 {
1342 UNIMPLEMENTED;
1343 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1344 return 0;
1345 }
1346
1347 /*
1348 * @unimplemented
1349 */
1350 DWORD
1351 STDCALL
1352 gdiPlaySpoolStream(
1353 DWORD a0,
1354 DWORD a1,
1355 DWORD a2,
1356 DWORD a3,
1357 DWORD a4,
1358 DWORD a5
1359 )
1360 {
1361 UNIMPLEMENTED;
1362 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1363 return 0;
1364 }
1365
1366 /*
1367 * @unimplemented
1368 */
1369 HANDLE
1370 STDCALL
1371 AddFontMemResourceEx(
1372 PVOID pbFont,
1373 DWORD cbFont,
1374 PVOID pdv,
1375 DWORD *pcFonts
1376 )
1377 {
1378 UNIMPLEMENTED;
1379 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1380 return 0;
1381 }
1382
1383 /*
1384 * @unimplemented
1385 */
1386 int
1387 STDCALL
1388 AddFontResourceTracking(
1389 LPCSTR lpString,
1390 int unknown
1391 )
1392 {
1393 UNIMPLEMENTED;
1394 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1395 return 0;
1396 }
1397
1398
1399
1400 /*
1401 * @unimplemented
1402 */
1403 HBITMAP
1404 STDCALL
1405 ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
1406 {
1407 UNIMPLEMENTED;
1408 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1409 return 0;
1410 }
1411
1412 /*
1413 * @unimplemented
1414 */
1415 HBRUSH
1416 STDCALL
1417 ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags)
1418 {
1419 UNIMPLEMENTED;
1420 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1421 return 0;
1422 }
1423
1424 /*
1425 * @unimplemented
1426 */
1427 BOOL
1428 STDCALL
1429 ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries)
1430 {
1431 UNIMPLEMENTED;
1432 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1433 return 0;
1434 }
1435
1436 /*
1437 * @unimplemented
1438 */
1439 int
1440 STDCALL
1441 EndFormPage(HDC hdc)
1442 {
1443 UNIMPLEMENTED;
1444 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1445 return 0;
1446 }
1447
1448
1449
1450 /*
1451 * @unimplemented
1452 */
1453 DWORD
1454 STDCALL
1455 GdiAddGlsBounds(HDC hdc,LPRECT prc)
1456 {
1457 UNIMPLEMENTED;
1458 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1459 return 0;
1460 }
1461
1462 /*
1463 * @unimplemented
1464 */
1465 BOOL
1466 STDCALL
1467 GdiArtificialDecrementDriver(LPWSTR pDriverName,BOOL unknown)
1468 {
1469 UNIMPLEMENTED;
1470 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1471 return 0;
1472 }
1473
1474 /*
1475 * @unimplemented
1476 */
1477 BOOL
1478 STDCALL
1479 GdiCleanCacheDC(HDC hdc)
1480 {
1481 UNIMPLEMENTED;
1482 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1483 return 0;
1484 }
1485
1486 /*
1487 * @unimplemented
1488 */
1489 HDC
1490 STDCALL
1491 GdiConvertAndCheckDC(HDC hdc)
1492 {
1493 UNIMPLEMENTED;
1494 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1495 return 0;
1496 }
1497
1498 /*
1499 * @unimplemented
1500 */
1501 HENHMETAFILE
1502 STDCALL
1503 GdiConvertEnhMetaFile(HENHMETAFILE hmf)
1504 {
1505 UNIMPLEMENTED;
1506 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1507 return 0;
1508 }
1509
1510 /*
1511 * @unimplemented
1512 */
1513 BOOL
1514 STDCALL
1515 GdiDrawStream(HDC dc, ULONG l, VOID *v)
1516 {
1517 UNIMPLEMENTED;
1518 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1519 return 0;
1520 }
1521
1522 /*
1523 * @unimplemented
1524 */
1525 DWORD
1526 STDCALL
1527 GdiGetCodePage(HDC hdc)
1528 {
1529 UNIMPLEMENTED;
1530 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1531 return 0;
1532 }
1533
1534 /*
1535 * @unimplemented
1536 */
1537 BOOL
1538 STDCALL
1539 GdiIsMetaFileDC(HDC hdc)
1540 {
1541 UNIMPLEMENTED;
1542 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1543 return 0;
1544 }
1545
1546 /*
1547 * @unimplemented
1548 */
1549 BOOL
1550 STDCALL
1551 GdiIsMetaPrintDC(HDC hdc)
1552 {
1553 UNIMPLEMENTED;
1554 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1555 return 0;
1556 }
1557
1558 /*
1559 * @unimplemented
1560 */
1561 BOOL
1562 STDCALL
1563 GdiIsPlayMetafileDC(HDC hdc)
1564 {
1565 UNIMPLEMENTED;
1566 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1567 return 0;
1568 }
1569
1570 /*
1571 * @unimplemented
1572 */
1573 BOOL
1574 STDCALL
1575 GdiValidateHandle(HGDIOBJ hobj)
1576 {
1577 UNIMPLEMENTED;
1578 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1579 return 0;
1580 }
1581
1582 /*
1583 * @unimplemented
1584 */
1585 DWORD
1586 STDCALL
1587 GetBitmapAttributes(HBITMAP hbm)
1588 {
1589 UNIMPLEMENTED;
1590 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1591 return 0;
1592 }
1593
1594 /*
1595 * @unimplemented
1596 */
1597 DWORD
1598 STDCALL
1599 GetBrushAttributes(HBRUSH hbr)
1600 {
1601 UNIMPLEMENTED;
1602 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1603 return 0;
1604 }
1605
1606 /*
1607 * @unimplemented
1608 */
1609 BOOL
1610 STDCALL
1611 GetCharABCWidthsI(HDC hdc,
1612 UINT giFirst,
1613 UINT cgi,
1614 LPWORD pgi,
1615 LPABC lpabc
1616 )
1617 {
1618 UNIMPLEMENTED;
1619 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1620 return 0;
1621 }
1622
1623 /*
1624 * @unimplemented
1625 */
1626 BOOL
1627 STDCALL
1628 GetCharWidthI(HDC hdc,
1629 UINT giFirst,
1630 UINT cgi,
1631 LPWORD pgi,
1632 LPINT lpBuffer
1633 )
1634 {
1635 UNIMPLEMENTED;
1636 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1637 return 0;
1638 }
1639
1640
1641
1642 /*
1643 * @implemented
1644 */
1645 ULONG
1646 STDCALL
1647 GetEUDCTimeStamp(VOID)
1648 {
1649 return NtGdiGetEudcTimeStampEx(NULL,0,TRUE);
1650 }
1651
1652 /*
1653 * @implemented
1654 */
1655 ULONG
1656 STDCALL
1657 GetFontAssocStatus(HDC hdc)
1658 {
1659 ULONG retValue = 0;
1660
1661 if (hdc)
1662 {
1663 retValue = NtGdiQueryFontAssocInfo(hdc);
1664 }
1665
1666 return retValue;
1667 }
1668
1669 /*
1670 * @unimplemented
1671 */
1672 HFONT
1673 STDCALL
1674 GetHFONT(HDC dc)
1675 {
1676 UNIMPLEMENTED;
1677 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1678 return 0;
1679 }
1680
1681 /*
1682 * @unimplemented
1683 */
1684 DWORD
1685 STDCALL
1686 GetLayout(HDC hdc
1687 )
1688 {
1689 UNIMPLEMENTED;
1690 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1691 return 0;
1692 }
1693
1694 /*
1695 * @implemented
1696 */
1697 BOOL
1698 STDCALL
1699 GetTextExtentExPointWPri(HDC hdc,
1700 LPWSTR lpwsz,
1701 ULONG cwc,
1702 ULONG dxMax,
1703 ULONG *pcCh,
1704 PULONG pdxOut,
1705 LPSIZE psize)
1706 {
1707 return NtGdiGetTextExtentExW(hdc,lpwsz,cwc,dxMax,pcCh,pdxOut,psize,0);
1708 }
1709
1710 /*
1711 * @implemented
1712 */
1713 INT
1714 STDCALL
1715 GetTextFaceAliasW(HDC hdc,
1716 int cChar,
1717 LPWSTR pszOut)
1718 {
1719 INT retValue = 0;
1720 if ((!pszOut) || (cChar))
1721 {
1722 retValue = NtGdiGetTextFaceW(hdc,cChar,pszOut,TRUE);
1723 }
1724 else
1725 {
1726 SetLastError(ERROR_INVALID_PARAMETER);
1727 }
1728 return retValue;
1729 }
1730
1731
1732
1733 /*
1734 * @unimplemented
1735 */
1736 BOOL
1737 STDCALL
1738 MirrorRgn(HWND hwnd,HRGN hrgn)
1739 {
1740 UNIMPLEMENTED;
1741 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1742 return 0;
1743 }
1744
1745
1746
1747 /*
1748 * @unimplemented
1749 */
1750 DWORD
1751 STDCALL
1752 QueryFontAssocStatus(VOID)
1753 {
1754 UNIMPLEMENTED;
1755 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1756 return 0;
1757 }
1758
1759 /*
1760 * @implemented
1761 */
1762 BOOL
1763 STDCALL
1764 RemoveFontMemResourceEx(HANDLE fh)
1765 {
1766 BOOL retValue=0;
1767
1768 if (fh)
1769 {
1770 retValue = NtGdiRemoveFontMemResourceEx(fh);
1771 }
1772 else
1773 {
1774 SetLastError(ERROR_INVALID_PARAMETER);
1775 }
1776 return retValue;
1777 }
1778
1779 /*
1780 * @unimplemented
1781 */
1782 int
1783 STDCALL
1784 RemoveFontResourceTracking(LPCSTR lpString,int unknown)
1785 {
1786 UNIMPLEMENTED;
1787 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1788 return 0;
1789 }
1790
1791 /*
1792 * @unimplemented
1793 */
1794 HBITMAP
1795 STDCALL
1796 SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
1797 {
1798 UNIMPLEMENTED;
1799 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1800 return 0;
1801 }
1802
1803 /*
1804 * @unimplemented
1805 */
1806 HBRUSH
1807 STDCALL
1808 SetBrushAttributes(HBRUSH hbm, DWORD dwFlags)
1809 {
1810 UNIMPLEMENTED;
1811 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1812 return 0;
1813 }
1814
1815 /*
1816 * @unimplemented
1817 */
1818 DWORD
1819 STDCALL
1820 SetLayout(HDC hdc,
1821 DWORD dwLayout)
1822 {
1823 UNIMPLEMENTED;
1824 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1825 return 0;
1826 }
1827
1828 /*
1829 * @unimplemented
1830 */
1831 DWORD
1832 STDCALL
1833 SetLayoutWidth(HDC hdc,LONG wox,DWORD dwLayout)
1834 {
1835 UNIMPLEMENTED;
1836 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1837 return 0;
1838 }
1839
1840
1841
1842 /*
1843 * @implemented
1844 */
1845 int
1846 STDCALL
1847 StartFormPage(HDC hdc)
1848 {
1849 return StartPage(hdc);
1850 }
1851
1852 /*
1853 * @unimplemented
1854 */
1855 VOID
1856 STDCALL
1857 UnloadNetworkFonts(DWORD unknown)
1858 {
1859 UNIMPLEMENTED;
1860 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1861 }
1862
1863 /*
1864 * @implemented
1865 */
1866 BOOL
1867 STDCALL
1868 GetTextExtentExPointI(HDC hdc,
1869 LPWORD pgiIn,
1870 int cgi,
1871 int nMaxExtent,
1872 LPINT lpnFit,
1873 LPINT alpDx,
1874 LPSIZE lpSize)
1875 {
1876 return NtGdiGetTextExtentExW(hdc,pgiIn,cgi,nMaxExtent,(ULONG *)lpnFit, (PULONG) alpDx,lpSize,1);
1877 }
1878
1879 /*
1880 * @implemented
1881 */
1882 BOOL
1883 STDCALL
1884 GetTextExtentPointI(HDC hdc,
1885 LPWORD pgiIn,
1886 int cgi,
1887 LPSIZE lpSize)
1888 {
1889 return NtGdiGetTextExtent(hdc,pgiIn,cgi,lpSize,2);
1890 }
1891
1892
1893
1894
1895
1896 /*
1897 * @unimplemented
1898 */
1899 BOOL
1900 STDCALL
1901 GdiRealizationInfo(HDC hdc,
1902 PREALIZATION_INFO pri)
1903 {
1904 UNIMPLEMENTED;
1905 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1906 return 0;
1907 }
1908
1909
1910
1911 /*
1912 * @unimplemented
1913 */
1914 BOOL
1915 STDCALL
1916 GetETM(HDC hdc,
1917 EXTTEXTMETRIC *petm)
1918 {
1919 UNIMPLEMENTED;
1920 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1921 return 0;
1922 }
1923
1924 /*
1925 * @unimplemented
1926 */
1927 BOOL
1928 STDCALL
1929 GdiAddGlsRecord(HDC hdc,
1930 DWORD unknown1,
1931 LPCSTR unknown2,
1932 LPRECT unknown3)
1933 {
1934 UNIMPLEMENTED;
1935 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1936 return 0;
1937 }
1938
1939 /*
1940 * @unimplemented
1941 */
1942 HANDLE
1943 STDCALL
1944 GdiConvertMetaFilePict(HGLOBAL hMem)
1945 {
1946 UNIMPLEMENTED;
1947 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1948 return 0;
1949 }
1950
1951 /*
1952 * @implemented
1953 */
1954 DEVMODEW *
1955 STDCALL
1956 GdiConvertToDevmodeW(DEVMODEA *dm)
1957 {
1958 LPDEVMODEW dmw;
1959
1960 dmw = HEAP_alloc(sizeof(DEVMODEW));
1961 #define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, (LPSTR)dm->f, len, dmw->f, len )
1962 #define COPYN(f) dmw->f = dm->f
1963 COPYS(dmDeviceName, CCHDEVICENAME );
1964 COPYN(dmSpecVersion);
1965 COPYN(dmDriverVersion);
1966 switch ( dm->dmSize )
1967 {
1968 case SIZEOF_DEVMODEA_300:
1969 dmw->dmSize = SIZEOF_DEVMODEW_300;
1970 break;
1971 case SIZEOF_DEVMODEA_400:
1972 dmw->dmSize = SIZEOF_DEVMODEW_400;
1973 break;
1974 case SIZEOF_DEVMODEA_500:
1975 default: /* FIXME what to do??? */
1976 dmw->dmSize = SIZEOF_DEVMODEW_500;
1977 break;
1978 }
1979 COPYN(dmDriverExtra);
1980 COPYN(dmFields);
1981 COPYN(dmPosition.x);
1982 COPYN(dmPosition.y);
1983 COPYN(dmScale);
1984 COPYN(dmCopies);
1985 COPYN(dmDefaultSource);
1986 COPYN(dmPrintQuality);
1987 COPYN(dmColor);
1988 COPYN(dmDuplex);
1989 COPYN(dmYResolution);
1990 COPYN(dmTTOption);
1991 COPYN(dmCollate);
1992 COPYS(dmFormName,CCHFORMNAME);
1993 COPYN(dmLogPixels);
1994 COPYN(dmBitsPerPel);
1995 COPYN(dmPelsWidth);
1996 COPYN(dmPelsHeight);
1997 COPYN(dmDisplayFlags); // aka dmNup
1998 COPYN(dmDisplayFrequency);
1999
2000 if ( dm->dmSize <= SIZEOF_DEVMODEA_300 )
2001 {
2002 return dmw; // we're done with 0x300 fields
2003 }
2004
2005 COPYN(dmICMMethod);
2006 COPYN(dmICMIntent);
2007 COPYN(dmMediaType);
2008 COPYN(dmDitherType);
2009 COPYN(dmReserved1);
2010 COPYN(dmReserved2);
2011
2012 if ( dm->dmSize <= SIZEOF_DEVMODEA_400 )
2013 {
2014 return dmw; // we're done with 0x400 fields
2015 }
2016
2017 COPYN(dmPanningWidth);
2018 COPYN(dmPanningHeight);
2019
2020 return dmw;
2021
2022 #undef COPYN
2023 #undef COPYS
2024 }
2025
2026 /*
2027 * @unimplemented
2028 */
2029 HENHMETAFILE
2030 STDCALL
2031 GdiCreateLocalEnhMetaFile(HENHMETAFILE hmo)
2032 {
2033 UNIMPLEMENTED;
2034 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2035 return 0;
2036 }
2037
2038 /*
2039 * @unimplemented
2040 */
2041 METAFILEPICT *
2042 STDCALL
2043 GdiCreateLocalMetaFilePict(HENHMETAFILE hmo)
2044 {
2045 UNIMPLEMENTED;
2046 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2047 return 0;
2048 }
2049
2050
2051 /*
2052 * @unimplemented
2053 */
2054 HANDLE
2055 STDCALL
2056 GdiGetSpoolFileHandle(LPWSTR pwszPrinterName,
2057 LPDEVMODEW pDevmode,
2058 LPWSTR pwszDocName)
2059 {
2060 UNIMPLEMENTED;
2061 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2062 return 0;
2063 }
2064
2065 /*
2066 * @unimplemented
2067 */
2068 BOOL
2069 STDCALL
2070 GdiDeleteSpoolFileHandle(HANDLE SpoolFileHandle)
2071 {
2072 UNIMPLEMENTED;
2073 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2074 return 0;
2075 }
2076
2077 /*
2078 * @unimplemented
2079 */
2080 DWORD
2081 STDCALL
2082 GdiGetPageCount(HANDLE SpoolFileHandle)
2083 {
2084 UNIMPLEMENTED;
2085 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2086 return 0;
2087 }
2088
2089 /*
2090 * @unimplemented
2091 */
2092 HDC
2093 STDCALL
2094 GdiGetDC(HANDLE SpoolFileHandle)
2095 {
2096 UNIMPLEMENTED;
2097 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2098 return 0;
2099 }
2100
2101 /*
2102 * @unimplemented
2103 */
2104 HANDLE
2105 STDCALL
2106 GdiGetPageHandle(HANDLE SpoolFileHandle,
2107 DWORD Page,
2108 LPDWORD pdwPageType)
2109 {
2110 UNIMPLEMENTED;
2111 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2112 return 0;
2113 }
2114
2115 /*
2116 * @unimplemented
2117 */
2118 BOOL
2119 STDCALL
2120 GdiStartDocEMF(HANDLE SpoolFileHandle,
2121 DOCINFOW *pDocInfo)
2122 {
2123 UNIMPLEMENTED;
2124 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2125 return 0;
2126 }
2127
2128 /*
2129 * @unimplemented
2130 */
2131 BOOL
2132 STDCALL
2133 GdiStartPageEMF(HANDLE SpoolFileHandle)
2134 {
2135 UNIMPLEMENTED;
2136 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2137 return 0;
2138 }
2139
2140 /*
2141 * @unimplemented
2142 */
2143 BOOL
2144 STDCALL
2145 GdiPlayPageEMF(HANDLE SpoolFileHandle,
2146 HANDLE hemf,
2147 RECT *prectDocument,
2148 RECT *prectBorder,
2149 RECT *prectClip)
2150 {
2151 UNIMPLEMENTED;
2152 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2153 return 0;
2154 }
2155
2156 /*
2157 * @unimplemented
2158 */
2159 BOOL
2160 STDCALL
2161 GdiEndPageEMF(HANDLE SpoolFileHandle,
2162 DWORD dwOptimization)
2163 {
2164 UNIMPLEMENTED;
2165 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2166 return 0;
2167 }
2168
2169 /*
2170 * @unimplemented
2171 */
2172 BOOL
2173 STDCALL
2174 GdiEndDocEMF(HANDLE SpoolFileHandle)
2175 {
2176 UNIMPLEMENTED;
2177 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2178 return 0;
2179 }
2180
2181 /*
2182 * @unimplemented
2183 */
2184 BOOL
2185 STDCALL
2186 GdiGetDevmodeForPage(HANDLE SpoolFileHandle,
2187 DWORD dwPageNumber,
2188 PDEVMODEW *pCurrDM,
2189 PDEVMODEW *pLastDM)
2190 {
2191 UNIMPLEMENTED;
2192 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2193 return 0;
2194 }
2195
2196 /*
2197 * @unimplemented
2198 */
2199 BOOL
2200 STDCALL
2201 GdiResetDCEMF(HANDLE SpoolFileHandle,
2202 PDEVMODEW pCurrDM)
2203 {
2204 UNIMPLEMENTED;
2205 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2206 return 0;
2207 }
2208
2209
2210 HBITMAP
2211 STDCALL
2212 CreateDIBitmap(HDC hDc,
2213 const BITMAPINFOHEADER *Header,
2214 DWORD Init, LPCVOID Bits, const BITMAPINFO *Data,
2215 UINT ColorUse)
2216 {
2217 /* FIMXE we need do more thing in user mode */
2218 return NtGdiCreateDIBitmap(hDc, Header, Init, Bits, Data, ColorUse);
2219 }
2220
2221 /*
2222 * @unimplemented
2223 */
2224 INT
2225 STDCALL
2226 CombineRgn(HRGN hDest,
2227 HRGN hSrc1,
2228 HRGN hSrc2,
2229 INT CombineMode)
2230 {
2231 /* FIXME some part should be done in user mode */
2232 return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
2233 }
2234
2235 /*
2236 * @unimplemented
2237 */
2238 HBITMAP STDCALL
2239 CreateBitmap(INT Width,
2240 INT Height,
2241 UINT Planes,
2242 UINT BitsPixel,
2243 PCVOID pUnsafeBits)
2244 {
2245 /* FIXME some part should be done in user mode */
2246 return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
2247 }
2248
2249 /*
2250 * @unimplemented
2251 */
2252 LPWSTR STDCALL
2253 EngGetDriverName(HDEV hdev)
2254 {
2255 UNIMPLEMENTED;
2256 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2257 return 0;
2258 }
2259
2260 /*
2261 * @unimplemented
2262 */
2263 ULONG STDCALL
2264 XLATEOBJ_iXlate(XLATEOBJ *XlateObj,
2265 ULONG Color)
2266 {
2267 UNIMPLEMENTED;
2268 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2269 return 0;
2270 }
2271
2272 /*
2273 * @unimplemented
2274 */
2275 ULONG *
2276 STDCALL
2277 XLATEOBJ_piVector(XLATEOBJ *XlateObj)
2278 {
2279 return XlateObj->pulXlate;
2280 }
2281
2282 /*
2283 * @unimplemented
2284 */
2285 BOOL
2286 STDCALL
2287 GdiPlayEMF(LPWSTR pwszPrinterName,
2288 LPDEVMODEW pDevmode,
2289 LPWSTR pwszDocName,
2290 EMFPLAYPROC pfnEMFPlayFn,
2291 HANDLE hPageQuery
2292 )
2293 {
2294 UNIMPLEMENTED;
2295 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2296 return 0;
2297 }
2298
2299
2300
2301 /*
2302 * @unimplemented
2303 */
2304 BOOL
2305 STDCALL
2306 GdiPlayPrivatePageEMF(HANDLE SpoolFileHandle,
2307 DWORD unknown,
2308 RECT *prectDocument)
2309 {
2310 UNIMPLEMENTED;
2311 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2312 return 0;
2313 }
2314
2315 /*
2316 * @unimplemented
2317 */
2318 VOID STDCALL GdiInitializeLanguagePack(DWORD InitParam)
2319 {
2320 UNIMPLEMENTED;
2321 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2322 }
2323
2324
2325 /*
2326 * @implemented
2327 */
2328 INT
2329 STDCALL
2330 ExcludeClipRect(IN HDC hdc, IN INT xLeft, IN INT yTop, IN INT xRight, IN INT yBottom)
2331 {
2332 /* FIXME some part need be done on user mode size */
2333 return NtGdiExcludeClipRect(hdc, xLeft, yTop, xRight, yBottom);
2334 }
2335
2336 /*
2337 * @implemented
2338 */
2339 INT
2340 STDCALL
2341 ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode)
2342 {
2343 /* FIXME some part need be done on user mode size */
2344 return NtGdiExtSelectClipRgn(hdc,hrgn, iMode);
2345 }
2346
2347 /*
2348 * @implemented
2349 */
2350 BOOL
2351 STDCALL
2352 GdiGradientFill(
2353 IN HDC hdc,
2354 IN PTRIVERTEX pVertex,
2355 IN ULONG nVertex,
2356 IN PVOID pMesh,
2357 IN ULONG nMesh,
2358 IN ULONG ulMode)
2359 {
2360 /* FIXME some part need be done in user mode */
2361 return NtGdiGradientFill(hdc, pVertex, nVertex, pMesh, nMesh, ulMode);
2362 }
2363
2364
2365 /*
2366 * @implemented
2367 */
2368 BOOL
2369 STDCALL
2370 GdiTransparentBlt(IN HDC hdcDst,
2371 IN INT xDst,
2372 IN INT yDst,
2373 IN INT cxDst,
2374 IN INT cyDst,
2375 IN HDC hdcSrc,
2376 IN INT xSrc,
2377 IN INT ySrc,
2378 IN INT cxSrc,
2379 IN INT cySrc,
2380 IN COLORREF TransColor
2381 )
2382 {
2383 /* FIXME some part need be done in user mode */
2384 return NtGdiTransparentBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcSrc, xSrc, ySrc, cxSrc, cySrc, TransColor);
2385 }
2386
2387 /*
2388 * @unimplemented
2389 */
2390 BOOL
2391 STDCALL
2392 GdiPrinterThunk(
2393 IN HUMPD humpd,
2394 DWORD *status,
2395 DWORD unuse)
2396 {
2397 /* FIXME figout the protypes, the HUMPD are a STRUCT or COM object */
2398 /* status contain some form of return value that being save, what it is I do not known */
2399 /* unsue seam have zero effect, what it is for I do not known */
2400
2401 // ? return NtGdiSetPUMPDOBJ(humpd->0x10,TRUE, humpd, ?) <- blackbox, OpenRCE info, and api hooks for anylaysing;
2402 return FALSE;
2403 }
2404
2405 /*
2406 * @unimplemented
2407 *
2408 */
2409 HBITMAP
2410 STDCALL
2411 GdiConvertBitmapV5(
2412 HBITMAP in_format_BitMap,
2413 HBITMAP src_BitMap,
2414 INT bpp,
2415 INT unuse)
2416 {
2417 /* FIXME guessing the prototypes */
2418
2419 /*
2420 * it have create a new bitmap with desired in format,
2421 * then convert it src_bitmap to new format
2422 * and return it as HBITMAP
2423 */
2424
2425 return FALSE;
2426 }
2427
2428
2429 /*
2430 * @implemented
2431 *
2432 */
2433 COLORREF
2434 STDCALL
2435 GetBkColor(HDC hdc)
2436 {
2437 /* FIXME some part are done in user mode */
2438 return NtGdiGetBkColor(hdc);
2439 }
2440
2441 /*
2442 * @implemented
2443 *
2444 */
2445 int
2446 STDCALL
2447 GetBkMode(HDC hdc)
2448 {
2449 /* FIXME some part are done in user mode */
2450 return NtGdiGetBkMode(hdc);
2451 }
2452
2453 /*
2454 * @implemented
2455 *
2456 */
2457 BOOL
2458 STDCALL
2459 GetBrushOrgEx(HDC hdc,LPPOINT pt)
2460 {
2461 /* FIXME some part are done in user mode */
2462 return NtGdiGetBrushOrgEx(hdc,pt);
2463 }
2464
2465 /*
2466 * @implemented
2467 *
2468 */
2469 BOOL
2470 STDCALL
2471 GetCharABCWidthsFloatW(HDC hdc,UINT FirstChar,UINT LastChar,LPABCFLOAT abcF)
2472 {
2473 /* FIXME some part are done in user mode */
2474 return NtGdiGetCharABCWidthsFloat(hdc, FirstChar, LastChar, abcF);
2475 }
2476
2477 /*
2478 * @implemented
2479 *
2480 */
2481 int
2482 STDCALL
2483 GetDeviceCaps(HDC hdc,
2484 int i)
2485 {
2486 /* FIXME some part need be done in user mode */
2487 return NtGdiGetDeviceCaps(hdc,i);
2488 }
2489
2490
2491 /*
2492 * @implemented
2493 *
2494 */
2495 BOOL
2496 STDCALL
2497 GetCurrentPositionEx(HDC hdc,
2498 LPPOINT lpPoint)
2499 {
2500 /* FIXME some part need be done in user mode */
2501 return NtGdiGetCurrentPositionEx(hdc, lpPoint);
2502 }
2503
2504 /*
2505 * @implemented
2506 *
2507 */
2508 int
2509 STDCALL
2510 GetClipBox(HDC hdc,
2511 LPRECT lprc)
2512 {
2513 /* FIXME some part need be done in user mode */
2514 return NtGdiGetClipBox(hdc, lprc);
2515 }
2516
2517 /*
2518 * @implemented
2519 *
2520 */
2521 BOOL
2522 STDCALL
2523 GetCharWidthFloatW(HDC hdc,
2524 UINT iFirstChar,
2525 UINT iLastChar,
2526 PFLOAT pxBuffer)
2527 {
2528 /* FIXME some part need be done in user mode */
2529 return NtGdiGetCharWidthFloat(hdc, iFirstChar, iLastChar, pxBuffer);
2530 }
2531
2532 /*
2533 * @implemented
2534 *
2535 */
2536 BOOL
2537 STDCALL
2538 GetCharWidth32W(HDC hdc,
2539 UINT iFirstChar,
2540 UINT iLastChar,
2541 LPINT lpBuffer)
2542 {
2543 /* FIXME some part need be done in user mode */
2544 return NtGdiGetCharWidth32(hdc, iFirstChar, iLastChar, lpBuffer);
2545 }
2546
2547 /*
2548 * @implemented
2549 *
2550 */
2551 BOOL
2552 STDCALL
2553 GetCharABCWidths(HDC hdc,
2554 UINT uFirstChar,
2555 UINT uLastChar,
2556 LPABC lpabc)
2557 {
2558 /* FIXME some part need be done in user mode */
2559 return NtGdiGetCharABCWidths(hdc, uFirstChar, uLastChar, lpabc);
2560 }
2561
2562
2563 /*
2564 * @implemented
2565 *
2566 */
2567 DWORD
2568 STDCALL
2569 GetFontData(HDC hdc,
2570 DWORD dwTable,
2571 DWORD dwOffset,
2572 LPVOID lpvBuffer,
2573 DWORD cbData)
2574 {
2575 if (!lpvBuffer)
2576 {
2577 cbData = 0;
2578 }
2579 return NtGdiGetFontData(hdc, dwTable, dwOffset, lpvBuffer, cbData);
2580 }
2581
2582
2583 /*
2584 * @implemented
2585 *
2586 */
2587 DWORD
2588 STDCALL
2589 GetRegionData(HRGN hrgn,
2590 DWORD nCount,
2591 LPRGNDATA lpRgnData)
2592 {
2593 if (!lpRgnData)
2594 {
2595 nCount = 0;
2596 }
2597
2598 return NtGdiGetRegionData(hrgn,nCount,lpRgnData);
2599 }
2600
2601
2602 /*
2603 * @implemented
2604 *
2605 */
2606 INT
2607 STDCALL
2608 GetRgnBox(HRGN hrgn,
2609 LPRECT prcOut)
2610 {
2611 /* FIXME some stuff need be done in user mode */
2612 return NtGdiGetRgnBox(hrgn, prcOut);
2613 }
2614
2615
2616 /*
2617 * @implemented
2618 *
2619 */
2620 INT
2621 STDCALL
2622 OffsetRgn( HRGN hrgn,
2623 int nXOffset,
2624 int nYOffset)
2625 {
2626 /* FIXME some part are done in user mode */
2627 return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
2628 }
2629
2630
2631 INT
2632 STDCALL
2633 GetTextCharsetInfo(HDC hdc,
2634 LPFONTSIGNATURE lpSig,
2635 DWORD dwFlags)
2636 {
2637 /* FIXME some part are done in user mode */
2638 return NtGdiGetTextCharsetInfo(hdc, lpSig, dwFlags);
2639 }
2640
2641
2642
2643 INT
2644 STDCALL
2645 IntersectClipRect(HDC hdc,
2646 int nLeftRect,
2647 int nTopRect,
2648 int nRightRect,
2649 int nBottomRect)
2650 {
2651 /* FIXME some part are done in user mode */
2652 return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
2653 }
2654
2655 INT
2656 STDCALL
2657 OffsetClipRgn(HDC hdc,
2658 int nXOffset,
2659 int nYOffset)
2660 {
2661 /* FIXME some part are done in user mode */
2662 return NtGdiOffsetClipRgn( hdc, nXOffset, nYOffset);
2663 }
2664
2665
2666 INT
2667 STDCALL
2668 NamedEscape(HDC hdc,
2669 PWCHAR pDriver,
2670 INT iEsc,
2671 INT cjIn,
2672 LPSTR pjIn,
2673 INT cjOut,
2674 LPSTR pjOut)
2675 {
2676 /* FIXME metadc, metadc are done most in user mode, and we do not support it
2677 * Windows 2000/XP/Vista ignore the current hdc, that are being pass and always set hdc to NULL
2678 * when it calls to NtGdiExtEscape from NamedEscape
2679 */
2680 return NtGdiExtEscape(NULL,pDriver,wcslen(pDriver),iEsc,cjIn,pjIn,cjOut,pjOut);
2681 }
2682
2683
2684 BOOL
2685 STDCALL
2686 PatBlt(HDC hdc,
2687 int nXLeft,
2688 int nYLeft,
2689 int nWidth,
2690 int nHeight,
2691 DWORD dwRop)
2692 {
2693 /* FIXME some part need be done in user mode */
2694 return NtGdiPatBlt( hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
2695 }
2696
2697 BOOL
2698 STDCALL
2699 PolyPatBlt(IN HDC hdc,
2700 IN DWORD rop4,
2701 IN PPOLYPATBLT pPoly,
2702 IN DWORD Count,
2703 IN DWORD Mode)
2704 {
2705 /* FIXME some part need be done in user mode */
2706 return NtGdiPolyPatBlt(hdc, rop4, pPoly,Count,Mode);
2707 }
2708
2709
2710
2711
2712
2713
2714
2715
2716