source: trunk/src/gdi32/gdi32.cpp@ 3255

Last change on this file since 3255 was 3255, checked in by cbratschi, 25 years ago

dump rop2 mode

File size: 90.1 KB
Line 
1/* $Id: gdi32.cpp,v 1.46 2000-03-28 15:25:47 cbratschi Exp $ */
2
3/*
4 * GDI32 apis
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 * Copyright 1998 Patrick Haller
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include <stdlib.h>
14#include <stdarg.h>
15#include <string.h>
16#include "misc.h"
17#include "callback.h"
18#include "unicode.h"
19#include "dibsect.h"
20#include <codepage.h>
21#include "oslibgpi.h"
22#include "oslibgdi.h"
23
24#define DBG_LOCALLOG DBG_gdi32
25#include "dbglocal.h"
26
27//******************************************************************************
28//******************************************************************************
29BOOL WIN32API GetTextExtentPointA(HDC hdc, LPCSTR lpsz, int cbString, LPSIZE lpSize)
30{
31 BOOL rc;
32
33 lpSize->cx = lpSize->cy = 0;
34 rc = O32_GetTextExtentPoint(hdc, lpsz, cbString, lpSize);
35 dprintf(("GDI32: GetTextExtentPointA of %s returned %d\n", lpsz, rc));
36 return(rc);
37}
38//******************************************************************************
39//******************************************************************************
40COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor)
41{
42 dprintf(("GDI32: SetBkColor to %X\n", crColor));
43 return(O32_SetBkColor(hdc, crColor));
44}
45//******************************************************************************
46//******************************************************************************
47COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor)
48{
49 COLORREF clr;
50
51 clr = O32_SetTextColor(hdc, crColor);
52 dprintf(("GDI32: SetTextColor from %X to %X\n", clr, crColor));
53 return(clr);
54}
55//******************************************************************************
56//******************************************************************************
57
58static hFntDefaultGui = NULL;
59HGDIOBJ WIN32API GetStockObject(int arg1)
60{
61 HGDIOBJ obj;
62
63 switch(arg1)
64 {
65 case DEFAULT_GUI_FONT:
66 if(NULL==hFntDefaultGui)
67 hFntDefaultGui = CreateFontA( 9, 0, 0, 0, FW_MEDIUM, FALSE,
68 FALSE, FALSE, ANSI_CHARSET,
69 OUT_DEFAULT_PRECIS,
70 CLIP_DEFAULT_PRECIS,
71 DEFAULT_QUALITY,
72 FIXED_PITCH|FF_MODERN, "WarpSans");
73 obj = hFntDefaultGui;
74 break;
75 default:
76 obj = O32_GetStockObject(arg1);
77 break;
78 }
79 dprintf(("GDI32: GetStockObject %d returned %X\n", arg1, obj));
80 return(obj);
81}
82//******************************************************************************
83//******************************************************************************
84int WIN32API GetObjectA( HGDIOBJ hObject, int size, void *lpBuffer)
85{
86 int rc;
87
88 if(size == 0 || lpBuffer == NULL) {
89 SetLastError(ERROR_INVALID_PARAMETER);
90 return 0;
91 }
92
93 if(DIBSection::getSection() != NULL)
94 {
95 DIBSection *dsect = DIBSection::find(hObject);
96 if(dsect)
97 {
98 rc = dsect->GetDIBSection(size, lpBuffer);
99 if(rc == 0) {
100 SetLastError(ERROR_INVALID_PARAMETER);
101 return 0;
102 }
103 SetLastError(ERROR_SUCCESS);
104 return rc;
105 }
106 }
107
108 dprintf(("GDI32: GetObject %X %X %X\n", hObject, size, lpBuffer));
109 return O32_GetObject(hObject, size, lpBuffer);
110}
111//******************************************************************************
112//******************************************************************************
113int WIN32API GetObjectW( HGDIOBJ arg1, int arg2, void * arg3)
114{
115 dprintf(("GDI32: GetObjectW %X, %d %X not complete!", arg1, arg2, arg3));
116 return GetObjectA(arg1, arg2, arg3);
117}
118//******************************************************************************
119//******************************************************************************
120DWORD WIN32API GetObjectType( HGDIOBJ arg1)
121{
122 dprintf2(("GDI32: GetObjectType\n"));
123 return O32_GetObjectType(arg1);
124}
125//******************************************************************************
126//******************************************************************************
127BOOL WIN32API DeleteObject(HANDLE hObj)
128{
129 dprintf(("GDI32: DeleteObject %x", hObj));
130 DIBSection::deleteSection((DWORD)hObj);
131 return O32_DeleteObject(hObj);
132}
133//******************************************************************************
134//******************************************************************************
135BOOL WIN32API DeleteDC( HDC hdc)
136{
137 dprintf(("GDI32: DeleteDC %x", hdc));
138 return O32_DeleteDC(hdc);
139}
140//******************************************************************************
141//******************************************************************************
142HBRUSH WIN32API CreatePatternBrush(HBITMAP arg1)
143{
144 HBRUSH brush;
145
146 brush = O32_CreatePatternBrush(arg1);
147 dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", arg1, brush));
148 return(brush);
149}
150//******************************************************************************
151//******************************************************************************
152HPEN WIN32API CreatePen( int fnPenStyle, int nWidth, COLORREF crColor)
153{
154 dprintf(("GDI32: CreatePen\n"));
155
156 //CB: todo: PS_DOT is different in Win32 (. . . . and not - - - -)
157 // Open32 looks like LINETYPE_SHORTDASH instead of LINETYPE_DOT!!!
158 // -> difficult to fix without performance decrease!
159
160 return O32_CreatePen(fnPenStyle,nWidth,crColor);
161}
162//******************************************************************************
163//******************************************************************************
164HPEN WIN32API CreatePenIndirect( const LOGPEN * lplgpn)
165{
166 dprintf(("GDI32: CreatePenIndirect\n"));
167 return O32_CreatePenIndirect(lplgpn);
168}
169//******************************************************************************
170//******************************************************************************
171HBRUSH WIN32API CreateDIBPatternBrushPt( const VOID * arg1, UINT arg2)
172{
173 dprintf(("GDI32: CreateDIBPatternBrushPt\n"));
174 return O32_CreateDIBPatternBrushPt(arg1, arg2);
175}
176//******************************************************************************
177//******************************************************************************
178HDC WIN32API CreateCompatibleDC( HDC hdc)
179{
180 HDC newHdc;
181
182 newHdc = O32_CreateCompatibleDC(hdc);
183 ULONG oldcp = OSLibGpiQueryCp(hdc);
184 if (!oldcp) /* If new DC is to be created */
185 oldcp = GetDisplayCodepage();
186
187 OSLibGpiSetCp(newHdc, oldcp);
188 dprintf(("CreateCompatibleDC %X returned %x", hdc, newHdc));
189 return newHdc;
190}
191//******************************************************************************
192//******************************************************************************
193INT WIN32API StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
194 INT heightDst, INT xSrc, INT ySrc, INT widthSrc,
195 INT heightSrc, const void *bits,
196 const BITMAPINFO *info, UINT wUsage, DWORD dwRop )
197{
198#if 1
199 dprintf(("GDI32: StretchDIBits %x to (%d,%d) (%d,%d) from (%d,%d) (%d,%d), %x %x %x %x", hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc, widthSrc, heightSrc, bits, info, wUsage, dwRop));
200
201 if(wUsage == DIB_PAL_COLORS && info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))
202 {
203 // workaround for open32 bug.
204 // If syscolors > 256 and wUsage == DIB_PAL_COLORS.
205
206 int i;
207 USHORT *pColorIndex = (USHORT *)info->bmiColors;
208 RGBQUAD *pColors = (RGBQUAD *) alloca(info->bmiHeader.biClrUsed *
209 sizeof(RGBQUAD));
210 BITMAPINFO *infoLoc = (BITMAPINFO *) alloca(sizeof(BITMAPINFO) +
211 info->bmiHeader.biClrUsed * sizeof(RGBQUAD));
212
213 memcpy(infoLoc, info, sizeof(BITMAPINFO));
214
215 if(GetDIBColorTable(hdc, 0, info->bmiHeader.biClrUsed, pColors) == 0)
216 return FALSE;
217
218 for(i=0;i<info->bmiHeader.biClrUsed;i++, pColorIndex++)
219 {
220 infoLoc->bmiColors[i] = pColors[*pColorIndex];
221 }
222
223 return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,
224 widthSrc, heightSrc, (void *)bits,
225 (PBITMAPINFO)infoLoc, DIB_RGB_COLORS, dwRop);
226 }
227
228 return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,
229 widthSrc, heightSrc, (void *)bits,
230 (PBITMAPINFO)info, wUsage, dwRop);
231#else
232 dprintf(("GDI32: StretchDIBits\n"));
233 return O32_StretchDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, (void *)arg10, (PBITMAPINFO)arg11, arg12, arg13);
234#endif
235}
236//******************************************************************************
237//******************************************************************************
238BOOL WIN32API StrokeAndFillPath( HDC arg1)
239{
240 dprintf(("GDI32: StrokeAndFillPath\n"));
241 return O32_StrokeAndFillPath(arg1);
242}
243//******************************************************************************
244//******************************************************************************
245BOOL WIN32API StrokePath( HDC arg1)
246{
247 dprintf(("GDI32: StrokePath\n"));
248 return O32_StrokePath(arg1);
249}
250//******************************************************************************
251//******************************************************************************
252HGDIOBJ WIN32API SelectObject(HDC hdc, HGDIOBJ hObj)
253{
254 HGDIOBJ rc;
255
256 dprintf2(("GDI32: SelectObject %x %x", hdc, hObj));
257
258 if(DIBSection::getSection() != NULL)
259 {
260 DIBSection *dsect;
261
262 dsect = DIBSection::find(hdc);
263 if(dsect)
264 {
265 //remove previously selected dibsection
266 dsect->UnSelectDIBObject();
267 }
268 dsect = DIBSection::find((DWORD)hObj);
269 if(dsect)
270 {
271 dsect->SelectDIBObject(hdc);
272 }
273 }
274 rc = O32_SelectObject(hdc, hObj);
275 if(rc != 0 && DIBSection::getSection != NULL)
276 {
277 DIBSection *dsect = DIBSection::find((DWORD)rc);
278 if(dsect)
279 {
280 dsect->UnSelectDIBObject();
281 }
282 }
283 return(rc);
284}
285//******************************************************************************
286//******************************************************************************
287int WIN32API SetBkMode( HDC arg1, int arg2)
288{
289 dprintf(("GDI32: SetBkMode\n"));
290 return O32_SetBkMode(arg1, arg2);
291}
292//******************************************************************************
293//******************************************************************************
294COLORREF WIN32API GetPixel( HDC arg1, int arg2, int arg3)
295{
296//// dprintf(("GDI32: GetPixel\n"));
297 return O32_GetPixel(arg1, arg2, arg3);
298}
299//******************************************************************************
300//******************************************************************************
301COLORREF WIN32API SetPixel( HDC arg1, int arg2, int arg3, COLORREF arg4)
302{
303//// dprintf(("GDI32: SetPixel\n"));
304 return O32_SetPixel(arg1, arg2, arg3, arg4);
305}
306//******************************************************************************
307//Faster version of SetPixel (since it doesn't need to return the original color)
308//Just use SetPixel for now
309//******************************************************************************
310BOOL WIN32API SetPixelV(HDC arg1, int arg2, int arg3, COLORREF arg4)
311{
312 COLORREF rc;
313
314//// dprintf(("GDI32: SetPixelV\n"));
315 rc = O32_SetPixel(arg1, arg2, arg3, arg4);
316 if(rc == GDI_ERROR) // || rc == COLOR_INVALID)
317 return(FALSE);
318 return(TRUE);
319}
320//******************************************************************************
321//******************************************************************************
322BOOL WIN32API GetDCOrgEx(HDC arg1, PPOINT arg2)
323{
324 dprintf(("GDI32: GetDCOrgEx\n"));
325 return O32_GetDCOrgEx(arg1, arg2);
326}
327//******************************************************************************
328//******************************************************************************
329BOOL WIN32API GetWindowExtEx(HDC arg1, PSIZE arg2)
330{
331 dprintf(("GDI32: GetWindowExtEx\n"));
332 return O32_GetWindowExtEx(arg1, arg2);
333}
334//******************************************************************************
335//******************************************************************************
336int WIN32API AbortDoc( HDC arg1)
337{
338 dprintf(("GDI32: AbortDoc"));
339 return O32_AbortDoc(arg1);
340}
341//******************************************************************************
342//******************************************************************************
343BOOL WIN32API AbortPath( HDC arg1)
344{
345 dprintf(("GDI32: AbortPath"));
346 return O32_AbortPath(arg1);
347}
348//******************************************************************************
349//******************************************************************************
350BOOL WIN32API AngleArc( HDC arg1, int arg2, int arg3, DWORD arg4, float arg5, float arg6)
351{
352 dprintf(("GDI32: AngleArc"));
353 return O32_AngleArc(arg1, arg2, arg3, arg4, arg5, arg6);
354}
355//******************************************************************************
356//******************************************************************************
357BOOL WIN32API Arc( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
358{
359 dprintf(("GDI32: Arc"));
360 return O32_Arc(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
361}
362//******************************************************************************
363//******************************************************************************
364BOOL WIN32API ArcTo( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
365{
366 dprintf(("GDI32: ArcTo"));
367 return O32_ArcTo(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
368}
369//******************************************************************************
370//******************************************************************************
371BOOL WIN32API BeginPath( HDC arg1)
372{
373 dprintf(("GDI32: BeginPath"));
374 return O32_BeginPath(arg1);
375}
376//******************************************************************************
377//******************************************************************************
378BOOL WIN32API Chord( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
379{
380 dprintf(("GDI32: Chord"));
381 return O32_Chord(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
382}
383//******************************************************************************
384//******************************************************************************
385BOOL WIN32API CloseFigure( HDC arg1)
386{
387 dprintf(("GDI32: CloseFigure"));
388 return O32_CloseFigure(arg1);
389}
390//******************************************************************************
391//******************************************************************************
392HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH * arg1)
393{
394 dprintf(("GDI32: CreateBrushIndirect"));
395 return O32_CreateBrushIndirect((LPLOGBRUSH)arg1);
396}
397//******************************************************************************
398//******************************************************************************
399HDC WIN32API CreateDCA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput, const DEVMODEA *lpInitData)
400{
401 HDC hdc;
402
403 hdc = O32_CreateDC(lpszDriver, lpszDevice, lpszOutput, lpInitData);
404 dprintf(("GDI32: CreateDCA %s %s %s %x returned %x", lpszDriver, lpszDevice, lpszOutput, lpInitData, hdc));
405 return hdc;
406}
407//******************************************************************************
408//******************************************************************************
409HDC WIN32API CreateDCW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
410{
411 char *astring4, *astring5;
412
413 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
414 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
415 char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
416
417 if(arg4)
418 {
419 astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
420 astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
421 }
422
423 HDC rc;
424 DEVMODEA devmode;
425
426 dprintf(("GDI32: CreateDCW"));
427
428 if(arg4)
429 {
430 strcpy((char*)devmode.dmDeviceName, astring4);
431 strcpy((char*)devmode.dmFormName, astring5);
432
433 devmode.dmSpecVersion = arg4->dmSpecVersion;
434 devmode.dmDriverVersion = arg4->dmDriverVersion;
435 devmode.dmSize = arg4->dmSize;
436 devmode.dmDriverExtra = arg4->dmDriverExtra;
437 devmode.dmFields = arg4->dmFields;
438 devmode.dmOrientation = arg4->dmOrientation;
439 devmode.dmPaperSize = arg4->dmPaperSize;
440 devmode.dmPaperLength = arg4->dmPaperLength;
441 devmode.dmPaperWidth = arg4->dmPaperWidth;
442 devmode.dmScale = arg4->dmScale;
443 devmode.dmCopies = arg4->dmCopies;
444 devmode.dmDefaultSource = arg4->dmDefaultSource;
445 devmode.dmPrintQuality = arg4->dmPrintQuality;
446 devmode.dmColor = arg4->dmColor;
447 devmode.dmDuplex = arg4->dmDuplex;
448 devmode.dmYResolution = arg4->dmYResolution;
449 devmode.dmTTOption = arg4->dmTTOption;
450 devmode.dmCollate = arg4->dmCollate;
451 devmode.dmLogPixels = arg4->dmLogPixels;
452 devmode.dmBitsPerPel = arg4->dmBitsPerPel;
453 devmode.dmPelsWidth = arg4->dmPelsWidth;
454 devmode.dmPelsHeight = arg4->dmPelsHeight;
455 devmode.dmDisplayFlags = arg4->dmDisplayFlags;
456 devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
457 devmode.dmICMMethod = arg4->dmICMMethod;
458 devmode.dmICMIntent = arg4->dmICMIntent;
459 devmode.dmMediaType = arg4->dmMediaType;
460 devmode.dmDitherType = arg4->dmDitherType;
461 devmode.dmReserved1 = arg4->dmReserved1;
462 devmode.dmReserved2 = arg4->dmReserved2;
463 rc = O32_CreateDC(astring1,astring2,astring3,&devmode);
464 }
465 else
466 rc = O32_CreateDC(astring1,astring2,astring3, NULL);
467
468 FreeAsciiString(astring1);
469 FreeAsciiString(astring2);
470 FreeAsciiString(astring3);
471
472 if(arg4)
473 {
474 FreeAsciiString(astring4);
475 FreeAsciiString(astring5);
476 }
477
478 return rc;
479}
480//******************************************************************************
481//******************************************************************************
482HBRUSH WIN32API CreateHatchBrush( int arg1, COLORREF arg2)
483{
484 dprintf(("GDI32: CreateHatchBrush"));
485 return O32_CreateHatchBrush(arg1, arg2);
486}
487//******************************************************************************
488//******************************************************************************
489HDC WIN32API CreateICA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput,
490 const DEVMODEA *lpdvmInit)
491{
492 static char *szDisplay = "DISPLAY";
493
494 dprintf(("GDI32: CreateICA"));
495 //SvL: Open32 tests for "DISPLAY"
496 if(lpszDriver && !strcmp(lpszDriver, "display")) {
497 lpszDriver = szDisplay;
498 }
499 //SvL: Open32 tests lpszDriver for NULL even though it's ignored
500 if(lpszDriver == NULL) {
501 lpszDriver = lpszDevice;
502 }
503 return O32_CreateIC(lpszDriver, lpszDevice, lpszOutput, lpdvmInit);
504}
505//******************************************************************************
506//******************************************************************************
507HDC WIN32API CreateICW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
508{
509 char *astring4, *astring5;
510
511 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
512 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
513 char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
514 if(arg4)
515 {
516 astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
517 astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
518 }
519
520 HDC rc;
521 DEVMODEA devmode;
522
523 dprintf(("GDI32: CreateICW"));
524
525 if(arg4)
526 {
527 strcpy((char*)devmode.dmDeviceName, astring4);
528 strcpy((char*)devmode.dmFormName, astring5);
529
530 devmode.dmSpecVersion = arg4->dmSpecVersion;
531 devmode.dmDriverVersion = arg4->dmDriverVersion;
532 devmode.dmSize = arg4->dmSize;
533 devmode.dmDriverExtra = arg4->dmDriverExtra;
534 devmode.dmFields = arg4->dmFields;
535 devmode.dmOrientation = arg4->dmOrientation;
536 devmode.dmPaperSize = arg4->dmPaperSize;
537 devmode.dmPaperLength = arg4->dmPaperLength;
538 devmode.dmPaperWidth = arg4->dmPaperWidth;
539 devmode.dmScale = arg4->dmScale;
540 devmode.dmCopies = arg4->dmCopies;
541 devmode.dmDefaultSource = arg4->dmDefaultSource;
542 devmode.dmPrintQuality = arg4->dmPrintQuality;
543 devmode.dmColor = arg4->dmColor;
544 devmode.dmDuplex = arg4->dmDuplex;
545 devmode.dmYResolution = arg4->dmYResolution;
546 devmode.dmTTOption = arg4->dmTTOption;
547 devmode.dmCollate = arg4->dmCollate;
548 devmode.dmLogPixels = arg4->dmLogPixels;
549 devmode.dmBitsPerPel = arg4->dmBitsPerPel;
550 devmode.dmPelsWidth = arg4->dmPelsWidth;
551 devmode.dmPelsHeight = arg4->dmPelsHeight;
552 devmode.dmDisplayFlags = arg4->dmDisplayFlags;
553 devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
554 devmode.dmICMMethod = arg4->dmICMMethod;
555 devmode.dmICMIntent = arg4->dmICMIntent;
556 devmode.dmMediaType = arg4->dmMediaType;
557 devmode.dmDitherType = arg4->dmDitherType;
558 devmode.dmReserved1 = arg4->dmReserved1;
559 devmode.dmReserved2 = arg4->dmReserved2;
560
561 rc = CreateICA(astring1,astring2,astring3,&devmode);
562 }
563 else
564 rc = CreateICA(astring1,astring2,astring3, NULL);
565
566 FreeAsciiString(astring1);
567 FreeAsciiString(astring2);
568 FreeAsciiString(astring3);
569 if(arg4)
570 {
571 FreeAsciiString(astring4);
572 FreeAsciiString(astring5);
573 }
574
575 return rc;
576}
577//******************************************************************************
578//******************************************************************************
579HBRUSH WIN32API CreateSolidBrush( COLORREF arg1)
580{
581 dprintf(("GDI32: CreateSolidBrush\n"));
582 return O32_CreateSolidBrush(arg1);
583}
584//******************************************************************************
585//******************************************************************************
586BOOL WIN32API DPtoLP( HDC arg1, PPOINT arg2, int arg3)
587{
588 dprintf(("GDI32: DPtoLP\n"));
589 return O32_DPtoLP(arg1, arg2, arg3);
590}
591//******************************************************************************
592//******************************************************************************
593BOOL WIN32API Ellipse( HDC arg1, int arg2, int arg3, int arg4, int arg5)
594{
595 dprintf(("GDI32: Ellipse"));
596 return O32_Ellipse(arg1, arg2, arg3, arg4, arg5);
597}
598//******************************************************************************
599//******************************************************************************
600int WIN32API EndDoc( HDC arg1)
601{
602 dprintf(("GDI32: EndDoc"));
603 return O32_EndDoc(arg1);
604}
605//******************************************************************************
606//******************************************************************************
607int WIN32API EndPage( HDC arg1)
608{
609 dprintf(("GDI32: EndPage"));
610 return O32_EndPage(arg1);
611}
612//******************************************************************************
613//******************************************************************************
614BOOL WIN32API EndPath( HDC arg1)
615{
616 dprintf(("GDI32: EndPath"));
617 return O32_EndPath(arg1);
618}
619//******************************************************************************
620//******************************************************************************
621BOOL WIN32API Rectangle( HDC arg1, int arg2, int arg3, int arg4, int arg5)
622{
623 dprintf(("GDI32: Rectangle\n"));
624 return O32_Rectangle(arg1, arg2, arg3, arg4, arg5);
625}
626//******************************************************************************
627//******************************************************************************
628VOID dumpROP2(INT rop2)
629{
630 CHAR *name;
631
632 switch (rop2)
633 {
634 case R2_BLACK:
635 name = "R2_BLACK";
636 break;
637
638 case R2_COPYPEN:
639 name = "R2_COPYPEN";
640 break;
641
642 case R2_MASKNOTPEN:
643 name = "R2_MASKNOTPEN";
644 break;
645
646 case R2_MASKPEN:
647 name = "R2_MASKPEN";
648 break;
649
650 case R2_MASKPENNOT:
651 name = "R2_MASKPENNOT";
652 break;
653
654 case R2_MERGENOTPEN:
655 name = "R2_MERGENOTPEN";
656 break;
657
658 case R2_MERGEPEN:
659 name = "R2_MERGEPEN";
660 break;
661
662 case R2_MERGEPENNOT:
663 name = "R2_MERGEPENNOT";
664 break;
665
666 case R2_NOP:
667 name = "R2_NOP";
668 break;
669
670 case R2_NOT:
671 name = "R2_NOT";
672 break;
673
674 case R2_NOTCOPYPEN:
675 name = "R2_NOTCOPYPEN";
676 break;
677
678 case R2_NOTMASKPEN:
679 name = "R2_NOTMASKPEN";
680 break;
681
682 case R2_NOTMERGEPEN:
683 name = "R2_NOTMERGEPEN";
684 break;
685
686 case R2_WHITE:
687 name = "R2_WHITE";
688 break;
689
690 case R2_XORPEN:
691 name = "R2_XORPEN";
692 break;
693
694 default:
695 name = "unknown mode!!!";
696 break;
697 }
698
699 dprintf((" ROP2 mode = %s",name));
700}
701//******************************************************************************
702//******************************************************************************
703int WIN32API SetROP2( HDC hdc, int rop2)
704{
705 dprintf(("GDI32: SetROP2 %x %x", hdc, rop2));
706 #ifdef DEBUG
707 dumpROP2(rop2);
708 #endif
709 return O32_SetROP2(hdc, rop2);
710}
711//******************************************************************************
712//******************************************************************************
713int WIN32API EnumObjects( HDC arg1, int arg2, GOBJENUMPROC arg3, LPARAM arg4)
714{
715 dprintf(("GDI32: EnumObjects STUB"));
716 //calling convention differences
717// return O32_EnumObjects(arg1, arg2, arg3, arg4);
718 return 0;
719}
720//******************************************************************************
721//******************************************************************************
722int WIN32API Escape( HDC arg1, int arg2, int arg3, LPCSTR arg4, PVOID arg5)
723{
724 dprintf(("GDI32: Escape"));
725 return O32_Escape(arg1, arg2, arg3, arg4, arg5);
726}
727//******************************************************************************
728//******************************************************************************
729int WIN32API ExcludeClipRect( HDC arg1, int arg2, int arg3, int arg4, int arg5)
730{
731 dprintf(("GDI32: ExcludeClipRect"));
732 return O32_ExcludeClipRect(arg1, arg2, arg3, arg4, arg5);
733}
734//******************************************************************************
735//******************************************************************************
736HPEN WIN32API ExtCreatePen( DWORD arg1, DWORD arg2, const LOGBRUSH * arg3, DWORD arg4, const DWORD * arg5)
737{
738 dprintf(("GDI32: ExtCreatePen"));
739 return O32_ExtCreatePen(arg1, arg2, arg3, arg4, arg5);
740}
741//******************************************************************************
742//******************************************************************************
743BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5)
744{
745 dprintf(("GDI32: ExtFloodFill"));
746 return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5);
747}
748//******************************************************************************
749//******************************************************************************
750BOOL WIN32API FillPath( HDC arg1)
751{
752 dprintf(("GDI32: FillPath"));
753 return O32_FillPath(arg1);
754}
755//******************************************************************************
756//******************************************************************************
757BOOL WIN32API FlattenPath( HDC arg1)
758{
759 dprintf(("GDI32: FlattenPath"));
760 return O32_FlattenPath(arg1);
761}
762//******************************************************************************
763//******************************************************************************
764BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4)
765{
766 dprintf(("GDI32: FloodFill"));
767 return O32_FloodFill(arg1, arg2, arg3, arg4);
768}
769//******************************************************************************
770//******************************************************************************
771int WIN32API GetArcDirection( HDC arg1)
772{
773 dprintf(("GDI32: GetArcDirection"));
774 return O32_GetArcDirection(arg1);
775}
776//******************************************************************************
777//******************************************************************************
778BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2)
779{
780 dprintf(("GDI32: GetAspectRatioFilterEx"));
781 return O32_GetAspectRatioFilterEx(arg1, arg2);
782}
783//******************************************************************************
784//******************************************************************************
785COLORREF WIN32API GetBkColor( HDC arg1)
786{
787 dprintf(("GDI32: GetBkColor"));
788 return O32_GetBkColor(arg1);
789}
790//******************************************************************************
791//******************************************************************************
792int WIN32API GetBkMode( HDC arg1)
793{
794 dprintf(("GDI32: GetBkMode"));
795 return O32_GetBkMode(arg1);
796}
797//******************************************************************************
798//******************************************************************************
799UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3)
800{
801 dprintf(("GDI32: GetBoundsRect"));
802 return O32_GetBoundsRect(arg1, arg2, arg3);
803}
804//******************************************************************************
805//******************************************************************************
806BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2)
807{
808 dprintf(("GDI32: GetBrushOrgEx"));
809 return O32_GetBrushOrgEx(arg1, arg2);
810}
811//******************************************************************************
812//******************************************************************************
813BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
814{
815 dprintf(("GDI32: GetCharABCWidthsA"));
816 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
817}
818//******************************************************************************
819//******************************************************************************
820BOOL WIN32API GetCharABCWidthsW( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
821{
822 dprintf(("GDI32: GetCharABCWidthsW not properly implemented."));
823 // NOTE: This will not work as is (needs UNICODE support)
824 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
825}
826//******************************************************************************
827//******************************************************************************
828BOOL WIN32API GetCharWidth32A( HDC arg1, UINT arg2, UINT arg3, PINT arg4)
829{
830 dprintf(("GDI32: GetCharWidth32A"));
831 return O32_GetCharWidth(arg1, arg2, arg3, arg4);
832}
833//******************************************************************************
834//TODO: Cut off Unicode chars?
835//******************************************************************************
836BOOL WIN32API GetCharWidth32W(HDC arg1, UINT iFirstChar, UINT iLastChar, PINT arg4)
837{
838 dprintf(("GDI32: GetCharWidth32W, not properly implemented"));
839 return O32_GetCharWidth(arg1, iFirstChar, iLastChar, arg4);
840}
841//******************************************************************************
842//******************************************************************************
843int WIN32API GetClipBox( HDC arg1, PRECT arg2)
844{
845 int rc;
846
847 rc = O32_GetClipBox(arg1, arg2);
848 dprintf(("GDI32: GetClipBox of %X returned %d\n", arg1, rc));
849 return(rc);
850}
851//******************************************************************************
852//******************************************************************************
853HANDLE WIN32API GetCurrentObject( HDC hdc, UINT arg2)
854{
855 dprintf(("GDI32: GetCurrentObject %x %x", hdc, arg2));
856 return (HANDLE)O32_GetCurrentObject(hdc, arg2);
857}
858//******************************************************************************
859//******************************************************************************
860BOOL WIN32API GetCurrentPositionEx( HDC arg1, PPOINT arg2)
861{
862 dprintf(("GDI32: GetCurrentPositionEx"));
863 return O32_GetCurrentPositionEx(arg1, arg2);
864}
865//******************************************************************************
866//******************************************************************************
867int WIN32API GetDeviceCaps(HDC hdc, int nIndex)
868{
869 int rc;
870
871 rc = O32_GetDeviceCaps(hdc, nIndex);
872 dprintf(("GDI32: GetDeviceCaps %X, %d returned %d\n", hdc, nIndex, rc));
873 //SvL: 13-9-'98: NT returns -1 when using 16 bits colors, NOT 65536!
874 if(nIndex == NUMCOLORS && rc > 256)
875 return -1;
876
877 return(rc);
878}
879//******************************************************************************
880//******************************************************************************
881int WIN32API GetGraphicsMode(HDC arg1)
882{
883 dprintf(("GDI32: GetGraphicsMode"));
884 return O32_GetGraphicsMode(arg1);
885}
886//******************************************************************************
887//******************************************************************************
888DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
889{
890 dprintf(("GDI32: GetKerningPairsA"));
891 return O32_GetKerningPairs(arg1, arg2, arg3);
892}
893//******************************************************************************
894//******************************************************************************
895DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
896{
897 dprintf(("GDI32: GetKerningPairsW"));
898 // NOTE: This will not work as is (needs UNICODE support)
899 return O32_GetKerningPairs(arg1, arg2, arg3);
900}
901//******************************************************************************
902//******************************************************************************
903int WIN32API GetMapMode( HDC arg1)
904{
905 dprintf(("GDI32: GetMapMode"));
906 return O32_GetMapMode(arg1);
907}
908//******************************************************************************
909//******************************************************************************
910BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
911{
912 dprintf(("GDI32: GetMiterLimit"));
913 return O32_GetMiterLimit(arg1, arg2);
914}
915//******************************************************************************
916//******************************************************************************
917COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2)
918{
919 dprintf(("GDI32: GetNearestColor\n"));
920 return O32_GetNearestColor(arg1, arg2);
921}
922//******************************************************************************
923//******************************************************************************
924UINT WIN32API GetOutlineTextMetricsA( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICA arg3)
925{
926 dprintf(("GDI32: GetOutlineTextMetricsA"));
927 return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
928}
929//******************************************************************************
930//******************************************************************************
931UINT WIN32API GetOutlineTextMetricsW( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICW arg3)
932{
933 dprintf(("GDI32: GetOutlineTextMetricsW STUB"));
934 // NOTE: This will not work as is (needs UNICODE support)
935// return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
936 return 0;
937}
938//******************************************************************************
939//******************************************************************************
940INT WIN32API GetPath( HDC arg1, PPOINT arg2, PBYTE arg3, int arg4)
941{
942 dprintf(("GDI32: GetPath"));
943 return O32_GetPath(arg1, arg2, arg3, arg4);
944}
945//******************************************************************************
946//******************************************************************************
947int WIN32API GetPolyFillMode( HDC arg1)
948{
949 dprintf(("GDI32: GetPolyFillMode"));
950 return O32_GetPolyFillMode(arg1);
951}
952//******************************************************************************
953//******************************************************************************
954int WIN32API GetROP2( HDC arg1)
955{
956 dprintf(("GDI32: GetROP2"));
957 return O32_GetROP2(arg1);
958}
959//******************************************************************************
960//******************************************************************************
961BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2)
962{
963 dprintf(("GDI32: GetRasterizerCaps"));
964 return O32_GetRasterizerCaps(arg1, arg2);
965}
966//******************************************************************************
967//******************************************************************************
968UINT WIN32API GetTextAlign( HDC arg1)
969{
970 dprintf(("GDI32: GetTextAlign"));
971 return O32_GetTextAlign(arg1);
972}
973//******************************************************************************
974//******************************************************************************
975int WIN32API GetTextCharacterExtra( HDC arg1)
976{
977 dprintf(("GDI32: GetTextCharacterExtra"));
978 return O32_GetTextCharacterExtra(arg1);
979}
980//******************************************************************************
981//******************************************************************************
982COLORREF WIN32API GetTextColor( HDC arg1)
983{
984 dprintf(("GDI32: GetTextColor"));
985 return O32_GetTextColor(arg1);
986}
987//******************************************************************************
988//******************************************************************************
989BOOL WIN32API GetTextExtentPoint32A( HDC hdc, LPCSTR lpsz, int cbString, PSIZE lpSize)
990{
991 BOOL rc;
992
993 lpSize->cx = lpSize->cy = 0;
994 rc = O32_GetTextExtentPoint32(hdc, lpsz, cbString, lpSize);
995 dprintf(("GDI32: GetTextExtentPoint32A %x %s %d returned %d (%d,%d)", hdc, lpsz, cbString, rc, lpSize->cx, lpSize->cy));
996 return rc;
997}
998//******************************************************************************
999//******************************************************************************
1000BOOL WIN32API GetTextExtentPoint32W(HDC arg1, LPCWSTR arg2, int arg3, PSIZE lpSize)
1001{
1002 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1003 BOOL rc;
1004
1005 dprintf(("GDI32: GetTextExtentPoint32W %s\n", astring));
1006 lpSize->cx = lpSize->cy = 0;
1007 rc = O32_GetTextExtentPoint32(arg1, astring, arg3, lpSize);
1008 FreeAsciiString(astring);
1009 return(rc);
1010}
1011//******************************************************************************
1012//******************************************************************************
1013BOOL WIN32API GetTextExtentPointW(HDC hdc,
1014 LPCWSTR lpString,
1015 int cbString,
1016 PSIZE lpSize)
1017{
1018 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
1019 BOOL rc;
1020
1021 lpSize->cx = lpSize->cy = 0;
1022 rc = O32_GetTextExtentPoint(hdc,
1023 astring,
1024 cbString,
1025 lpSize);
1026 dprintf(("GDI32: GetTextExtentPointW %X %s (size %08xh) returned %d\n", hdc, astring, cbString, rc));
1027 dprintf(("GDI32: GetTextExtentPointW (%d,%d)\n", lpSize->cx, lpSize->cy));
1028
1029 FreeAsciiString(astring);
1030 return(rc);
1031}
1032//******************************************************************************
1033//******************************************************************************
1034int WIN32API GetTextFaceA( HDC arg1, int arg2, LPSTR arg3)
1035{
1036 dprintf(("GDI32: GetTextFaceA"));
1037 return O32_GetTextFace(arg1, arg2, arg3);
1038}
1039//******************************************************************************
1040//******************************************************************************
1041int WIN32API GetTextFaceW( HDC arg1, int arg2, LPWSTR arg3)
1042{
1043 char *astring = (char *)malloc(arg2+1);
1044 int rc;
1045
1046 dprintf(("GDI32: GetTextFaceW"));
1047 rc = O32_GetTextFace(arg1, arg2, astring);
1048 AsciiToUnicode(astring, arg3);
1049 free(astring);
1050 return rc;
1051}
1052//******************************************************************************
1053//******************************************************************************
1054BOOL WIN32API GetTextMetricsA( HDC arg1, LPTEXTMETRICA arg2)
1055{
1056 BOOL rc;
1057
1058 rc = O32_GetTextMetrics(arg1, arg2);
1059 dprintf(("GDI32: GetTextMetricsA returned %d\n", rc));
1060 return(rc);
1061}
1062//******************************************************************************
1063//******************************************************************************
1064BOOL WIN32API GetTextMetricsW( HDC arg1, LPTEXTMETRICW pwtm)
1065{
1066 BOOL rc;
1067 TEXTMETRICA atm;
1068
1069 dprintf(("GDI32: GetTextMetricsW"));
1070
1071 rc = O32_GetTextMetrics(arg1, &atm);
1072 pwtm->tmHeight = atm.tmHeight;
1073 pwtm->tmAscent = atm.tmAscent;
1074 pwtm->tmDescent = atm.tmDescent;
1075 pwtm->tmInternalLeading = atm.tmInternalLeading;
1076 pwtm->tmExternalLeading = atm.tmExternalLeading;
1077 pwtm->tmAveCharWidth = atm.tmAveCharWidth;
1078 pwtm->tmMaxCharWidth = atm.tmMaxCharWidth;
1079 pwtm->tmWeight = atm.tmWeight;
1080 pwtm->tmOverhang = atm.tmOverhang;
1081 pwtm->tmDigitizedAspectX = atm.tmDigitizedAspectX;
1082 pwtm->tmDigitizedAspectY = atm.tmDigitizedAspectY;
1083 pwtm->tmFirstChar = atm.tmFirstChar;
1084 pwtm->tmLastChar = atm.tmLastChar;
1085 pwtm->tmDefaultChar = atm.tmDefaultChar;
1086 pwtm->tmBreakChar = atm.tmBreakChar;
1087 pwtm->tmItalic = atm.tmItalic;
1088 pwtm->tmUnderlined = atm.tmUnderlined;
1089 pwtm->tmStruckOut = atm.tmStruckOut;
1090 pwtm->tmPitchAndFamily = atm.tmPitchAndFamily;
1091 pwtm->tmCharSet = atm.tmCharSet;
1092 return(rc);
1093}
1094//******************************************************************************
1095//******************************************************************************
1096BOOL WIN32API GetViewportExtEx( HDC arg1, PSIZE arg2)
1097{
1098 dprintf(("GDI32: GetViewportExtEx"));
1099 return O32_GetViewportExtEx(arg1, arg2);
1100}
1101//******************************************************************************
1102//******************************************************************************
1103BOOL WIN32API GetViewportOrgEx( HDC arg1, PPOINT arg2)
1104{
1105 dprintf(("GDI32: GetViewportOrgEx"));
1106 return O32_GetViewportOrgEx(arg1, arg2);
1107}
1108//******************************************************************************
1109//******************************************************************************
1110BOOL WIN32API GetWindowOrgEx( HDC arg1, PPOINT arg2)
1111{
1112 dprintf(("GDI32: GetWindowOrgEx"));
1113 return O32_GetWindowOrgEx(arg1, arg2);
1114}
1115//******************************************************************************
1116//******************************************************************************
1117BOOL WIN32API GetWorldTransform( HDC arg1, LPXFORM arg2)
1118{
1119 dprintf(("GDI32: GetWorldTransform"));
1120 return O32_GetWorldTransform(arg1, arg2);
1121}
1122//******************************************************************************
1123//******************************************************************************
1124int WIN32API IntersectClipRect(HDC arg1, int arg2, int arg3, int arg4, int arg5)
1125{
1126 int rc;
1127
1128 rc = O32_IntersectClipRect(arg1, arg2, arg3, arg4, arg5);
1129 dprintf(("GDI32: IntersectClipRect returned %d\n", rc));
1130 return(rc);
1131}
1132//******************************************************************************
1133//******************************************************************************
1134BOOL WIN32API LPtoDP( HDC arg1, PPOINT arg2, int arg3)
1135{
1136 dprintf(("GDI32: LPtoDP"));
1137 return O32_LPtoDP(arg1, arg2, arg3);
1138}
1139//******************************************************************************
1140//******************************************************************************
1141BOOL WIN32API ModifyWorldTransform( HDC arg1, const XFORM *arg2, DWORD arg3)
1142{
1143 dprintf(("GDI32: ModifyWorldTransform"));
1144 return O32_ModifyWorldTransform(arg1, (LPXFORM)arg2, arg3);
1145}
1146//******************************************************************************
1147//******************************************************************************
1148BOOL WIN32API OffsetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1149{
1150 dprintf(("GDI32: OffsetViewportOrgEx"));
1151 return O32_OffsetViewportOrgEx(arg1, arg2, arg3, arg4);
1152}
1153//******************************************************************************
1154//******************************************************************************
1155BOOL WIN32API OffsetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1156{
1157 dprintf(("GDI32: OffsetWindowOrgEx"));
1158 return O32_OffsetWindowOrgEx(arg1, arg2, arg3, arg4);
1159}
1160//******************************************************************************
1161//******************************************************************************
1162BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
1163 int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
1164 int nYRadial2)
1165{
1166 dprintf(("GDI32: Pie"));
1167 //CB: bug in O32_Pie
1168 if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
1169 return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
1170 else
1171 return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
1172}
1173//******************************************************************************
1174//******************************************************************************
1175BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
1176{
1177 dprintf(("GDI32: PolyBezier"));
1178 return O32_PolyBezier(arg1, arg2, (int)arg3);
1179}
1180//******************************************************************************
1181//******************************************************************************
1182BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
1183{
1184 dprintf(("GDI32: PolyBezierTo"));
1185 return O32_PolyBezierTo(arg1, arg2, arg3);
1186}
1187//******************************************************************************
1188//******************************************************************************
1189BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
1190{
1191 dprintf(("GDI32: PolyDraw"));
1192 return O32_PolyDraw(arg1, arg2, arg3, arg4);
1193}
1194//******************************************************************************
1195//******************************************************************************
1196BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
1197{
1198 dprintf(("GDI32: PolyPolygon"));
1199 return O32_PolyPolygon(arg1, arg2, arg3, arg4);
1200}
1201//******************************************************************************
1202//******************************************************************************
1203BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
1204{
1205 dprintf(("GDI32: PolyPolyline"));
1206
1207 return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
1208}
1209//******************************************************************************
1210//******************************************************************************
1211BOOL WIN32API Polygon( HDC arg1, const POINT * arg2, int arg3)
1212{
1213 dprintf(("GDI32: Polygon"));
1214 return O32_Polygon(arg1, arg2, arg3);
1215}
1216//******************************************************************************
1217//******************************************************************************
1218BOOL WIN32API PtVisible( HDC arg1, int arg2, int arg3)
1219{
1220 dprintf(("GDI32: PtVisible"));
1221 return O32_PtVisible(arg1, arg2, arg3);
1222}
1223//******************************************************************************
1224//******************************************************************************
1225BOOL WIN32API RectVisible( HDC arg1, const RECT * arg2)
1226{
1227 dprintf(("GDI32: RectVisible\n"));
1228 return O32_RectVisible(arg1, arg2);
1229}
1230//******************************************************************************
1231//******************************************************************************
1232HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
1233{
1234 dprintf(("GDI32: ResetDCA\n"));
1235 return (HDC)O32_ResetDC(arg1, arg2);
1236}
1237//******************************************************************************
1238//******************************************************************************
1239HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
1240{
1241 dprintf(("GDI32: ResetDCW\n"));
1242 // NOTE: This will not work as is (needs UNICODE support)
1243 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
1244}
1245//******************************************************************************
1246//******************************************************************************
1247BOOL WIN32API RestoreDC( HDC arg1, int arg2)
1248{
1249 dprintf(("GDI32: RestoreDC\n"));
1250 return O32_RestoreDC(arg1, arg2);
1251}
1252//******************************************************************************
1253//******************************************************************************
1254BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
1255{
1256 dprintf(("GDI32: RoundRect"));
1257 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1258}
1259//******************************************************************************
1260//******************************************************************************
1261int WIN32API SaveDC( HDC arg1)
1262{
1263 dprintf(("GDI32: SaveDC"));
1264 return O32_SaveDC(arg1);
1265}
1266//******************************************************************************
1267//******************************************************************************
1268BOOL WIN32API ScaleViewportExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1269{
1270 dprintf(("GDI32: ScaleViewportExtEx"));
1271 return O32_ScaleViewportExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1272}
1273//******************************************************************************
1274//******************************************************************************
1275BOOL WIN32API ScaleWindowExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1276{
1277 dprintf(("GDI32: ScaleWindowExtEx"));
1278 return O32_ScaleWindowExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1279}
1280//******************************************************************************
1281//******************************************************************************
1282int WIN32API SetArcDirection( HDC arg1, int arg2)
1283{
1284 dprintf(("GDI32: SetArcDirection"));
1285 return O32_SetArcDirection(arg1, arg2);
1286}
1287//******************************************************************************
1288//******************************************************************************
1289UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
1290{
1291 dprintf(("GDI32: SetBoundsRect"));
1292 return O32_SetBoundsRect(arg1, arg2, arg3);
1293}
1294//******************************************************************************
1295//******************************************************************************
1296BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1297{
1298 BOOL rc;
1299
1300 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
1301 dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc));
1302 return(rc);
1303}
1304//******************************************************************************
1305//******************************************************************************
1306int WIN32API SetGraphicsMode(HDC arg1, int arg2)
1307{
1308 dprintf(("GDI32: SetGraphicsMode"));
1309 return O32_SetGraphicsMode(arg1, arg2);
1310}
1311//******************************************************************************
1312//******************************************************************************
1313int WIN32API SetMapMode( HDC arg1, int arg2)
1314{
1315 dprintf(("GDI32: SetMapMode"));
1316 return O32_SetMapMode(arg1, arg2);
1317}
1318//******************************************************************************
1319//******************************************************************************
1320DWORD WIN32API SetMapperFlags( HDC arg1, DWORD arg2)
1321{
1322 dprintf(("GDI32: SetMapperFlags"));
1323 return O32_SetMapperFlags(arg1, arg2);
1324}
1325//******************************************************************************
1326//******************************************************************************
1327BOOL WIN32API SetMiterLimit( HDC arg1, float arg2, float * arg3)
1328{
1329 dprintf(("GDI32: SetMiterLimit"));
1330 return O32_SetMiterLimit(arg1, arg2, arg3);
1331}
1332//******************************************************************************
1333//******************************************************************************
1334int WIN32API SetPolyFillMode( HDC arg1, int arg2)
1335{
1336 dprintf(("GDI32: SetPolyFillMode"));
1337 return O32_SetPolyFillMode(arg1, arg2);
1338}
1339//******************************************************************************
1340//******************************************************************************
1341UINT WIN32API SetTextAlign( HDC arg1, UINT arg2)
1342{
1343 dprintf(("GDI32: SetTextAlign"));
1344 return O32_SetTextAlign(arg1, arg2);
1345}
1346//******************************************************************************
1347//******************************************************************************
1348int WIN32API SetTextCharacterExtra( HDC arg1, int arg2)
1349{
1350 dprintf(("GDI32: SetTextCharacterExtra"));
1351 return O32_SetTextCharacterExtra(arg1, arg2);
1352}
1353//******************************************************************************
1354//******************************************************************************
1355BOOL WIN32API SetTextJustification( HDC arg1, int arg2, int arg3)
1356{
1357 dprintf(("GDI32: SetTextJustification"));
1358 return O32_SetTextJustification(arg1, arg2, arg3);
1359}
1360//******************************************************************************
1361//******************************************************************************
1362BOOL WIN32API SetViewportExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
1363{
1364 dprintf(("GDI32: SetViewportExtEx"));
1365 return O32_SetViewportExtEx(arg1, arg2, arg3, arg4);
1366}
1367//******************************************************************************
1368//******************************************************************************
1369BOOL WIN32API SetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1370{
1371 dprintf(("GDI32: SetViewportOrgEx"));
1372 return O32_SetViewportOrgEx(arg1, arg2, arg3, arg4);
1373}
1374//******************************************************************************
1375//******************************************************************************
1376BOOL WIN32API SetWindowExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
1377{
1378 dprintf(("GDI32: SetWindowExtEx"));
1379 return O32_SetWindowExtEx(arg1, arg2, arg3, arg4);
1380}
1381//******************************************************************************
1382//******************************************************************************
1383BOOL WIN32API SetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1384{
1385 dprintf(("GDI32: SetWindowOrgEx"));
1386 return O32_SetWindowOrgEx(arg1, arg2, arg3, arg4);
1387}
1388//******************************************************************************
1389//******************************************************************************
1390BOOL WIN32API SetWorldTransform( HDC arg1, const XFORM *arg2)
1391{
1392 dprintf(("GDI32: SetWorldTransform"));
1393 return O32_SetWorldTransform(arg1, (LPXFORM)arg2);
1394}
1395//******************************************************************************
1396//******************************************************************************
1397INT WIN32API StartDocA( HDC arg1, const DOCINFOA *arg2)
1398{
1399 dprintf(("GDI32: StartDocA"));
1400 return O32_StartDoc(arg1, (LPDOCINFOA)arg2);
1401}
1402//******************************************************************************
1403//******************************************************************************
1404INT WIN32API StartDocW( HDC arg1, const DOCINFOW *arg2)
1405{
1406 dprintf(("GDI32: StartDocW STUB"));
1407 // NOTE: This will not work as is (needs UNICODE support)
1408// return O32_StartDoc(arg1, arg2);
1409 return 0;
1410}
1411//******************************************************************************
1412//******************************************************************************
1413int WIN32API StartPage( HDC arg1)
1414{
1415 dprintf(("GDI32: StartPage"));
1416 return O32_StartPage(arg1);
1417}
1418//******************************************************************************
1419//******************************************************************************
1420BOOL WIN32API UnrealizeObject( HGDIOBJ arg1)
1421{
1422 dprintf(("GDI32: UnrealizeObject"));
1423 return O32_UnrealizeObject(arg1);
1424}
1425//******************************************************************************
1426//******************************************************************************
1427BOOL WIN32API WidenPath( HDC arg1)
1428{
1429 dprintf(("GDI32: WidenPath"));
1430 return O32_WidenPath(arg1);
1431}
1432//******************************************************************************
1433//TODO: Not implemented
1434//******************************************************************************
1435int WIN32API SetAbortProc(HDC hdc, ABORTPROC lpAbortProc)
1436{
1437 dprintf(("GDI32: SetAbortProc - stub (1)w\n"));
1438 return(1);
1439}
1440//******************************************************************************
1441//Selects the current path as a clipping region for a device context, combining
1442//any existing clipping region by using the specified mode
1443//TODO: Can be emulated with SelectClipRegion??
1444//******************************************************************************
1445BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
1446{
1447 dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
1448 return(TRUE);
1449}
1450//******************************************************************************
1451//TODO: Sets the color adjustment values for a device context. (used to adjust
1452// the input color of the src bitmap for calls of StretchBlt & StretchDIBits
1453// functions when HALFTONE mode is set
1454//******************************************************************************
1455BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
1456{
1457 dprintf(("GDI32: SetColorAdjustment, not implemented!(TRUE)\n"));
1458 return(TRUE);
1459}
1460//******************************************************************************
1461//Maps colors to system palette; faster way to update window (instead of redrawing)
1462//We just redraw
1463//******************************************************************************
1464BOOL WIN32API UpdateColors(HDC hdc)
1465{
1466 dprintf(("GDI32: UpdateColors\n"));
1467 return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);
1468}
1469//******************************************************************************
1470//******************************************************************************
1471BOOL WIN32API GdiFlush()
1472{
1473 dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
1474 return(TRUE);
1475}
1476//******************************************************************************
1477//******************************************************************************
1478BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
1479{
1480 dprintf(("GDI32: GdiComment, not implemented (TRUE)\n"));
1481 return(TRUE);
1482}
1483//******************************************************************************
1484//******************************************************************************
1485BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
1486{
1487 dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
1488 return(FALSE);
1489}
1490//******************************************************************************
1491//******************************************************************************
1492BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
1493{
1494 dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
1495 return(FALSE);
1496}
1497//******************************************************************************
1498//******************************************************************************
1499BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
1500{
1501 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
1502 return(FALSE);
1503}
1504//******************************************************************************
1505//******************************************************************************
1506BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
1507 UINT iFirstChar,
1508 UINT iLastChar,
1509 LPABCFLOAT pxBUffer)
1510{
1511 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
1512 return(FALSE);
1513}
1514//******************************************************************************
1515//******************************************************************************
1516INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
1517 INT cbOutput, LPSTR lpszOutData)
1518{
1519 dprintf(("GDI32: ExtEscape, %x %x %d %x %d %x not implemented", hdc, nEscape, cbInput, lpszInData, cbOutput, lpszOutData));
1520#ifdef DEBUG
1521 if(cbInput && lpszInData) {
1522 ULONG *tmp = (ULONG *)lpszInData;
1523 for(int i=0;i<cbInput/4;i++) {
1524 dprintf(("GDI32: ExtEscape par %d: %x", i, *tmp++));
1525 }
1526 }
1527#endif
1528 return(0);
1529}
1530//******************************************************************************
1531//******************************************************************************
1532int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
1533{
1534 dprintf(("GDI32: DrawEscape, not implemented\n"));
1535 return(0);
1536}
1537//******************************************************************************
1538//******************************************************************************
1539BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
1540{
1541 dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
1542 return(FALSE);
1543}
1544//******************************************************************************
1545//******************************************************************************
1546DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
1547 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
1548{
1549 dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
1550 return(GDI_ERROR);
1551}
1552//******************************************************************************
1553
1554//******************************************************************************
1555/*KSO Thu 21.05.1998*/
1556DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
1557 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
1558{
1559 dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
1560 return(GDI_ERROR);
1561}
1562//******************************************************************************
1563
1564//******************************************************************************
1565BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
1566{
1567 // Here is a guess for a undocumented entry
1568 dprintf(("GDI32: SetObjectOwner - stub (TRUE)\n"));
1569 return TRUE;
1570}
1571//******************************************************************************
1572
1573
1574/* Office 97 stubs - KSO Thu 21.05.1998*/
1575//******************************************************************************
1576BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
1577 HDC hdc,
1578 LPCSTR str,
1579 int count,
1580 int maxExt,
1581 LPINT lpnFit,
1582 LPINT alpDx,
1583 LPSIZE size)
1584{
1585 int index, nFit, extent;
1586 SIZE tSize;
1587
1588 dprintf(("GDI32: GetTextExtendExPointA\n"));
1589
1590 size->cx = size->cy = nFit = extent = 0;
1591 for(index = 0; index < count; index++)
1592 {
1593 if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
1594 if( extent+tSize.cx < maxExt )
1595 {
1596 extent+=tSize.cx;
1597 nFit++;
1598 str++;
1599 if( alpDx )
1600 alpDx[index] = extent;
1601 if( tSize.cy > size->cy ) size->cy = tSize.cy;
1602 }
1603 else break;
1604 }
1605 size->cx = extent;
1606
1607 if (lpnFit != NULL) // check if result is desired
1608 *lpnFit = nFit;
1609
1610 dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
1611 hdc,count,str,maxExt,nFit, size->cx,size->cy));
1612 return TRUE;
1613}
1614//******************************************************************************
1615//******************************************************************************
1616BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
1617 HDC arg1,
1618 LPCWSTR arg2,
1619 int arg3,
1620 int arg4,
1621 LPINT arg5,
1622 LPINT arg6,
1623 LPSIZE arg7
1624 )
1625{
1626 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1627 BOOL rc;
1628
1629 dprintf(("GDI32: GetTextExtendExPointW\n"));
1630 rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
1631 FreeAsciiString(astring);
1632 return rc;
1633}
1634//******************************************************************************
1635//******************************************************************************
1636UINT WIN32API DeleteColorSpace( /*KSO Thu 21.05.1998*/
1637 HCOLORSPACE hColorSpace
1638 )
1639{
1640 dprintf(("GDI32: DeleteColorSpace - stub\n"));
1641 return FALSE;
1642}
1643//******************************************************************************
1644//******************************************************************************
1645BOOL WIN32API SetColorSpace( /*KSO Thu 21.05.1998*/
1646 HDC hdc,
1647 HCOLORSPACE hColorSpace
1648 )
1649{
1650 dprintf(("GDI32: SetColorSpace - stub\n"));
1651 return FALSE;
1652}
1653//******************************************************************************
1654//******************************************************************************
1655 HCOLORSPACE WIN32API CreateColorSpaceA( /*KSO Thu 21.05.1998*/
1656 LPLOGCOLORSPACEA lpLogColorSpace
1657 )
1658{
1659 dprintf(("GDI32: CreateColorSpaceA - stub\n"));
1660 return 0;
1661}
1662//******************************************************************************
1663//******************************************************************************
1664HCOLORSPACE WIN32API CreateColorSpaceW( /*KSO Thu 21.05.1998*/
1665 LPLOGCOLORSPACEW lpwLogColorSpace
1666 )
1667{
1668 dprintf(("GDI32: CreateColorSpaceW - stub\n"));
1669 return 0;
1670}
1671//******************************************************************************
1672//******************************************************************************
1673HANDLE WIN32API GetColorSpace( /*KSO Thu 21.05.1998*/
1674 HDC hdc
1675 )
1676{
1677 dprintf(("GDI32: GetColorSpace - stub\n"));
1678 return 0;
1679}
1680//******************************************************************************
1681//******************************************************************************
1682int WIN32API SetICMMode( /*KSO Thu 21.05.1998*/
1683 HDC hdc,
1684 int mode
1685 )
1686{
1687 dprintf(("GDI32: SetICMMode - stub\n"));
1688 return 0;
1689}
1690//******************************************************************************
1691
1692
1693
1694
1695/*****************************************************************************
1696 * Name : BOOL CancelDC
1697 * Purpose : The CancelDC function cancels any pending operation on the
1698 * specified device context (DC).
1699 * Parameters: HDC hdc handle of device context
1700 * Variables :
1701 * Result : TRUE / FALSE
1702 * Remark :
1703 * Status : UNTESTED STUB
1704 *
1705 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1706 *****************************************************************************/
1707
1708BOOL WIN32API CancelDC(HDC hdc)
1709{
1710 dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
1711 hdc));
1712
1713 return (FALSE);
1714}
1715
1716
1717/*****************************************************************************
1718 * Name : BOOL CheckColorsInGamut
1719 * Purpose : The CheckColorsInGamut function indicates whether the specified
1720 * color values are within the gamut of the specified device.
1721 * Parameters: HDC hdc handle of device context
1722 * LPVOID lpaRGBQuad
1723 * LPVOID lpResult
1724 * DWORD dwResult
1725 * Variables :
1726 * Result : TRUE / FALSE
1727 * Remark :
1728 * Status : UNTESTED STUB
1729 *
1730 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1731 *****************************************************************************/
1732
1733BOOL WIN32API CheckColorsInGamut(HDC hdc,
1734 LPVOID lpaRGBQuad,
1735 LPVOID lpResult,
1736 DWORD dwResult)
1737{
1738 dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1739 hdc,
1740 lpaRGBQuad,
1741 lpResult,
1742 dwResult));
1743
1744 return (FALSE);
1745}
1746
1747
1748/*****************************************************************************
1749 * Name : BOOL ColorMatchToTarget
1750 * Purpose : The ColorMatchToTarget function enables or disables preview for
1751 * the specified device context. When preview is enabled, colors
1752 * in subsequent output to the specified device context are
1753 * displayed as they would appear on the target device. This is
1754 * useful for checking how well the target maps the specified
1755 * colors in an image. To enable preview, image color matching
1756 * must be enabled for both the target and the preview device context.
1757 * Parameters: HDC hdc handle of device context
1758 * HDC hdcTarget handle of target device context
1759 * DWORD uiAction
1760 * Variables :
1761 * Result : TRUE / FALSE
1762 * Remark :
1763 * Status : UNTESTED STUB
1764 *
1765 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1766 *****************************************************************************/
1767
1768BOOL WIN32API ColorMatchToTarget(HDC hdc,
1769 HDC hdcTarget,
1770 DWORD uiAction)
1771{
1772 dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
1773 hdc,
1774 hdcTarget,
1775 uiAction));
1776
1777 return (FALSE);
1778}
1779
1780
1781/*****************************************************************************
1782 * Name : BOOL CombineTransform
1783 * Purpose : The CombineTransform function concatenates two world-space to
1784 * page-space transformations.
1785 * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
1786 * XFORM *lLPXFORM1 address of 1st transformation
1787 * XFORM *lLPXFORM2 address of 2nd transformation
1788 * Variables :
1789 * Result : TRUE / FALSE
1790 * Remark :
1791 * Status : UNTESTED
1792 *
1793 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1794 * Markus Montkowski [Wen, 1999/01/12 20:18]
1795 *****************************************************************************/
1796
1797BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
1798 CONST XFORM *lLPXFORM1,
1799 CONST XFORM *lLPXFORM2)
1800{
1801 dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh).\n",
1802 lLPXFORMResult,
1803 lLPXFORM1,
1804 lLPXFORM2));
1805
1806 XFORM xfrm;
1807 if( O32_IsBadWritePtr( (void*)lLPXFORMResult, sizeof(XFORM)) ||
1808 O32_IsBadReadPtr( (void*)lLPXFORM1, sizeof(XFORM)) ||
1809 O32_IsBadWritePtr( (void*)lLPXFORM2, sizeof(XFORM)) )
1810 return (FALSE);
1811
1812 // Add the translations
1813 lLPXFORMResult->eDx = lLPXFORM1->eDx + lLPXFORM2->eDx;
1814 lLPXFORMResult->eDy = lLPXFORM1->eDy + lLPXFORM2->eDy;
1815
1816 // Multiply the matrixes
1817 xfrm.eM11 = lLPXFORM1->eM11 * lLPXFORM2->eM11 + lLPXFORM1->eM21 * lLPXFORM1->eM12;
1818 xfrm.eM12 = lLPXFORM1->eM11 * lLPXFORM2->eM12 + lLPXFORM1->eM12 * lLPXFORM1->eM22;
1819 xfrm.eM21 = lLPXFORM1->eM21 * lLPXFORM2->eM11 + lLPXFORM1->eM22 * lLPXFORM1->eM21;
1820 xfrm.eM22 = lLPXFORM1->eM21 * lLPXFORM2->eM12 + lLPXFORM1->eM22 * lLPXFORM1->eM22;
1821
1822 // Now copy to resulting XFROM as the pt must not be distinct
1823 lLPXFORMResult->eM11 = xfrm.eM11;
1824 lLPXFORMResult->eM12 = xfrm.eM12;
1825 lLPXFORMResult->eM21 = xfrm.eM21;
1826 lLPXFORMResult->eM22 = xfrm.eM22;
1827
1828 return (TRUE);
1829}
1830
1831
1832
1833/*****************************************************************************
1834 * Name : HBRUSH CreateDIBPatternBrush
1835 * Purpose : The CreateDIBPatternBrush function creates a logical brush that
1836 * has the pattern specified by the specified device-independent
1837 * bitmap (DIB). The brush can subsequently be selected into any
1838 * device context that is associated with a device that supports
1839 * raster operations.
1840 * This function is provided only for compatibility with applications
1841 * written for versions of Windows earlier than 3.0. For Win32-based
1842 * applications, use the CreateDIBPatternBrushPt function.
1843 * Parameters: HGLOBAL hglbDIBPacked Identifies a global memory object containing
1844 * a packed DIB, which consists of a BITMAPINFO structure immediately
1845 * followed by an array of bytes defining the pixels of the bitmap.
1846 * UINT fuColorSpec color table data
1847 * Variables :
1848 * Result : TRUE / FALSE
1849 * Remark :
1850 * Status : UNTESTED
1851 *
1852 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1853 * Markus Montkowski [Wen, 1999/01/12 20:00]
1854 *****************************************************************************/
1855
1856HBRUSH WIN32API CreateDIBPatternBrush( HGLOBAL hglbDIBPacked,
1857 UINT fuColorSpec)
1858{
1859 LPVOID lpMem;
1860 HBRUSH ret = 0;
1861 dprintf(("GDI32: CreateDIBPatternBrush(%08xh, %08xh) \n",
1862 hglbDIBPacked,
1863 fuColorSpec));
1864
1865 lpMem = GlobalLock(hglbDIBPacked);
1866 if(NULL!=lpMem)
1867 {
1868
1869 ret = CreateDIBPatternBrushPt( lpMem,
1870 fuColorSpec);
1871 GlobalUnlock(hglbDIBPacked);
1872 }
1873
1874 return (ret);
1875}
1876
1877
1878
1879
1880/*****************************************************************************
1881 * Name : int EnumICMProfilesA
1882 * Purpose : The EnumICMProfilesA function enumerates the different color
1883 * profiles that the system supports for the specified device context.
1884 * Parameters: HDC hdc
1885 * ICMENUMPROC lpICMEnumFunc
1886 * LPARAM lParam
1887 * Variables :
1888 * Result : TRUE / FALSE
1889 * Remark :
1890 * Status : UNTESTED STUB
1891 *
1892 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1893 *****************************************************************************/
1894
1895int WIN32API EnumICMProfilesA(HDC hdc,
1896 ICMENUMPROCA lpICMEnumProc,
1897 LPARAM lParam)
1898{
1899 dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
1900 hdc,
1901 lpICMEnumProc,
1902 lParam));
1903
1904 return (-1);
1905}
1906
1907
1908/*****************************************************************************
1909 * Name : int EnumICMProfilesW
1910 * Purpose : The EnumICMProfilesW function enumerates the different color
1911 * profiles that the system supports for the specified device context.
1912 * Parameters: HDC hdc
1913 * ICMENUMPROC lpICMEnumFunc
1914 * LPARAM lParam
1915 * Variables :
1916 * Result : TRUE / FALSE
1917 * Remark :
1918 * Status : UNTESTED STUB
1919 *
1920 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1921 *****************************************************************************/
1922
1923int WIN32API EnumICMProfilesW(HDC hdc,
1924 ICMENUMPROCW lpICMEnumProc,
1925 LPARAM lParam)
1926{
1927 dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
1928 hdc,
1929 lpICMEnumProc,
1930 lParam));
1931
1932 return (-1);
1933}
1934
1935
1936/*****************************************************************************
1937 * Name : BOOL FixBrushOrgEx
1938 * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
1939 * It is provided for compatibility with Win32s. If called, the
1940 * function does nothing, and returns FALSE.
1941 * Parameters: HDC, int, int, LPPOINT
1942 * Variables :
1943 * Result : TRUE / FALSE
1944 * Remark : not implemented in Win32
1945 * Status : UNTESTED STUB
1946 *
1947 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1948 *****************************************************************************/
1949
1950BOOL WIN32API FixBrushOrgEx(HDC hdc,
1951 int iDummy1,
1952 int iDummy2,
1953 LPPOINT lpPoint)
1954{
1955 dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1956 hdc,
1957 iDummy1,
1958 iDummy2,
1959 lpPoint));
1960
1961 return (FALSE);
1962}
1963
1964
1965/*****************************************************************************
1966 * Name : DWORD GdiGetBatchLimit
1967 * Purpose : The GdiGetBatchLimit function returns the maximum number of
1968 * function calls that can be accumulated in the calling thread's
1969 * current batch. The system flushes the current batch whenever
1970 * this limit is exceeded.
1971 * Parameters:
1972 * Variables :
1973 * Result : 1
1974 * Remark :
1975 * Status : UNTESTED STUB
1976 *
1977 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1978 *****************************************************************************/
1979
1980DWORD WIN32API GdiGetBatchLimit(VOID)
1981{
1982 dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
1983
1984 return (1);
1985}
1986
1987
1988/*****************************************************************************
1989 * Name : DWORD GdiSetBatchLimit
1990 * Purpose : The GdiSetBatchLimit function sets the maximum number of
1991 * functions that can be accumulated in the calling thread's current
1992 * batch. The system flushes the current batch whenever this limit
1993 * is exceeded.
1994 * Parameters: DWORD dwLimit
1995 * Variables :
1996 * Result :
1997 * Remark :
1998 * Status : UNTESTED STUB
1999 *
2000 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2001 *****************************************************************************/
2002
2003DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
2004{
2005 dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
2006 dwLimit));
2007
2008 return (1);
2009}
2010
2011
2012/*****************************************************************************
2013 * Name : DWORD GetCharacterPlacementA
2014 * Purpose : The GetCharacterPlacementA function retrieves information about
2015 * a character string, such as character widths, caret positioning,
2016 * ordering within the string, and glyph rendering. The type of
2017 * information returned depends on the dwFlags parameter and is
2018 * based on the currently selected font in the given display context.
2019 * The function copies the information to the specified GCP_RESULTSA
2020 * structure or to one or more arrays specified by the structure.
2021 * Parameters: HDC hdc handle to device context
2022 * LPCSTR lpString pointer to string
2023 * int nCount number of characters in string
2024 * int nMaxExtent maximum extent for displayed string
2025 * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
2026 * DWORD dwFlags placement flags
2027 * Variables :
2028 * Result :
2029 * Remark :
2030 * Status : UNTESTED STUB
2031 *
2032 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2033 *****************************************************************************/
2034
2035DWORD WIN32API GetCharacterPlacementA(HDC hdc,
2036 LPCSTR lpString,
2037 int nCount,
2038 int nMaxExtent,
2039 GCP_RESULTSA * lpResults,
2040 DWORD dwFlags)
2041{
2042 dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2043 hdc,
2044 lpString,
2045 nCount,
2046 nMaxExtent,
2047 lpResults,
2048 dwFlags));
2049
2050 return (0);
2051}
2052
2053
2054/*****************************************************************************
2055 * Name : DWORD GetCharacterPlacementW
2056 * Purpose : The GetCharacterPlacementW function retrieves information about
2057 * a character string, such as character widths, caret positioning,
2058 * ordering within the string, and glyph rendering. The type of
2059 * information returned depends on the dwFlags parameter and is
2060 * based on the currently selected font in the given display context.
2061 * The function copies the information to the specified GCP_RESULTSW
2062 * structure or to one or more arrays specified by the structure.
2063 * Parameters: HDC hdc handle to device context
2064 * LPCSTR lpString pointer to string
2065 * int nCount number of characters in string
2066 * int nMaxExtent maximum extent for displayed string
2067 * GCP_RESULTSW *lpResults pointer to buffer for placement result
2068 * DWORD dwFlags placement flags
2069 * Variables :
2070 * Result :
2071 * Remark :
2072 * Status : UNTESTED STUB
2073 *
2074 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2075 *****************************************************************************/
2076
2077DWORD WIN32API GetCharacterPlacementW(HDC hdc,
2078 LPCWSTR lpString,
2079 int nCount,
2080 int nMaxExtent,
2081 GCP_RESULTSW *lpResults,
2082 DWORD dwFlags)
2083{
2084 dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2085 hdc,
2086 lpString,
2087 nCount,
2088 nMaxExtent,
2089 lpResults,
2090 dwFlags));
2091
2092 return (0);
2093}
2094
2095
2096/*****************************************************************************
2097 * Name : DWORD GetDeviceGammaRamp
2098 * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
2099 * direct color display boards.
2100 * Parameters: HDC hdc handle to device context
2101 * LPVOID lpRamp Gamma ramp array
2102 * Variables :
2103 * Result :
2104 * Remark :
2105 * Status : UNTESTED STUB
2106 *
2107 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2108 *****************************************************************************/
2109
2110DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
2111 LPVOID lpRamp)
2112{
2113 dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
2114 hdc,
2115 lpRamp));
2116
2117 return (FALSE);
2118}
2119
2120
2121
2122
2123/*****************************************************************************
2124 * Name : BOOL GetICMProfileA
2125 * Purpose : The GetICMProfileA function retrieves the name of the color
2126 * profile file for the device associated with the specified device
2127 * context.
2128 * Parameters: HDC hdc handle to device context
2129 * DWORD cbName
2130 * LPTSTR lpszFilename
2131 * Variables :
2132 * Result : TRUE / FALSE
2133 * Remark :
2134 * Status : UNTESTED STUB
2135 *
2136 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2137 *****************************************************************************/
2138
2139BOOL WIN32API GetICMProfileA(HDC hdc,
2140 DWORD cbName,
2141 LPTSTR lpszFilename)
2142{
2143 dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
2144 hdc,
2145 cbName,
2146 lpszFilename));
2147
2148 return (FALSE);
2149}
2150
2151
2152/*****************************************************************************
2153 * Name : BOOL GetICMProfileW
2154 * Purpose : The GetICMProfileW function retrieves the name of the color
2155 * profile file for the device associated with the specified device
2156 * context.
2157 * Parameters: HDC hdc handle to device context
2158 * DWORD cbName
2159 * LPWSTR lpszFilename
2160 * Variables :
2161 * Result : TRUE / FALSE
2162 * Remark :
2163 * Status : UNTESTED STUB
2164 *
2165 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2166 *****************************************************************************/
2167
2168BOOL WIN32API GetICMProfileW(HDC hdc,
2169 DWORD cbName,
2170 LPTSTR lpszFilename)
2171{
2172 dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
2173 hdc,
2174 cbName,
2175 lpszFilename));
2176
2177 return (FALSE);
2178}
2179
2180
2181/*****************************************************************************
2182 * Name : BOOL GetLogColorSpaceA
2183 * Purpose : The GetLogColorSpace function retrieves information about the
2184 * logical color space identified by the specified handle.
2185 * Parameters: HCOLORSPACE hColorSpace
2186 * LPLOGCOLORSPACE lpbuffer
2187 * DWORD nSize
2188 * Variables :
2189 * Result : TRUE / FALSE
2190 * Remark :
2191 * Status : UNTESTED STUB
2192 *
2193 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2194 *****************************************************************************/
2195
2196#define LPLOGCOLORSPACE LPVOID
2197BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
2198 LPLOGCOLORSPACE lpBuffer,
2199 DWORD nSize)
2200{
2201 dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
2202 hColorSpace,
2203 lpBuffer,
2204 nSize));
2205
2206 return (FALSE);
2207}
2208
2209
2210/*****************************************************************************
2211 * Name : BOOL GetLogColorSpaceW
2212 * Purpose : The GetLogColorSpace function retrieves information about the
2213 * logical color space identified by the specified handle.
2214 * Parameters: HCOLORSPACE hColorSpace
2215 * LPLOGCOLORSPACE lpbuffer
2216 * DWORD nSize
2217 * Variables :
2218 * Result : TRUE / FALSE
2219 * Remark :
2220 * Status : UNTESTED STUB
2221 *
2222 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2223 *****************************************************************************/
2224
2225BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
2226 LPLOGCOLORSPACE lpBuffer,
2227 DWORD nSize)
2228{
2229 dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
2230 hColorSpace,
2231 lpBuffer,
2232 nSize));
2233
2234 return (FALSE);
2235}
2236
2237
2238/*****************************************************************************
2239 * Name : BOOL SetDeviceGammaRamp
2240 * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
2241 * color display boards.
2242 * Parameters: HDC hdc handle of device context
2243 * LPVOID lpRamp
2244 * Variables :
2245 * Result : TRUE / FALSE
2246 * Remark :
2247 * Status : UNTESTED STUB
2248 *
2249 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2250 *****************************************************************************/
2251
2252BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
2253 LPVOID lpRamp)
2254{
2255 dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
2256 hdc,
2257 lpRamp));
2258
2259 return (FALSE);
2260}
2261
2262
2263/*****************************************************************************
2264 * Name : BOOL SetICMProfileA
2265 * Purpose : The SetICMProfileA function sets the color profile for the
2266 * specified device context.
2267 * Parameters: HDC hdc handle of device context
2268 * LPTSTR lpFileName
2269 * Variables :
2270 * Result : TRUE / FALSE
2271 * Remark :
2272 * Status : UNTESTED STUB
2273 *
2274 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2275 *****************************************************************************/
2276
2277BOOL WIN32API SetICMProfileA(HDC hdc,
2278 LPTSTR lpFileName)
2279{
2280 dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
2281 hdc,
2282 lpFileName));
2283
2284 return (FALSE);
2285}
2286
2287
2288/*****************************************************************************
2289 * Name : BOOL SetICMProfileW
2290 * Purpose : The SetICMProfileW function sets the color profile for the
2291 * specified device context.
2292 * Parameters: HDC hdc handle of device context
2293 * LPTSTR lpFileName
2294 * Variables :
2295 * Result : TRUE / FALSE
2296 * Remark :
2297 * Status : UNTESTED STUB
2298 *
2299 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2300 *****************************************************************************/
2301
2302BOOL WIN32API SetICMProfileW(HDC hdc,
2303 LPWSTR lpFileName)
2304{
2305 dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
2306 hdc,
2307 lpFileName));
2308
2309 return (FALSE);
2310}
2311
2312
2313
2314/*****************************************************************************
2315 * Name : BOOL UpdateICMRegKeyA
2316 * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
2317 * registry entries that identify ICC color profiles or color-matching
2318 * DLLs. The function carries out the action specified by the nCommand
2319 * parameter.
2320 * Parameters: DWORD dwReserved
2321 * DWORD CMID
2322 * LPTSTR lpszFileName
2323 * UINT nCommand
2324 * Variables :
2325 * Result : TRUE / FALSE
2326 * Remark :
2327 * Status : UNTESTED STUB
2328 *
2329 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2330 *****************************************************************************/
2331
2332BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
2333 DWORD CMID,
2334 LPTSTR lpszFileName,
2335 UINT nCommand)
2336{
2337 dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
2338 dwReserved,
2339 CMID,
2340 lpszFileName,
2341 nCommand));
2342
2343 return (FALSE);
2344}
2345
2346
2347/*****************************************************************************
2348 * Name : BOOL UpdateICMRegKeyW
2349 * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
2350 * registry entries that identify ICC color profiles or color-matching
2351 * DLLs. The function carries out the action specified by the nCommand
2352 * parameter.
2353 * Parameters: DWORD dwReserved
2354 * DWORD CMID
2355 * LPWSTR lpszFileName
2356 * UINT nCommand
2357 * Variables :
2358 * Result : TRUE / FALSE
2359 * Remark :
2360 * Status : UNTESTED STUB
2361 *
2362 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2363 *****************************************************************************/
2364
2365BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
2366 DWORD CMID,
2367 LPWSTR lpszFileName,
2368 UINT nCommand)
2369{
2370 dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
2371 dwReserved,
2372 CMID,
2373 lpszFileName,
2374 nCommand));
2375
2376 return (FALSE);
2377}
2378
2379
2380
Note: See TracBrowser for help on using the repository browser.