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

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

CreateDIBSection enhancement + CreateICA/W bugfix

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