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

Last change on this file since 1966 was 1966, checked in by hugh, 26 years ago

Implemented DEFAULT_GUI_FONT for GetStockObject
DIBSecttion now get the DC Palette on creation and updated if DC pal changes.

File size: 132.3 KB
Line 
1/* $Id: gdi32.cpp,v 1.23 1999-12-04 13:53:12 hugh 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
21typedef struct _POLYTEXTA
22{
23 int x;
24 int y;
25 UINT n;
26 LPCSTR lpstr;
27 UINT uiFlags;
28 RECT rcl;
29 int *pdx;
30} POLYTEXTA;
31
32
33typedef struct _POLYTEXTW
34{
35 int x;
36 int y;
37 UINT n;
38 LPCWSTR lpstr;
39 UINT uiFlags;
40 RECT rcl;
41 int *pdx;
42} POLYTEXTW;
43
44
45static ULONG QueryPaletteSize(BITMAPINFOHEADER *pBHdr)
46{
47 ULONG cbPalette;
48
49 switch (pBHdr->biBitCount)
50 {
51 case 1:
52 case 4:
53 case 8:
54 cbPalette = (1 << pBHdr->biBitCount) * sizeof(RGBQUAD);
55 break;
56
57 case 16:
58 case 24:
59 case 32:
60 cbPalette = 0;
61 break;
62
63 default:
64 dprintf(("QueryPaletteSize: error pBHdr->biBitCount = %d", pBHdr->biBitCount));
65 cbPalette = -1;
66 }
67
68 return cbPalette;
69}
70
71static ULONG CalcBitmapSize(ULONG cBits, LONG cx, LONG cy)
72{
73 ULONG alignment;
74 ULONG factor;
75 BOOL flag = TRUE; //true: '*' false: '/'
76
77 cy = cy < 0 ? -cy : cy;
78
79 switch(cBits)
80 {
81 case 1:
82 factor = 8;
83 flag = FALSE;
84 break;
85
86 case 4:
87 factor = 2;
88 flag = FALSE;
89 break;
90
91 case 8:
92 factor = 1;
93 break;
94
95 case 16:
96 factor = 2;
97 break;
98
99 case 24:
100 factor = 3;
101 break;
102
103 case 32:
104 return cx*cy;
105
106 default:
107 return 0;
108 }
109
110 if (flag)
111 alignment = (cx = (cx*factor)) % 4;
112 else
113 alignment = (cx = ((cx+factor-1)/factor)) % 4;
114
115 if (alignment != 0)
116 cx += 4 - alignment;
117
118 return cx*cy;
119}
120
121//******************************************************************************
122//******************************************************************************
123BOOL WIN32API GetTextExtentPointA(HDC hdc, LPCSTR lpsz, int cbString, LPSIZE lpSize)
124{
125 BOOL rc;
126
127 lpSize->cx = lpSize->cy = 0;
128 rc = O32_GetTextExtentPoint(hdc, lpsz, cbString, lpSize);
129 dprintf(("GDI32: GetTextExtentPointA of %s returned %d\n", lpsz, rc));
130 return(rc);
131}
132//******************************************************************************
133//******************************************************************************
134COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor)
135{
136 dprintf(("GDI32: SetBkColor to %X\n", crColor));
137 return(O32_SetBkColor(hdc, crColor));
138}
139//******************************************************************************
140//******************************************************************************
141COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor)
142{
143 COLORREF clr;
144
145 clr = O32_SetTextColor(hdc, crColor);
146 dprintf(("GDI32: SetTextColor from %X to %X\n", clr, crColor));
147 return(clr);
148}
149//******************************************************************************
150//******************************************************************************
151
152static hFntDefaultGui = NULL;
153HGDIOBJ WIN32API GetStockObject(int arg1)
154{
155 HGDIOBJ obj;
156
157 switch(arg1)
158 {
159 case DEFAULT_GUI_FONT:
160 if(NULL==hFntDefaultGui)
161 hFntDefaultGui = CreateFontA( 0, 0, 0, 0, FW_MEDIUM, FALSE,
162 FALSE, FALSE, ANSI_CHARSET,
163 OUT_DEFAULT_PRECIS,
164 CLIP_DEFAULT_PRECIS,
165 DEFAULT_QUALITY,
166 FIXED_PITCH|FF_MODERN, "WarpSans");
167 obj = hFntDefaultGui;
168 break;
169 default:
170 obj = O32_GetStockObject(arg1);
171 break;
172 }
173 dprintf(("GDI32: GetStockObject %d returned %X\n", arg1, obj));
174 return(obj);
175}
176//******************************************************************************
177//******************************************************************************
178UINT WIN32API RealizePalette( HDC arg1)
179{
180 dprintf(("GDI32: RealizePalette(0x%08X)\n",arg1));
181 return O32_RealizePalette(arg1);
182}
183//******************************************************************************
184//******************************************************************************
185int WIN32API GetObjectA( HGDIOBJ arg1, int arg2, void * arg3)
186{
187
188 if(DIBSection::getSection() != NULL)
189 {
190 DIBSection *dsect = DIBSection::find(arg1);
191 if(dsect)
192 {
193 return dsect->GetDIBSection(arg2, (DIBSECTION*)arg3);
194 }
195 }
196
197 dprintf(("GDI32: GetObject %X %X %X\n", arg1, arg2, arg3));
198 return O32_GetObject(arg1, arg2, arg3);
199}
200//******************************************************************************
201//******************************************************************************
202DWORD WIN32API GetObjectType( HGDIOBJ arg1)
203{
204 dprintf(("GDI32: GetObjectType\n"));
205 return O32_GetObjectType(arg1);
206}
207//******************************************************************************
208//******************************************************************************
209BOOL WIN32API DeleteObject(HANDLE hObj)
210{
211 dprintf(("GDI32: DeleteObject\n"));
212 DIBSection::deleteSection((DWORD)hObj);
213 return O32_DeleteObject(hObj);
214}
215//******************************************************************************
216//******************************************************************************
217BOOL WIN32API DeleteDC( HDC arg1)
218{
219 dprintf(("GDI32: DeleteDC\n"));
220 return O32_DeleteDC(arg1);
221}
222//******************************************************************************
223//******************************************************************************
224HPALETTE WIN32API CreatePalette( const LOGPALETTE * arg1)
225{
226 HPALETTE rc;
227 dprintf(("GDI32: CreatePalette\n"));
228 for(int i=0; i<arg1->palNumEntries;i++)
229 {
230 dprintf2(("Index %d : 0x%08X\n",i, *((DWORD*)(&arg1->palPalEntry[i])) ));
231 }
232 rc = O32_CreatePalette(arg1);
233 dprintf((" returns 0x%08X\n",rc));
234
235 return rc;
236}
237//******************************************************************************
238//******************************************************************************
239HBRUSH WIN32API CreatePatternBrush(HBITMAP arg1)
240{
241 HBRUSH brush;
242
243 brush = O32_CreatePatternBrush(arg1);
244 dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", arg1, brush));
245 return(brush);
246}
247//******************************************************************************
248//******************************************************************************
249HPEN WIN32API CreatePen( int arg1, int arg2, COLORREF arg3)
250{
251 dprintf(("GDI32: CreatePen\n"));
252 return O32_CreatePen(arg1, arg2, arg3);
253}
254//******************************************************************************
255//******************************************************************************
256HPEN WIN32API CreatePenIndirect( const LOGPEN * arg1)
257{
258 dprintf(("GDI32: CreatePenIndirect\n"));
259 return O32_CreatePenIndirect(arg1);
260}
261//******************************************************************************
262//******************************************************************************
263HRGN WIN32API CreatePolyPolygonRgn( const POINT * arg1, const INT * arg2, int arg3, int arg4)
264{
265 dprintf(("GDI32: CreatePolyPolygonRgn\n"));
266 return O32_CreatePolyPolygonRgn(arg1, arg2, arg3, arg4);
267}
268//******************************************************************************
269//******************************************************************************
270HRGN WIN32API CreatePolygonRgn(const POINT * arg1, int arg2, int arg3)
271{
272 dprintf(("GDI32: CreatePolygonRgn"));
273 return O32_CreatePolygonRgn(arg1, arg2, arg3);
274}
275//******************************************************************************
276//******************************************************************************
277HBRUSH WIN32API CreateDIBPatternBrushPt( const VOID * arg1, UINT arg2)
278{
279 dprintf(("GDI32: CreateDIBPatternBrushPt\n"));
280 return O32_CreateDIBPatternBrushPt(arg1, arg2);
281}
282//******************************************************************************
283//******************************************************************************
284HBITMAP WIN32API CreateDIBitmap(HDC arg1, const BITMAPINFOHEADER * arg2, DWORD arg3, const void * arg4, const BITMAPINFO * arg5, UINT arg6)
285{
286 int iHeight;
287 HBITMAP rc;
288 dprintf(("GDI32: CreateDIBitmap\n"));
289
290 //TEMPORARY HACK TO PREVENT CRASH IN OPEN32 (WSeB GA)
291
292 iHeight = arg2->biHeight;
293 if(arg2->biHeight < 0)
294 {
295 ((BITMAPINFOHEADER *)arg2)->biHeight = -arg2->biHeight;
296 }
297
298 rc = O32_CreateDIBitmap(arg1, arg2, arg3, arg4, arg5, arg6);
299
300 ((BITMAPINFOHEADER *)arg2)->biHeight = iHeight;
301
302 return rc;
303}
304//******************************************************************************
305//******************************************************************************
306HBITMAP WIN32API CreateCompatibleBitmap( HDC arg1, int arg2, int arg3)
307{
308 dprintf(("GDI32: CreateCompatibleBitmap\n"));
309 return O32_CreateCompatibleBitmap(arg1, arg2, arg3);
310}
311//******************************************************************************
312//******************************************************************************
313HDC WIN32API CreateCompatibleDC( HDC arg1)
314{
315 HDC rc;
316
317 rc = O32_CreateCompatibleDC(arg1);
318 dprintf(("GDI32: CreateCompatibleDC %X returned %x", arg1, rc));
319 return rc;
320}
321//******************************************************************************
322//******************************************************************************
323INT WIN32API StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
324 INT heightDst, INT xSrc, INT ySrc, INT widthSrc,
325 INT heightSrc, const void *bits,
326 const BITMAPINFO *info, UINT wUsage, DWORD dwRop )
327{
328#if 1
329 dprintf(("GDI32: StretchDIBits"));
330
331 if(wUsage == DIB_PAL_COLORS && info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))
332 {
333 // workaround for open32 bug.
334 // If syscolors > 256 and wUsage == DIB_PAL_COLORS.
335
336 int i;
337 USHORT *pColorIndex = (USHORT *)info->bmiColors;
338 RGBQUAD *pColors = (RGBQUAD *) alloca(info->bmiHeader.biClrUsed *
339 sizeof(RGBQUAD));
340 BITMAPINFO *infoLoc = (BITMAPINFO *) alloca(sizeof(BITMAPINFO) +
341 info->bmiHeader.biClrUsed * sizeof(RGBQUAD));
342
343 memcpy(infoLoc, info, sizeof(BITMAPINFO));
344
345 if(GetDIBColorTable(hdc, 0, info->bmiHeader.biClrUsed, pColors) == 0)
346 return FALSE;
347
348 for(i=0;i<info->bmiHeader.biClrUsed;i++, pColorIndex++)
349 {
350 infoLoc->bmiColors[i] = pColors[*pColorIndex];
351 }
352
353 return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,
354 widthSrc, heightSrc, (void *)bits,
355 (PBITMAPINFO)infoLoc, DIB_RGB_COLORS, dwRop);
356 }
357
358 return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,
359 widthSrc, heightSrc, (void *)bits,
360 (PBITMAPINFO)info, wUsage, dwRop);
361#else
362 dprintf(("GDI32: StretchDIBits\n"));
363 return O32_StretchDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, (void *)arg10, (PBITMAPINFO)arg11, arg12, arg13);
364#endif
365}
366//******************************************************************************
367//******************************************************************************
368BOOL WIN32API StretchBlt(HDC hdcDest, int nXOriginDest, int nYOriginDest,
369 int nWidthDest, int nHeightDest,
370 HDC hdcSrc, int nXOriginSrc, int nYOriginSrc,
371 int nWidthSrc, int nHeightSrc, DWORD dwRop)
372{
373 dprintf(("GDI32: StretchBlt Dest: (%d, %d) size (%d, %d)\n",
374 nXOriginDest, nYOriginDest, nWidthDest, nHeightDest));
375 dprintf(("GDI32: StretchBlt Src : (%d, %d) size (%d, %d)\n",
376 nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc));
377 if(DIBSection::getSection() != NULL)
378 {
379 DIBSection *dsect = DIBSection::findHDC(hdcSrc);
380 if(dsect)
381 {
382 dprintf((" Do stretched DIB Blt\n"));
383 return(dsect->BitBlt( hdcDest,
384 nXOriginDest, nYOriginDest, nWidthDest, nHeightDest,
385 nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc,
386 dwRop));
387 }
388 }
389 return O32_StretchBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, dwRop);
390}
391//******************************************************************************
392//******************************************************************************
393BOOL WIN32API StrokeAndFillPath( HDC arg1)
394{
395 dprintf(("GDI32: StrokeAndFillPath\n"));
396 return O32_StrokeAndFillPath(arg1);
397}
398//******************************************************************************
399//******************************************************************************
400BOOL WIN32API StrokePath( HDC arg1)
401{
402 dprintf(("GDI32: StrokePath\n"));
403 return O32_StrokePath(arg1);
404}
405//******************************************************************************
406//******************************************************************************
407int WIN32API SetStretchBltMode( HDC arg1, int arg2)
408{
409 dprintf(("GDI32: SetStretchBltMode 0x%08X, 0x%08X\n",arg1, arg2));
410
411 if(DIBSection::getSection() != NULL)
412 {
413 DIBSection *dsect = DIBSection::findHDC(arg1);
414 if(dsect)
415 {
416 dprintf((" - DC is DIBSection\n"));
417 }
418 }
419 return O32_SetStretchBltMode(arg1, arg2);
420}
421//******************************************************************************
422//******************************************************************************
423HGDIOBJ WIN32API SelectObject(HDC hdc, HGDIOBJ hObj)
424{
425 HGDIOBJ rc;
426
427//// dprintf(("GDI32: SelectObject\n"));
428
429 if(DIBSection::getSection() != NULL)
430 {
431 DIBSection *dsect;
432
433 dsect = DIBSection::find(hdc);
434 if(dsect)
435 {
436 //remove previously selected dibsection
437 dsect->UnSelectDIBObject();
438 }
439 dsect = DIBSection::find((DWORD)hObj);
440 if(dsect)
441 {
442 dsect->SelectDIBObject(hdc);
443 }
444 }
445 rc = O32_SelectObject(hdc, hObj);
446 if(rc != 0 && DIBSection::getSection != NULL)
447 {
448 DIBSection *dsect = DIBSection::find((DWORD)rc);
449 if(dsect)
450 {
451 dsect->UnSelectDIBObject();
452 }
453 }
454 return(rc);
455}
456//******************************************************************************
457//******************************************************************************
458HPALETTE WIN32API SelectPalette(HDC arg1, HPALETTE arg2, BOOL arg3)
459{
460 dprintf(("GDI32: SelectPalette (0x%08X, 0x%08X, 0x%08X)\n", arg1, arg2, arg3));
461 if(DIBSection::getSection() != NULL)
462 {
463 DIBSection *dsect = DIBSection::findHDC(arg1);
464 if(dsect)
465 {
466 PALETTEENTRY Pal[256];
467 char PalSize = dsect->GetBitCount();
468 dprintf((" - Set Palette Values in DIBSection\n"));
469 if(PalSize<=8)
470 {
471 GetPaletteEntries( arg2, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal);
472 dsect->SetDIBColorTable(0, 1<< PalSize, (RGBQUAD*)&Pal);
473 }
474
475 }
476 }
477 return O32_SelectPalette(arg1, arg2, arg3);
478}
479//******************************************************************************
480//******************************************************************************
481int WIN32API SetBkMode( HDC arg1, int arg2)
482{
483 dprintf(("GDI32: SetBkMode\n"));
484 return O32_SetBkMode(arg1, arg2);
485}
486//******************************************************************************
487//******************************************************************************
488COLORREF WIN32API GetPixel( HDC arg1, int arg2, int arg3)
489{
490//// dprintf(("GDI32: GetPixel\n"));
491 return O32_GetPixel(arg1, arg2, arg3);
492}
493//******************************************************************************
494//******************************************************************************
495COLORREF WIN32API SetPixel( HDC arg1, int arg2, int arg3, COLORREF arg4)
496{
497//// dprintf(("GDI32: SetPixel\n"));
498 return O32_SetPixel(arg1, arg2, arg3, arg4);
499}
500//******************************************************************************
501//Faster version of SetPixel (since it doesn't need to return the original color)
502//Just use SetPixel for now
503//******************************************************************************
504BOOL WIN32API SetPixelV(HDC arg1, int arg2, int arg3, COLORREF arg4)
505{
506 COLORREF rc;
507
508//// dprintf(("GDI32: SetPixelV\n"));
509 rc = O32_SetPixel(arg1, arg2, arg3, arg4);
510 if(rc == GDI_ERROR) // || rc == COLOR_INVALID)
511 return(FALSE);
512 return(TRUE);
513}
514//******************************************************************************
515//******************************************************************************
516BOOL WIN32API GetDCOrgEx(HDC arg1, PPOINT arg2)
517{
518 dprintf(("GDI32: GetDCOrgEx\n"));
519 return O32_GetDCOrgEx(arg1, arg2);
520}
521//******************************************************************************
522//******************************************************************************
523BOOL WIN32API GetWindowExtEx(HDC arg1, PSIZE arg2)
524{
525 dprintf(("GDI32: GetWindowExtEx\n"));
526 return O32_GetWindowExtEx(arg1, arg2);
527}
528//******************************************************************************
529//******************************************************************************
530int WIN32API AbortDoc( HDC arg1)
531{
532 dprintf(("GDI32: AbortDoc"));
533 return O32_AbortDoc(arg1);
534}
535//******************************************************************************
536//******************************************************************************
537BOOL WIN32API AbortPath( HDC arg1)
538{
539 dprintf(("GDI32: AbortPath"));
540 return O32_AbortPath(arg1);
541}
542//******************************************************************************
543//******************************************************************************
544BOOL WIN32API AngleArc( HDC arg1, int arg2, int arg3, DWORD arg4, float arg5, float arg6)
545{
546 dprintf(("GDI32: AngleArc"));
547 return O32_AngleArc(arg1, arg2, arg3, arg4, arg5, arg6);
548}
549//******************************************************************************
550//******************************************************************************
551BOOL WIN32API AnimatePalette( HPALETTE arg1, UINT arg2, UINT arg3, const PALETTEENTRY * arg4)
552{
553 dprintf(("GDI32: AnimatePalette"));
554 return O32_AnimatePalette(arg1, arg2, arg3, arg4);
555}
556//******************************************************************************
557//******************************************************************************
558BOOL WIN32API Arc( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
559{
560 dprintf(("GDI32: Arc"));
561 return O32_Arc(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
562}
563//******************************************************************************
564//******************************************************************************
565BOOL WIN32API ArcTo( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
566{
567 dprintf(("GDI32: ArcTo"));
568 return O32_ArcTo(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
569}
570//******************************************************************************
571//******************************************************************************
572BOOL WIN32API BeginPath( HDC arg1)
573{
574 dprintf(("GDI32: BeginPath"));
575 return O32_BeginPath(arg1);
576}
577//******************************************************************************
578//******************************************************************************
579BOOL WIN32API BitBlt(HDC hdcDest, int arg2, int arg3, int arg4, int arg5, HDC hdcSrc, int arg7, int arg8, DWORD arg9)
580{
581 if(DIBSection::getSection() != NULL) {
582 DIBSection *dsect = DIBSection::findHDC(hdcSrc);
583 if(dsect) {
584 return(dsect->BitBlt(hdcDest, arg2, arg3, arg4, arg5, arg7, arg8, arg4, arg5, arg9));
585 }
586 }
587 dprintf(("GDI32: BitBlt to hdc %X from (%d,%d) to (%d,%d), (%d,%d) rop %X\n", hdcDest, arg7, arg8, arg2, arg3, arg4, arg5, arg9));
588 return O32_BitBlt(hdcDest, arg2, arg3, arg4, arg5, hdcSrc, arg7, arg8, arg9);
589}
590//******************************************************************************
591//******************************************************************************
592BOOL WIN32API Chord( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
593{
594 dprintf(("GDI32: Chord"));
595 return O32_Chord(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
596}
597//******************************************************************************
598//******************************************************************************
599HENHMETAFILE WIN32API CloseEnhMetaFile( HDC arg1)
600{
601 dprintf(("GDI32: CloseEnhMetaFile"));
602 return O32_CloseEnhMetaFile(arg1);
603}
604//******************************************************************************
605//******************************************************************************
606BOOL WIN32API CloseFigure( HDC arg1)
607{
608 dprintf(("GDI32: CloseFigure"));
609 return O32_CloseFigure(arg1);
610}
611//******************************************************************************
612//******************************************************************************
613HMETAFILE WIN32API CloseMetaFile( HDC arg1)
614{
615 dprintf(("GDI32: CloseMetaFile"));
616 return O32_CloseMetaFile(arg1);
617}
618//******************************************************************************
619//******************************************************************************
620int WIN32API CombineRgn( HRGN arg1, HRGN arg2, HRGN arg3, int arg4)
621{
622 dprintf(("GDI32: CombineRgn"));
623 return O32_CombineRgn(arg1, arg2, arg3, arg4);
624}
625//******************************************************************************
626//******************************************************************************
627HENHMETAFILE WIN32API CopyEnhMetaFileA( HENHMETAFILE arg1, LPCSTR arg2)
628{
629 dprintf(("GDI32: CopyEnhMetaFileA"));
630 return O32_CopyEnhMetaFile(arg1, arg2);
631}
632//******************************************************************************
633//******************************************************************************
634HENHMETAFILE WIN32API CopyEnhMetaFileW( HENHMETAFILE arg1, LPCWSTR arg2)
635{
636 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
637 HENHMETAFILE rc;
638
639 dprintf(("GDI32: CopyEnhMetaFileW"));
640 rc = O32_CopyEnhMetaFile(arg1, astring);
641 FreeAsciiString(astring);
642 return rc;
643}
644//******************************************************************************
645//******************************************************************************
646HMETAFILE WIN32API CopyMetaFileA( HMETAFILE arg1, LPCSTR arg2)
647{
648 dprintf(("GDI32: CopyMetaFileA"));
649 return O32_CopyMetaFile(arg1, arg2);
650}
651//******************************************************************************
652//******************************************************************************
653HMETAFILE WIN32API CopyMetaFileW( HMETAFILE arg1, LPCWSTR arg2)
654{
655 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
656 HMETAFILE rc;
657
658 dprintf(("GDI32: CopyMetaFileW"));
659 rc = O32_CopyMetaFile(arg1, astring);
660 FreeAsciiString(astring);
661 return rc;
662}
663//******************************************************************************
664//******************************************************************************
665HBITMAP WIN32API CreateBitmap(int nWidth, int nHeight, UINT cPlanes,
666 UINT cBitsPerPel, const void *lpvBits)
667{
668 HBITMAP rc;
669
670 rc = O32_CreateBitmap(nWidth, nHeight, cPlanes, cBitsPerPel, lpvBits);
671 dprintf(("GDI32: CreateBitmap (%d,%d) bps %d returned %d\n", nWidth, nHeight, cBitsPerPel, rc));
672 return(rc);
673}
674//******************************************************************************
675//******************************************************************************
676HBITMAP WIN32API CreateBitmapIndirect( const BITMAP * arg1)
677{
678 dprintf(("GDI32: CreateBitmapIndirect"));
679 return O32_CreateBitmapIndirect(arg1);
680}
681//******************************************************************************
682//******************************************************************************
683HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH * arg1)
684{
685 dprintf(("GDI32: CreateBrushIndirect"));
686 return O32_CreateBrushIndirect((LPLOGBRUSH)arg1);
687}
688//******************************************************************************
689//******************************************************************************
690HDC WIN32API CreateDCA( LPCSTR arg1, LPCSTR arg2, LPCSTR arg3, const DEVMODEA * arg4)
691{
692 dprintf(("GDI32: CreateDCA"));
693 return O32_CreateDC(arg1, arg2, arg3, arg4);
694}
695//******************************************************************************
696//******************************************************************************
697HDC WIN32API CreateDCW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
698{
699 char *astring4, *astring5;
700
701 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
702 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
703 char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
704
705 if(arg4)
706 {
707 astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
708 astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
709 }
710
711 HDC rc;
712 DEVMODEA devmode;
713
714 dprintf(("GDI32: CreateDCW"));
715
716 if(arg4)
717 {
718 strcpy((char*)devmode.dmDeviceName, astring4);
719 strcpy((char*)devmode.dmFormName, astring5);
720
721 devmode.dmSpecVersion = arg4->dmSpecVersion;
722 devmode.dmDriverVersion = arg4->dmDriverVersion;
723 devmode.dmSize = arg4->dmSize;
724 devmode.dmDriverExtra = arg4->dmDriverExtra;
725 devmode.dmFields = arg4->dmFields;
726 devmode.dmOrientation = arg4->dmOrientation;
727 devmode.dmPaperSize = arg4->dmPaperSize;
728 devmode.dmPaperLength = arg4->dmPaperLength;
729 devmode.dmPaperWidth = arg4->dmPaperWidth;
730 devmode.dmScale = arg4->dmScale;
731 devmode.dmCopies = arg4->dmCopies;
732 devmode.dmDefaultSource = arg4->dmDefaultSource;
733 devmode.dmPrintQuality = arg4->dmPrintQuality;
734 devmode.dmColor = arg4->dmColor;
735 devmode.dmDuplex = arg4->dmDuplex;
736 devmode.dmYResolution = arg4->dmYResolution;
737 devmode.dmTTOption = arg4->dmTTOption;
738 devmode.dmCollate = arg4->dmCollate;
739 devmode.dmLogPixels = arg4->dmLogPixels;
740 devmode.dmBitsPerPel = arg4->dmBitsPerPel;
741 devmode.dmPelsWidth = arg4->dmPelsWidth;
742 devmode.dmPelsHeight = arg4->dmPelsHeight;
743 devmode.dmDisplayFlags = arg4->dmDisplayFlags;
744 devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
745 devmode.dmICMMethod = arg4->dmICMMethod;
746 devmode.dmICMIntent = arg4->dmICMIntent;
747 devmode.dmMediaType = arg4->dmMediaType;
748 devmode.dmDitherType = arg4->dmDitherType;
749 devmode.dmReserved1 = arg4->dmReserved1;
750 devmode.dmReserved2 = arg4->dmReserved2;
751 rc = O32_CreateDC(astring1,astring2,astring3,&devmode);
752 }
753 else
754 rc = O32_CreateDC(astring1,astring2,astring3, NULL);
755
756 FreeAsciiString(astring1);
757 FreeAsciiString(astring2);
758 FreeAsciiString(astring3);
759
760 if(arg4)
761 {
762 FreeAsciiString(astring4);
763 FreeAsciiString(astring5);
764 }
765
766 return rc;
767}
768//******************************************************************************
769//******************************************************************************
770HRGN WIN32API CreateEllipticRgn( int arg1, int arg2, int arg3, int arg4)
771{
772 dprintf(("GDI32: CreateEllipticRgn"));
773 return O32_CreateEllipticRgn(arg1, arg2, arg3, arg4);
774}
775//******************************************************************************
776//******************************************************************************
777HRGN WIN32API CreateEllipticRgnIndirect( const RECT * arg1)
778{
779 dprintf(("GDI32: CreateEllipticRgnIndirect"));
780 return O32_CreateEllipticRgnIndirect(arg1);
781}
782//******************************************************************************
783//******************************************************************************
784HENHMETAFILE WIN32API CreateEnhMetaFileA( HDC arg1, LPCSTR arg2, const RECT * arg3, LPCSTR arg4)
785{
786 dprintf(("GDI32: CreateEnhMetaFileA"));
787 return O32_CreateEnhMetaFile(arg1, arg2, arg3, arg4);
788}
789//******************************************************************************
790//******************************************************************************
791HENHMETAFILE WIN32API CreateEnhMetaFileW( HDC arg1, LPCWSTR arg2, const RECT * arg3, LPCWSTR arg4)
792{
793 char *astring1 = UnicodeToAsciiString((LPWSTR)arg2);
794 char *astring2 = UnicodeToAsciiString((LPWSTR)arg4);
795 HENHMETAFILE rc;
796
797 dprintf(("GDI32: CreateMetaFileW"));
798 rc = O32_CreateEnhMetaFile(arg1,astring1,arg3,astring2);
799 FreeAsciiString(astring1);
800 FreeAsciiString(astring2);
801 return rc;
802}
803//******************************************************************************
804//******************************************************************************
805//******************************************************************************
806//******************************************************************************
807HBRUSH WIN32API CreateHatchBrush( int arg1, COLORREF arg2)
808{
809 dprintf(("GDI32: CreateHatchBrush"));
810 return O32_CreateHatchBrush(arg1, arg2);
811}
812//******************************************************************************
813//******************************************************************************
814HDC WIN32API CreateICA( LPCSTR arg1, LPCSTR arg2, LPCSTR arg3, const DEVMODEA * arg4)
815{
816 dprintf(("GDI32: CreateICA"));
817 return O32_CreateIC(arg1, arg2, arg3, arg4);
818}
819//******************************************************************************
820//******************************************************************************
821HDC WIN32API CreateICW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
822{
823 char *astring4, *astring5;
824
825 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
826 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
827 char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
828 if(arg4)
829 {
830 astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
831 astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
832 }
833
834 HDC rc;
835 DEVMODEA devmode;
836
837 dprintf(("GDI32: CreateICW"));
838
839 if(arg4)
840 {
841 strcpy((char*)devmode.dmDeviceName, astring4);
842 strcpy((char*)devmode.dmFormName, astring5);
843
844 devmode.dmSpecVersion = arg4->dmSpecVersion;
845 devmode.dmDriverVersion = arg4->dmDriverVersion;
846 devmode.dmSize = arg4->dmSize;
847 devmode.dmDriverExtra = arg4->dmDriverExtra;
848 devmode.dmFields = arg4->dmFields;
849 devmode.dmOrientation = arg4->dmOrientation;
850 devmode.dmPaperSize = arg4->dmPaperSize;
851 devmode.dmPaperLength = arg4->dmPaperLength;
852 devmode.dmPaperWidth = arg4->dmPaperWidth;
853 devmode.dmScale = arg4->dmScale;
854 devmode.dmCopies = arg4->dmCopies;
855 devmode.dmDefaultSource = arg4->dmDefaultSource;
856 devmode.dmPrintQuality = arg4->dmPrintQuality;
857 devmode.dmColor = arg4->dmColor;
858 devmode.dmDuplex = arg4->dmDuplex;
859 devmode.dmYResolution = arg4->dmYResolution;
860 devmode.dmTTOption = arg4->dmTTOption;
861 devmode.dmCollate = arg4->dmCollate;
862 devmode.dmLogPixels = arg4->dmLogPixels;
863 devmode.dmBitsPerPel = arg4->dmBitsPerPel;
864 devmode.dmPelsWidth = arg4->dmPelsWidth;
865 devmode.dmPelsHeight = arg4->dmPelsHeight;
866 devmode.dmDisplayFlags = arg4->dmDisplayFlags;
867 devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
868 devmode.dmICMMethod = arg4->dmICMMethod;
869 devmode.dmICMIntent = arg4->dmICMIntent;
870 devmode.dmMediaType = arg4->dmMediaType;
871 devmode.dmDitherType = arg4->dmDitherType;
872 devmode.dmReserved1 = arg4->dmReserved1;
873 devmode.dmReserved2 = arg4->dmReserved2;
874
875 rc = O32_CreateIC(astring1,astring2,astring3,&devmode);
876 }
877 else
878 rc = O32_CreateIC(astring1,astring2,astring3, NULL);
879
880 FreeAsciiString(astring1);
881 FreeAsciiString(astring2);
882 FreeAsciiString(astring3);
883 if(arg4)
884 {
885 FreeAsciiString(astring4);
886 FreeAsciiString(astring5);
887 }
888
889 return rc;
890}
891//******************************************************************************
892//******************************************************************************
893HDC WIN32API CreateMetaFileA( LPCSTR arg1)
894{
895 dprintf(("GDI32: CreateMetaFileA"));
896 return O32_CreateMetaFile(arg1);
897}
898//******************************************************************************
899//******************************************************************************
900HDC WIN32API CreateMetaFileW( LPCWSTR arg1)
901{
902 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
903 HDC rc;
904
905 dprintf(("GDI32: CreateMetaFileW"));
906 rc = O32_CreateMetaFile(astring);
907 FreeAsciiString(astring);
908 return rc;
909}
910//******************************************************************************
911//******************************************************************************
912HRGN WIN32API CreateRectRgn( int arg1, int arg2, int arg3, int arg4)
913{
914 dprintf(("GDI32: CreateRectRgn"));
915 return O32_CreateRectRgn(arg1, arg2, arg3, arg4);
916}
917//******************************************************************************
918//******************************************************************************
919HRGN WIN32API CreateRectRgnIndirect( const RECT * arg1)
920{
921 dprintf(("GDI32: CreateRectRgnIndirect"));
922 return O32_CreateRectRgnIndirect(arg1);
923}
924//******************************************************************************
925//******************************************************************************
926HRGN WIN32API CreateRoundRectRgn( int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
927{
928 dprintf(("GDI32: CreateRoundRectRgn"));
929 return O32_CreateRoundRectRgn(arg1, arg2, arg3, arg4, arg5, arg6);
930}
931//******************************************************************************
932//******************************************************************************
933HBRUSH WIN32API CreateSolidBrush( COLORREF arg1)
934{
935 dprintf(("GDI32: CreateSolidBrush\n"));
936 return O32_CreateSolidBrush(arg1);
937}
938//******************************************************************************
939//******************************************************************************
940BOOL WIN32API DPtoLP( HDC arg1, PPOINT arg2, int arg3)
941{
942 dprintf(("GDI32: DPtoLP\n"));
943 return O32_DPtoLP(arg1, arg2, arg3);
944}
945//******************************************************************************
946//******************************************************************************
947BOOL WIN32API DeleteEnhMetaFile( HENHMETAFILE arg1)
948{
949 dprintf(("GDI32: DeleteEnhMetaFile\n"));
950 return O32_DeleteEnhMetaFile(arg1);
951}
952//******************************************************************************
953//******************************************************************************
954BOOL WIN32API DeleteMetaFile( HMETAFILE arg1)
955{
956 dprintf(("GDI32: DeleteMetaFile"));
957 return O32_DeleteMetaFile(arg1);
958}
959//******************************************************************************
960//******************************************************************************
961BOOL WIN32API Ellipse( HDC arg1, int arg2, int arg3, int arg4, int arg5)
962{
963 dprintf(("GDI32: Ellipse"));
964 return O32_Ellipse(arg1, arg2, arg3, arg4, arg5);
965}
966//******************************************************************************
967//******************************************************************************
968int WIN32API EndDoc( HDC arg1)
969{
970 dprintf(("GDI32: EndDoc"));
971 return O32_EndDoc(arg1);
972}
973//******************************************************************************
974//******************************************************************************
975int WIN32API EndPage( HDC arg1)
976{
977 dprintf(("GDI32: EndPage"));
978 return O32_EndPage(arg1);
979}
980//******************************************************************************
981//******************************************************************************
982BOOL WIN32API EndPath( HDC arg1)
983{
984 dprintf(("GDI32: EndPath"));
985 return O32_EndPath(arg1);
986}
987//******************************************************************************
988//******************************************************************************
989BOOL WIN32API EnumEnhMetaFile( HDC arg1, HENHMETAFILE arg2, ENHMFENUMPROC arg3, PVOID arg4, const RECT * arg5)
990{
991 dprintf(("GDI32: EnumEnhMetaFile DOESN'T WORK!"));
992// return O32_EnumEnhMetaFile(arg1, arg2, arg3, arg4, arg5);
993 return 0;
994}
995//******************************************************************************
996//******************************************************************************
997BOOL WIN32API MoveToEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
998{
999 dprintf(("GDI32: MoveToEx\n"));
1000 return O32_MoveToEx(arg1, arg2, arg3, arg4);
1001}
1002//******************************************************************************
1003//******************************************************************************
1004BOOL WIN32API PatBlt( HDC arg1, int arg2, int arg3, int arg4, int arg5, DWORD arg6)
1005{
1006 BOOL rc;
1007
1008 rc = O32_PatBlt(arg1, arg2, arg3, arg4, arg5, arg6);
1009 dprintf(("GDI32: PatBlt (%d,%d) (%d,%d) returned %d\n", arg2, arg3, arg4, arg5, rc));
1010 return(rc);
1011}
1012//******************************************************************************
1013//******************************************************************************
1014BOOL WIN32API Rectangle( HDC arg1, int arg2, int arg3, int arg4, int arg5)
1015{
1016 dprintf(("GDI32: Rectangle\n"));
1017 return O32_Rectangle(arg1, arg2, arg3, arg4, arg5);
1018}
1019//******************************************************************************
1020//******************************************************************************
1021int WIN32API SetROP2( HDC arg1, int arg2)
1022{
1023 dprintf(("GDI32: SetROP2"));
1024 return O32_SetROP2(arg1, arg2);
1025}
1026//******************************************************************************
1027//TODO: Callback
1028//******************************************************************************
1029BOOL WIN32API EnumMetaFile( HDC arg1, HMETAFILE arg2, MFENUMPROC arg3, LPARAM arg4)
1030{
1031 dprintf(("GDI32: EnumMetaFile STUB"));
1032 //calling convention differences
1033// return O32_EnumMetaFile(arg1, arg2, arg3, arg4);
1034 return 0;
1035}
1036//******************************************************************************
1037//******************************************************************************
1038int WIN32API EnumObjects( HDC arg1, int arg2, GOBJENUMPROC arg3, LPARAM arg4)
1039{
1040 dprintf(("GDI32: EnumObjects STUB"));
1041 //calling convention differences
1042// return O32_EnumObjects(arg1, arg2, arg3, arg4);
1043 return 0;
1044}
1045//******************************************************************************
1046//******************************************************************************
1047BOOL WIN32API EqualRgn( HRGN arg1, HRGN arg2)
1048{
1049 dprintf(("GDI32: EqualRgn"));
1050 return O32_EqualRgn(arg1, arg2);
1051}
1052//******************************************************************************
1053//******************************************************************************
1054int WIN32API Escape( HDC arg1, int arg2, int arg3, LPCSTR arg4, PVOID arg5)
1055{
1056 dprintf(("GDI32: Escape"));
1057 return O32_Escape(arg1, arg2, arg3, arg4, arg5);
1058}
1059//******************************************************************************
1060//******************************************************************************
1061int WIN32API ExcludeClipRect( HDC arg1, int arg2, int arg3, int arg4, int arg5)
1062{
1063 dprintf(("GDI32: ExcludeClipRect"));
1064 return O32_ExcludeClipRect(arg1, arg2, arg3, arg4, arg5);
1065}
1066//******************************************************************************
1067//******************************************************************************
1068HPEN WIN32API ExtCreatePen( DWORD arg1, DWORD arg2, const LOGBRUSH * arg3, DWORD arg4, const DWORD * arg5)
1069{
1070 dprintf(("GDI32: ExtCreatePen"));
1071 return O32_ExtCreatePen(arg1, arg2, arg3, arg4, arg5);
1072}
1073//******************************************************************************
1074//******************************************************************************
1075HRGN WIN32API ExtCreateRegion( const XFORM * arg1, DWORD arg2, const RGNDATA * arg3)
1076{
1077 dprintf(("GDI32: ExtCreateRegion"));
1078 return O32_ExtCreateRegion(arg1, arg2, arg3);
1079}
1080//******************************************************************************
1081//******************************************************************************
1082BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5)
1083{
1084 dprintf(("GDI32: ExtFloodFill"));
1085 return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5);
1086}
1087//******************************************************************************
1088//******************************************************************************
1089int WIN32API ExtSelectClipRgn( HDC arg1, HRGN arg2, int arg3)
1090{
1091 dprintf(("GDI32: ExtSelectClipRgn"));
1092 return O32_ExtSelectClipRgn(arg1, arg2, arg3);
1093}
1094//******************************************************************************
1095//******************************************************************************
1096BOOL WIN32API FillPath( HDC arg1)
1097{
1098 dprintf(("GDI32: FillPath"));
1099 return O32_FillPath(arg1);
1100}
1101//******************************************************************************
1102//******************************************************************************
1103BOOL WIN32API FillRgn( HDC arg1, HRGN arg2, HBRUSH arg3)
1104{
1105 dprintf(("GDI32: FillRgn"));
1106 return O32_FillRgn(arg1, arg2, arg3);
1107}
1108//******************************************************************************
1109//******************************************************************************
1110BOOL WIN32API FlattenPath( HDC arg1)
1111{
1112 dprintf(("GDI32: FlattenPath"));
1113 return O32_FlattenPath(arg1);
1114}
1115//******************************************************************************
1116//******************************************************************************
1117BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4)
1118{
1119 dprintf(("GDI32: FloodFill"));
1120 return O32_FloodFill(arg1, arg2, arg3, arg4);
1121}
1122//******************************************************************************
1123//******************************************************************************
1124BOOL WIN32API FrameRgn( HDC arg1, HRGN arg2, HBRUSH arg3, int arg4, int arg5)
1125{
1126 dprintf(("GDI32: FrameRgn"));
1127 return O32_FrameRgn(arg1, arg2, arg3, arg4, arg5);
1128}
1129//******************************************************************************
1130//******************************************************************************
1131int WIN32API GetArcDirection( HDC arg1)
1132{
1133 dprintf(("GDI32: GetArcDirection"));
1134 return O32_GetArcDirection(arg1);
1135}
1136//******************************************************************************
1137//******************************************************************************
1138BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2)
1139{
1140 dprintf(("GDI32: GetAspectRatioFilterEx"));
1141 return O32_GetAspectRatioFilterEx(arg1, arg2);
1142}
1143//******************************************************************************
1144//******************************************************************************
1145LONG WIN32API GetBitmapBits( HBITMAP arg1, LONG arg2, PVOID arg3)
1146{
1147 dprintf(("GDI32: GetBitmapBits"));
1148 return O32_GetBitmapBits(arg1, arg2, arg3);
1149}
1150//******************************************************************************
1151//******************************************************************************
1152BOOL WIN32API GetBitmapDimensionEx( HBITMAP arg1, PSIZE arg2)
1153{
1154 dprintf(("GDI32: GetBitmapDimensionEx"));
1155 return O32_GetBitmapDimensionEx(arg1, arg2);
1156}
1157//******************************************************************************
1158//******************************************************************************
1159COLORREF WIN32API GetBkColor( HDC arg1)
1160{
1161 dprintf(("GDI32: GetBkColor"));
1162 return O32_GetBkColor(arg1);
1163}
1164//******************************************************************************
1165//******************************************************************************
1166int WIN32API GetBkMode( HDC arg1)
1167{
1168 dprintf(("GDI32: GetBkMode"));
1169 return O32_GetBkMode(arg1);
1170}
1171//******************************************************************************
1172//******************************************************************************
1173UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3)
1174{
1175 dprintf(("GDI32: GetBoundsRect"));
1176 return O32_GetBoundsRect(arg1, arg2, arg3);
1177}
1178//******************************************************************************
1179//******************************************************************************
1180BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2)
1181{
1182 dprintf(("GDI32: GetBrushOrgEx"));
1183 return O32_GetBrushOrgEx(arg1, arg2);
1184}
1185//******************************************************************************
1186//******************************************************************************
1187BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
1188{
1189 dprintf(("GDI32: GetCharABCWidthsA"));
1190 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
1191}
1192//******************************************************************************
1193//******************************************************************************
1194BOOL WIN32API GetCharABCWidthsW( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
1195{
1196 dprintf(("GDI32: GetCharABCWidthsW not properly implemented."));
1197 // NOTE: This will not work as is (needs UNICODE support)
1198 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
1199}
1200//******************************************************************************
1201//******************************************************************************
1202BOOL WIN32API GetCharWidthA( HDC arg1, UINT arg2, UINT arg3, PINT arg4)
1203{
1204 dprintf(("GDI32: GetCharWidthA"));
1205 return O32_GetCharWidth(arg1, arg2, arg3, arg4);
1206}
1207//******************************************************************************
1208//TODO: Cut off Unicode chars?
1209//******************************************************************************
1210BOOL WIN32API GetCharWidthW(HDC arg1, UINT iFirstChar, UINT iLastChar, PINT arg4)
1211{
1212 dprintf(("GDI32: GetCharWidthW, not properly implemented"));
1213 return O32_GetCharWidth(arg1, iFirstChar, iLastChar, arg4);
1214}
1215//******************************************************************************
1216//******************************************************************************
1217int WIN32API GetClipBox( HDC arg1, PRECT arg2)
1218{
1219 int rc;
1220
1221 rc = O32_GetClipBox(arg1, arg2);
1222 dprintf(("GDI32: GetClipBox of %X returned %d\n", arg1, rc));
1223 return(rc);
1224}
1225//******************************************************************************
1226//******************************************************************************
1227int WIN32API GetClipRgn( HDC arg1, HRGN arg2)
1228{
1229 dprintf(("GDI32: GetClipRgn"));
1230 return O32_GetClipRgn(arg1, arg2);
1231}
1232//******************************************************************************
1233//******************************************************************************
1234HANDLE WIN32API GetCurrentObject( HDC arg1, UINT arg2)
1235{
1236 dprintf(("GDI32: GetCurrentObject"));
1237 return (HANDLE)O32_GetCurrentObject(arg1, arg2);
1238}
1239//******************************************************************************
1240//******************************************************************************
1241BOOL WIN32API GetCurrentPositionEx( HDC arg1, PPOINT arg2)
1242{
1243 dprintf(("GDI32: GetCurrentPositionEx"));
1244 return O32_GetCurrentPositionEx(arg1, arg2);
1245}
1246//******************************************************************************
1247//******************************************************************************
1248int WIN32API GetDIBits( HDC arg1, HBITMAP arg2, UINT arg3, UINT arg4, void * arg5, PBITMAPINFO arg6, UINT arg7)
1249{
1250 dprintf(("GDI32: GetDIBits"));
1251 return O32_GetDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1252}
1253//******************************************************************************
1254//******************************************************************************
1255int WIN32API GetDeviceCaps(HDC hdc, int nIndex)
1256{
1257 int rc;
1258
1259 rc = O32_GetDeviceCaps(hdc, nIndex);
1260 dprintf(("GDI32: GetDeviceCaps %X, %d returned %d\n", hdc, nIndex, rc));
1261 //SvL: 13-9-'98: NT returns -1 when using 16 bits colors, NOT 65536!
1262 if(nIndex == NUMCOLORS && rc > 256)
1263 return -1;
1264 return(rc);
1265}
1266//******************************************************************************
1267//******************************************************************************
1268HENHMETAFILE WIN32API GetEnhMetaFileA( LPCSTR arg1)
1269{
1270 dprintf(("GDI32: GetEnhMetaFileA"));
1271 return O32_GetEnhMetaFile(arg1);
1272}
1273//******************************************************************************
1274//******************************************************************************
1275UINT WIN32API GetEnhMetaFileBits( HENHMETAFILE arg1, UINT arg2, PBYTE arg3)
1276{
1277 dprintf(("GDI32: GetEnhMetaFileBits"));
1278 return O32_GetEnhMetaFileBits(arg1, arg2, arg3);
1279}
1280//******************************************************************************
1281//******************************************************************************
1282UINT WIN32API GetEnhMetaFileHeader( HENHMETAFILE arg1, UINT arg2, LPENHMETAHEADER arg3)
1283{
1284 dprintf(("GDI32: GetEnhMetaFileHeader"));
1285 return O32_GetEnhMetaFileHeader(arg1, arg2, arg3);
1286}
1287//******************************************************************************
1288//******************************************************************************
1289UINT WIN32API GetEnhMetaFilePaletteEntries( HENHMETAFILE arg1, UINT arg2, PPALETTEENTRY arg3)
1290{
1291 dprintf(("GDI32: GetEnhMetaFilePaletteEntries"));
1292 return O32_GetEnhMetaFilePaletteEntries(arg1, arg2, arg3);
1293}
1294//******************************************************************************
1295//******************************************************************************
1296HENHMETAFILE WIN32API GetEnhMetaFileW( LPCWSTR arg1)
1297{
1298 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
1299 HENHMETAFILE rc;
1300
1301 dprintf(("GDI32: GetEnhMetaFileW"));
1302 // NOTE: This will not work as is (needs UNICODE support)
1303 rc = O32_GetEnhMetaFile(astring);
1304 FreeAsciiString(astring);
1305 return rc;
1306}
1307//******************************************************************************
1308//******************************************************************************
1309int WIN32API GetGraphicsMode(HDC arg1)
1310{
1311 dprintf(("GDI32: GetGraphicsMode"));
1312 return O32_GetGraphicsMode(arg1);
1313}
1314//******************************************************************************
1315//******************************************************************************
1316DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
1317{
1318 dprintf(("GDI32: GetKerningPairsA"));
1319 return O32_GetKerningPairs(arg1, arg2, arg3);
1320}
1321//******************************************************************************
1322//******************************************************************************
1323DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
1324{
1325 dprintf(("GDI32: GetKerningPairsW"));
1326 // NOTE: This will not work as is (needs UNICODE support)
1327 return O32_GetKerningPairs(arg1, arg2, arg3);
1328}
1329//******************************************************************************
1330//******************************************************************************
1331int WIN32API GetMapMode( HDC arg1)
1332{
1333 dprintf(("GDI32: GetMapMode"));
1334 return O32_GetMapMode(arg1);
1335}
1336//******************************************************************************
1337//******************************************************************************
1338HMETAFILE WIN32API GetMetaFileA( LPCSTR arg1)
1339{
1340 dprintf(("GDI32: GetMetaFileA"));
1341 return O32_GetMetaFile(arg1);
1342}
1343//******************************************************************************
1344//******************************************************************************
1345UINT WIN32API GetMetaFileBitsEx( HMETAFILE arg1, UINT arg2, LPVOID arg3)
1346{
1347 dprintf(("GDI32: GetMetaFileBitsEx"));
1348 return O32_GetMetaFileBitsEx(arg1, arg2, arg3);
1349}
1350//******************************************************************************
1351//******************************************************************************
1352HMETAFILE WIN32API GetMetaFileW( LPCWSTR arg1)
1353{
1354 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
1355 HENHMETAFILE rc;
1356
1357 dprintf(("GDI32: GetMetaFileW"));
1358 rc = O32_GetMetaFile(astring);
1359 FreeAsciiString(astring);
1360 return rc;
1361
1362}
1363//******************************************************************************
1364//******************************************************************************
1365BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
1366{
1367 dprintf(("GDI32: GetMiterLimit"));
1368 return O32_GetMiterLimit(arg1, arg2);
1369}
1370//******************************************************************************
1371//******************************************************************************
1372COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2)
1373{
1374 dprintf(("GDI32: GetNearestColor\n"));
1375 return O32_GetNearestColor(arg1, arg2);
1376}
1377//******************************************************************************
1378//******************************************************************************
1379UINT WIN32API GetNearestPaletteIndex( HPALETTE arg1, COLORREF arg2)
1380{
1381 UINT rc;
1382 dprintf(("GDI32: GetNearestPaletteIndex (0x%08X ,0x%08X) ",arg1,arg2));
1383 rc = O32_GetNearestPaletteIndex(arg1, arg2);
1384 dprintf(("Returns %d\n",rc));
1385 return rc;
1386}
1387//******************************************************************************
1388//******************************************************************************
1389int WIN32API GetObjectW( HGDIOBJ arg1, int arg2, void * arg3)
1390{
1391 dprintf(("GDI32: GetObjectW %X, %d %X\n", arg1, arg2, arg3));
1392 // NOTE: This will not work as is (needs UNICODE support)
1393 return O32_GetObject(arg1, arg2, arg3);
1394}
1395//******************************************************************************
1396//******************************************************************************
1397UINT WIN32API GetOutlineTextMetricsA( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICA arg3)
1398{
1399 dprintf(("GDI32: GetOutlineTextMetricsA"));
1400 return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
1401}
1402//******************************************************************************
1403//******************************************************************************
1404UINT WIN32API GetOutlineTextMetricsW( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICW arg3)
1405{
1406 dprintf(("GDI32: GetOutlineTextMetricsW STUB"));
1407 // NOTE: This will not work as is (needs UNICODE support)
1408// return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
1409 return 0;
1410}
1411//******************************************************************************
1412//******************************************************************************
1413UINT WIN32API GetPaletteEntries( HPALETTE arg1, UINT arg2, UINT arg3, PPALETTEENTRY arg4)
1414{
1415 dprintf(("GDI32: GetPaletteEntries"));
1416 return O32_GetPaletteEntries(arg1, arg2, arg3, arg4);
1417}
1418//******************************************************************************
1419//******************************************************************************
1420INT WIN32API GetPath( HDC arg1, PPOINT arg2, PBYTE arg3, int arg4)
1421{
1422 dprintf(("GDI32: GetPath"));
1423 return O32_GetPath(arg1, arg2, arg3, arg4);
1424}
1425//******************************************************************************
1426//******************************************************************************
1427int WIN32API GetPolyFillMode( HDC arg1)
1428{
1429 dprintf(("GDI32: GetPolyFillMode"));
1430 return O32_GetPolyFillMode(arg1);
1431}
1432//******************************************************************************
1433//******************************************************************************
1434int WIN32API GetROP2( HDC arg1)
1435{
1436 dprintf(("GDI32: GetROP2"));
1437 return O32_GetROP2(arg1);
1438}
1439//******************************************************************************
1440//******************************************************************************
1441BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2)
1442{
1443 dprintf(("GDI32: GetRasterizerCaps"));
1444 return O32_GetRasterizerCaps(arg1, arg2);
1445}
1446//******************************************************************************
1447//******************************************************************************
1448DWORD WIN32API GetRegionData( HRGN arg1, DWORD arg2, PRGNDATA arg3)
1449{
1450 dprintf(("GDI32: GetRegionData"));
1451 return O32_GetRegionData(arg1, arg2, arg3);
1452}
1453//******************************************************************************
1454//******************************************************************************
1455int WIN32API GetRgnBox( HRGN arg1, PRECT arg2)
1456{
1457 dprintf(("GDI32: GetRgnBox"));
1458 return O32_GetRgnBox(arg1, arg2);
1459}
1460//******************************************************************************
1461//******************************************************************************
1462int WIN32API GetStretchBltMode( HDC arg1)
1463{
1464 dprintf(("GDI32: GetStretchBltMode"));
1465 return O32_GetStretchBltMode(arg1);
1466}
1467//******************************************************************************
1468//******************************************************************************
1469UINT WIN32API GetSystemPaletteEntries( HDC arg1, UINT arg2, UINT arg3, PPALETTEENTRY arg4)
1470{
1471 UINT rc;
1472
1473 dprintf(("GDI32: GetSystemPaletteEntries start %d nr %d pal ptr %X", arg2, arg3, arg4));
1474 rc = O32_GetSystemPaletteEntries(arg1, arg2, arg3, arg4);
1475 dprintf((" GetSystemPaletteEntries returned %d", rc));
1476 return(rc);
1477}
1478//******************************************************************************
1479//******************************************************************************
1480UINT WIN32API GetTextAlign( HDC arg1)
1481{
1482 dprintf(("GDI32: GetTextAlign"));
1483 return O32_GetTextAlign(arg1);
1484}
1485//******************************************************************************
1486//******************************************************************************
1487int WIN32API GetTextCharacterExtra( HDC arg1)
1488{
1489 dprintf(("GDI32: GetTextCharacterExtra"));
1490 return O32_GetTextCharacterExtra(arg1);
1491}
1492//******************************************************************************
1493//******************************************************************************
1494COLORREF WIN32API GetTextColor( HDC arg1)
1495{
1496 dprintf(("GDI32: GetTextColor"));
1497 return O32_GetTextColor(arg1);
1498}
1499//******************************************************************************
1500//******************************************************************************
1501BOOL WIN32API GetTextExtentPoint32A( HDC arg1, LPCSTR arg2, int arg3, PSIZE lpSize)
1502{
1503 dprintf(("GDI32: GetTextExtentPoint32A"));
1504 lpSize->cx = lpSize->cy = 0;
1505 return O32_GetTextExtentPoint32(arg1, arg2, arg3, lpSize);
1506}
1507//******************************************************************************
1508//******************************************************************************
1509BOOL WIN32API GetTextExtentPoint32W(HDC arg1, LPCWSTR arg2, int arg3, PSIZE lpSize)
1510{
1511 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1512 BOOL rc;
1513
1514 dprintf(("GDI32: GetTextExtentPoint32W %s\n", astring));
1515 lpSize->cx = lpSize->cy = 0;
1516 rc = O32_GetTextExtentPoint32(arg1, astring, arg3, lpSize);
1517 FreeAsciiString(astring);
1518 return(rc);
1519}
1520//******************************************************************************
1521//******************************************************************************
1522BOOL WIN32API GetTextExtentPointW(HDC hdc,
1523 LPCWSTR lpString,
1524 int cbString,
1525 PSIZE lpSize)
1526{
1527 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
1528 BOOL rc;
1529
1530 lpSize->cx = lpSize->cy = 0;
1531 rc = O32_GetTextExtentPoint(hdc,
1532 astring,
1533 cbString,
1534 lpSize);
1535 dprintf(("GDI32: GetTextExtentPointW %X %s (size %08xh) returned %d\n", hdc, astring, cbString, rc));
1536 dprintf(("GDI32: GetTextExtentPointW (%d,%d)\n", lpSize->cx, lpSize->cy));
1537
1538 FreeAsciiString(astring);
1539 return(rc);
1540}
1541//******************************************************************************
1542//******************************************************************************
1543int WIN32API GetTextFaceA( HDC arg1, int arg2, LPSTR arg3)
1544{
1545 dprintf(("GDI32: GetTextFaceA"));
1546 return O32_GetTextFace(arg1, arg2, arg3);
1547}
1548//******************************************************************************
1549//******************************************************************************
1550int WIN32API GetTextFaceW( HDC arg1, int arg2, LPWSTR arg3)
1551{
1552 char *astring = (char *)malloc(arg2+1);
1553 int rc;
1554
1555 dprintf(("GDI32: GetTextFaceW"));
1556 rc = O32_GetTextFace(arg1, arg2, astring);
1557 AsciiToUnicode(astring, arg3);
1558 free(astring);
1559 return rc;
1560}
1561//******************************************************************************
1562//******************************************************************************
1563BOOL WIN32API GetTextMetricsA( HDC arg1, LPTEXTMETRICA arg2)
1564{
1565 BOOL rc;
1566
1567 rc = O32_GetTextMetrics(arg1, arg2);
1568 dprintf(("GDI32: GetTextMetricsA returned %d\n", rc));
1569 return(rc);
1570}
1571//******************************************************************************
1572//******************************************************************************
1573BOOL WIN32API GetTextMetricsW( HDC arg1, LPTEXTMETRICW pwtm)
1574{
1575 BOOL rc;
1576 TEXTMETRICA atm;
1577
1578 dprintf(("GDI32: GetTextMetricsW"));
1579
1580 rc = O32_GetTextMetrics(arg1, &atm);
1581 pwtm->tmHeight = atm.tmHeight;
1582 pwtm->tmAscent = atm.tmAscent;
1583 pwtm->tmDescent = atm.tmDescent;
1584 pwtm->tmInternalLeading = atm.tmInternalLeading;
1585 pwtm->tmExternalLeading = atm.tmExternalLeading;
1586 pwtm->tmAveCharWidth = atm.tmAveCharWidth;
1587 pwtm->tmMaxCharWidth = atm.tmMaxCharWidth;
1588 pwtm->tmWeight = atm.tmWeight;
1589 pwtm->tmOverhang = atm.tmOverhang;
1590 pwtm->tmDigitizedAspectX = atm.tmDigitizedAspectX;
1591 pwtm->tmDigitizedAspectY = atm.tmDigitizedAspectY;
1592 pwtm->tmFirstChar = atm.tmFirstChar;
1593 pwtm->tmLastChar = atm.tmLastChar;
1594 pwtm->tmDefaultChar = atm.tmDefaultChar;
1595 pwtm->tmBreakChar = atm.tmBreakChar;
1596 pwtm->tmItalic = atm.tmItalic;
1597 pwtm->tmUnderlined = atm.tmUnderlined;
1598 pwtm->tmStruckOut = atm.tmStruckOut;
1599 pwtm->tmPitchAndFamily = atm.tmPitchAndFamily;
1600 pwtm->tmCharSet = atm.tmCharSet;
1601 return(rc);
1602}
1603//******************************************************************************
1604//******************************************************************************
1605BOOL WIN32API GetViewportExtEx( HDC arg1, PSIZE arg2)
1606{
1607 dprintf(("GDI32: GetViewportExtEx"));
1608 return O32_GetViewportExtEx(arg1, arg2);
1609}
1610//******************************************************************************
1611//******************************************************************************
1612BOOL WIN32API GetViewportOrgEx( HDC arg1, PPOINT arg2)
1613{
1614 dprintf(("GDI32: GetViewportOrgEx"));
1615 return O32_GetViewportOrgEx(arg1, arg2);
1616}
1617//******************************************************************************
1618//******************************************************************************
1619UINT WIN32API GetWinMetaFileBits( HENHMETAFILE arg1, UINT arg2, PBYTE arg3, int arg4, HDC arg5)
1620{
1621 dprintf(("GDI32: GetWinMetaFileBits"));
1622 return O32_GetWinMetaFileBits(arg1, arg2, arg3, arg4, arg5);
1623}
1624//******************************************************************************
1625//******************************************************************************
1626BOOL WIN32API GetWindowOrgEx( HDC arg1, PPOINT arg2)
1627{
1628 dprintf(("GDI32: GetWindowOrgEx"));
1629 return O32_GetWindowOrgEx(arg1, arg2);
1630}
1631//******************************************************************************
1632//******************************************************************************
1633BOOL WIN32API GetWorldTransform( HDC arg1, LPXFORM arg2)
1634{
1635 dprintf(("GDI32: GetWorldTransform"));
1636 return O32_GetWorldTransform(arg1, arg2);
1637}
1638//******************************************************************************
1639//******************************************************************************
1640int WIN32API IntersectClipRect(HDC arg1, int arg2, int arg3, int arg4, int arg5)
1641{
1642 int rc;
1643
1644 rc = O32_IntersectClipRect(arg1, arg2, arg3, arg4, arg5);
1645 dprintf(("GDI32: IntersectClipRect returned %d\n", rc));
1646 return(rc);
1647}
1648//******************************************************************************
1649//******************************************************************************
1650BOOL WIN32API InvertRgn( HDC arg1, HRGN arg2)
1651{
1652 dprintf(("GDI32: InvertRgn"));
1653 return O32_InvertRgn(arg1, arg2);
1654}
1655//******************************************************************************
1656//******************************************************************************
1657BOOL WIN32API LPtoDP( HDC arg1, PPOINT arg2, int arg3)
1658{
1659 dprintf(("GDI32: LPtoDP"));
1660 return O32_LPtoDP(arg1, arg2, arg3);
1661}
1662//******************************************************************************
1663//******************************************************************************
1664BOOL WIN32API MaskBlt( HDC arg1, int arg2, int arg3, int arg4, int arg5, HDC arg6, int arg7, int arg8, HBITMAP arg9, int arg10, int arg11, DWORD arg12)
1665{
1666 dprintf(("GDI32: MaskBlt"));
1667 return O32_MaskBlt(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
1668}
1669//******************************************************************************
1670//******************************************************************************
1671BOOL WIN32API ModifyWorldTransform( HDC arg1, const XFORM *arg2, DWORD arg3)
1672{
1673 dprintf(("GDI32: ModifyWorldTransform"));
1674 return O32_ModifyWorldTransform(arg1, (LPXFORM)arg2, arg3);
1675}
1676//******************************************************************************
1677//******************************************************************************
1678int WIN32API OffsetClipRgn( HDC arg1, int arg2, int arg3)
1679{
1680 dprintf(("GDI32: OffsetClipRgn"));
1681 return O32_OffsetClipRgn(arg1, arg2, arg3);
1682}
1683//******************************************************************************
1684//******************************************************************************
1685int WIN32API OffsetRgn( HRGN arg1, int arg2, int arg3)
1686{
1687 dprintf(("GDI32: OffsetRgn"));
1688 return O32_OffsetRgn(arg1, arg2, arg3);
1689}
1690//******************************************************************************
1691//******************************************************************************
1692BOOL WIN32API OffsetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1693{
1694 dprintf(("GDI32: OffsetViewportOrgEx"));
1695 return O32_OffsetViewportOrgEx(arg1, arg2, arg3, arg4);
1696}
1697//******************************************************************************
1698//******************************************************************************
1699BOOL WIN32API OffsetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1700{
1701 dprintf(("GDI32: OffsetWindowOrgEx"));
1702 return O32_OffsetWindowOrgEx(arg1, arg2, arg3, arg4);
1703}
1704//******************************************************************************
1705//******************************************************************************
1706BOOL WIN32API PaintRgn( HDC arg1, HRGN arg2)
1707{
1708 dprintf(("GDI32: PaintRgn"));
1709 return O32_PaintRgn(arg1, arg2);
1710}
1711//******************************************************************************
1712//******************************************************************************
1713HRGN WIN32API PathToRegion( HDC arg1)
1714{
1715 dprintf(("GDI32: PathToRegion"));
1716 return O32_PathToRegion(arg1);
1717}
1718//******************************************************************************
1719//******************************************************************************
1720BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
1721 int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
1722 int nYRadial2)
1723{
1724 dprintf(("GDI32: Pie"));
1725 //CB: bug in O32_Pie
1726 if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
1727 return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
1728 else
1729 return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
1730}
1731//******************************************************************************
1732//******************************************************************************
1733BOOL WIN32API PlayEnhMetaFile( HDC arg1, HENHMETAFILE arg2, const RECT * arg3)
1734{
1735 dprintf(("GDI32: PlayEnhMetaFile"));
1736 return O32_PlayEnhMetaFile(arg1, arg2, arg3);
1737}
1738//******************************************************************************
1739//******************************************************************************
1740BOOL WIN32API PlayMetaFile( HDC arg1, HMETAFILE arg2)
1741{
1742 dprintf(("GDI32: PlayMetaFile"));
1743 return O32_PlayMetaFile(arg1, arg2);
1744}
1745//******************************************************************************
1746//******************************************************************************
1747BOOL WIN32API PlayMetaFileRecord( HDC arg1, LPHANDLETABLE arg2, LPMETARECORD arg3, UINT arg4)
1748{
1749 dprintf(("GDI32: PlayMetaFileRecord"));
1750 return O32_PlayMetaFileRecord(arg1, arg2, arg3, (int)arg4);
1751}
1752//******************************************************************************
1753//******************************************************************************
1754BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
1755{
1756 dprintf(("GDI32: PolyBezier"));
1757 return O32_PolyBezier(arg1, arg2, (int)arg3);
1758}
1759//******************************************************************************
1760//******************************************************************************
1761BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
1762{
1763 dprintf(("GDI32: PolyBezierTo"));
1764 return O32_PolyBezierTo(arg1, arg2, arg3);
1765}
1766//******************************************************************************
1767//******************************************************************************
1768BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
1769{
1770 dprintf(("GDI32: PolyDraw"));
1771 return O32_PolyDraw(arg1, arg2, arg3, arg4);
1772}
1773//******************************************************************************
1774//******************************************************************************
1775BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
1776{
1777 dprintf(("GDI32: PolyPolygon"));
1778 return O32_PolyPolygon(arg1, arg2, arg3, arg4);
1779}
1780//******************************************************************************
1781//******************************************************************************
1782BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
1783{
1784 dprintf(("GDI32: PolyPolyline"));
1785
1786 return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
1787}
1788//******************************************************************************
1789//******************************************************************************
1790BOOL WIN32API Polygon( HDC arg1, const POINT * arg2, int arg3)
1791{
1792 dprintf(("GDI32: Polygon"));
1793 return O32_Polygon(arg1, arg2, arg3);
1794}
1795//******************************************************************************
1796//******************************************************************************
1797BOOL WIN32API PtInRegion( HRGN arg1, int arg2, int arg3)
1798{
1799 dprintf(("GDI32: PtInRegion"));
1800 return O32_PtInRegion(arg1, arg2, arg3);
1801}
1802//******************************************************************************
1803//******************************************************************************
1804BOOL WIN32API PtVisible( HDC arg1, int arg2, int arg3)
1805{
1806 dprintf(("GDI32: PtVisible"));
1807 return O32_PtVisible(arg1, arg2, arg3);
1808}
1809//******************************************************************************
1810//******************************************************************************
1811BOOL WIN32API RectInRegion( HRGN arg1, const RECT * arg2)
1812{
1813 dprintf(("GDI32: RectInRegion"));
1814 return O32_RectInRegion(arg1, arg2);
1815}
1816//******************************************************************************
1817//******************************************************************************
1818BOOL WIN32API RectVisible( HDC arg1, const RECT * arg2)
1819{
1820 dprintf(("GDI32: RectVisible\n"));
1821 return O32_RectVisible(arg1, arg2);
1822}
1823//******************************************************************************
1824//******************************************************************************
1825HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
1826{
1827 dprintf(("GDI32: ResetDCA\n"));
1828 return (HDC)O32_ResetDC(arg1, arg2);
1829}
1830//******************************************************************************
1831//******************************************************************************
1832HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
1833{
1834 dprintf(("GDI32: ResetDCW\n"));
1835 // NOTE: This will not work as is (needs UNICODE support)
1836 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
1837}
1838//******************************************************************************
1839//******************************************************************************
1840BOOL WIN32API ResizePalette( HPALETTE arg1, UINT arg2)
1841{
1842 dprintf(("GDI32: ResizePalette\n"));
1843 return O32_ResizePalette(arg1, arg2);
1844}
1845//******************************************************************************
1846//******************************************************************************
1847BOOL WIN32API RestoreDC( HDC arg1, int arg2)
1848{
1849 dprintf(("GDI32: RestoreDC\n"));
1850 return O32_RestoreDC(arg1, arg2);
1851}
1852//******************************************************************************
1853//******************************************************************************
1854BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
1855{
1856 dprintf(("GDI32: RoundRect"));
1857 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1858}
1859//******************************************************************************
1860//******************************************************************************
1861int WIN32API SaveDC( HDC arg1)
1862{
1863 dprintf(("GDI32: SaveDC"));
1864 return O32_SaveDC(arg1);
1865}
1866//******************************************************************************
1867//******************************************************************************
1868BOOL WIN32API ScaleViewportExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1869{
1870 dprintf(("GDI32: ScaleViewportExtEx"));
1871 return O32_ScaleViewportExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1872}
1873//******************************************************************************
1874//******************************************************************************
1875BOOL WIN32API ScaleWindowExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1876{
1877 dprintf(("GDI32: ScaleWindowExtEx"));
1878 return O32_ScaleWindowExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1879}
1880//******************************************************************************
1881//******************************************************************************
1882int WIN32API SelectClipRgn( HDC arg1, HRGN arg2)
1883{
1884 dprintf(("GDI32: SelectClipRgn"));
1885 return O32_SelectClipRgn(arg1, arg2);
1886}
1887//******************************************************************************
1888//******************************************************************************
1889int WIN32API SetArcDirection( HDC arg1, int arg2)
1890{
1891 dprintf(("GDI32: SetArcDirection"));
1892 return O32_SetArcDirection(arg1, arg2);
1893}
1894//******************************************************************************
1895//******************************************************************************
1896LONG WIN32API SetBitmapBits( HBITMAP arg1, LONG arg2, const VOID * arg3)
1897{
1898 dprintf(("GDI32: SetBitmapBits"));
1899 return O32_SetBitmapBits(arg1, (DWORD)arg2, arg3);
1900}
1901//******************************************************************************
1902//******************************************************************************
1903BOOL WIN32API SetBitmapDimensionEx( HBITMAP arg1, int arg2, int arg3, PSIZE arg4)
1904{
1905 dprintf(("GDI32: SetBitmapDimensionEx"));
1906 return O32_SetBitmapDimensionEx(arg1, arg2, arg3, arg4);
1907}
1908//******************************************************************************
1909//******************************************************************************
1910UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
1911{
1912 dprintf(("GDI32: SetBoundsRect"));
1913 return O32_SetBoundsRect(arg1, arg2, arg3);
1914}
1915//******************************************************************************
1916//******************************************************************************
1917BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1918{
1919 BOOL rc;
1920
1921 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
1922 dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc));
1923 return(rc);
1924}
1925//******************************************************************************
1926//******************************************************************************
1927int WIN32API SetDIBits( HDC arg1, HBITMAP arg2, UINT arg3, UINT arg4, const VOID * arg5, const BITMAPINFO * arg6, UINT arg7)
1928{
1929 dprintf(("GDI32: SetDIBits %x %x %x %x %x %x %x\n", arg1, arg2, arg3, arg4, arg5, arg6, arg7));
1930
1931 if(DIBSection::getSection() != NULL) {
1932 DIBSection *dsect;
1933
1934 dsect = DIBSection::find((DWORD)arg2);
1935 if(dsect) {
1936 return dsect->SetDIBits(arg1, arg2, arg3, arg4, arg5, (WINBITMAPINFOHEADER *)&arg6->bmiHeader, arg7);
1937 }
1938 }
1939 return O32_SetDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1940}
1941//******************************************************************************
1942//******************************************************************************
1943INT WIN32API SetDIBitsToDevice(HDC hdc, INT xDest, INT yDest, DWORD cx, DWORD cy, INT xSrc, INT ySrc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse)
1944{
1945 INT result, imgsize, palsize;
1946 char *ptr;
1947
1948 dprintf(("GDI32: SetDIBitsToDevice hdc:%X xDest:%d yDest:%d, cx:%d, cy:%d, xSrc:%d, ySrc:%d, startscan:%d, lines:%d, bits:%X, info%X, coloruse:%d",
1949 hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (LPVOID) bits, (PBITMAPINFO)info, coloruse));
1950
1951 // EB: ->>> Crazy. Nobody seen this Open32 bug ?
1952 // Dont't like dirty pointers, but Open32 needs a bit help.
1953 // Only tested with winmine.
1954 palsize = QueryPaletteSize((BITMAPINFOHEADER*)&info->bmiHeader);
1955 imgsize = CalcBitmapSize(info->bmiHeader.biBitCount,
1956 info->bmiHeader.biWidth, info->bmiHeader.biHeight);
1957 ptr = ((char *)info) + palsize + sizeof(BITMAPINFOHEADER);
1958 if(bits >= ptr && bits < ptr + imgsize)
1959 {
1960 bits = (char *)bits - imgsize +
1961 CalcBitmapSize(info->bmiHeader.biBitCount,
1962 info->bmiHeader.biWidth, lines);
1963 }
1964 // EB: <<<-
1965
1966 result = O32_SetDIBitsToDevice(hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (PVOID) bits, (PBITMAPINFO)info, coloruse);
1967 return result;
1968}
1969//******************************************************************************
1970//******************************************************************************
1971HENHMETAFILE WIN32API SetEnhMetaFileBits( UINT arg1, const BYTE * arg2)
1972{
1973 dprintf(("GDI32: SetEnhMetaFileBits"));
1974 return O32_SetEnhMetaFileBits(arg1, arg2);
1975}
1976//******************************************************************************
1977//******************************************************************************
1978int WIN32API SetGraphicsMode(HDC arg1, int arg2)
1979{
1980 dprintf(("GDI32: SetGraphicsMode"));
1981 return O32_SetGraphicsMode(arg1, arg2);
1982}
1983//******************************************************************************
1984//******************************************************************************
1985int WIN32API SetMapMode( HDC arg1, int arg2)
1986{
1987 dprintf(("GDI32: SetMapMode"));
1988 return O32_SetMapMode(arg1, arg2);
1989}
1990//******************************************************************************
1991//******************************************************************************
1992DWORD WIN32API SetMapperFlags( HDC arg1, DWORD arg2)
1993{
1994 dprintf(("GDI32: SetMapperFlags"));
1995 return O32_SetMapperFlags(arg1, arg2);
1996}
1997//******************************************************************************
1998//******************************************************************************
1999HMETAFILE WIN32API SetMetaFileBitsEx( UINT arg1, const BYTE * arg2)
2000{
2001 dprintf(("GDI32: SetMetaFileBitsEx"));
2002 return O32_SetMetaFileBitsEx(arg1, (PBYTE)arg2);
2003}
2004//******************************************************************************
2005//******************************************************************************
2006BOOL WIN32API SetMiterLimit( HDC arg1, float arg2, float * arg3)
2007{
2008 dprintf(("GDI32: SetMiterLimit"));
2009 return O32_SetMiterLimit(arg1, arg2, arg3);
2010}
2011//******************************************************************************
2012//******************************************************************************
2013UINT WIN32API SetPaletteEntries( HPALETTE arg1, UINT arg2, UINT arg3, PALETTEENTRY * arg4)
2014{
2015 dprintf(("GDI32: SetPaletteEntries"));
2016 return O32_SetPaletteEntries(arg1, arg2, arg3, (const PALETTEENTRY *)arg4);
2017}
2018//******************************************************************************
2019//******************************************************************************
2020int WIN32API SetPolyFillMode( HDC arg1, int arg2)
2021{
2022 dprintf(("GDI32: SetPolyFillMode"));
2023 return O32_SetPolyFillMode(arg1, arg2);
2024}
2025//******************************************************************************
2026//******************************************************************************
2027BOOL WIN32API SetRectRgn( HRGN arg1, int arg2, int arg3, int arg4, int arg5)
2028{
2029 dprintf(("GDI32: SetRectRgn"));
2030 return O32_SetRectRgn(arg1, arg2, arg3, arg4, arg5);
2031}
2032//******************************************************************************
2033//******************************************************************************
2034UINT WIN32API SetTextAlign( HDC arg1, UINT arg2)
2035{
2036 dprintf(("GDI32: SetTextAlign"));
2037 return O32_SetTextAlign(arg1, arg2);
2038}
2039//******************************************************************************
2040//******************************************************************************
2041int WIN32API SetTextCharacterExtra( HDC arg1, int arg2)
2042{
2043 dprintf(("GDI32: SetTextCharacterExtra"));
2044 return O32_SetTextCharacterExtra(arg1, arg2);
2045}
2046//******************************************************************************
2047//******************************************************************************
2048BOOL WIN32API SetTextJustification( HDC arg1, int arg2, int arg3)
2049{
2050 dprintf(("GDI32: SetTextJustification"));
2051 return O32_SetTextJustification(arg1, arg2, arg3);
2052}
2053//******************************************************************************
2054//******************************************************************************
2055BOOL WIN32API SetViewportExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
2056{
2057 dprintf(("GDI32: SetViewportExtEx"));
2058 return O32_SetViewportExtEx(arg1, arg2, arg3, arg4);
2059}
2060//******************************************************************************
2061//******************************************************************************
2062BOOL WIN32API SetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
2063{
2064 dprintf(("GDI32: SetViewportOrgEx"));
2065 return O32_SetViewportOrgEx(arg1, arg2, arg3, arg4);
2066}
2067//******************************************************************************
2068//******************************************************************************
2069HENHMETAFILE WIN32API SetWinMetaFileBits( UINT arg1, const BYTE * arg2, HDC arg3, const METAFILEPICT * arg4)
2070{
2071 dprintf(("GDI32: SetWinMetaFileBits"));
2072 return O32_SetWinMetaFileBits(arg1, arg2, arg3, arg4);
2073}
2074//******************************************************************************
2075//******************************************************************************
2076BOOL WIN32API SetWindowExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
2077{
2078 dprintf(("GDI32: SetWindowExtEx"));
2079 return O32_SetWindowExtEx(arg1, arg2, arg3, arg4);
2080}
2081//******************************************************************************
2082//******************************************************************************
2083BOOL WIN32API SetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
2084{
2085 dprintf(("GDI32: SetWindowOrgEx"));
2086 return O32_SetWindowOrgEx(arg1, arg2, arg3, arg4);
2087}
2088//******************************************************************************
2089//******************************************************************************
2090BOOL WIN32API SetWorldTransform( HDC arg1, const XFORM *arg2)
2091{
2092 dprintf(("GDI32: SetWorldTransform"));
2093 return O32_SetWorldTransform(arg1, (LPXFORM)arg2);
2094}
2095//******************************************************************************
2096//******************************************************************************
2097INT WIN32API StartDocA( HDC arg1, const DOCINFOA *arg2)
2098{
2099 dprintf(("GDI32: StartDocA"));
2100 return O32_StartDoc(arg1, (LPDOCINFOA)arg2);
2101}
2102//******************************************************************************
2103//******************************************************************************
2104INT WIN32API StartDocW( HDC arg1, const DOCINFOW *arg2)
2105{
2106 dprintf(("GDI32: StartDocW STUB"));
2107 // NOTE: This will not work as is (needs UNICODE support)
2108// return O32_StartDoc(arg1, arg2);
2109 return 0;
2110}
2111//******************************************************************************
2112//******************************************************************************
2113int WIN32API StartPage( HDC arg1)
2114{
2115 dprintf(("GDI32: StartPage"));
2116 return O32_StartPage(arg1);
2117}
2118//******************************************************************************
2119//******************************************************************************
2120BOOL WIN32API UnrealizeObject( HGDIOBJ arg1)
2121{
2122 dprintf(("GDI32: UnrealizeObject"));
2123 return O32_UnrealizeObject(arg1);
2124}
2125//******************************************************************************
2126//******************************************************************************
2127BOOL WIN32API WidenPath( HDC arg1)
2128{
2129 dprintf(("GDI32: WidenPath"));
2130 return O32_WidenPath(arg1);
2131}
2132//******************************************************************************
2133//CreateDisardableBitmap is obsolete and can be replaced by CreateCompatibleBitmap
2134//******************************************************************************
2135HBITMAP WIN32API CreateDiscardableBitmap(HDC hDC, int nWidth, int nHeight)
2136{
2137 dprintf(("GDI32: CreateDisardableBitmap\n"));
2138 return O32_CreateCompatibleBitmap(hDC, nWidth, nHeight);
2139}
2140//******************************************************************************
2141//TODO: Not implemented
2142//******************************************************************************
2143int WIN32API SetAbortProc(HDC hdc, ABORTPROC lpAbortProc)
2144{
2145 dprintf(("GDI32: SetAbortProc - stub (1)w\n"));
2146 return(1);
2147}
2148//******************************************************************************
2149//Selects the current path as a clipping region for a device context, combining
2150//any existing clipping region by using the specified mode
2151//TODO: Can be emulated with SelectClipRegion??
2152//******************************************************************************
2153BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
2154{
2155 dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
2156 return(TRUE);
2157}
2158//******************************************************************************
2159//TODO: Sets the color adjustment values for a device context. (used to adjust
2160// the input color of the src bitmap for calls of StretchBlt & StretchDIBits
2161// functions when HALFTONE mode is set
2162//******************************************************************************
2163BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
2164{
2165 dprintf(("GDI32: SetColorAdjustment, not implemented!(TRUE)\n"));
2166 return(TRUE);
2167}
2168//******************************************************************************
2169//WINE: OBJECTS\DIB.C
2170//*********************************************************************************
2171HBITMAP WIN32API CreateDIBSection( HDC hdc, BITMAPINFO *pbmi, UINT iUsage,
2172 VOID **ppvBits, HANDLE hSection, DWORD dwOffset)
2173{
2174 HBITMAP res = 0;
2175 BOOL fFlip = 0;
2176 int iHeight, iWidth;
2177
2178 dprintf(("GDI32: CreateDIBSection %x %x %x %d", hdc, iUsage, hSection, dwOffset));
2179 if(hSection)
2180 {
2181 dprintf(("GDI32: CreateDIBSection, hSection != NULL, not supported!\n"));
2182 return NULL;
2183 }
2184
2185 //SvL: 13-9-98: StarCraft uses bitmap with negative height
2186 iWidth = pbmi->bmiHeader.biWidth;
2187 if(pbmi->bmiHeader.biWidth < 0)
2188 {
2189 pbmi->bmiHeader.biWidth = -pbmi->bmiHeader.biWidth;
2190 fFlip = FLIP_HOR;
2191 }
2192 iHeight = pbmi->bmiHeader.biHeight;
2193 if(pbmi->bmiHeader.biHeight < 0)
2194 {
2195 pbmi->bmiHeader.biHeight = -pbmi->bmiHeader.biHeight;
2196 fFlip |= FLIP_VERT;
2197 }
2198
2199 res = O32_CreateDIBitmap(hdc, &pbmi->bmiHeader, 0, NULL, pbmi, 0);
2200 if (res)
2201 {
2202 ULONG Pal[256];
2203 char PalSize;
2204 LOGPALETTE tmpPal = { 0x300,1,{0,0,0,0}};
2205 HPALETTE hpalCur, hpalTmp;
2206 DIBSection *dsect = new DIBSection((WINBITMAPINFOHEADER *)&pbmi->bmiHeader, (DWORD)res, fFlip);
2207 dprintf(("Constructor returned\n"));
2208
2209 if(NULL!=dsect)
2210 {
2211 PalSize = dsect->GetBitCount();
2212 if(PalSize<=8)
2213 {
2214 // Now get the current Palette from the DC
2215 hpalTmp = CreatePalette(&tmpPal);
2216 hpalCur = SelectPalette(hdc, hpalTmp, FALSE);
2217
2218 // and use it to set the DIBColorTable
2219 GetPaletteEntries( hpalCur, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal);
2220 dsect->SetDIBColorTable(0, 1<< PalSize, (RGBQUAD*)&Pal);
2221
2222 // Restore the DC Palette
2223 SelectPalette(hdc,hpalCur,FALSE);
2224 DeleteObject(hpalTmp);
2225 }
2226 // Set the hdc in the DIBSection so we can update the palete if a new
2227 // Paletet etc. gets selected into the DC.
2228
2229 dsect->SelectDIBObject(hdc);
2230
2231 if(ppvBits!=NULL)
2232 *ppvBits = dsect->GetDIBObject();
2233
2234 pbmi->bmiHeader.biWidth = iWidth;
2235 pbmi->bmiHeader.biHeight = iHeight;
2236
2237 dprintf(("GDI32: return %08X\n",res));
2238 return(res);
2239 }
2240 }
2241
2242 /* Error. */
2243 if (res)
2244 DeleteObject(res);
2245 *ppvBits = NULL;
2246#ifdef DEBUG
2247 dprintf(("GDI32: CreateDIBSection, error!\n"));
2248 dprintf(("pbmi->biWidth %d", pbmi->bmiHeader.biWidth));
2249 dprintf(("pbmi->biHeight %d", pbmi->bmiHeader.biHeight));
2250 dprintf(("pbmi->biBitCount %d", pbmi->bmiHeader.biBitCount));
2251#endif
2252
2253 return 0;
2254}
2255//******************************************************************************
2256//******************************************************************************
2257UINT WIN32API GetDIBColorTable( HDC hdc, UINT uStartIndex, UINT cEntries,
2258 RGBQUAD *pColors)
2259{
2260 HPALETTE hpal = O32_GetCurrentObject(hdc, OBJ_PAL);
2261 UINT rc;
2262 int i;
2263
2264 rc = O32_GetPaletteEntries(hpal,
2265 uStartIndex,
2266 cEntries,
2267 (PALETTEENTRY *)pColors);
2268 for(i=0;
2269 i<cEntries;
2270 i++)
2271 {
2272 BYTE tmp;
2273 tmp = pColors[i].rgbBlue;
2274 pColors[i].rgbBlue = pColors[i].rgbRed;
2275 pColors[i].rgbRed = tmp;
2276 pColors[i].rgbReserved = 0;
2277 }
2278 dprintf(("GDI32: GetDIBColorTable returns %d\n", rc));
2279 return(rc);
2280}
2281//******************************************************************************
2282//******************************************************************************
2283UINT WIN32API SetDIBColorTable(HDC hdc, UINT uStartIndex, UINT cEntries,
2284 RGBQUAD *pColors)
2285{
2286 DIBSection *dsect = DIBSection::findHDC(hdc);
2287
2288 dprintf(("GDI32: SetDIBColorTable\n"));
2289 if(dsect)
2290 {
2291 return(dsect->SetDIBColorTable(uStartIndex, cEntries, pColors));
2292 }
2293 else
2294 return(0);
2295}
2296//******************************************************************************
2297//******************************************************************************
2298HPALETTE WIN32API CreateHalftonePalette(HDC hdc)
2299{
2300 dprintf(("GDI32: CreateHalftonePalette, not implemented\n"));
2301 return(NULL);
2302}
2303//******************************************************************************
2304//Maps colors to system palette; faster way to update window (instead of redrawing)
2305//We just redraw
2306//******************************************************************************
2307BOOL WIN32API UpdateColors(HDC hdc)
2308{
2309 dprintf(("GDI32: UpdateColors\n"));
2310 return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);
2311}
2312//******************************************************************************
2313//******************************************************************************
2314BOOL WIN32API GdiFlush()
2315{
2316 dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
2317 return(TRUE);
2318}
2319//******************************************************************************
2320//******************************************************************************
2321BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
2322{
2323 dprintf(("GDI32: GdiComment, not implemented (TRUE)\n"));
2324 return(TRUE);
2325}
2326//******************************************************************************
2327//******************************************************************************
2328BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
2329{
2330 dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
2331 return(FALSE);
2332}
2333//******************************************************************************
2334//******************************************************************************
2335BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
2336{
2337 dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
2338 return(FALSE);
2339}
2340//******************************************************************************
2341//******************************************************************************
2342BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
2343{
2344 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
2345 return(FALSE);
2346}
2347//******************************************************************************
2348//******************************************************************************
2349BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
2350 UINT iFirstChar,
2351 UINT iLastChar,
2352 LPABCFLOAT pxBUffer)
2353{
2354 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
2355 return(FALSE);
2356}
2357//******************************************************************************
2358//******************************************************************************
2359INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
2360 INT cbOutput, LPSTR lpszOutData)
2361{
2362 dprintf(("GDI32: ExtEscape, not implemented\n"));
2363 return(0);
2364}
2365//******************************************************************************
2366//******************************************************************************
2367int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
2368{
2369 dprintf(("GDI32: DrawEscape, not implemented\n"));
2370 return(0);
2371}
2372//******************************************************************************
2373//******************************************************************************
2374BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
2375{
2376 dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
2377 return(FALSE);
2378}
2379//******************************************************************************
2380//******************************************************************************
2381BOOL WIN32API PlgBlt(HDC hdcDest, CONST POINT *lpPoint, HDC hdcSrc, int nXSrc,
2382 int nYSrc, int nWidth, int nHeight, HBITMAP hbmMask,
2383 int xMast, int yMask)
2384{
2385 dprintf(("GDI32: PlgBlt, not implemented\n"));
2386 return(FALSE);
2387}
2388//******************************************************************************
2389//******************************************************************************
2390DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
2391 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
2392{
2393 dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
2394 return(GDI_ERROR);
2395}
2396//******************************************************************************
2397
2398//******************************************************************************
2399/*KSO Thu 21.05.1998*/
2400DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
2401 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
2402{
2403 dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
2404 return(GDI_ERROR);
2405}
2406//******************************************************************************
2407
2408//******************************************************************************
2409int WIN32API DescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR)
2410{
2411 dprintf(("GDI32: DescribePixelFormat, not implemented (GDI_ERROR)\n"));
2412 return(GDI_ERROR);
2413}
2414//******************************************************************************
2415//******************************************************************************
2416BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
2417{
2418 // Here is a guess for a undocumented entry
2419 dprintf(("GDI32: SetObjectOwner - stub (TRUE)\n"));
2420 return TRUE;
2421}
2422//******************************************************************************
2423
2424
2425/* Office 97 stubs - KSO Thu 21.05.1998*/
2426//******************************************************************************
2427BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
2428 HDC hdc,
2429 LPCSTR str,
2430 int count,
2431 int maxExt,
2432 LPINT lpnFit,
2433 LPINT alpDx,
2434 LPSIZE size)
2435{
2436 int index, nFit, extent;
2437 SIZE tSize;
2438
2439 dprintf(("GDI32: GetTextExtendExPointA\n"));
2440
2441 size->cx = size->cy = nFit = extent = 0;
2442 for(index = 0; index < count; index++)
2443 {
2444 if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
2445 if( extent+tSize.cx < maxExt )
2446 {
2447 extent+=tSize.cx;
2448 nFit++;
2449 str++;
2450 if( alpDx )
2451 alpDx[index] = extent;
2452 if( tSize.cy > size->cy ) size->cy = tSize.cy;
2453 }
2454 else break;
2455 }
2456 size->cx = extent;
2457
2458 if (lpnFit != NULL) // check if result is desired
2459 *lpnFit = nFit;
2460
2461 dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
2462 hdc,count,str,maxExt,nFit, size->cx,size->cy));
2463 return TRUE;
2464}
2465//******************************************************************************
2466//******************************************************************************
2467BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
2468 HDC arg1,
2469 LPCWSTR arg2,
2470 int arg3,
2471 int arg4,
2472 LPINT arg5,
2473 LPINT arg6,
2474 LPSIZE arg7
2475 )
2476{
2477 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2478 BOOL rc;
2479
2480 dprintf(("GDI32: GetTextExtendExPointW\n"));
2481 rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
2482 FreeAsciiString(astring);
2483 return rc;
2484}
2485//******************************************************************************
2486//******************************************************************************
2487BOOL WIN32API PlayEnhMetaFileRecord( /*KSO Thu 21.05.1998*/
2488 HDC arg1,
2489 LPHANDLETABLE arg2,
2490 CONST ENHMETARECORD *arg3,
2491 UINT arg4
2492 )
2493{
2494 dprintf(("GDI32: PlayEnhMetaFileRecord - stub\n"));
2495 return FALSE;
2496}
2497//******************************************************************************
2498UINT WIN32API GetEnhMetaFileDescriptionA( /*KSO Thu 21.05.1998*/
2499 HENHMETAFILE arg1,
2500 UINT arg2,
2501 LPSTR arg3
2502 )
2503{
2504 dprintf(("GDI32: GetEnhMetaFileDescriptionA - stub\n"));
2505 return FALSE;
2506}
2507//******************************************************************************
2508//******************************************************************************
2509UINT WIN32API GetEnhMetaFileDescriptionW( /*KSO Thu 21.05.1998*/
2510 HENHMETAFILE arg1,
2511 UINT arg2,
2512 LPWSTR arg3
2513 )
2514{
2515 dprintf(("GDI32: GetEnhMetaFileDescriptionW - stub\n"));
2516 return FALSE;
2517}
2518//******************************************************************************
2519//******************************************************************************
2520UINT WIN32API DeleteColorSpace( /*KSO Thu 21.05.1998*/
2521 HCOLORSPACE hColorSpace
2522 )
2523{
2524 dprintf(("GDI32: DeleteColorSpace - stub\n"));
2525 return FALSE;
2526}
2527//******************************************************************************
2528//******************************************************************************
2529BOOL WIN32API SetColorSpace( /*KSO Thu 21.05.1998*/
2530 HDC hdc,
2531 HCOLORSPACE hColorSpace
2532 )
2533{
2534 dprintf(("GDI32: SetColorSpace - stub\n"));
2535 return FALSE;
2536}
2537//******************************************************************************
2538//******************************************************************************
2539 HCOLORSPACE WIN32API CreateColorSpaceA( /*KSO Thu 21.05.1998*/
2540 LPLOGCOLORSPACEA lpLogColorSpace
2541 )
2542{
2543 dprintf(("GDI32: CreateColorSpaceA - stub\n"));
2544 return 0;
2545}
2546//******************************************************************************
2547//******************************************************************************
2548HCOLORSPACE WIN32API CreateColorSpaceW( /*KSO Thu 21.05.1998*/
2549 LPLOGCOLORSPACEW lpwLogColorSpace
2550 )
2551{
2552 dprintf(("GDI32: CreateColorSpaceW - stub\n"));
2553 return 0;
2554}
2555//******************************************************************************
2556//******************************************************************************
2557HANDLE WIN32API GetColorSpace( /*KSO Thu 21.05.1998*/
2558 HDC hdc
2559 )
2560{
2561 dprintf(("GDI32: GetColorSpace - stub\n"));
2562 return 0;
2563}
2564//******************************************************************************
2565//******************************************************************************
2566int WIN32API SetICMMode( /*KSO Thu 21.05.1998*/
2567 HDC hdc,
2568 int mode
2569 )
2570{
2571 dprintf(("GDI32: SetICMMode - stub\n"));
2572 return 0;
2573}
2574//******************************************************************************
2575
2576
2577
2578
2579/*****************************************************************************
2580 * Name : BOOL CancelDC
2581 * Purpose : The CancelDC function cancels any pending operation on the
2582 * specified device context (DC).
2583 * Parameters: HDC hdc handle of device context
2584 * Variables :
2585 * Result : TRUE / FALSE
2586 * Remark :
2587 * Status : UNTESTED STUB
2588 *
2589 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2590 *****************************************************************************/
2591
2592BOOL WIN32API CancelDC(HDC hdc)
2593{
2594 dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
2595 hdc));
2596
2597 return (FALSE);
2598}
2599
2600
2601/*****************************************************************************
2602 * Name : BOOL CheckColorsInGamut
2603 * Purpose : The CheckColorsInGamut function indicates whether the specified
2604 * color values are within the gamut of the specified device.
2605 * Parameters: HDC hdc handle of device context
2606 * LPVOID lpaRGBQuad
2607 * LPVOID lpResult
2608 * DWORD dwResult
2609 * Variables :
2610 * Result : TRUE / FALSE
2611 * Remark :
2612 * Status : UNTESTED STUB
2613 *
2614 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2615 *****************************************************************************/
2616
2617BOOL WIN32API CheckColorsInGamut(HDC hdc,
2618 LPVOID lpaRGBQuad,
2619 LPVOID lpResult,
2620 DWORD dwResult)
2621{
2622 dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2623 hdc,
2624 lpaRGBQuad,
2625 lpResult,
2626 dwResult));
2627
2628 return (FALSE);
2629}
2630
2631
2632/*****************************************************************************
2633 * Name : BOOL ColorMatchToTarget
2634 * Purpose : The ColorMatchToTarget function enables or disables preview for
2635 * the specified device context. When preview is enabled, colors
2636 * in subsequent output to the specified device context are
2637 * displayed as they would appear on the target device. This is
2638 * useful for checking how well the target maps the specified
2639 * colors in an image. To enable preview, image color matching
2640 * must be enabled for both the target and the preview device context.
2641 * Parameters: HDC hdc handle of device context
2642 * HDC hdcTarget handle of target device context
2643 * DWORD uiAction
2644 * Variables :
2645 * Result : TRUE / FALSE
2646 * Remark :
2647 * Status : UNTESTED STUB
2648 *
2649 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2650 *****************************************************************************/
2651
2652BOOL WIN32API ColorMatchToTarget(HDC hdc,
2653 HDC hdcTarget,
2654 DWORD uiAction)
2655{
2656 dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
2657 hdc,
2658 hdcTarget,
2659 uiAction));
2660
2661 return (FALSE);
2662}
2663
2664
2665/*****************************************************************************
2666 * Name : BOOL CombineTransform
2667 * Purpose : The CombineTransform function concatenates two world-space to
2668 * page-space transformations.
2669 * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
2670 * XFORM *lLPXFORM1 address of 1st transformation
2671 * XFORM *lLPXFORM2 address of 2nd transformation
2672 * Variables :
2673 * Result : TRUE / FALSE
2674 * Remark :
2675 * Status : UNTESTED
2676 *
2677 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2678 * Markus Montkowski [Wen, 1999/01/12 20:18]
2679 *****************************************************************************/
2680
2681BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
2682 CONST XFORM *lLPXFORM1,
2683 CONST XFORM *lLPXFORM2)
2684{
2685 dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh).\n",
2686 lLPXFORMResult,
2687 lLPXFORM1,
2688 lLPXFORM2));
2689
2690 XFORM xfrm;
2691 if( O32_IsBadWritePtr( (void*)lLPXFORMResult, sizeof(XFORM)) ||
2692 O32_IsBadReadPtr( (void*)lLPXFORM1, sizeof(XFORM)) ||
2693 O32_IsBadWritePtr( (void*)lLPXFORM2, sizeof(XFORM)) )
2694 return (FALSE);
2695
2696 // Add the translations
2697 lLPXFORMResult->eDx = lLPXFORM1->eDx + lLPXFORM2->eDx;
2698 lLPXFORMResult->eDy = lLPXFORM1->eDy + lLPXFORM2->eDy;
2699
2700 // Multiply the matrixes
2701 xfrm.eM11 = lLPXFORM1->eM11 * lLPXFORM2->eM11 + lLPXFORM1->eM21 * lLPXFORM1->eM12;
2702 xfrm.eM12 = lLPXFORM1->eM11 * lLPXFORM2->eM12 + lLPXFORM1->eM12 * lLPXFORM1->eM22;
2703 xfrm.eM21 = lLPXFORM1->eM21 * lLPXFORM2->eM11 + lLPXFORM1->eM22 * lLPXFORM1->eM21;
2704 xfrm.eM22 = lLPXFORM1->eM21 * lLPXFORM2->eM12 + lLPXFORM1->eM22 * lLPXFORM1->eM22;
2705
2706 // Now copy to resulting XFROM as the pt must not be distinct
2707 lLPXFORMResult->eM11 = xfrm.eM11;
2708 lLPXFORMResult->eM12 = xfrm.eM12;
2709 lLPXFORMResult->eM21 = xfrm.eM21;
2710 lLPXFORMResult->eM22 = xfrm.eM22;
2711
2712 return (TRUE);
2713}
2714
2715
2716
2717/*****************************************************************************
2718 * Name : HBRUSH CreateDIBPatternBrush
2719 * Purpose : The CreateDIBPatternBrush function creates a logical brush that
2720 * has the pattern specified by the specified device-independent
2721 * bitmap (DIB). The brush can subsequently be selected into any
2722 * device context that is associated with a device that supports
2723 * raster operations.
2724 * This function is provided only for compatibility with applications
2725 * written for versions of Windows earlier than 3.0. For Win32-based
2726 * applications, use the CreateDIBPatternBrushPt function.
2727 * Parameters: HGLOBAL hglbDIBPacked Identifies a global memory object containing
2728 * a packed DIB, which consists of a BITMAPINFO structure immediately
2729 * followed by an array of bytes defining the pixels of the bitmap.
2730 * UINT fuColorSpec color table data
2731 * Variables :
2732 * Result : TRUE / FALSE
2733 * Remark :
2734 * Status : UNTESTED
2735 *
2736 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2737 * Markus Montkowski [Wen, 1999/01/12 20:00]
2738 *****************************************************************************/
2739
2740HBRUSH WIN32API CreateDIBPatternBrush( HGLOBAL hglbDIBPacked,
2741 UINT fuColorSpec)
2742{
2743 LPVOID lpMem;
2744 HBRUSH ret = 0;
2745 dprintf(("GDI32: CreateDIBPatternBrush(%08xh, %08xh) \n",
2746 hglbDIBPacked,
2747 fuColorSpec));
2748
2749 lpMem = GlobalLock(hglbDIBPacked);
2750 if(NULL!=lpMem)
2751 {
2752
2753 ret = CreateDIBPatternBrushPt( lpMem,
2754 fuColorSpec);
2755 GlobalUnlock(hglbDIBPacked);
2756 }
2757
2758 return (ret);
2759}
2760
2761
2762
2763
2764/*****************************************************************************
2765 * Name : int EnumICMProfilesA
2766 * Purpose : The EnumICMProfilesA function enumerates the different color
2767 * profiles that the system supports for the specified device context.
2768 * Parameters: HDC hdc
2769 * ICMENUMPROC lpICMEnumFunc
2770 * LPARAM lParam
2771 * Variables :
2772 * Result : TRUE / FALSE
2773 * Remark :
2774 * Status : UNTESTED STUB
2775 *
2776 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2777 *****************************************************************************/
2778
2779int WIN32API EnumICMProfilesA(HDC hdc,
2780 ICMENUMPROCA lpICMEnumProc,
2781 LPARAM lParam)
2782{
2783 dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
2784 hdc,
2785 lpICMEnumProc,
2786 lParam));
2787
2788 return (-1);
2789}
2790
2791
2792/*****************************************************************************
2793 * Name : int EnumICMProfilesW
2794 * Purpose : The EnumICMProfilesW function enumerates the different color
2795 * profiles that the system supports for the specified device context.
2796 * Parameters: HDC hdc
2797 * ICMENUMPROC lpICMEnumFunc
2798 * LPARAM lParam
2799 * Variables :
2800 * Result : TRUE / FALSE
2801 * Remark :
2802 * Status : UNTESTED STUB
2803 *
2804 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2805 *****************************************************************************/
2806
2807int WIN32API EnumICMProfilesW(HDC hdc,
2808 ICMENUMPROCW lpICMEnumProc,
2809 LPARAM lParam)
2810{
2811 dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
2812 hdc,
2813 lpICMEnumProc,
2814 lParam));
2815
2816 return (-1);
2817}
2818
2819
2820/*****************************************************************************
2821 * Name : BOOL FixBrushOrgEx
2822 * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
2823 * It is provided for compatibility with Win32s. If called, the
2824 * function does nothing, and returns FALSE.
2825 * Parameters: HDC, int, int, LPPOINT
2826 * Variables :
2827 * Result : TRUE / FALSE
2828 * Remark : not implemented in Win32
2829 * Status : UNTESTED STUB
2830 *
2831 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2832 *****************************************************************************/
2833
2834BOOL WIN32API FixBrushOrgEx(HDC hdc,
2835 int iDummy1,
2836 int iDummy2,
2837 LPPOINT lpPoint)
2838{
2839 dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2840 hdc,
2841 iDummy1,
2842 iDummy2,
2843 lpPoint));
2844
2845 return (FALSE);
2846}
2847
2848
2849/*****************************************************************************
2850 * Name : DWORD GdiGetBatchLimit
2851 * Purpose : The GdiGetBatchLimit function returns the maximum number of
2852 * function calls that can be accumulated in the calling thread's
2853 * current batch. The system flushes the current batch whenever
2854 * this limit is exceeded.
2855 * Parameters:
2856 * Variables :
2857 * Result : 1
2858 * Remark :
2859 * Status : UNTESTED STUB
2860 *
2861 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2862 *****************************************************************************/
2863
2864DWORD WIN32API GdiGetBatchLimit(VOID)
2865{
2866 dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
2867
2868 return (1);
2869}
2870
2871
2872/*****************************************************************************
2873 * Name : DWORD GdiSetBatchLimit
2874 * Purpose : The GdiSetBatchLimit function sets the maximum number of
2875 * functions that can be accumulated in the calling thread's current
2876 * batch. The system flushes the current batch whenever this limit
2877 * is exceeded.
2878 * Parameters: DWORD dwLimit
2879 * Variables :
2880 * Result :
2881 * Remark :
2882 * Status : UNTESTED STUB
2883 *
2884 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2885 *****************************************************************************/
2886
2887DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
2888{
2889 dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
2890 dwLimit));
2891
2892 return (1);
2893}
2894
2895
2896/*****************************************************************************
2897 * Name : DWORD GetCharacterPlacementA
2898 * Purpose : The GetCharacterPlacementA function retrieves information about
2899 * a character string, such as character widths, caret positioning,
2900 * ordering within the string, and glyph rendering. The type of
2901 * information returned depends on the dwFlags parameter and is
2902 * based on the currently selected font in the given display context.
2903 * The function copies the information to the specified GCP_RESULTSA
2904 * structure or to one or more arrays specified by the structure.
2905 * Parameters: HDC hdc handle to device context
2906 * LPCSTR lpString pointer to string
2907 * int nCount number of characters in string
2908 * int nMaxExtent maximum extent for displayed string
2909 * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
2910 * DWORD dwFlags placement flags
2911 * Variables :
2912 * Result :
2913 * Remark :
2914 * Status : UNTESTED STUB
2915 *
2916 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2917 *****************************************************************************/
2918
2919DWORD WIN32API GetCharacterPlacementA(HDC hdc,
2920 LPCSTR lpString,
2921 int nCount,
2922 int nMaxExtent,
2923 GCP_RESULTSA * lpResults,
2924 DWORD dwFlags)
2925{
2926 dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2927 hdc,
2928 lpString,
2929 nCount,
2930 nMaxExtent,
2931 lpResults,
2932 dwFlags));
2933
2934 return (0);
2935}
2936
2937
2938/*****************************************************************************
2939 * Name : DWORD GetCharacterPlacementW
2940 * Purpose : The GetCharacterPlacementW function retrieves information about
2941 * a character string, such as character widths, caret positioning,
2942 * ordering within the string, and glyph rendering. The type of
2943 * information returned depends on the dwFlags parameter and is
2944 * based on the currently selected font in the given display context.
2945 * The function copies the information to the specified GCP_RESULTSW
2946 * structure or to one or more arrays specified by the structure.
2947 * Parameters: HDC hdc handle to device context
2948 * LPCSTR lpString pointer to string
2949 * int nCount number of characters in string
2950 * int nMaxExtent maximum extent for displayed string
2951 * GCP_RESULTSW *lpResults pointer to buffer for placement result
2952 * DWORD dwFlags placement flags
2953 * Variables :
2954 * Result :
2955 * Remark :
2956 * Status : UNTESTED STUB
2957 *
2958 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2959 *****************************************************************************/
2960
2961DWORD WIN32API GetCharacterPlacementW(HDC hdc,
2962 LPCWSTR lpString,
2963 int nCount,
2964 int nMaxExtent,
2965 GCP_RESULTSW *lpResults,
2966 DWORD dwFlags)
2967{
2968 dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2969 hdc,
2970 lpString,
2971 nCount,
2972 nMaxExtent,
2973 lpResults,
2974 dwFlags));
2975
2976 return (0);
2977}
2978
2979
2980/*****************************************************************************
2981 * Name : DWORD GetDeviceGammaRamp
2982 * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
2983 * direct color display boards.
2984 * Parameters: HDC hdc handle to device context
2985 * LPVOID lpRamp Gamma ramp array
2986 * Variables :
2987 * Result :
2988 * Remark :
2989 * Status : UNTESTED STUB
2990 *
2991 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2992 *****************************************************************************/
2993
2994DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
2995 LPVOID lpRamp)
2996{
2997 dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
2998 hdc,
2999 lpRamp));
3000
3001 return (FALSE);
3002}
3003
3004
3005
3006
3007/*****************************************************************************
3008 * Name : BOOL GetICMProfileA
3009 * Purpose : The GetICMProfileA function retrieves the name of the color
3010 * profile file for the device associated with the specified device
3011 * context.
3012 * Parameters: HDC hdc handle to device context
3013 * DWORD cbName
3014 * LPTSTR lpszFilename
3015 * Variables :
3016 * Result : TRUE / FALSE
3017 * Remark :
3018 * Status : UNTESTED STUB
3019 *
3020 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3021 *****************************************************************************/
3022
3023BOOL WIN32API GetICMProfileA(HDC hdc,
3024 DWORD cbName,
3025 LPTSTR lpszFilename)
3026{
3027 dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
3028 hdc,
3029 cbName,
3030 lpszFilename));
3031
3032 return (FALSE);
3033}
3034
3035
3036/*****************************************************************************
3037 * Name : BOOL GetICMProfileW
3038 * Purpose : The GetICMProfileW function retrieves the name of the color
3039 * profile file for the device associated with the specified device
3040 * context.
3041 * Parameters: HDC hdc handle to device context
3042 * DWORD cbName
3043 * LPWSTR lpszFilename
3044 * Variables :
3045 * Result : TRUE / FALSE
3046 * Remark :
3047 * Status : UNTESTED STUB
3048 *
3049 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3050 *****************************************************************************/
3051
3052BOOL WIN32API GetICMProfileW(HDC hdc,
3053 DWORD cbName,
3054 LPTSTR lpszFilename)
3055{
3056 dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
3057 hdc,
3058 cbName,
3059 lpszFilename));
3060
3061 return (FALSE);
3062}
3063
3064
3065/*****************************************************************************
3066 * Name : BOOL GetLogColorSpaceA
3067 * Purpose : The GetLogColorSpace function retrieves information about the
3068 * logical color space identified by the specified handle.
3069 * Parameters: HCOLORSPACE hColorSpace
3070 * LPLOGCOLORSPACE lpbuffer
3071 * DWORD nSize
3072 * Variables :
3073 * Result : TRUE / FALSE
3074 * Remark :
3075 * Status : UNTESTED STUB
3076 *
3077 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3078 *****************************************************************************/
3079
3080#define LPLOGCOLORSPACE LPVOID
3081BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
3082 LPLOGCOLORSPACE lpBuffer,
3083 DWORD nSize)
3084{
3085 dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
3086 hColorSpace,
3087 lpBuffer,
3088 nSize));
3089
3090 return (FALSE);
3091}
3092
3093
3094/*****************************************************************************
3095 * Name : BOOL GetLogColorSpaceW
3096 * Purpose : The GetLogColorSpace function retrieves information about the
3097 * logical color space identified by the specified handle.
3098 * Parameters: HCOLORSPACE hColorSpace
3099 * LPLOGCOLORSPACE lpbuffer
3100 * DWORD nSize
3101 * Variables :
3102 * Result : TRUE / FALSE
3103 * Remark :
3104 * Status : UNTESTED STUB
3105 *
3106 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3107 *****************************************************************************/
3108
3109BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
3110 LPLOGCOLORSPACE lpBuffer,
3111 DWORD nSize)
3112{
3113 dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
3114 hColorSpace,
3115 lpBuffer,
3116 nSize));
3117
3118 return (FALSE);
3119}
3120
3121
3122/*****************************************************************************
3123 * Name : int GetMetaRgn
3124 * Purpose : The GetMetaRgn function retrieves the current metaregion for
3125 * the specified device context.
3126 * Parameters: HDC hdc handle of device context
3127 * HRGN hrgn handle of region
3128 * Variables :
3129 * Result : 0 / 1
3130 * Remark :
3131 * Status : UNTESTED STUB
3132 *
3133 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3134 *****************************************************************************/
3135
3136int WIN32API GetMetaRgn(HDC hdc,
3137 HRGN hrgn)
3138{
3139 dprintf(("GDI32: GetMetaRgn(%08xh, %08xh) not implemented.\n",
3140 hdc,
3141 hrgn));
3142
3143 return (0);
3144}
3145
3146
3147/*****************************************************************************
3148 * Name : int GetPixelFormat
3149 * Purpose : The GetPixelFormat function obtains the index of the specified
3150 * device context's currently selected pixel format.
3151 * Parameters: HDC hdc handle of device context
3152 * Variables :
3153 * Result : 0 / 1
3154 * Remark :
3155 * Status : UNTESTED STUB
3156 *
3157 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3158 *****************************************************************************/
3159
3160int WIN32API GetPixelFormat(HDC hdc)
3161{
3162 dprintf(("GDI32: GetPixelFormat(%08xh) not implemented.\n",
3163 hdc));
3164
3165 return (0);
3166}
3167
3168
3169/*****************************************************************************
3170 * Name : BOOL PolyTextOutA
3171 * Purpose : The PolyTextOutA function draws several strings using the font
3172 * and text colors currently selected in the specified device context.
3173 * Parameters: HDC hdc handle of device context
3174 * CONST POLYTEXT *pptxt address of array of structures that identify strings
3175 * int cStrings number of structures in array
3176 * Variables :
3177 * Result : TRUE / FALSE
3178 * Remark :
3179 * Status : UNTESTED STUB
3180 *
3181 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3182 *****************************************************************************/
3183
3184BOOL WIN32API PolyTextOutA(HDC hdc,
3185 POLYTEXTA *pptxt,
3186 int cStrings)
3187{
3188 dprintf(("GDI32: PolyTextOutA(%08xh, %08xh, %08xh) not implemented.\n",
3189 hdc,
3190 pptxt,
3191 cStrings));
3192
3193 return (FALSE);
3194}
3195
3196
3197#if 0
3198
3199The POLYTEXT structure describes how the PolyTextOut function should draw a string of text.
3200
3201Members
3202
3203x
3204
3205Specifies the horizontal reference point for the string. The string is aligned to this point using the current text-alignment mode.
3206
3207y
3208
3209Specifies the vertical reference point for the string. The string is aligned to this point using the current text-alignment mode.
3210
3211n
3212
3213Specifies the number of characters in the string.
3214
3215uiFlags
3216
3217Specifies whether the string is to be opaque or clipped and whether the string is accompanied by an array of character-width values. This member can be one or more of the following values:
3218
3219Value Meaning
3220ETO_OPAQUE The rectangles given for each string is to be opaqued with the current background color.
3221ETO_CLIPPED Each string is to be clipped to its given rectangle.
3222lpstr
3223
3224Points to a string of text to be drawn by the PolyTextOut function.
3225
3226rcl
3227
3228Specifies a rectangle structure that contains the dimensions of the opaquing or clipping rectangle. This member is ignored if neither of the ETO_OPAQUE nor the ETO_CLIPPED value is specified for the uiFlags member.
3229
3230pdx
3231
3232Specifies in an array the width value for each character in the string.
3233
3234See Also
3235
3236PolyTextOut
3237#endif
3238
3239
3240/*****************************************************************************
3241 * Name : BOOL PolyTextOutW
3242 * Purpose : The PolyTextOutW function draws several strings using the font
3243 * and text colors currently selected in the specified device context.
3244 * Parameters: HDC hdc handle of device context
3245 * CONST POLYTEXT *pptxt address of array of structures that identify strings
3246 * int cStrings number of structures in array
3247 * Variables :
3248 * Result : TRUE / FALSE
3249 * Remark :
3250 * Status : UNTESTED STUB
3251 *
3252 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3253 *****************************************************************************/
3254
3255BOOL WIN32API PolyTextOutW(HDC hdc,
3256 POLYTEXTW *pptxt,
3257 int cStrings)
3258{
3259 dprintf(("GDI32: PolyTextOutW(%08xh, %08xh, %08xh) not implemented.\n",
3260 hdc,
3261 pptxt,
3262 cStrings));
3263
3264 return (FALSE);
3265}
3266
3267
3268/*****************************************************************************
3269 * Name : BOOL SetDeviceGammaRamp
3270 * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
3271 * color display boards.
3272 * Parameters: HDC hdc handle of device context
3273 * LPVOID lpRamp
3274 * Variables :
3275 * Result : TRUE / FALSE
3276 * Remark :
3277 * Status : UNTESTED STUB
3278 *
3279 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3280 *****************************************************************************/
3281
3282BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
3283 LPVOID lpRamp)
3284{
3285 dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
3286 hdc,
3287 lpRamp));
3288
3289 return (FALSE);
3290}
3291
3292
3293/*****************************************************************************
3294 * Name : BOOL SetICMProfileA
3295 * Purpose : The SetICMProfileA function sets the color profile for the
3296 * specified device context.
3297 * Parameters: HDC hdc handle of device context
3298 * LPTSTR lpFileName
3299 * Variables :
3300 * Result : TRUE / FALSE
3301 * Remark :
3302 * Status : UNTESTED STUB
3303 *
3304 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3305 *****************************************************************************/
3306
3307BOOL WIN32API SetICMProfileA(HDC hdc,
3308 LPTSTR lpFileName)
3309{
3310 dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
3311 hdc,
3312 lpFileName));
3313
3314 return (FALSE);
3315}
3316
3317
3318/*****************************************************************************
3319 * Name : BOOL SetICMProfileW
3320 * Purpose : The SetICMProfileW function sets the color profile for the
3321 * specified device context.
3322 * Parameters: HDC hdc handle of device context
3323 * LPTSTR lpFileName
3324 * Variables :
3325 * Result : TRUE / FALSE
3326 * Remark :
3327 * Status : UNTESTED STUB
3328 *
3329 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3330 *****************************************************************************/
3331
3332BOOL WIN32API SetICMProfileW(HDC hdc,
3333 LPWSTR lpFileName)
3334{
3335 dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
3336 hdc,
3337 lpFileName));
3338
3339 return (FALSE);
3340}
3341
3342
3343/*****************************************************************************
3344 * Name : int SetMetaRgn
3345 * Purpose : The SetMetaRgn function intersects the current clipping region
3346 * for the specified device context with the current metaregion
3347 * and saves the combined region as the new metaregion for the
3348 * specified device context. The clipping region is reset to a null region.
3349 * Parameters: HDC hdc handle of device context
3350 * Variables :
3351 * Result : TRUE / FALSE
3352 * Remark :
3353 * Status : UNTESTED STUB
3354 *
3355 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3356 *****************************************************************************/
3357
3358BOOL WIN32API SetMetaRgn(HDC hdc)
3359{
3360 dprintf(("GDI32: SetMetaRgn(%08xh) not implemented.\n",
3361 hdc));
3362
3363 return (NULLREGION);
3364}
3365
3366
3367/*****************************************************************************
3368 * Name : BOOL UpdateICMRegKeyA
3369 * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
3370 * registry entries that identify ICC color profiles or color-matching
3371 * DLLs. The function carries out the action specified by the nCommand
3372 * parameter.
3373 * Parameters: DWORD dwReserved
3374 * DWORD CMID
3375 * LPTSTR lpszFileName
3376 * UINT nCommand
3377 * Variables :
3378 * Result : TRUE / FALSE
3379 * Remark :
3380 * Status : UNTESTED STUB
3381 *
3382 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3383 *****************************************************************************/
3384
3385BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
3386 DWORD CMID,
3387 LPTSTR lpszFileName,
3388 UINT nCommand)
3389{
3390 dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
3391 dwReserved,
3392 CMID,
3393 lpszFileName,
3394 nCommand));
3395
3396 return (FALSE);
3397}
3398
3399
3400/*****************************************************************************
3401 * Name : BOOL UpdateICMRegKeyW
3402 * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
3403 * registry entries that identify ICC color profiles or color-matching
3404 * DLLs. The function carries out the action specified by the nCommand
3405 * parameter.
3406 * Parameters: DWORD dwReserved
3407 * DWORD CMID
3408 * LPWSTR lpszFileName
3409 * UINT nCommand
3410 * Variables :
3411 * Result : TRUE / FALSE
3412 * Remark :
3413 * Status : UNTESTED STUB
3414 *
3415 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3416 *****************************************************************************/
3417
3418BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
3419 DWORD CMID,
3420 LPWSTR lpszFileName,
3421 UINT nCommand)
3422{
3423 dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
3424 dwReserved,
3425 CMID,
3426 lpszFileName,
3427 nCommand));
3428
3429 return (FALSE);
3430}
3431
3432
3433
Note: See TracBrowser for help on using the repository browser.