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

Last change on this file since 2859 was 2859, checked in by sandervl, 26 years ago

* empty log message *

File size: 88.6 KB
Line 
1/* $Id: gdi32.cpp,v 1.44 2000-02-22 19:11:49 sandervl 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 return O32_CreateIC(lpszDriver, lpszDevice, lpszOutput, lpdvmInit);
500}
501//******************************************************************************
502//******************************************************************************
503HDC WIN32API CreateICW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
504{
505 char *astring4, *astring5;
506
507 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
508 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
509 char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
510 if(arg4)
511 {
512 astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
513 astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
514 }
515
516 HDC rc;
517 DEVMODEA devmode;
518
519 dprintf(("GDI32: CreateICW"));
520
521 if(arg4)
522 {
523 strcpy((char*)devmode.dmDeviceName, astring4);
524 strcpy((char*)devmode.dmFormName, astring5);
525
526 devmode.dmSpecVersion = arg4->dmSpecVersion;
527 devmode.dmDriverVersion = arg4->dmDriverVersion;
528 devmode.dmSize = arg4->dmSize;
529 devmode.dmDriverExtra = arg4->dmDriverExtra;
530 devmode.dmFields = arg4->dmFields;
531 devmode.dmOrientation = arg4->dmOrientation;
532 devmode.dmPaperSize = arg4->dmPaperSize;
533 devmode.dmPaperLength = arg4->dmPaperLength;
534 devmode.dmPaperWidth = arg4->dmPaperWidth;
535 devmode.dmScale = arg4->dmScale;
536 devmode.dmCopies = arg4->dmCopies;
537 devmode.dmDefaultSource = arg4->dmDefaultSource;
538 devmode.dmPrintQuality = arg4->dmPrintQuality;
539 devmode.dmColor = arg4->dmColor;
540 devmode.dmDuplex = arg4->dmDuplex;
541 devmode.dmYResolution = arg4->dmYResolution;
542 devmode.dmTTOption = arg4->dmTTOption;
543 devmode.dmCollate = arg4->dmCollate;
544 devmode.dmLogPixels = arg4->dmLogPixels;
545 devmode.dmBitsPerPel = arg4->dmBitsPerPel;
546 devmode.dmPelsWidth = arg4->dmPelsWidth;
547 devmode.dmPelsHeight = arg4->dmPelsHeight;
548 devmode.dmDisplayFlags = arg4->dmDisplayFlags;
549 devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
550 devmode.dmICMMethod = arg4->dmICMMethod;
551 devmode.dmICMIntent = arg4->dmICMIntent;
552 devmode.dmMediaType = arg4->dmMediaType;
553 devmode.dmDitherType = arg4->dmDitherType;
554 devmode.dmReserved1 = arg4->dmReserved1;
555 devmode.dmReserved2 = arg4->dmReserved2;
556
557 rc = CreateICA(astring1,astring2,astring3,&devmode);
558 }
559 else
560 rc = CreateICA(astring1,astring2,astring3, NULL);
561
562 FreeAsciiString(astring1);
563 FreeAsciiString(astring2);
564 FreeAsciiString(astring3);
565 if(arg4)
566 {
567 FreeAsciiString(astring4);
568 FreeAsciiString(astring5);
569 }
570
571 return rc;
572}
573//******************************************************************************
574//******************************************************************************
575HBRUSH WIN32API CreateSolidBrush( COLORREF arg1)
576{
577 dprintf(("GDI32: CreateSolidBrush\n"));
578 return O32_CreateSolidBrush(arg1);
579}
580//******************************************************************************
581//******************************************************************************
582BOOL WIN32API DPtoLP( HDC arg1, PPOINT arg2, int arg3)
583{
584 dprintf(("GDI32: DPtoLP\n"));
585 return O32_DPtoLP(arg1, arg2, arg3);
586}
587//******************************************************************************
588//******************************************************************************
589BOOL WIN32API Ellipse( HDC arg1, int arg2, int arg3, int arg4, int arg5)
590{
591 dprintf(("GDI32: Ellipse"));
592 return O32_Ellipse(arg1, arg2, arg3, arg4, arg5);
593}
594//******************************************************************************
595//******************************************************************************
596int WIN32API EndDoc( HDC arg1)
597{
598 dprintf(("GDI32: EndDoc"));
599 return O32_EndDoc(arg1);
600}
601//******************************************************************************
602//******************************************************************************
603int WIN32API EndPage( HDC arg1)
604{
605 dprintf(("GDI32: EndPage"));
606 return O32_EndPage(arg1);
607}
608//******************************************************************************
609//******************************************************************************
610BOOL WIN32API EndPath( HDC arg1)
611{
612 dprintf(("GDI32: EndPath"));
613 return O32_EndPath(arg1);
614}
615//******************************************************************************
616//******************************************************************************
617BOOL WIN32API Rectangle( HDC arg1, int arg2, int arg3, int arg4, int arg5)
618{
619 dprintf(("GDI32: Rectangle\n"));
620 return O32_Rectangle(arg1, arg2, arg3, arg4, arg5);
621}
622//******************************************************************************
623//******************************************************************************
624int WIN32API SetROP2( HDC hdc, int rop2)
625{
626 dprintf(("GDI32: SetROP2 %x %x", hdc, rop2));
627 return O32_SetROP2(hdc, rop2);
628}
629//******************************************************************************
630//******************************************************************************
631int WIN32API EnumObjects( HDC arg1, int arg2, GOBJENUMPROC arg3, LPARAM arg4)
632{
633 dprintf(("GDI32: EnumObjects STUB"));
634 //calling convention differences
635// return O32_EnumObjects(arg1, arg2, arg3, arg4);
636 return 0;
637}
638//******************************************************************************
639//******************************************************************************
640int WIN32API Escape( HDC arg1, int arg2, int arg3, LPCSTR arg4, PVOID arg5)
641{
642 dprintf(("GDI32: Escape"));
643 return O32_Escape(arg1, arg2, arg3, arg4, arg5);
644}
645//******************************************************************************
646//******************************************************************************
647int WIN32API ExcludeClipRect( HDC arg1, int arg2, int arg3, int arg4, int arg5)
648{
649 dprintf(("GDI32: ExcludeClipRect"));
650 return O32_ExcludeClipRect(arg1, arg2, arg3, arg4, arg5);
651}
652//******************************************************************************
653//******************************************************************************
654HPEN WIN32API ExtCreatePen( DWORD arg1, DWORD arg2, const LOGBRUSH * arg3, DWORD arg4, const DWORD * arg5)
655{
656 dprintf(("GDI32: ExtCreatePen"));
657 return O32_ExtCreatePen(arg1, arg2, arg3, arg4, arg5);
658}
659//******************************************************************************
660//******************************************************************************
661BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5)
662{
663 dprintf(("GDI32: ExtFloodFill"));
664 return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5);
665}
666//******************************************************************************
667//******************************************************************************
668BOOL WIN32API FillPath( HDC arg1)
669{
670 dprintf(("GDI32: FillPath"));
671 return O32_FillPath(arg1);
672}
673//******************************************************************************
674//******************************************************************************
675BOOL WIN32API FlattenPath( HDC arg1)
676{
677 dprintf(("GDI32: FlattenPath"));
678 return O32_FlattenPath(arg1);
679}
680//******************************************************************************
681//******************************************************************************
682BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4)
683{
684 dprintf(("GDI32: FloodFill"));
685 return O32_FloodFill(arg1, arg2, arg3, arg4);
686}
687//******************************************************************************
688//******************************************************************************
689int WIN32API GetArcDirection( HDC arg1)
690{
691 dprintf(("GDI32: GetArcDirection"));
692 return O32_GetArcDirection(arg1);
693}
694//******************************************************************************
695//******************************************************************************
696BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2)
697{
698 dprintf(("GDI32: GetAspectRatioFilterEx"));
699 return O32_GetAspectRatioFilterEx(arg1, arg2);
700}
701//******************************************************************************
702//******************************************************************************
703COLORREF WIN32API GetBkColor( HDC arg1)
704{
705 dprintf(("GDI32: GetBkColor"));
706 return O32_GetBkColor(arg1);
707}
708//******************************************************************************
709//******************************************************************************
710int WIN32API GetBkMode( HDC arg1)
711{
712 dprintf(("GDI32: GetBkMode"));
713 return O32_GetBkMode(arg1);
714}
715//******************************************************************************
716//******************************************************************************
717UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3)
718{
719 dprintf(("GDI32: GetBoundsRect"));
720 return O32_GetBoundsRect(arg1, arg2, arg3);
721}
722//******************************************************************************
723//******************************************************************************
724BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2)
725{
726 dprintf(("GDI32: GetBrushOrgEx"));
727 return O32_GetBrushOrgEx(arg1, arg2);
728}
729//******************************************************************************
730//******************************************************************************
731BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
732{
733 dprintf(("GDI32: GetCharABCWidthsA"));
734 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
735}
736//******************************************************************************
737//******************************************************************************
738BOOL WIN32API GetCharABCWidthsW( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
739{
740 dprintf(("GDI32: GetCharABCWidthsW not properly implemented."));
741 // NOTE: This will not work as is (needs UNICODE support)
742 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
743}
744//******************************************************************************
745//******************************************************************************
746BOOL WIN32API GetCharWidth32A( HDC arg1, UINT arg2, UINT arg3, PINT arg4)
747{
748 dprintf(("GDI32: GetCharWidth32A"));
749 return O32_GetCharWidth(arg1, arg2, arg3, arg4);
750}
751//******************************************************************************
752//TODO: Cut off Unicode chars?
753//******************************************************************************
754BOOL WIN32API GetCharWidth32W(HDC arg1, UINT iFirstChar, UINT iLastChar, PINT arg4)
755{
756 dprintf(("GDI32: GetCharWidth32W, not properly implemented"));
757 return O32_GetCharWidth(arg1, iFirstChar, iLastChar, arg4);
758}
759//******************************************************************************
760//******************************************************************************
761int WIN32API GetClipBox( HDC arg1, PRECT arg2)
762{
763 int rc;
764
765 rc = O32_GetClipBox(arg1, arg2);
766 dprintf(("GDI32: GetClipBox of %X returned %d\n", arg1, rc));
767 return(rc);
768}
769//******************************************************************************
770//******************************************************************************
771HANDLE WIN32API GetCurrentObject( HDC hdc, UINT arg2)
772{
773 dprintf(("GDI32: GetCurrentObject %x %x", hdc, arg2));
774 return (HANDLE)O32_GetCurrentObject(hdc, arg2);
775}
776//******************************************************************************
777//******************************************************************************
778BOOL WIN32API GetCurrentPositionEx( HDC arg1, PPOINT arg2)
779{
780 dprintf(("GDI32: GetCurrentPositionEx"));
781 return O32_GetCurrentPositionEx(arg1, arg2);
782}
783//******************************************************************************
784//******************************************************************************
785int WIN32API GetDeviceCaps(HDC hdc, int nIndex)
786{
787 int rc;
788
789 rc = O32_GetDeviceCaps(hdc, nIndex);
790 dprintf(("GDI32: GetDeviceCaps %X, %d returned %d\n", hdc, nIndex, rc));
791 //SvL: 13-9-'98: NT returns -1 when using 16 bits colors, NOT 65536!
792 if(nIndex == NUMCOLORS && rc > 256)
793 return -1;
794
795 return(rc);
796}
797//******************************************************************************
798//******************************************************************************
799int WIN32API GetGraphicsMode(HDC arg1)
800{
801 dprintf(("GDI32: GetGraphicsMode"));
802 return O32_GetGraphicsMode(arg1);
803}
804//******************************************************************************
805//******************************************************************************
806DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
807{
808 dprintf(("GDI32: GetKerningPairsA"));
809 return O32_GetKerningPairs(arg1, arg2, arg3);
810}
811//******************************************************************************
812//******************************************************************************
813DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
814{
815 dprintf(("GDI32: GetKerningPairsW"));
816 // NOTE: This will not work as is (needs UNICODE support)
817 return O32_GetKerningPairs(arg1, arg2, arg3);
818}
819//******************************************************************************
820//******************************************************************************
821int WIN32API GetMapMode( HDC arg1)
822{
823 dprintf(("GDI32: GetMapMode"));
824 return O32_GetMapMode(arg1);
825}
826//******************************************************************************
827//******************************************************************************
828BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
829{
830 dprintf(("GDI32: GetMiterLimit"));
831 return O32_GetMiterLimit(arg1, arg2);
832}
833//******************************************************************************
834//******************************************************************************
835COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2)
836{
837 dprintf(("GDI32: GetNearestColor\n"));
838 return O32_GetNearestColor(arg1, arg2);
839}
840//******************************************************************************
841//******************************************************************************
842UINT WIN32API GetOutlineTextMetricsA( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICA arg3)
843{
844 dprintf(("GDI32: GetOutlineTextMetricsA"));
845 return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
846}
847//******************************************************************************
848//******************************************************************************
849UINT WIN32API GetOutlineTextMetricsW( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICW arg3)
850{
851 dprintf(("GDI32: GetOutlineTextMetricsW STUB"));
852 // NOTE: This will not work as is (needs UNICODE support)
853// return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
854 return 0;
855}
856//******************************************************************************
857//******************************************************************************
858INT WIN32API GetPath( HDC arg1, PPOINT arg2, PBYTE arg3, int arg4)
859{
860 dprintf(("GDI32: GetPath"));
861 return O32_GetPath(arg1, arg2, arg3, arg4);
862}
863//******************************************************************************
864//******************************************************************************
865int WIN32API GetPolyFillMode( HDC arg1)
866{
867 dprintf(("GDI32: GetPolyFillMode"));
868 return O32_GetPolyFillMode(arg1);
869}
870//******************************************************************************
871//******************************************************************************
872int WIN32API GetROP2( HDC arg1)
873{
874 dprintf(("GDI32: GetROP2"));
875 return O32_GetROP2(arg1);
876}
877//******************************************************************************
878//******************************************************************************
879BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2)
880{
881 dprintf(("GDI32: GetRasterizerCaps"));
882 return O32_GetRasterizerCaps(arg1, arg2);
883}
884//******************************************************************************
885//******************************************************************************
886UINT WIN32API GetTextAlign( HDC arg1)
887{
888 dprintf(("GDI32: GetTextAlign"));
889 return O32_GetTextAlign(arg1);
890}
891//******************************************************************************
892//******************************************************************************
893int WIN32API GetTextCharacterExtra( HDC arg1)
894{
895 dprintf(("GDI32: GetTextCharacterExtra"));
896 return O32_GetTextCharacterExtra(arg1);
897}
898//******************************************************************************
899//******************************************************************************
900COLORREF WIN32API GetTextColor( HDC arg1)
901{
902 dprintf(("GDI32: GetTextColor"));
903 return O32_GetTextColor(arg1);
904}
905//******************************************************************************
906//******************************************************************************
907BOOL WIN32API GetTextExtentPoint32A( HDC hdc, LPCSTR lpsz, int cbString, PSIZE lpSize)
908{
909 BOOL rc;
910
911 lpSize->cx = lpSize->cy = 0;
912 rc = O32_GetTextExtentPoint32(hdc, lpsz, cbString, lpSize);
913 dprintf(("GDI32: GetTextExtentPoint32A %x %s %d returned %d (%d,%d)", hdc, lpsz, cbString, rc, lpSize->cx, lpSize->cy));
914 return rc;
915}
916//******************************************************************************
917//******************************************************************************
918BOOL WIN32API GetTextExtentPoint32W(HDC arg1, LPCWSTR arg2, int arg3, PSIZE lpSize)
919{
920 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
921 BOOL rc;
922
923 dprintf(("GDI32: GetTextExtentPoint32W %s\n", astring));
924 lpSize->cx = lpSize->cy = 0;
925 rc = O32_GetTextExtentPoint32(arg1, astring, arg3, lpSize);
926 FreeAsciiString(astring);
927 return(rc);
928}
929//******************************************************************************
930//******************************************************************************
931BOOL WIN32API GetTextExtentPointW(HDC hdc,
932 LPCWSTR lpString,
933 int cbString,
934 PSIZE lpSize)
935{
936 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
937 BOOL rc;
938
939 lpSize->cx = lpSize->cy = 0;
940 rc = O32_GetTextExtentPoint(hdc,
941 astring,
942 cbString,
943 lpSize);
944 dprintf(("GDI32: GetTextExtentPointW %X %s (size %08xh) returned %d\n", hdc, astring, cbString, rc));
945 dprintf(("GDI32: GetTextExtentPointW (%d,%d)\n", lpSize->cx, lpSize->cy));
946
947 FreeAsciiString(astring);
948 return(rc);
949}
950//******************************************************************************
951//******************************************************************************
952int WIN32API GetTextFaceA( HDC arg1, int arg2, LPSTR arg3)
953{
954 dprintf(("GDI32: GetTextFaceA"));
955 return O32_GetTextFace(arg1, arg2, arg3);
956}
957//******************************************************************************
958//******************************************************************************
959int WIN32API GetTextFaceW( HDC arg1, int arg2, LPWSTR arg3)
960{
961 char *astring = (char *)malloc(arg2+1);
962 int rc;
963
964 dprintf(("GDI32: GetTextFaceW"));
965 rc = O32_GetTextFace(arg1, arg2, astring);
966 AsciiToUnicode(astring, arg3);
967 free(astring);
968 return rc;
969}
970//******************************************************************************
971//******************************************************************************
972BOOL WIN32API GetTextMetricsA( HDC arg1, LPTEXTMETRICA arg2)
973{
974 BOOL rc;
975
976 rc = O32_GetTextMetrics(arg1, arg2);
977 dprintf(("GDI32: GetTextMetricsA returned %d\n", rc));
978 return(rc);
979}
980//******************************************************************************
981//******************************************************************************
982BOOL WIN32API GetTextMetricsW( HDC arg1, LPTEXTMETRICW pwtm)
983{
984 BOOL rc;
985 TEXTMETRICA atm;
986
987 dprintf(("GDI32: GetTextMetricsW"));
988
989 rc = O32_GetTextMetrics(arg1, &atm);
990 pwtm->tmHeight = atm.tmHeight;
991 pwtm->tmAscent = atm.tmAscent;
992 pwtm->tmDescent = atm.tmDescent;
993 pwtm->tmInternalLeading = atm.tmInternalLeading;
994 pwtm->tmExternalLeading = atm.tmExternalLeading;
995 pwtm->tmAveCharWidth = atm.tmAveCharWidth;
996 pwtm->tmMaxCharWidth = atm.tmMaxCharWidth;
997 pwtm->tmWeight = atm.tmWeight;
998 pwtm->tmOverhang = atm.tmOverhang;
999 pwtm->tmDigitizedAspectX = atm.tmDigitizedAspectX;
1000 pwtm->tmDigitizedAspectY = atm.tmDigitizedAspectY;
1001 pwtm->tmFirstChar = atm.tmFirstChar;
1002 pwtm->tmLastChar = atm.tmLastChar;
1003 pwtm->tmDefaultChar = atm.tmDefaultChar;
1004 pwtm->tmBreakChar = atm.tmBreakChar;
1005 pwtm->tmItalic = atm.tmItalic;
1006 pwtm->tmUnderlined = atm.tmUnderlined;
1007 pwtm->tmStruckOut = atm.tmStruckOut;
1008 pwtm->tmPitchAndFamily = atm.tmPitchAndFamily;
1009 pwtm->tmCharSet = atm.tmCharSet;
1010 return(rc);
1011}
1012//******************************************************************************
1013//******************************************************************************
1014BOOL WIN32API GetViewportExtEx( HDC arg1, PSIZE arg2)
1015{
1016 dprintf(("GDI32: GetViewportExtEx"));
1017 return O32_GetViewportExtEx(arg1, arg2);
1018}
1019//******************************************************************************
1020//******************************************************************************
1021BOOL WIN32API GetViewportOrgEx( HDC arg1, PPOINT arg2)
1022{
1023 dprintf(("GDI32: GetViewportOrgEx"));
1024 return O32_GetViewportOrgEx(arg1, arg2);
1025}
1026//******************************************************************************
1027//******************************************************************************
1028BOOL WIN32API GetWindowOrgEx( HDC arg1, PPOINT arg2)
1029{
1030 dprintf(("GDI32: GetWindowOrgEx"));
1031 return O32_GetWindowOrgEx(arg1, arg2);
1032}
1033//******************************************************************************
1034//******************************************************************************
1035BOOL WIN32API GetWorldTransform( HDC arg1, LPXFORM arg2)
1036{
1037 dprintf(("GDI32: GetWorldTransform"));
1038 return O32_GetWorldTransform(arg1, arg2);
1039}
1040//******************************************************************************
1041//******************************************************************************
1042int WIN32API IntersectClipRect(HDC arg1, int arg2, int arg3, int arg4, int arg5)
1043{
1044 int rc;
1045
1046 rc = O32_IntersectClipRect(arg1, arg2, arg3, arg4, arg5);
1047 dprintf(("GDI32: IntersectClipRect returned %d\n", rc));
1048 return(rc);
1049}
1050//******************************************************************************
1051//******************************************************************************
1052BOOL WIN32API LPtoDP( HDC arg1, PPOINT arg2, int arg3)
1053{
1054 dprintf(("GDI32: LPtoDP"));
1055 return O32_LPtoDP(arg1, arg2, arg3);
1056}
1057//******************************************************************************
1058//******************************************************************************
1059BOOL WIN32API ModifyWorldTransform( HDC arg1, const XFORM *arg2, DWORD arg3)
1060{
1061 dprintf(("GDI32: ModifyWorldTransform"));
1062 return O32_ModifyWorldTransform(arg1, (LPXFORM)arg2, arg3);
1063}
1064//******************************************************************************
1065//******************************************************************************
1066BOOL WIN32API OffsetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1067{
1068 dprintf(("GDI32: OffsetViewportOrgEx"));
1069 return O32_OffsetViewportOrgEx(arg1, arg2, arg3, arg4);
1070}
1071//******************************************************************************
1072//******************************************************************************
1073BOOL WIN32API OffsetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1074{
1075 dprintf(("GDI32: OffsetWindowOrgEx"));
1076 return O32_OffsetWindowOrgEx(arg1, arg2, arg3, arg4);
1077}
1078//******************************************************************************
1079//******************************************************************************
1080BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
1081 int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
1082 int nYRadial2)
1083{
1084 dprintf(("GDI32: Pie"));
1085 //CB: bug in O32_Pie
1086 if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
1087 return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
1088 else
1089 return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
1090}
1091//******************************************************************************
1092//******************************************************************************
1093BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
1094{
1095 dprintf(("GDI32: PolyBezier"));
1096 return O32_PolyBezier(arg1, arg2, (int)arg3);
1097}
1098//******************************************************************************
1099//******************************************************************************
1100BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
1101{
1102 dprintf(("GDI32: PolyBezierTo"));
1103 return O32_PolyBezierTo(arg1, arg2, arg3);
1104}
1105//******************************************************************************
1106//******************************************************************************
1107BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
1108{
1109 dprintf(("GDI32: PolyDraw"));
1110 return O32_PolyDraw(arg1, arg2, arg3, arg4);
1111}
1112//******************************************************************************
1113//******************************************************************************
1114BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
1115{
1116 dprintf(("GDI32: PolyPolygon"));
1117 return O32_PolyPolygon(arg1, arg2, arg3, arg4);
1118}
1119//******************************************************************************
1120//******************************************************************************
1121BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
1122{
1123 dprintf(("GDI32: PolyPolyline"));
1124
1125 return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
1126}
1127//******************************************************************************
1128//******************************************************************************
1129BOOL WIN32API Polygon( HDC arg1, const POINT * arg2, int arg3)
1130{
1131 dprintf(("GDI32: Polygon"));
1132 return O32_Polygon(arg1, arg2, arg3);
1133}
1134//******************************************************************************
1135//******************************************************************************
1136BOOL WIN32API PtVisible( HDC arg1, int arg2, int arg3)
1137{
1138 dprintf(("GDI32: PtVisible"));
1139 return O32_PtVisible(arg1, arg2, arg3);
1140}
1141//******************************************************************************
1142//******************************************************************************
1143BOOL WIN32API RectVisible( HDC arg1, const RECT * arg2)
1144{
1145 dprintf(("GDI32: RectVisible\n"));
1146 return O32_RectVisible(arg1, arg2);
1147}
1148//******************************************************************************
1149//******************************************************************************
1150HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
1151{
1152 dprintf(("GDI32: ResetDCA\n"));
1153 return (HDC)O32_ResetDC(arg1, arg2);
1154}
1155//******************************************************************************
1156//******************************************************************************
1157HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
1158{
1159 dprintf(("GDI32: ResetDCW\n"));
1160 // NOTE: This will not work as is (needs UNICODE support)
1161 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
1162}
1163//******************************************************************************
1164//******************************************************************************
1165BOOL WIN32API RestoreDC( HDC arg1, int arg2)
1166{
1167 dprintf(("GDI32: RestoreDC\n"));
1168 return O32_RestoreDC(arg1, arg2);
1169}
1170//******************************************************************************
1171//******************************************************************************
1172BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
1173{
1174 dprintf(("GDI32: RoundRect"));
1175 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1176}
1177//******************************************************************************
1178//******************************************************************************
1179int WIN32API SaveDC( HDC arg1)
1180{
1181 dprintf(("GDI32: SaveDC"));
1182 return O32_SaveDC(arg1);
1183}
1184//******************************************************************************
1185//******************************************************************************
1186BOOL WIN32API ScaleViewportExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1187{
1188 dprintf(("GDI32: ScaleViewportExtEx"));
1189 return O32_ScaleViewportExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1190}
1191//******************************************************************************
1192//******************************************************************************
1193BOOL WIN32API ScaleWindowExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1194{
1195 dprintf(("GDI32: ScaleWindowExtEx"));
1196 return O32_ScaleWindowExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1197}
1198//******************************************************************************
1199//******************************************************************************
1200int WIN32API SetArcDirection( HDC arg1, int arg2)
1201{
1202 dprintf(("GDI32: SetArcDirection"));
1203 return O32_SetArcDirection(arg1, arg2);
1204}
1205//******************************************************************************
1206//******************************************************************************
1207UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
1208{
1209 dprintf(("GDI32: SetBoundsRect"));
1210 return O32_SetBoundsRect(arg1, arg2, arg3);
1211}
1212//******************************************************************************
1213//******************************************************************************
1214BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1215{
1216 BOOL rc;
1217
1218 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
1219 dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc));
1220 return(rc);
1221}
1222//******************************************************************************
1223//******************************************************************************
1224int WIN32API SetGraphicsMode(HDC arg1, int arg2)
1225{
1226 dprintf(("GDI32: SetGraphicsMode"));
1227 return O32_SetGraphicsMode(arg1, arg2);
1228}
1229//******************************************************************************
1230//******************************************************************************
1231int WIN32API SetMapMode( HDC arg1, int arg2)
1232{
1233 dprintf(("GDI32: SetMapMode"));
1234 return O32_SetMapMode(arg1, arg2);
1235}
1236//******************************************************************************
1237//******************************************************************************
1238DWORD WIN32API SetMapperFlags( HDC arg1, DWORD arg2)
1239{
1240 dprintf(("GDI32: SetMapperFlags"));
1241 return O32_SetMapperFlags(arg1, arg2);
1242}
1243//******************************************************************************
1244//******************************************************************************
1245BOOL WIN32API SetMiterLimit( HDC arg1, float arg2, float * arg3)
1246{
1247 dprintf(("GDI32: SetMiterLimit"));
1248 return O32_SetMiterLimit(arg1, arg2, arg3);
1249}
1250//******************************************************************************
1251//******************************************************************************
1252int WIN32API SetPolyFillMode( HDC arg1, int arg2)
1253{
1254 dprintf(("GDI32: SetPolyFillMode"));
1255 return O32_SetPolyFillMode(arg1, arg2);
1256}
1257//******************************************************************************
1258//******************************************************************************
1259UINT WIN32API SetTextAlign( HDC arg1, UINT arg2)
1260{
1261 dprintf(("GDI32: SetTextAlign"));
1262 return O32_SetTextAlign(arg1, arg2);
1263}
1264//******************************************************************************
1265//******************************************************************************
1266int WIN32API SetTextCharacterExtra( HDC arg1, int arg2)
1267{
1268 dprintf(("GDI32: SetTextCharacterExtra"));
1269 return O32_SetTextCharacterExtra(arg1, arg2);
1270}
1271//******************************************************************************
1272//******************************************************************************
1273BOOL WIN32API SetTextJustification( HDC arg1, int arg2, int arg3)
1274{
1275 dprintf(("GDI32: SetTextJustification"));
1276 return O32_SetTextJustification(arg1, arg2, arg3);
1277}
1278//******************************************************************************
1279//******************************************************************************
1280BOOL WIN32API SetViewportExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
1281{
1282 dprintf(("GDI32: SetViewportExtEx"));
1283 return O32_SetViewportExtEx(arg1, arg2, arg3, arg4);
1284}
1285//******************************************************************************
1286//******************************************************************************
1287BOOL WIN32API SetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1288{
1289 dprintf(("GDI32: SetViewportOrgEx"));
1290 return O32_SetViewportOrgEx(arg1, arg2, arg3, arg4);
1291}
1292//******************************************************************************
1293//******************************************************************************
1294BOOL WIN32API SetWindowExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
1295{
1296 dprintf(("GDI32: SetWindowExtEx"));
1297 return O32_SetWindowExtEx(arg1, arg2, arg3, arg4);
1298}
1299//******************************************************************************
1300//******************************************************************************
1301BOOL WIN32API SetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1302{
1303 dprintf(("GDI32: SetWindowOrgEx"));
1304 return O32_SetWindowOrgEx(arg1, arg2, arg3, arg4);
1305}
1306//******************************************************************************
1307//******************************************************************************
1308BOOL WIN32API SetWorldTransform( HDC arg1, const XFORM *arg2)
1309{
1310 dprintf(("GDI32: SetWorldTransform"));
1311 return O32_SetWorldTransform(arg1, (LPXFORM)arg2);
1312}
1313//******************************************************************************
1314//******************************************************************************
1315INT WIN32API StartDocA( HDC arg1, const DOCINFOA *arg2)
1316{
1317 dprintf(("GDI32: StartDocA"));
1318 return O32_StartDoc(arg1, (LPDOCINFOA)arg2);
1319}
1320//******************************************************************************
1321//******************************************************************************
1322INT WIN32API StartDocW( HDC arg1, const DOCINFOW *arg2)
1323{
1324 dprintf(("GDI32: StartDocW STUB"));
1325 // NOTE: This will not work as is (needs UNICODE support)
1326// return O32_StartDoc(arg1, arg2);
1327 return 0;
1328}
1329//******************************************************************************
1330//******************************************************************************
1331int WIN32API StartPage( HDC arg1)
1332{
1333 dprintf(("GDI32: StartPage"));
1334 return O32_StartPage(arg1);
1335}
1336//******************************************************************************
1337//******************************************************************************
1338BOOL WIN32API UnrealizeObject( HGDIOBJ arg1)
1339{
1340 dprintf(("GDI32: UnrealizeObject"));
1341 return O32_UnrealizeObject(arg1);
1342}
1343//******************************************************************************
1344//******************************************************************************
1345BOOL WIN32API WidenPath( HDC arg1)
1346{
1347 dprintf(("GDI32: WidenPath"));
1348 return O32_WidenPath(arg1);
1349}
1350//******************************************************************************
1351//TODO: Not implemented
1352//******************************************************************************
1353int WIN32API SetAbortProc(HDC hdc, ABORTPROC lpAbortProc)
1354{
1355 dprintf(("GDI32: SetAbortProc - stub (1)w\n"));
1356 return(1);
1357}
1358//******************************************************************************
1359//Selects the current path as a clipping region for a device context, combining
1360//any existing clipping region by using the specified mode
1361//TODO: Can be emulated with SelectClipRegion??
1362//******************************************************************************
1363BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
1364{
1365 dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
1366 return(TRUE);
1367}
1368//******************************************************************************
1369//TODO: Sets the color adjustment values for a device context. (used to adjust
1370// the input color of the src bitmap for calls of StretchBlt & StretchDIBits
1371// functions when HALFTONE mode is set
1372//******************************************************************************
1373BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
1374{
1375 dprintf(("GDI32: SetColorAdjustment, not implemented!(TRUE)\n"));
1376 return(TRUE);
1377}
1378//******************************************************************************
1379//Maps colors to system palette; faster way to update window (instead of redrawing)
1380//We just redraw
1381//******************************************************************************
1382BOOL WIN32API UpdateColors(HDC hdc)
1383{
1384 dprintf(("GDI32: UpdateColors\n"));
1385 return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);
1386}
1387//******************************************************************************
1388//******************************************************************************
1389BOOL WIN32API GdiFlush()
1390{
1391 dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
1392 return(TRUE);
1393}
1394//******************************************************************************
1395//******************************************************************************
1396BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
1397{
1398 dprintf(("GDI32: GdiComment, not implemented (TRUE)\n"));
1399 return(TRUE);
1400}
1401//******************************************************************************
1402//******************************************************************************
1403BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
1404{
1405 dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
1406 return(FALSE);
1407}
1408//******************************************************************************
1409//******************************************************************************
1410BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
1411{
1412 dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
1413 return(FALSE);
1414}
1415//******************************************************************************
1416//******************************************************************************
1417BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
1418{
1419 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
1420 return(FALSE);
1421}
1422//******************************************************************************
1423//******************************************************************************
1424BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
1425 UINT iFirstChar,
1426 UINT iLastChar,
1427 LPABCFLOAT pxBUffer)
1428{
1429 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
1430 return(FALSE);
1431}
1432//******************************************************************************
1433//******************************************************************************
1434INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
1435 INT cbOutput, LPSTR lpszOutData)
1436{
1437 dprintf(("GDI32: ExtEscape, %x %x %d %x %d %x not implemented", hdc, nEscape, cbInput, lpszInData, cbOutput, lpszOutData));
1438#ifdef DEBUG
1439 if(cbInput && lpszInData) {
1440 ULONG *tmp = (ULONG *)lpszInData;
1441 for(int i=0;i<cbInput/4;i++) {
1442 dprintf(("GDI32: ExtEscape par %d: %x", i, *tmp++));
1443 }
1444 }
1445#endif
1446 return(0);
1447}
1448//******************************************************************************
1449//******************************************************************************
1450int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
1451{
1452 dprintf(("GDI32: DrawEscape, not implemented\n"));
1453 return(0);
1454}
1455//******************************************************************************
1456//******************************************************************************
1457BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
1458{
1459 dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
1460 return(FALSE);
1461}
1462//******************************************************************************
1463//******************************************************************************
1464DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
1465 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
1466{
1467 dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
1468 return(GDI_ERROR);
1469}
1470//******************************************************************************
1471
1472//******************************************************************************
1473/*KSO Thu 21.05.1998*/
1474DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
1475 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
1476{
1477 dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
1478 return(GDI_ERROR);
1479}
1480//******************************************************************************
1481
1482//******************************************************************************
1483BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
1484{
1485 // Here is a guess for a undocumented entry
1486 dprintf(("GDI32: SetObjectOwner - stub (TRUE)\n"));
1487 return TRUE;
1488}
1489//******************************************************************************
1490
1491
1492/* Office 97 stubs - KSO Thu 21.05.1998*/
1493//******************************************************************************
1494BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
1495 HDC hdc,
1496 LPCSTR str,
1497 int count,
1498 int maxExt,
1499 LPINT lpnFit,
1500 LPINT alpDx,
1501 LPSIZE size)
1502{
1503 int index, nFit, extent;
1504 SIZE tSize;
1505
1506 dprintf(("GDI32: GetTextExtendExPointA\n"));
1507
1508 size->cx = size->cy = nFit = extent = 0;
1509 for(index = 0; index < count; index++)
1510 {
1511 if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
1512 if( extent+tSize.cx < maxExt )
1513 {
1514 extent+=tSize.cx;
1515 nFit++;
1516 str++;
1517 if( alpDx )
1518 alpDx[index] = extent;
1519 if( tSize.cy > size->cy ) size->cy = tSize.cy;
1520 }
1521 else break;
1522 }
1523 size->cx = extent;
1524
1525 if (lpnFit != NULL) // check if result is desired
1526 *lpnFit = nFit;
1527
1528 dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
1529 hdc,count,str,maxExt,nFit, size->cx,size->cy));
1530 return TRUE;
1531}
1532//******************************************************************************
1533//******************************************************************************
1534BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
1535 HDC arg1,
1536 LPCWSTR arg2,
1537 int arg3,
1538 int arg4,
1539 LPINT arg5,
1540 LPINT arg6,
1541 LPSIZE arg7
1542 )
1543{
1544 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1545 BOOL rc;
1546
1547 dprintf(("GDI32: GetTextExtendExPointW\n"));
1548 rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
1549 FreeAsciiString(astring);
1550 return rc;
1551}
1552//******************************************************************************
1553//******************************************************************************
1554UINT WIN32API DeleteColorSpace( /*KSO Thu 21.05.1998*/
1555 HCOLORSPACE hColorSpace
1556 )
1557{
1558 dprintf(("GDI32: DeleteColorSpace - stub\n"));
1559 return FALSE;
1560}
1561//******************************************************************************
1562//******************************************************************************
1563BOOL WIN32API SetColorSpace( /*KSO Thu 21.05.1998*/
1564 HDC hdc,
1565 HCOLORSPACE hColorSpace
1566 )
1567{
1568 dprintf(("GDI32: SetColorSpace - stub\n"));
1569 return FALSE;
1570}
1571//******************************************************************************
1572//******************************************************************************
1573 HCOLORSPACE WIN32API CreateColorSpaceA( /*KSO Thu 21.05.1998*/
1574 LPLOGCOLORSPACEA lpLogColorSpace
1575 )
1576{
1577 dprintf(("GDI32: CreateColorSpaceA - stub\n"));
1578 return 0;
1579}
1580//******************************************************************************
1581//******************************************************************************
1582HCOLORSPACE WIN32API CreateColorSpaceW( /*KSO Thu 21.05.1998*/
1583 LPLOGCOLORSPACEW lpwLogColorSpace
1584 )
1585{
1586 dprintf(("GDI32: CreateColorSpaceW - stub\n"));
1587 return 0;
1588}
1589//******************************************************************************
1590//******************************************************************************
1591HANDLE WIN32API GetColorSpace( /*KSO Thu 21.05.1998*/
1592 HDC hdc
1593 )
1594{
1595 dprintf(("GDI32: GetColorSpace - stub\n"));
1596 return 0;
1597}
1598//******************************************************************************
1599//******************************************************************************
1600int WIN32API SetICMMode( /*KSO Thu 21.05.1998*/
1601 HDC hdc,
1602 int mode
1603 )
1604{
1605 dprintf(("GDI32: SetICMMode - stub\n"));
1606 return 0;
1607}
1608//******************************************************************************
1609
1610
1611
1612
1613/*****************************************************************************
1614 * Name : BOOL CancelDC
1615 * Purpose : The CancelDC function cancels any pending operation on the
1616 * specified device context (DC).
1617 * Parameters: HDC hdc handle of device context
1618 * Variables :
1619 * Result : TRUE / FALSE
1620 * Remark :
1621 * Status : UNTESTED STUB
1622 *
1623 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1624 *****************************************************************************/
1625
1626BOOL WIN32API CancelDC(HDC hdc)
1627{
1628 dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
1629 hdc));
1630
1631 return (FALSE);
1632}
1633
1634
1635/*****************************************************************************
1636 * Name : BOOL CheckColorsInGamut
1637 * Purpose : The CheckColorsInGamut function indicates whether the specified
1638 * color values are within the gamut of the specified device.
1639 * Parameters: HDC hdc handle of device context
1640 * LPVOID lpaRGBQuad
1641 * LPVOID lpResult
1642 * DWORD dwResult
1643 * Variables :
1644 * Result : TRUE / FALSE
1645 * Remark :
1646 * Status : UNTESTED STUB
1647 *
1648 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1649 *****************************************************************************/
1650
1651BOOL WIN32API CheckColorsInGamut(HDC hdc,
1652 LPVOID lpaRGBQuad,
1653 LPVOID lpResult,
1654 DWORD dwResult)
1655{
1656 dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1657 hdc,
1658 lpaRGBQuad,
1659 lpResult,
1660 dwResult));
1661
1662 return (FALSE);
1663}
1664
1665
1666/*****************************************************************************
1667 * Name : BOOL ColorMatchToTarget
1668 * Purpose : The ColorMatchToTarget function enables or disables preview for
1669 * the specified device context. When preview is enabled, colors
1670 * in subsequent output to the specified device context are
1671 * displayed as they would appear on the target device. This is
1672 * useful for checking how well the target maps the specified
1673 * colors in an image. To enable preview, image color matching
1674 * must be enabled for both the target and the preview device context.
1675 * Parameters: HDC hdc handle of device context
1676 * HDC hdcTarget handle of target device context
1677 * DWORD uiAction
1678 * Variables :
1679 * Result : TRUE / FALSE
1680 * Remark :
1681 * Status : UNTESTED STUB
1682 *
1683 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1684 *****************************************************************************/
1685
1686BOOL WIN32API ColorMatchToTarget(HDC hdc,
1687 HDC hdcTarget,
1688 DWORD uiAction)
1689{
1690 dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
1691 hdc,
1692 hdcTarget,
1693 uiAction));
1694
1695 return (FALSE);
1696}
1697
1698
1699/*****************************************************************************
1700 * Name : BOOL CombineTransform
1701 * Purpose : The CombineTransform function concatenates two world-space to
1702 * page-space transformations.
1703 * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
1704 * XFORM *lLPXFORM1 address of 1st transformation
1705 * XFORM *lLPXFORM2 address of 2nd transformation
1706 * Variables :
1707 * Result : TRUE / FALSE
1708 * Remark :
1709 * Status : UNTESTED
1710 *
1711 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1712 * Markus Montkowski [Wen, 1999/01/12 20:18]
1713 *****************************************************************************/
1714
1715BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
1716 CONST XFORM *lLPXFORM1,
1717 CONST XFORM *lLPXFORM2)
1718{
1719 dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh).\n",
1720 lLPXFORMResult,
1721 lLPXFORM1,
1722 lLPXFORM2));
1723
1724 XFORM xfrm;
1725 if( O32_IsBadWritePtr( (void*)lLPXFORMResult, sizeof(XFORM)) ||
1726 O32_IsBadReadPtr( (void*)lLPXFORM1, sizeof(XFORM)) ||
1727 O32_IsBadWritePtr( (void*)lLPXFORM2, sizeof(XFORM)) )
1728 return (FALSE);
1729
1730 // Add the translations
1731 lLPXFORMResult->eDx = lLPXFORM1->eDx + lLPXFORM2->eDx;
1732 lLPXFORMResult->eDy = lLPXFORM1->eDy + lLPXFORM2->eDy;
1733
1734 // Multiply the matrixes
1735 xfrm.eM11 = lLPXFORM1->eM11 * lLPXFORM2->eM11 + lLPXFORM1->eM21 * lLPXFORM1->eM12;
1736 xfrm.eM12 = lLPXFORM1->eM11 * lLPXFORM2->eM12 + lLPXFORM1->eM12 * lLPXFORM1->eM22;
1737 xfrm.eM21 = lLPXFORM1->eM21 * lLPXFORM2->eM11 + lLPXFORM1->eM22 * lLPXFORM1->eM21;
1738 xfrm.eM22 = lLPXFORM1->eM21 * lLPXFORM2->eM12 + lLPXFORM1->eM22 * lLPXFORM1->eM22;
1739
1740 // Now copy to resulting XFROM as the pt must not be distinct
1741 lLPXFORMResult->eM11 = xfrm.eM11;
1742 lLPXFORMResult->eM12 = xfrm.eM12;
1743 lLPXFORMResult->eM21 = xfrm.eM21;
1744 lLPXFORMResult->eM22 = xfrm.eM22;
1745
1746 return (TRUE);
1747}
1748
1749
1750
1751/*****************************************************************************
1752 * Name : HBRUSH CreateDIBPatternBrush
1753 * Purpose : The CreateDIBPatternBrush function creates a logical brush that
1754 * has the pattern specified by the specified device-independent
1755 * bitmap (DIB). The brush can subsequently be selected into any
1756 * device context that is associated with a device that supports
1757 * raster operations.
1758 * This function is provided only for compatibility with applications
1759 * written for versions of Windows earlier than 3.0. For Win32-based
1760 * applications, use the CreateDIBPatternBrushPt function.
1761 * Parameters: HGLOBAL hglbDIBPacked Identifies a global memory object containing
1762 * a packed DIB, which consists of a BITMAPINFO structure immediately
1763 * followed by an array of bytes defining the pixels of the bitmap.
1764 * UINT fuColorSpec color table data
1765 * Variables :
1766 * Result : TRUE / FALSE
1767 * Remark :
1768 * Status : UNTESTED
1769 *
1770 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1771 * Markus Montkowski [Wen, 1999/01/12 20:00]
1772 *****************************************************************************/
1773
1774HBRUSH WIN32API CreateDIBPatternBrush( HGLOBAL hglbDIBPacked,
1775 UINT fuColorSpec)
1776{
1777 LPVOID lpMem;
1778 HBRUSH ret = 0;
1779 dprintf(("GDI32: CreateDIBPatternBrush(%08xh, %08xh) \n",
1780 hglbDIBPacked,
1781 fuColorSpec));
1782
1783 lpMem = GlobalLock(hglbDIBPacked);
1784 if(NULL!=lpMem)
1785 {
1786
1787 ret = CreateDIBPatternBrushPt( lpMem,
1788 fuColorSpec);
1789 GlobalUnlock(hglbDIBPacked);
1790 }
1791
1792 return (ret);
1793}
1794
1795
1796
1797
1798/*****************************************************************************
1799 * Name : int EnumICMProfilesA
1800 * Purpose : The EnumICMProfilesA function enumerates the different color
1801 * profiles that the system supports for the specified device context.
1802 * Parameters: HDC hdc
1803 * ICMENUMPROC lpICMEnumFunc
1804 * LPARAM lParam
1805 * Variables :
1806 * Result : TRUE / FALSE
1807 * Remark :
1808 * Status : UNTESTED STUB
1809 *
1810 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1811 *****************************************************************************/
1812
1813int WIN32API EnumICMProfilesA(HDC hdc,
1814 ICMENUMPROCA lpICMEnumProc,
1815 LPARAM lParam)
1816{
1817 dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
1818 hdc,
1819 lpICMEnumProc,
1820 lParam));
1821
1822 return (-1);
1823}
1824
1825
1826/*****************************************************************************
1827 * Name : int EnumICMProfilesW
1828 * Purpose : The EnumICMProfilesW function enumerates the different color
1829 * profiles that the system supports for the specified device context.
1830 * Parameters: HDC hdc
1831 * ICMENUMPROC lpICMEnumFunc
1832 * LPARAM lParam
1833 * Variables :
1834 * Result : TRUE / FALSE
1835 * Remark :
1836 * Status : UNTESTED STUB
1837 *
1838 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1839 *****************************************************************************/
1840
1841int WIN32API EnumICMProfilesW(HDC hdc,
1842 ICMENUMPROCW lpICMEnumProc,
1843 LPARAM lParam)
1844{
1845 dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
1846 hdc,
1847 lpICMEnumProc,
1848 lParam));
1849
1850 return (-1);
1851}
1852
1853
1854/*****************************************************************************
1855 * Name : BOOL FixBrushOrgEx
1856 * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
1857 * It is provided for compatibility with Win32s. If called, the
1858 * function does nothing, and returns FALSE.
1859 * Parameters: HDC, int, int, LPPOINT
1860 * Variables :
1861 * Result : TRUE / FALSE
1862 * Remark : not implemented in Win32
1863 * Status : UNTESTED STUB
1864 *
1865 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1866 *****************************************************************************/
1867
1868BOOL WIN32API FixBrushOrgEx(HDC hdc,
1869 int iDummy1,
1870 int iDummy2,
1871 LPPOINT lpPoint)
1872{
1873 dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1874 hdc,
1875 iDummy1,
1876 iDummy2,
1877 lpPoint));
1878
1879 return (FALSE);
1880}
1881
1882
1883/*****************************************************************************
1884 * Name : DWORD GdiGetBatchLimit
1885 * Purpose : The GdiGetBatchLimit function returns the maximum number of
1886 * function calls that can be accumulated in the calling thread's
1887 * current batch. The system flushes the current batch whenever
1888 * this limit is exceeded.
1889 * Parameters:
1890 * Variables :
1891 * Result : 1
1892 * Remark :
1893 * Status : UNTESTED STUB
1894 *
1895 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1896 *****************************************************************************/
1897
1898DWORD WIN32API GdiGetBatchLimit(VOID)
1899{
1900 dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
1901
1902 return (1);
1903}
1904
1905
1906/*****************************************************************************
1907 * Name : DWORD GdiSetBatchLimit
1908 * Purpose : The GdiSetBatchLimit function sets the maximum number of
1909 * functions that can be accumulated in the calling thread's current
1910 * batch. The system flushes the current batch whenever this limit
1911 * is exceeded.
1912 * Parameters: DWORD dwLimit
1913 * Variables :
1914 * Result :
1915 * Remark :
1916 * Status : UNTESTED STUB
1917 *
1918 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1919 *****************************************************************************/
1920
1921DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
1922{
1923 dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
1924 dwLimit));
1925
1926 return (1);
1927}
1928
1929
1930/*****************************************************************************
1931 * Name : DWORD GetCharacterPlacementA
1932 * Purpose : The GetCharacterPlacementA function retrieves information about
1933 * a character string, such as character widths, caret positioning,
1934 * ordering within the string, and glyph rendering. The type of
1935 * information returned depends on the dwFlags parameter and is
1936 * based on the currently selected font in the given display context.
1937 * The function copies the information to the specified GCP_RESULTSA
1938 * structure or to one or more arrays specified by the structure.
1939 * Parameters: HDC hdc handle to device context
1940 * LPCSTR lpString pointer to string
1941 * int nCount number of characters in string
1942 * int nMaxExtent maximum extent for displayed string
1943 * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
1944 * DWORD dwFlags placement flags
1945 * Variables :
1946 * Result :
1947 * Remark :
1948 * Status : UNTESTED STUB
1949 *
1950 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1951 *****************************************************************************/
1952
1953DWORD WIN32API GetCharacterPlacementA(HDC hdc,
1954 LPCSTR lpString,
1955 int nCount,
1956 int nMaxExtent,
1957 GCP_RESULTSA * lpResults,
1958 DWORD dwFlags)
1959{
1960 dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1961 hdc,
1962 lpString,
1963 nCount,
1964 nMaxExtent,
1965 lpResults,
1966 dwFlags));
1967
1968 return (0);
1969}
1970
1971
1972/*****************************************************************************
1973 * Name : DWORD GetCharacterPlacementW
1974 * Purpose : The GetCharacterPlacementW function retrieves information about
1975 * a character string, such as character widths, caret positioning,
1976 * ordering within the string, and glyph rendering. The type of
1977 * information returned depends on the dwFlags parameter and is
1978 * based on the currently selected font in the given display context.
1979 * The function copies the information to the specified GCP_RESULTSW
1980 * structure or to one or more arrays specified by the structure.
1981 * Parameters: HDC hdc handle to device context
1982 * LPCSTR lpString pointer to string
1983 * int nCount number of characters in string
1984 * int nMaxExtent maximum extent for displayed string
1985 * GCP_RESULTSW *lpResults pointer to buffer for placement result
1986 * DWORD dwFlags placement flags
1987 * Variables :
1988 * Result :
1989 * Remark :
1990 * Status : UNTESTED STUB
1991 *
1992 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1993 *****************************************************************************/
1994
1995DWORD WIN32API GetCharacterPlacementW(HDC hdc,
1996 LPCWSTR lpString,
1997 int nCount,
1998 int nMaxExtent,
1999 GCP_RESULTSW *lpResults,
2000 DWORD dwFlags)
2001{
2002 dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2003 hdc,
2004 lpString,
2005 nCount,
2006 nMaxExtent,
2007 lpResults,
2008 dwFlags));
2009
2010 return (0);
2011}
2012
2013
2014/*****************************************************************************
2015 * Name : DWORD GetDeviceGammaRamp
2016 * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
2017 * direct color display boards.
2018 * Parameters: HDC hdc handle to device context
2019 * LPVOID lpRamp Gamma ramp array
2020 * Variables :
2021 * Result :
2022 * Remark :
2023 * Status : UNTESTED STUB
2024 *
2025 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2026 *****************************************************************************/
2027
2028DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
2029 LPVOID lpRamp)
2030{
2031 dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
2032 hdc,
2033 lpRamp));
2034
2035 return (FALSE);
2036}
2037
2038
2039
2040
2041/*****************************************************************************
2042 * Name : BOOL GetICMProfileA
2043 * Purpose : The GetICMProfileA function retrieves the name of the color
2044 * profile file for the device associated with the specified device
2045 * context.
2046 * Parameters: HDC hdc handle to device context
2047 * DWORD cbName
2048 * LPTSTR lpszFilename
2049 * Variables :
2050 * Result : TRUE / FALSE
2051 * Remark :
2052 * Status : UNTESTED STUB
2053 *
2054 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2055 *****************************************************************************/
2056
2057BOOL WIN32API GetICMProfileA(HDC hdc,
2058 DWORD cbName,
2059 LPTSTR lpszFilename)
2060{
2061 dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
2062 hdc,
2063 cbName,
2064 lpszFilename));
2065
2066 return (FALSE);
2067}
2068
2069
2070/*****************************************************************************
2071 * Name : BOOL GetICMProfileW
2072 * Purpose : The GetICMProfileW function retrieves the name of the color
2073 * profile file for the device associated with the specified device
2074 * context.
2075 * Parameters: HDC hdc handle to device context
2076 * DWORD cbName
2077 * LPWSTR lpszFilename
2078 * Variables :
2079 * Result : TRUE / FALSE
2080 * Remark :
2081 * Status : UNTESTED STUB
2082 *
2083 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2084 *****************************************************************************/
2085
2086BOOL WIN32API GetICMProfileW(HDC hdc,
2087 DWORD cbName,
2088 LPTSTR lpszFilename)
2089{
2090 dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
2091 hdc,
2092 cbName,
2093 lpszFilename));
2094
2095 return (FALSE);
2096}
2097
2098
2099/*****************************************************************************
2100 * Name : BOOL GetLogColorSpaceA
2101 * Purpose : The GetLogColorSpace function retrieves information about the
2102 * logical color space identified by the specified handle.
2103 * Parameters: HCOLORSPACE hColorSpace
2104 * LPLOGCOLORSPACE lpbuffer
2105 * DWORD nSize
2106 * Variables :
2107 * Result : TRUE / FALSE
2108 * Remark :
2109 * Status : UNTESTED STUB
2110 *
2111 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2112 *****************************************************************************/
2113
2114#define LPLOGCOLORSPACE LPVOID
2115BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
2116 LPLOGCOLORSPACE lpBuffer,
2117 DWORD nSize)
2118{
2119 dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
2120 hColorSpace,
2121 lpBuffer,
2122 nSize));
2123
2124 return (FALSE);
2125}
2126
2127
2128/*****************************************************************************
2129 * Name : BOOL GetLogColorSpaceW
2130 * Purpose : The GetLogColorSpace function retrieves information about the
2131 * logical color space identified by the specified handle.
2132 * Parameters: HCOLORSPACE hColorSpace
2133 * LPLOGCOLORSPACE lpbuffer
2134 * DWORD nSize
2135 * Variables :
2136 * Result : TRUE / FALSE
2137 * Remark :
2138 * Status : UNTESTED STUB
2139 *
2140 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2141 *****************************************************************************/
2142
2143BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
2144 LPLOGCOLORSPACE lpBuffer,
2145 DWORD nSize)
2146{
2147 dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
2148 hColorSpace,
2149 lpBuffer,
2150 nSize));
2151
2152 return (FALSE);
2153}
2154
2155
2156/*****************************************************************************
2157 * Name : BOOL SetDeviceGammaRamp
2158 * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
2159 * color display boards.
2160 * Parameters: HDC hdc handle of device context
2161 * LPVOID lpRamp
2162 * Variables :
2163 * Result : TRUE / FALSE
2164 * Remark :
2165 * Status : UNTESTED STUB
2166 *
2167 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2168 *****************************************************************************/
2169
2170BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
2171 LPVOID lpRamp)
2172{
2173 dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
2174 hdc,
2175 lpRamp));
2176
2177 return (FALSE);
2178}
2179
2180
2181/*****************************************************************************
2182 * Name : BOOL SetICMProfileA
2183 * Purpose : The SetICMProfileA function sets the color profile for the
2184 * specified device context.
2185 * Parameters: HDC hdc handle of device context
2186 * LPTSTR lpFileName
2187 * Variables :
2188 * Result : TRUE / FALSE
2189 * Remark :
2190 * Status : UNTESTED STUB
2191 *
2192 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2193 *****************************************************************************/
2194
2195BOOL WIN32API SetICMProfileA(HDC hdc,
2196 LPTSTR lpFileName)
2197{
2198 dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
2199 hdc,
2200 lpFileName));
2201
2202 return (FALSE);
2203}
2204
2205
2206/*****************************************************************************
2207 * Name : BOOL SetICMProfileW
2208 * Purpose : The SetICMProfileW function sets the color profile for the
2209 * specified device context.
2210 * Parameters: HDC hdc handle of device context
2211 * LPTSTR lpFileName
2212 * Variables :
2213 * Result : TRUE / FALSE
2214 * Remark :
2215 * Status : UNTESTED STUB
2216 *
2217 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2218 *****************************************************************************/
2219
2220BOOL WIN32API SetICMProfileW(HDC hdc,
2221 LPWSTR lpFileName)
2222{
2223 dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
2224 hdc,
2225 lpFileName));
2226
2227 return (FALSE);
2228}
2229
2230
2231
2232/*****************************************************************************
2233 * Name : BOOL UpdateICMRegKeyA
2234 * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
2235 * registry entries that identify ICC color profiles or color-matching
2236 * DLLs. The function carries out the action specified by the nCommand
2237 * parameter.
2238 * Parameters: DWORD dwReserved
2239 * DWORD CMID
2240 * LPTSTR lpszFileName
2241 * UINT nCommand
2242 * Variables :
2243 * Result : TRUE / FALSE
2244 * Remark :
2245 * Status : UNTESTED STUB
2246 *
2247 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2248 *****************************************************************************/
2249
2250BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
2251 DWORD CMID,
2252 LPTSTR lpszFileName,
2253 UINT nCommand)
2254{
2255 dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
2256 dwReserved,
2257 CMID,
2258 lpszFileName,
2259 nCommand));
2260
2261 return (FALSE);
2262}
2263
2264
2265/*****************************************************************************
2266 * Name : BOOL UpdateICMRegKeyW
2267 * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
2268 * registry entries that identify ICC color profiles or color-matching
2269 * DLLs. The function carries out the action specified by the nCommand
2270 * parameter.
2271 * Parameters: DWORD dwReserved
2272 * DWORD CMID
2273 * LPWSTR lpszFileName
2274 * UINT nCommand
2275 * Variables :
2276 * Result : TRUE / FALSE
2277 * Remark :
2278 * Status : UNTESTED STUB
2279 *
2280 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2281 *****************************************************************************/
2282
2283BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
2284 DWORD CMID,
2285 LPWSTR lpszFileName,
2286 UINT nCommand)
2287{
2288 dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
2289 dwReserved,
2290 CMID,
2291 lpszFileName,
2292 nCommand));
2293
2294 return (FALSE);
2295}
2296
2297
2298
Note: See TracBrowser for help on using the repository browser.