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

Last change on this file since 2779 was 2779, checked in by cbratschi, 26 years ago

* empty log message *

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