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

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

extra logging

File size: 132.8 KB
Line 
1/* $Id: gdi32.cpp,v 1.25 1999-12-16 00:10:50 sandervl Exp $ */
2
3/*
4 * GDI32 apis
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 * Copyright 1998 Patrick Haller
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include <stdlib.h>
14#include <stdarg.h>
15#include <string.h>
16#include "misc.h"
17#include "callback.h"
18#include "unicode.h"
19#include "dibsect.h"
20
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( 9, 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 nLeftRect, int nTopRect, int nRightRect, int nBottomRect)
913{
914 dprintf(("GDI32: CreateRectRgn (%d,%d)(%d,%d)", nLeftRect, nTopRect, nRightRect, nBottomRect));
915 return O32_CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect);
916}
917//******************************************************************************
918//******************************************************************************
919HRGN WIN32API CreateRectRgnIndirect( const RECT * lpRect)
920{
921 if(lpRect == NULL) {
922 SetLastError(ERROR_INVALID_PARAMETER);
923 return 0;
924 }
925 dprintf(("GDI32: CreateRectRgnIndirect (%d,%d)(%d,%d)", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom));
926 return O32_CreateRectRgnIndirect(lpRect);
927}
928//******************************************************************************
929//******************************************************************************
930HRGN WIN32API CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect,
931 int nWidthEllipse, int nHeightEllipse)
932{
933 dprintf(("GDI32: CreateRoundRectRgn (%d,%d)(%d,%d) (%d,%d)", nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse));
934 return O32_CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse);
935}
936//******************************************************************************
937//******************************************************************************
938HBRUSH WIN32API CreateSolidBrush( COLORREF arg1)
939{
940 dprintf(("GDI32: CreateSolidBrush\n"));
941 return O32_CreateSolidBrush(arg1);
942}
943//******************************************************************************
944//******************************************************************************
945BOOL WIN32API DPtoLP( HDC arg1, PPOINT arg2, int arg3)
946{
947 dprintf(("GDI32: DPtoLP\n"));
948 return O32_DPtoLP(arg1, arg2, arg3);
949}
950//******************************************************************************
951//******************************************************************************
952BOOL WIN32API DeleteEnhMetaFile( HENHMETAFILE arg1)
953{
954 dprintf(("GDI32: DeleteEnhMetaFile\n"));
955 return O32_DeleteEnhMetaFile(arg1);
956}
957//******************************************************************************
958//******************************************************************************
959BOOL WIN32API DeleteMetaFile( HMETAFILE arg1)
960{
961 dprintf(("GDI32: DeleteMetaFile"));
962 return O32_DeleteMetaFile(arg1);
963}
964//******************************************************************************
965//******************************************************************************
966BOOL WIN32API Ellipse( HDC arg1, int arg2, int arg3, int arg4, int arg5)
967{
968 dprintf(("GDI32: Ellipse"));
969 return O32_Ellipse(arg1, arg2, arg3, arg4, arg5);
970}
971//******************************************************************************
972//******************************************************************************
973int WIN32API EndDoc( HDC arg1)
974{
975 dprintf(("GDI32: EndDoc"));
976 return O32_EndDoc(arg1);
977}
978//******************************************************************************
979//******************************************************************************
980int WIN32API EndPage( HDC arg1)
981{
982 dprintf(("GDI32: EndPage"));
983 return O32_EndPage(arg1);
984}
985//******************************************************************************
986//******************************************************************************
987BOOL WIN32API EndPath( HDC arg1)
988{
989 dprintf(("GDI32: EndPath"));
990 return O32_EndPath(arg1);
991}
992//******************************************************************************
993//******************************************************************************
994BOOL WIN32API EnumEnhMetaFile( HDC arg1, HENHMETAFILE arg2, ENHMFENUMPROC arg3, PVOID arg4, const RECT * arg5)
995{
996 dprintf(("GDI32: EnumEnhMetaFile DOESN'T WORK!"));
997// return O32_EnumEnhMetaFile(arg1, arg2, arg3, arg4, arg5);
998 return 0;
999}
1000//******************************************************************************
1001//******************************************************************************
1002BOOL WIN32API MoveToEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1003{
1004 dprintf(("GDI32: MoveToEx\n"));
1005 return O32_MoveToEx(arg1, arg2, arg3, arg4);
1006}
1007//******************************************************************************
1008//******************************************************************************
1009BOOL WIN32API PatBlt( HDC arg1, int arg2, int arg3, int arg4, int arg5, DWORD arg6)
1010{
1011 BOOL rc;
1012
1013 rc = O32_PatBlt(arg1, arg2, arg3, arg4, arg5, arg6);
1014 dprintf(("GDI32: PatBlt (%d,%d) (%d,%d) returned %d\n", arg2, arg3, arg4, arg5, rc));
1015 return(rc);
1016}
1017//******************************************************************************
1018//******************************************************************************
1019BOOL WIN32API Rectangle( HDC arg1, int arg2, int arg3, int arg4, int arg5)
1020{
1021 dprintf(("GDI32: Rectangle\n"));
1022 return O32_Rectangle(arg1, arg2, arg3, arg4, arg5);
1023}
1024//******************************************************************************
1025//******************************************************************************
1026int WIN32API SetROP2( HDC arg1, int arg2)
1027{
1028 dprintf(("GDI32: SetROP2"));
1029 return O32_SetROP2(arg1, arg2);
1030}
1031//******************************************************************************
1032//TODO: Callback
1033//******************************************************************************
1034BOOL WIN32API EnumMetaFile( HDC arg1, HMETAFILE arg2, MFENUMPROC arg3, LPARAM arg4)
1035{
1036 dprintf(("GDI32: EnumMetaFile STUB"));
1037 //calling convention differences
1038// return O32_EnumMetaFile(arg1, arg2, arg3, arg4);
1039 return 0;
1040}
1041//******************************************************************************
1042//******************************************************************************
1043int WIN32API EnumObjects( HDC arg1, int arg2, GOBJENUMPROC arg3, LPARAM arg4)
1044{
1045 dprintf(("GDI32: EnumObjects STUB"));
1046 //calling convention differences
1047// return O32_EnumObjects(arg1, arg2, arg3, arg4);
1048 return 0;
1049}
1050//******************************************************************************
1051//******************************************************************************
1052BOOL WIN32API EqualRgn( HRGN arg1, HRGN arg2)
1053{
1054 dprintf(("GDI32: EqualRgn"));
1055 return O32_EqualRgn(arg1, arg2);
1056}
1057//******************************************************************************
1058//******************************************************************************
1059int WIN32API Escape( HDC arg1, int arg2, int arg3, LPCSTR arg4, PVOID arg5)
1060{
1061 dprintf(("GDI32: Escape"));
1062 return O32_Escape(arg1, arg2, arg3, arg4, arg5);
1063}
1064//******************************************************************************
1065//******************************************************************************
1066int WIN32API ExcludeClipRect( HDC arg1, int arg2, int arg3, int arg4, int arg5)
1067{
1068 dprintf(("GDI32: ExcludeClipRect"));
1069 return O32_ExcludeClipRect(arg1, arg2, arg3, arg4, arg5);
1070}
1071//******************************************************************************
1072//******************************************************************************
1073HPEN WIN32API ExtCreatePen( DWORD arg1, DWORD arg2, const LOGBRUSH * arg3, DWORD arg4, const DWORD * arg5)
1074{
1075 dprintf(("GDI32: ExtCreatePen"));
1076 return O32_ExtCreatePen(arg1, arg2, arg3, arg4, arg5);
1077}
1078//******************************************************************************
1079//******************************************************************************
1080HRGN WIN32API ExtCreateRegion( const XFORM * arg1, DWORD arg2, const RGNDATA * arg3)
1081{
1082 dprintf(("GDI32: ExtCreateRegion"));
1083 return O32_ExtCreateRegion(arg1, arg2, arg3);
1084}
1085//******************************************************************************
1086//******************************************************************************
1087BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5)
1088{
1089 dprintf(("GDI32: ExtFloodFill"));
1090 return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5);
1091}
1092//******************************************************************************
1093//******************************************************************************
1094int WIN32API ExtSelectClipRgn( HDC arg1, HRGN arg2, int arg3)
1095{
1096 dprintf(("GDI32: ExtSelectClipRgn"));
1097 return O32_ExtSelectClipRgn(arg1, arg2, arg3);
1098}
1099//******************************************************************************
1100//******************************************************************************
1101BOOL WIN32API FillPath( HDC arg1)
1102{
1103 dprintf(("GDI32: FillPath"));
1104 return O32_FillPath(arg1);
1105}
1106//******************************************************************************
1107//******************************************************************************
1108BOOL WIN32API FillRgn( HDC arg1, HRGN arg2, HBRUSH arg3)
1109{
1110 dprintf(("GDI32: FillRgn"));
1111 return O32_FillRgn(arg1, arg2, arg3);
1112}
1113//******************************************************************************
1114//******************************************************************************
1115BOOL WIN32API FlattenPath( HDC arg1)
1116{
1117 dprintf(("GDI32: FlattenPath"));
1118 return O32_FlattenPath(arg1);
1119}
1120//******************************************************************************
1121//******************************************************************************
1122BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4)
1123{
1124 dprintf(("GDI32: FloodFill"));
1125 return O32_FloodFill(arg1, arg2, arg3, arg4);
1126}
1127//******************************************************************************
1128//******************************************************************************
1129BOOL WIN32API FrameRgn( HDC arg1, HRGN arg2, HBRUSH arg3, int arg4, int arg5)
1130{
1131 dprintf(("GDI32: FrameRgn"));
1132 return O32_FrameRgn(arg1, arg2, arg3, arg4, arg5);
1133}
1134//******************************************************************************
1135//******************************************************************************
1136int WIN32API GetArcDirection( HDC arg1)
1137{
1138 dprintf(("GDI32: GetArcDirection"));
1139 return O32_GetArcDirection(arg1);
1140}
1141//******************************************************************************
1142//******************************************************************************
1143BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2)
1144{
1145 dprintf(("GDI32: GetAspectRatioFilterEx"));
1146 return O32_GetAspectRatioFilterEx(arg1, arg2);
1147}
1148//******************************************************************************
1149//******************************************************************************
1150LONG WIN32API GetBitmapBits( HBITMAP arg1, LONG arg2, PVOID arg3)
1151{
1152 dprintf(("GDI32: GetBitmapBits"));
1153 return O32_GetBitmapBits(arg1, arg2, arg3);
1154}
1155//******************************************************************************
1156//******************************************************************************
1157BOOL WIN32API GetBitmapDimensionEx( HBITMAP arg1, PSIZE arg2)
1158{
1159 dprintf(("GDI32: GetBitmapDimensionEx"));
1160 return O32_GetBitmapDimensionEx(arg1, arg2);
1161}
1162//******************************************************************************
1163//******************************************************************************
1164COLORREF WIN32API GetBkColor( HDC arg1)
1165{
1166 dprintf(("GDI32: GetBkColor"));
1167 return O32_GetBkColor(arg1);
1168}
1169//******************************************************************************
1170//******************************************************************************
1171int WIN32API GetBkMode( HDC arg1)
1172{
1173 dprintf(("GDI32: GetBkMode"));
1174 return O32_GetBkMode(arg1);
1175}
1176//******************************************************************************
1177//******************************************************************************
1178UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3)
1179{
1180 dprintf(("GDI32: GetBoundsRect"));
1181 return O32_GetBoundsRect(arg1, arg2, arg3);
1182}
1183//******************************************************************************
1184//******************************************************************************
1185BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2)
1186{
1187 dprintf(("GDI32: GetBrushOrgEx"));
1188 return O32_GetBrushOrgEx(arg1, arg2);
1189}
1190//******************************************************************************
1191//******************************************************************************
1192BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
1193{
1194 dprintf(("GDI32: GetCharABCWidthsA"));
1195 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
1196}
1197//******************************************************************************
1198//******************************************************************************
1199BOOL WIN32API GetCharABCWidthsW( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
1200{
1201 dprintf(("GDI32: GetCharABCWidthsW not properly implemented."));
1202 // NOTE: This will not work as is (needs UNICODE support)
1203 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
1204}
1205//******************************************************************************
1206//******************************************************************************
1207BOOL WIN32API GetCharWidthA( HDC arg1, UINT arg2, UINT arg3, PINT arg4)
1208{
1209 dprintf(("GDI32: GetCharWidthA"));
1210 return O32_GetCharWidth(arg1, arg2, arg3, arg4);
1211}
1212//******************************************************************************
1213//TODO: Cut off Unicode chars?
1214//******************************************************************************
1215BOOL WIN32API GetCharWidthW(HDC arg1, UINT iFirstChar, UINT iLastChar, PINT arg4)
1216{
1217 dprintf(("GDI32: GetCharWidthW, not properly implemented"));
1218 return O32_GetCharWidth(arg1, iFirstChar, iLastChar, arg4);
1219}
1220//******************************************************************************
1221//******************************************************************************
1222int WIN32API GetClipBox( HDC arg1, PRECT arg2)
1223{
1224 int rc;
1225
1226 rc = O32_GetClipBox(arg1, arg2);
1227 dprintf(("GDI32: GetClipBox of %X returned %d\n", arg1, rc));
1228 return(rc);
1229}
1230//******************************************************************************
1231//******************************************************************************
1232int WIN32API GetClipRgn( HDC arg1, HRGN arg2)
1233{
1234 dprintf(("GDI32: GetClipRgn"));
1235 return O32_GetClipRgn(arg1, arg2);
1236}
1237//******************************************************************************
1238//******************************************************************************
1239HANDLE WIN32API GetCurrentObject( HDC arg1, UINT arg2)
1240{
1241 dprintf(("GDI32: GetCurrentObject"));
1242 return (HANDLE)O32_GetCurrentObject(arg1, arg2);
1243}
1244//******************************************************************************
1245//******************************************************************************
1246BOOL WIN32API GetCurrentPositionEx( HDC arg1, PPOINT arg2)
1247{
1248 dprintf(("GDI32: GetCurrentPositionEx"));
1249 return O32_GetCurrentPositionEx(arg1, arg2);
1250}
1251//******************************************************************************
1252//******************************************************************************
1253int WIN32API GetDIBits( HDC arg1, HBITMAP arg2, UINT arg3, UINT arg4, void * arg5, PBITMAPINFO arg6, UINT arg7)
1254{
1255 dprintf(("GDI32: GetDIBits"));
1256 return O32_GetDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1257}
1258//******************************************************************************
1259//******************************************************************************
1260int WIN32API GetDeviceCaps(HDC hdc, int nIndex)
1261{
1262 int rc;
1263
1264 rc = O32_GetDeviceCaps(hdc, nIndex);
1265 dprintf(("GDI32: GetDeviceCaps %X, %d returned %d\n", hdc, nIndex, rc));
1266 //SvL: 13-9-'98: NT returns -1 when using 16 bits colors, NOT 65536!
1267 if(nIndex == NUMCOLORS && rc > 256)
1268 return -1;
1269 return(rc);
1270}
1271//******************************************************************************
1272//******************************************************************************
1273HENHMETAFILE WIN32API GetEnhMetaFileA( LPCSTR arg1)
1274{
1275 dprintf(("GDI32: GetEnhMetaFileA"));
1276 return O32_GetEnhMetaFile(arg1);
1277}
1278//******************************************************************************
1279//******************************************************************************
1280UINT WIN32API GetEnhMetaFileBits( HENHMETAFILE arg1, UINT arg2, PBYTE arg3)
1281{
1282 dprintf(("GDI32: GetEnhMetaFileBits"));
1283 return O32_GetEnhMetaFileBits(arg1, arg2, arg3);
1284}
1285//******************************************************************************
1286//******************************************************************************
1287UINT WIN32API GetEnhMetaFileHeader( HENHMETAFILE arg1, UINT arg2, LPENHMETAHEADER arg3)
1288{
1289 dprintf(("GDI32: GetEnhMetaFileHeader"));
1290 return O32_GetEnhMetaFileHeader(arg1, arg2, arg3);
1291}
1292//******************************************************************************
1293//******************************************************************************
1294UINT WIN32API GetEnhMetaFilePaletteEntries( HENHMETAFILE arg1, UINT arg2, PPALETTEENTRY arg3)
1295{
1296 dprintf(("GDI32: GetEnhMetaFilePaletteEntries"));
1297 return O32_GetEnhMetaFilePaletteEntries(arg1, arg2, arg3);
1298}
1299//******************************************************************************
1300//******************************************************************************
1301HENHMETAFILE WIN32API GetEnhMetaFileW( LPCWSTR arg1)
1302{
1303 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
1304 HENHMETAFILE rc;
1305
1306 dprintf(("GDI32: GetEnhMetaFileW"));
1307 // NOTE: This will not work as is (needs UNICODE support)
1308 rc = O32_GetEnhMetaFile(astring);
1309 FreeAsciiString(astring);
1310 return rc;
1311}
1312//******************************************************************************
1313//******************************************************************************
1314int WIN32API GetGraphicsMode(HDC arg1)
1315{
1316 dprintf(("GDI32: GetGraphicsMode"));
1317 return O32_GetGraphicsMode(arg1);
1318}
1319//******************************************************************************
1320//******************************************************************************
1321DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
1322{
1323 dprintf(("GDI32: GetKerningPairsA"));
1324 return O32_GetKerningPairs(arg1, arg2, arg3);
1325}
1326//******************************************************************************
1327//******************************************************************************
1328DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
1329{
1330 dprintf(("GDI32: GetKerningPairsW"));
1331 // NOTE: This will not work as is (needs UNICODE support)
1332 return O32_GetKerningPairs(arg1, arg2, arg3);
1333}
1334//******************************************************************************
1335//******************************************************************************
1336int WIN32API GetMapMode( HDC arg1)
1337{
1338 dprintf(("GDI32: GetMapMode"));
1339 return O32_GetMapMode(arg1);
1340}
1341//******************************************************************************
1342//******************************************************************************
1343HMETAFILE WIN32API GetMetaFileA( LPCSTR arg1)
1344{
1345 dprintf(("GDI32: GetMetaFileA"));
1346 return O32_GetMetaFile(arg1);
1347}
1348//******************************************************************************
1349//******************************************************************************
1350UINT WIN32API GetMetaFileBitsEx( HMETAFILE arg1, UINT arg2, LPVOID arg3)
1351{
1352 dprintf(("GDI32: GetMetaFileBitsEx"));
1353 return O32_GetMetaFileBitsEx(arg1, arg2, arg3);
1354}
1355//******************************************************************************
1356//******************************************************************************
1357HMETAFILE WIN32API GetMetaFileW( LPCWSTR arg1)
1358{
1359 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
1360 HENHMETAFILE rc;
1361
1362 dprintf(("GDI32: GetMetaFileW"));
1363 rc = O32_GetMetaFile(astring);
1364 FreeAsciiString(astring);
1365 return rc;
1366
1367}
1368//******************************************************************************
1369//******************************************************************************
1370BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
1371{
1372 dprintf(("GDI32: GetMiterLimit"));
1373 return O32_GetMiterLimit(arg1, arg2);
1374}
1375//******************************************************************************
1376//******************************************************************************
1377COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2)
1378{
1379 dprintf(("GDI32: GetNearestColor\n"));
1380 return O32_GetNearestColor(arg1, arg2);
1381}
1382//******************************************************************************
1383//******************************************************************************
1384UINT WIN32API GetNearestPaletteIndex( HPALETTE arg1, COLORREF arg2)
1385{
1386 UINT rc;
1387 dprintf(("GDI32: GetNearestPaletteIndex (0x%08X ,0x%08X) ",arg1,arg2));
1388 rc = O32_GetNearestPaletteIndex(arg1, arg2);
1389 dprintf(("Returns %d\n",rc));
1390 return rc;
1391}
1392//******************************************************************************
1393//******************************************************************************
1394int WIN32API GetObjectW( HGDIOBJ arg1, int arg2, void * arg3)
1395{
1396 dprintf(("GDI32: GetObjectW %X, %d %X\n", arg1, arg2, arg3));
1397 // NOTE: This will not work as is (needs UNICODE support)
1398 return O32_GetObject(arg1, arg2, arg3);
1399}
1400//******************************************************************************
1401//******************************************************************************
1402UINT WIN32API GetOutlineTextMetricsA( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICA arg3)
1403{
1404 dprintf(("GDI32: GetOutlineTextMetricsA"));
1405 return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
1406}
1407//******************************************************************************
1408//******************************************************************************
1409UINT WIN32API GetOutlineTextMetricsW( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICW arg3)
1410{
1411 dprintf(("GDI32: GetOutlineTextMetricsW STUB"));
1412 // NOTE: This will not work as is (needs UNICODE support)
1413// return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
1414 return 0;
1415}
1416//******************************************************************************
1417//******************************************************************************
1418UINT WIN32API GetPaletteEntries( HPALETTE arg1, UINT arg2, UINT arg3, PPALETTEENTRY arg4)
1419{
1420 dprintf(("GDI32: GetPaletteEntries"));
1421 return O32_GetPaletteEntries(arg1, arg2, arg3, arg4);
1422}
1423//******************************************************************************
1424//******************************************************************************
1425INT WIN32API GetPath( HDC arg1, PPOINT arg2, PBYTE arg3, int arg4)
1426{
1427 dprintf(("GDI32: GetPath"));
1428 return O32_GetPath(arg1, arg2, arg3, arg4);
1429}
1430//******************************************************************************
1431//******************************************************************************
1432int WIN32API GetPolyFillMode( HDC arg1)
1433{
1434 dprintf(("GDI32: GetPolyFillMode"));
1435 return O32_GetPolyFillMode(arg1);
1436}
1437//******************************************************************************
1438//******************************************************************************
1439int WIN32API GetROP2( HDC arg1)
1440{
1441 dprintf(("GDI32: GetROP2"));
1442 return O32_GetROP2(arg1);
1443}
1444//******************************************************************************
1445//******************************************************************************
1446BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2)
1447{
1448 dprintf(("GDI32: GetRasterizerCaps"));
1449 return O32_GetRasterizerCaps(arg1, arg2);
1450}
1451//******************************************************************************
1452//******************************************************************************
1453DWORD WIN32API GetRegionData( HRGN arg1, DWORD arg2, PRGNDATA arg3)
1454{
1455 dprintf(("GDI32: GetRegionData"));
1456 return O32_GetRegionData(arg1, arg2, arg3);
1457}
1458//******************************************************************************
1459//******************************************************************************
1460int WIN32API GetRgnBox( HRGN arg1, PRECT arg2)
1461{
1462 dprintf(("GDI32: GetRgnBox"));
1463 return O32_GetRgnBox(arg1, arg2);
1464}
1465//******************************************************************************
1466//******************************************************************************
1467int WIN32API GetStretchBltMode( HDC arg1)
1468{
1469 dprintf(("GDI32: GetStretchBltMode"));
1470 return O32_GetStretchBltMode(arg1);
1471}
1472//******************************************************************************
1473//******************************************************************************
1474UINT WIN32API GetSystemPaletteEntries( HDC arg1, UINT arg2, UINT arg3, PPALETTEENTRY arg4)
1475{
1476 UINT rc;
1477
1478 dprintf(("GDI32: GetSystemPaletteEntries start %d nr %d pal ptr %X", arg2, arg3, arg4));
1479 rc = O32_GetSystemPaletteEntries(arg1, arg2, arg3, arg4);
1480 dprintf((" GetSystemPaletteEntries returned %d", rc));
1481 return(rc);
1482}
1483//******************************************************************************
1484//******************************************************************************
1485UINT WIN32API GetTextAlign( HDC arg1)
1486{
1487 dprintf(("GDI32: GetTextAlign"));
1488 return O32_GetTextAlign(arg1);
1489}
1490//******************************************************************************
1491//******************************************************************************
1492int WIN32API GetTextCharacterExtra( HDC arg1)
1493{
1494 dprintf(("GDI32: GetTextCharacterExtra"));
1495 return O32_GetTextCharacterExtra(arg1);
1496}
1497//******************************************************************************
1498//******************************************************************************
1499COLORREF WIN32API GetTextColor( HDC arg1)
1500{
1501 dprintf(("GDI32: GetTextColor"));
1502 return O32_GetTextColor(arg1);
1503}
1504//******************************************************************************
1505//******************************************************************************
1506BOOL WIN32API GetTextExtentPoint32A( HDC arg1, LPCSTR arg2, int arg3, PSIZE lpSize)
1507{
1508 dprintf(("GDI32: GetTextExtentPoint32A"));
1509 lpSize->cx = lpSize->cy = 0;
1510 return O32_GetTextExtentPoint32(arg1, arg2, arg3, lpSize);
1511}
1512//******************************************************************************
1513//******************************************************************************
1514BOOL WIN32API GetTextExtentPoint32W(HDC arg1, LPCWSTR arg2, int arg3, PSIZE lpSize)
1515{
1516 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1517 BOOL rc;
1518
1519 dprintf(("GDI32: GetTextExtentPoint32W %s\n", astring));
1520 lpSize->cx = lpSize->cy = 0;
1521 rc = O32_GetTextExtentPoint32(arg1, astring, arg3, lpSize);
1522 FreeAsciiString(astring);
1523 return(rc);
1524}
1525//******************************************************************************
1526//******************************************************************************
1527BOOL WIN32API GetTextExtentPointW(HDC hdc,
1528 LPCWSTR lpString,
1529 int cbString,
1530 PSIZE lpSize)
1531{
1532 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
1533 BOOL rc;
1534
1535 lpSize->cx = lpSize->cy = 0;
1536 rc = O32_GetTextExtentPoint(hdc,
1537 astring,
1538 cbString,
1539 lpSize);
1540 dprintf(("GDI32: GetTextExtentPointW %X %s (size %08xh) returned %d\n", hdc, astring, cbString, rc));
1541 dprintf(("GDI32: GetTextExtentPointW (%d,%d)\n", lpSize->cx, lpSize->cy));
1542
1543 FreeAsciiString(astring);
1544 return(rc);
1545}
1546//******************************************************************************
1547//******************************************************************************
1548int WIN32API GetTextFaceA( HDC arg1, int arg2, LPSTR arg3)
1549{
1550 dprintf(("GDI32: GetTextFaceA"));
1551 return O32_GetTextFace(arg1, arg2, arg3);
1552}
1553//******************************************************************************
1554//******************************************************************************
1555int WIN32API GetTextFaceW( HDC arg1, int arg2, LPWSTR arg3)
1556{
1557 char *astring = (char *)malloc(arg2+1);
1558 int rc;
1559
1560 dprintf(("GDI32: GetTextFaceW"));
1561 rc = O32_GetTextFace(arg1, arg2, astring);
1562 AsciiToUnicode(astring, arg3);
1563 free(astring);
1564 return rc;
1565}
1566//******************************************************************************
1567//******************************************************************************
1568BOOL WIN32API GetTextMetricsA( HDC arg1, LPTEXTMETRICA arg2)
1569{
1570 BOOL rc;
1571
1572 rc = O32_GetTextMetrics(arg1, arg2);
1573 dprintf(("GDI32: GetTextMetricsA returned %d\n", rc));
1574 return(rc);
1575}
1576//******************************************************************************
1577//******************************************************************************
1578BOOL WIN32API GetTextMetricsW( HDC arg1, LPTEXTMETRICW pwtm)
1579{
1580 BOOL rc;
1581 TEXTMETRICA atm;
1582
1583 dprintf(("GDI32: GetTextMetricsW"));
1584
1585 rc = O32_GetTextMetrics(arg1, &atm);
1586 pwtm->tmHeight = atm.tmHeight;
1587 pwtm->tmAscent = atm.tmAscent;
1588 pwtm->tmDescent = atm.tmDescent;
1589 pwtm->tmInternalLeading = atm.tmInternalLeading;
1590 pwtm->tmExternalLeading = atm.tmExternalLeading;
1591 pwtm->tmAveCharWidth = atm.tmAveCharWidth;
1592 pwtm->tmMaxCharWidth = atm.tmMaxCharWidth;
1593 pwtm->tmWeight = atm.tmWeight;
1594 pwtm->tmOverhang = atm.tmOverhang;
1595 pwtm->tmDigitizedAspectX = atm.tmDigitizedAspectX;
1596 pwtm->tmDigitizedAspectY = atm.tmDigitizedAspectY;
1597 pwtm->tmFirstChar = atm.tmFirstChar;
1598 pwtm->tmLastChar = atm.tmLastChar;
1599 pwtm->tmDefaultChar = atm.tmDefaultChar;
1600 pwtm->tmBreakChar = atm.tmBreakChar;
1601 pwtm->tmItalic = atm.tmItalic;
1602 pwtm->tmUnderlined = atm.tmUnderlined;
1603 pwtm->tmStruckOut = atm.tmStruckOut;
1604 pwtm->tmPitchAndFamily = atm.tmPitchAndFamily;
1605 pwtm->tmCharSet = atm.tmCharSet;
1606 return(rc);
1607}
1608//******************************************************************************
1609//******************************************************************************
1610BOOL WIN32API GetViewportExtEx( HDC arg1, PSIZE arg2)
1611{
1612 dprintf(("GDI32: GetViewportExtEx"));
1613 return O32_GetViewportExtEx(arg1, arg2);
1614}
1615//******************************************************************************
1616//******************************************************************************
1617BOOL WIN32API GetViewportOrgEx( HDC arg1, PPOINT arg2)
1618{
1619 dprintf(("GDI32: GetViewportOrgEx"));
1620 return O32_GetViewportOrgEx(arg1, arg2);
1621}
1622//******************************************************************************
1623//******************************************************************************
1624UINT WIN32API GetWinMetaFileBits( HENHMETAFILE arg1, UINT arg2, PBYTE arg3, int arg4, HDC arg5)
1625{
1626 dprintf(("GDI32: GetWinMetaFileBits"));
1627 return O32_GetWinMetaFileBits(arg1, arg2, arg3, arg4, arg5);
1628}
1629//******************************************************************************
1630//******************************************************************************
1631BOOL WIN32API GetWindowOrgEx( HDC arg1, PPOINT arg2)
1632{
1633 dprintf(("GDI32: GetWindowOrgEx"));
1634 return O32_GetWindowOrgEx(arg1, arg2);
1635}
1636//******************************************************************************
1637//******************************************************************************
1638BOOL WIN32API GetWorldTransform( HDC arg1, LPXFORM arg2)
1639{
1640 dprintf(("GDI32: GetWorldTransform"));
1641 return O32_GetWorldTransform(arg1, arg2);
1642}
1643//******************************************************************************
1644//******************************************************************************
1645int WIN32API IntersectClipRect(HDC arg1, int arg2, int arg3, int arg4, int arg5)
1646{
1647 int rc;
1648
1649 rc = O32_IntersectClipRect(arg1, arg2, arg3, arg4, arg5);
1650 dprintf(("GDI32: IntersectClipRect returned %d\n", rc));
1651 return(rc);
1652}
1653//******************************************************************************
1654//******************************************************************************
1655BOOL WIN32API InvertRgn( HDC arg1, HRGN arg2)
1656{
1657 dprintf(("GDI32: InvertRgn"));
1658 return O32_InvertRgn(arg1, arg2);
1659}
1660//******************************************************************************
1661//******************************************************************************
1662BOOL WIN32API LPtoDP( HDC arg1, PPOINT arg2, int arg3)
1663{
1664 dprintf(("GDI32: LPtoDP"));
1665 return O32_LPtoDP(arg1, arg2, arg3);
1666}
1667//******************************************************************************
1668//******************************************************************************
1669BOOL 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)
1670{
1671 dprintf(("GDI32: MaskBlt"));
1672 return O32_MaskBlt(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
1673}
1674//******************************************************************************
1675//******************************************************************************
1676BOOL WIN32API ModifyWorldTransform( HDC arg1, const XFORM *arg2, DWORD arg3)
1677{
1678 dprintf(("GDI32: ModifyWorldTransform"));
1679 return O32_ModifyWorldTransform(arg1, (LPXFORM)arg2, arg3);
1680}
1681//******************************************************************************
1682//******************************************************************************
1683int WIN32API OffsetClipRgn( HDC arg1, int arg2, int arg3)
1684{
1685 dprintf(("GDI32: OffsetClipRgn"));
1686 return O32_OffsetClipRgn(arg1, arg2, arg3);
1687}
1688//******************************************************************************
1689//******************************************************************************
1690int WIN32API OffsetRgn( HRGN arg1, int arg2, int arg3)
1691{
1692 dprintf(("GDI32: OffsetRgn"));
1693 return O32_OffsetRgn(arg1, arg2, arg3);
1694}
1695//******************************************************************************
1696//******************************************************************************
1697BOOL WIN32API OffsetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1698{
1699 dprintf(("GDI32: OffsetViewportOrgEx"));
1700 return O32_OffsetViewportOrgEx(arg1, arg2, arg3, arg4);
1701}
1702//******************************************************************************
1703//******************************************************************************
1704BOOL WIN32API OffsetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1705{
1706 dprintf(("GDI32: OffsetWindowOrgEx"));
1707 return O32_OffsetWindowOrgEx(arg1, arg2, arg3, arg4);
1708}
1709//******************************************************************************
1710//******************************************************************************
1711BOOL WIN32API PaintRgn( HDC arg1, HRGN arg2)
1712{
1713 dprintf(("GDI32: PaintRgn"));
1714 return O32_PaintRgn(arg1, arg2);
1715}
1716//******************************************************************************
1717//******************************************************************************
1718HRGN WIN32API PathToRegion( HDC arg1)
1719{
1720 dprintf(("GDI32: PathToRegion"));
1721 return O32_PathToRegion(arg1);
1722}
1723//******************************************************************************
1724//******************************************************************************
1725BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
1726 int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
1727 int nYRadial2)
1728{
1729 dprintf(("GDI32: Pie"));
1730 //CB: bug in O32_Pie
1731 if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
1732 return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
1733 else
1734 return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
1735}
1736//******************************************************************************
1737//******************************************************************************
1738BOOL WIN32API PlayEnhMetaFile( HDC arg1, HENHMETAFILE arg2, const RECT * arg3)
1739{
1740 dprintf(("GDI32: PlayEnhMetaFile"));
1741 return O32_PlayEnhMetaFile(arg1, arg2, arg3);
1742}
1743//******************************************************************************
1744//******************************************************************************
1745BOOL WIN32API PlayMetaFile( HDC arg1, HMETAFILE arg2)
1746{
1747 dprintf(("GDI32: PlayMetaFile"));
1748 return O32_PlayMetaFile(arg1, arg2);
1749}
1750//******************************************************************************
1751//******************************************************************************
1752BOOL WIN32API PlayMetaFileRecord( HDC arg1, LPHANDLETABLE arg2, LPMETARECORD arg3, UINT arg4)
1753{
1754 dprintf(("GDI32: PlayMetaFileRecord"));
1755 return O32_PlayMetaFileRecord(arg1, arg2, arg3, (int)arg4);
1756}
1757//******************************************************************************
1758//******************************************************************************
1759BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
1760{
1761 dprintf(("GDI32: PolyBezier"));
1762 return O32_PolyBezier(arg1, arg2, (int)arg3);
1763}
1764//******************************************************************************
1765//******************************************************************************
1766BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
1767{
1768 dprintf(("GDI32: PolyBezierTo"));
1769 return O32_PolyBezierTo(arg1, arg2, arg3);
1770}
1771//******************************************************************************
1772//******************************************************************************
1773BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
1774{
1775 dprintf(("GDI32: PolyDraw"));
1776 return O32_PolyDraw(arg1, arg2, arg3, arg4);
1777}
1778//******************************************************************************
1779//******************************************************************************
1780BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
1781{
1782 dprintf(("GDI32: PolyPolygon"));
1783 return O32_PolyPolygon(arg1, arg2, arg3, arg4);
1784}
1785//******************************************************************************
1786//******************************************************************************
1787BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
1788{
1789 dprintf(("GDI32: PolyPolyline"));
1790
1791 return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
1792}
1793//******************************************************************************
1794//******************************************************************************
1795BOOL WIN32API Polygon( HDC arg1, const POINT * arg2, int arg3)
1796{
1797 dprintf(("GDI32: Polygon"));
1798 return O32_Polygon(arg1, arg2, arg3);
1799}
1800//******************************************************************************
1801//******************************************************************************
1802BOOL WIN32API PtInRegion( HRGN arg1, int arg2, int arg3)
1803{
1804 dprintf(("GDI32: PtInRegion"));
1805 return O32_PtInRegion(arg1, arg2, arg3);
1806}
1807//******************************************************************************
1808//******************************************************************************
1809BOOL WIN32API PtVisible( HDC arg1, int arg2, int arg3)
1810{
1811 dprintf(("GDI32: PtVisible"));
1812 return O32_PtVisible(arg1, arg2, arg3);
1813}
1814//******************************************************************************
1815//******************************************************************************
1816BOOL WIN32API RectInRegion( HRGN arg1, const RECT * arg2)
1817{
1818 dprintf(("GDI32: RectInRegion"));
1819 return O32_RectInRegion(arg1, arg2);
1820}
1821//******************************************************************************
1822//******************************************************************************
1823BOOL WIN32API RectVisible( HDC arg1, const RECT * arg2)
1824{
1825 dprintf(("GDI32: RectVisible\n"));
1826 return O32_RectVisible(arg1, arg2);
1827}
1828//******************************************************************************
1829//******************************************************************************
1830HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
1831{
1832 dprintf(("GDI32: ResetDCA\n"));
1833 return (HDC)O32_ResetDC(arg1, arg2);
1834}
1835//******************************************************************************
1836//******************************************************************************
1837HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
1838{
1839 dprintf(("GDI32: ResetDCW\n"));
1840 // NOTE: This will not work as is (needs UNICODE support)
1841 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
1842}
1843//******************************************************************************
1844//******************************************************************************
1845BOOL WIN32API ResizePalette( HPALETTE arg1, UINT arg2)
1846{
1847 dprintf(("GDI32: ResizePalette\n"));
1848 return O32_ResizePalette(arg1, arg2);
1849}
1850//******************************************************************************
1851//******************************************************************************
1852BOOL WIN32API RestoreDC( HDC arg1, int arg2)
1853{
1854 dprintf(("GDI32: RestoreDC\n"));
1855 return O32_RestoreDC(arg1, arg2);
1856}
1857//******************************************************************************
1858//******************************************************************************
1859BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
1860{
1861 dprintf(("GDI32: RoundRect"));
1862 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1863}
1864//******************************************************************************
1865//******************************************************************************
1866int WIN32API SaveDC( HDC arg1)
1867{
1868 dprintf(("GDI32: SaveDC"));
1869 return O32_SaveDC(arg1);
1870}
1871//******************************************************************************
1872//******************************************************************************
1873BOOL WIN32API ScaleViewportExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1874{
1875 dprintf(("GDI32: ScaleViewportExtEx"));
1876 return O32_ScaleViewportExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1877}
1878//******************************************************************************
1879//******************************************************************************
1880BOOL WIN32API ScaleWindowExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1881{
1882 dprintf(("GDI32: ScaleWindowExtEx"));
1883 return O32_ScaleWindowExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1884}
1885//******************************************************************************
1886//******************************************************************************
1887int WIN32API SelectClipRgn( HDC arg1, HRGN arg2)
1888{
1889 dprintf(("GDI32: SelectClipRgn"));
1890 return O32_SelectClipRgn(arg1, arg2);
1891}
1892//******************************************************************************
1893//******************************************************************************
1894int WIN32API SetArcDirection( HDC arg1, int arg2)
1895{
1896 dprintf(("GDI32: SetArcDirection"));
1897 return O32_SetArcDirection(arg1, arg2);
1898}
1899//******************************************************************************
1900//******************************************************************************
1901LONG WIN32API SetBitmapBits( HBITMAP arg1, LONG arg2, const VOID * arg3)
1902{
1903 dprintf(("GDI32: SetBitmapBits"));
1904 return O32_SetBitmapBits(arg1, (DWORD)arg2, arg3);
1905}
1906//******************************************************************************
1907//******************************************************************************
1908BOOL WIN32API SetBitmapDimensionEx( HBITMAP arg1, int arg2, int arg3, PSIZE arg4)
1909{
1910 dprintf(("GDI32: SetBitmapDimensionEx"));
1911 return O32_SetBitmapDimensionEx(arg1, arg2, arg3, arg4);
1912}
1913//******************************************************************************
1914//******************************************************************************
1915UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
1916{
1917 dprintf(("GDI32: SetBoundsRect"));
1918 return O32_SetBoundsRect(arg1, arg2, arg3);
1919}
1920//******************************************************************************
1921//******************************************************************************
1922BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1923{
1924 BOOL rc;
1925
1926 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
1927 dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc));
1928 return(rc);
1929}
1930//******************************************************************************
1931//******************************************************************************
1932int WIN32API SetDIBits( HDC arg1, HBITMAP arg2, UINT arg3, UINT arg4, const VOID * arg5, const BITMAPINFO * arg6, UINT arg7)
1933{
1934 dprintf(("GDI32: SetDIBits %x %x %x %x %x %x %x\n", arg1, arg2, arg3, arg4, arg5, arg6, arg7));
1935
1936 if(DIBSection::getSection() != NULL) {
1937 DIBSection *dsect;
1938
1939 dsect = DIBSection::find((DWORD)arg2);
1940 if(dsect) {
1941 return dsect->SetDIBits(arg1, arg2, arg3, arg4, arg5, (WINBITMAPINFOHEADER *)&arg6->bmiHeader, arg7);
1942 }
1943 }
1944 return O32_SetDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1945}
1946//******************************************************************************
1947//******************************************************************************
1948INT 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)
1949{
1950 INT result, imgsize, palsize;
1951 char *ptr;
1952
1953 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",
1954 hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (LPVOID) bits, (PBITMAPINFO)info, coloruse));
1955
1956 // EB: ->>> Crazy. Nobody seen this Open32 bug ?
1957 // Dont't like dirty pointers, but Open32 needs a bit help.
1958 // Only tested with winmine.
1959 palsize = QueryPaletteSize((BITMAPINFOHEADER*)&info->bmiHeader);
1960 imgsize = CalcBitmapSize(info->bmiHeader.biBitCount,
1961 info->bmiHeader.biWidth, info->bmiHeader.biHeight);
1962 ptr = ((char *)info) + palsize + sizeof(BITMAPINFOHEADER);
1963 if(bits >= ptr && bits < ptr + imgsize)
1964 {
1965 bits = (char *)bits - imgsize +
1966 CalcBitmapSize(info->bmiHeader.biBitCount,
1967 info->bmiHeader.biWidth, lines);
1968 }
1969 // EB: <<<-
1970
1971 result = O32_SetDIBitsToDevice(hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (PVOID) bits, (PBITMAPINFO)info, coloruse);
1972 return result;
1973}
1974//******************************************************************************
1975//******************************************************************************
1976HENHMETAFILE WIN32API SetEnhMetaFileBits( UINT arg1, const BYTE * arg2)
1977{
1978 dprintf(("GDI32: SetEnhMetaFileBits"));
1979 return O32_SetEnhMetaFileBits(arg1, arg2);
1980}
1981//******************************************************************************
1982//******************************************************************************
1983int WIN32API SetGraphicsMode(HDC arg1, int arg2)
1984{
1985 dprintf(("GDI32: SetGraphicsMode"));
1986 return O32_SetGraphicsMode(arg1, arg2);
1987}
1988//******************************************************************************
1989//******************************************************************************
1990int WIN32API SetMapMode( HDC arg1, int arg2)
1991{
1992 dprintf(("GDI32: SetMapMode"));
1993 return O32_SetMapMode(arg1, arg2);
1994}
1995//******************************************************************************
1996//******************************************************************************
1997DWORD WIN32API SetMapperFlags( HDC arg1, DWORD arg2)
1998{
1999 dprintf(("GDI32: SetMapperFlags"));
2000 return O32_SetMapperFlags(arg1, arg2);
2001}
2002//******************************************************************************
2003//******************************************************************************
2004HMETAFILE WIN32API SetMetaFileBitsEx( UINT arg1, const BYTE * arg2)
2005{
2006 dprintf(("GDI32: SetMetaFileBitsEx"));
2007 return O32_SetMetaFileBitsEx(arg1, (PBYTE)arg2);
2008}
2009//******************************************************************************
2010//******************************************************************************
2011BOOL WIN32API SetMiterLimit( HDC arg1, float arg2, float * arg3)
2012{
2013 dprintf(("GDI32: SetMiterLimit"));
2014 return O32_SetMiterLimit(arg1, arg2, arg3);
2015}
2016//******************************************************************************
2017//******************************************************************************
2018UINT WIN32API SetPaletteEntries( HPALETTE arg1, UINT arg2, UINT arg3, PALETTEENTRY * arg4)
2019{
2020 dprintf(("GDI32: SetPaletteEntries"));
2021 return O32_SetPaletteEntries(arg1, arg2, arg3, (const PALETTEENTRY *)arg4);
2022}
2023//******************************************************************************
2024//******************************************************************************
2025int WIN32API SetPolyFillMode( HDC arg1, int arg2)
2026{
2027 dprintf(("GDI32: SetPolyFillMode"));
2028 return O32_SetPolyFillMode(arg1, arg2);
2029}
2030//******************************************************************************
2031//******************************************************************************
2032BOOL WIN32API SetRectRgn( HRGN arg1, int arg2, int arg3, int arg4, int arg5)
2033{
2034 dprintf(("GDI32: SetRectRgn"));
2035 return O32_SetRectRgn(arg1, arg2, arg3, arg4, arg5);
2036}
2037//******************************************************************************
2038//******************************************************************************
2039UINT WIN32API SetTextAlign( HDC arg1, UINT arg2)
2040{
2041 dprintf(("GDI32: SetTextAlign"));
2042 return O32_SetTextAlign(arg1, arg2);
2043}
2044//******************************************************************************
2045//******************************************************************************
2046int WIN32API SetTextCharacterExtra( HDC arg1, int arg2)
2047{
2048 dprintf(("GDI32: SetTextCharacterExtra"));
2049 return O32_SetTextCharacterExtra(arg1, arg2);
2050}
2051//******************************************************************************
2052//******************************************************************************
2053BOOL WIN32API SetTextJustification( HDC arg1, int arg2, int arg3)
2054{
2055 dprintf(("GDI32: SetTextJustification"));
2056 return O32_SetTextJustification(arg1, arg2, arg3);
2057}
2058//******************************************************************************
2059//******************************************************************************
2060BOOL WIN32API SetViewportExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
2061{
2062 dprintf(("GDI32: SetViewportExtEx"));
2063 return O32_SetViewportExtEx(arg1, arg2, arg3, arg4);
2064}
2065//******************************************************************************
2066//******************************************************************************
2067BOOL WIN32API SetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
2068{
2069 dprintf(("GDI32: SetViewportOrgEx"));
2070 return O32_SetViewportOrgEx(arg1, arg2, arg3, arg4);
2071}
2072//******************************************************************************
2073//******************************************************************************
2074HENHMETAFILE WIN32API SetWinMetaFileBits( UINT arg1, const BYTE * arg2, HDC arg3, const METAFILEPICT * arg4)
2075{
2076 dprintf(("GDI32: SetWinMetaFileBits"));
2077 return O32_SetWinMetaFileBits(arg1, arg2, arg3, arg4);
2078}
2079//******************************************************************************
2080//******************************************************************************
2081BOOL WIN32API SetWindowExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
2082{
2083 dprintf(("GDI32: SetWindowExtEx"));
2084 return O32_SetWindowExtEx(arg1, arg2, arg3, arg4);
2085}
2086//******************************************************************************
2087//******************************************************************************
2088BOOL WIN32API SetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
2089{
2090 dprintf(("GDI32: SetWindowOrgEx"));
2091 return O32_SetWindowOrgEx(arg1, arg2, arg3, arg4);
2092}
2093//******************************************************************************
2094//******************************************************************************
2095BOOL WIN32API SetWorldTransform( HDC arg1, const XFORM *arg2)
2096{
2097 dprintf(("GDI32: SetWorldTransform"));
2098 return O32_SetWorldTransform(arg1, (LPXFORM)arg2);
2099}
2100//******************************************************************************
2101//******************************************************************************
2102INT WIN32API StartDocA( HDC arg1, const DOCINFOA *arg2)
2103{
2104 dprintf(("GDI32: StartDocA"));
2105 return O32_StartDoc(arg1, (LPDOCINFOA)arg2);
2106}
2107//******************************************************************************
2108//******************************************************************************
2109INT WIN32API StartDocW( HDC arg1, const DOCINFOW *arg2)
2110{
2111 dprintf(("GDI32: StartDocW STUB"));
2112 // NOTE: This will not work as is (needs UNICODE support)
2113// return O32_StartDoc(arg1, arg2);
2114 return 0;
2115}
2116//******************************************************************************
2117//******************************************************************************
2118int WIN32API StartPage( HDC arg1)
2119{
2120 dprintf(("GDI32: StartPage"));
2121 return O32_StartPage(arg1);
2122}
2123//******************************************************************************
2124//******************************************************************************
2125BOOL WIN32API UnrealizeObject( HGDIOBJ arg1)
2126{
2127 dprintf(("GDI32: UnrealizeObject"));
2128 return O32_UnrealizeObject(arg1);
2129}
2130//******************************************************************************
2131//******************************************************************************
2132BOOL WIN32API WidenPath( HDC arg1)
2133{
2134 dprintf(("GDI32: WidenPath"));
2135 return O32_WidenPath(arg1);
2136}
2137//******************************************************************************
2138//CreateDisardableBitmap is obsolete and can be replaced by CreateCompatibleBitmap
2139//******************************************************************************
2140HBITMAP WIN32API CreateDiscardableBitmap(HDC hDC, int nWidth, int nHeight)
2141{
2142 dprintf(("GDI32: CreateDisardableBitmap\n"));
2143 return O32_CreateCompatibleBitmap(hDC, nWidth, nHeight);
2144}
2145//******************************************************************************
2146//TODO: Not implemented
2147//******************************************************************************
2148int WIN32API SetAbortProc(HDC hdc, ABORTPROC lpAbortProc)
2149{
2150 dprintf(("GDI32: SetAbortProc - stub (1)w\n"));
2151 return(1);
2152}
2153//******************************************************************************
2154//Selects the current path as a clipping region for a device context, combining
2155//any existing clipping region by using the specified mode
2156//TODO: Can be emulated with SelectClipRegion??
2157//******************************************************************************
2158BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
2159{
2160 dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
2161 return(TRUE);
2162}
2163//******************************************************************************
2164//TODO: Sets the color adjustment values for a device context. (used to adjust
2165// the input color of the src bitmap for calls of StretchBlt & StretchDIBits
2166// functions when HALFTONE mode is set
2167//******************************************************************************
2168BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
2169{
2170 dprintf(("GDI32: SetColorAdjustment, not implemented!(TRUE)\n"));
2171 return(TRUE);
2172}
2173//******************************************************************************
2174//WINE: OBJECTS\DIB.C
2175//*********************************************************************************
2176HBITMAP WIN32API CreateDIBSection( HDC hdc, BITMAPINFO *pbmi, UINT iUsage,
2177 VOID **ppvBits, HANDLE hSection, DWORD dwOffset)
2178{
2179 HBITMAP res = 0;
2180 BOOL fFlip = 0;
2181 int iHeight, iWidth;
2182
2183 dprintf(("GDI32: CreateDIBSection %x %x %x %d", hdc, iUsage, hSection, dwOffset));
2184 if(hSection)
2185 {
2186 dprintf(("GDI32: CreateDIBSection, hSection != NULL, not supported!\n"));
2187 return NULL;
2188 }
2189
2190 //SvL: 13-9-98: StarCraft uses bitmap with negative height
2191 iWidth = pbmi->bmiHeader.biWidth;
2192 if(pbmi->bmiHeader.biWidth < 0)
2193 {
2194 pbmi->bmiHeader.biWidth = -pbmi->bmiHeader.biWidth;
2195 fFlip = FLIP_HOR;
2196 }
2197 iHeight = pbmi->bmiHeader.biHeight;
2198 if(pbmi->bmiHeader.biHeight < 0)
2199 {
2200 pbmi->bmiHeader.biHeight = -pbmi->bmiHeader.biHeight;
2201 fFlip |= FLIP_VERT;
2202 }
2203
2204 res = O32_CreateDIBitmap(hdc, &pbmi->bmiHeader, 0, NULL, pbmi, 0);
2205 if (res)
2206 {
2207 ULONG Pal[256];
2208 char PalSize;
2209 LOGPALETTE tmpPal = { 0x300,1,{0,0,0,0}};
2210 HPALETTE hpalCur, hpalTmp;
2211 DIBSection *dsect = new DIBSection((WINBITMAPINFOHEADER *)&pbmi->bmiHeader, (DWORD)res, fFlip);
2212 dprintf(("Constructor returned\n"));
2213
2214 if(NULL!=dsect)
2215 {
2216 PalSize = dsect->GetBitCount();
2217 if(PalSize<=8)
2218 {
2219 // Now get the current Palette from the DC
2220 hpalTmp = CreatePalette(&tmpPal);
2221 hpalCur = SelectPalette(hdc, hpalTmp, FALSE);
2222
2223 // and use it to set the DIBColorTable
2224 GetPaletteEntries( hpalCur, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal);
2225 dsect->SetDIBColorTable(0, 1<< PalSize, (RGBQUAD*)&Pal);
2226
2227 // Restore the DC Palette
2228 SelectPalette(hdc,hpalCur,FALSE);
2229 DeleteObject(hpalTmp);
2230 }
2231 // Set the hdc in the DIBSection so we can update the palete if a new
2232 // Paletet etc. gets selected into the DC.
2233
2234 dsect->SelectDIBObject(hdc);
2235
2236 if(ppvBits!=NULL)
2237 *ppvBits = dsect->GetDIBObject();
2238
2239 pbmi->bmiHeader.biWidth = iWidth;
2240 pbmi->bmiHeader.biHeight = iHeight;
2241
2242 dprintf(("GDI32: return %08X\n",res));
2243 return(res);
2244 }
2245 }
2246
2247 /* Error. */
2248 if (res)
2249 DeleteObject(res);
2250 *ppvBits = NULL;
2251#ifdef DEBUG
2252 dprintf(("GDI32: CreateDIBSection, error!\n"));
2253 dprintf(("pbmi->biWidth %d", pbmi->bmiHeader.biWidth));
2254 dprintf(("pbmi->biHeight %d", pbmi->bmiHeader.biHeight));
2255 dprintf(("pbmi->biBitCount %d", pbmi->bmiHeader.biBitCount));
2256#endif
2257
2258 return 0;
2259}
2260//******************************************************************************
2261//******************************************************************************
2262UINT WIN32API GetDIBColorTable( HDC hdc, UINT uStartIndex, UINT cEntries,
2263 RGBQUAD *pColors)
2264{
2265 HPALETTE hpal = O32_GetCurrentObject(hdc, OBJ_PAL);
2266 UINT rc;
2267 int i;
2268
2269 rc = O32_GetPaletteEntries(hpal,
2270 uStartIndex,
2271 cEntries,
2272 (PALETTEENTRY *)pColors);
2273 for(i=0;
2274 i<cEntries;
2275 i++)
2276 {
2277 BYTE tmp;
2278 tmp = pColors[i].rgbBlue;
2279 pColors[i].rgbBlue = pColors[i].rgbRed;
2280 pColors[i].rgbRed = tmp;
2281 pColors[i].rgbReserved = 0;
2282 }
2283 dprintf(("GDI32: GetDIBColorTable returns %d\n", rc));
2284 return(rc);
2285}
2286//******************************************************************************
2287//******************************************************************************
2288UINT WIN32API SetDIBColorTable(HDC hdc, UINT uStartIndex, UINT cEntries,
2289 RGBQUAD *pColors)
2290{
2291 DIBSection *dsect = DIBSection::findHDC(hdc);
2292
2293 dprintf(("GDI32: SetDIBColorTable\n"));
2294 if(dsect)
2295 {
2296 return(dsect->SetDIBColorTable(uStartIndex, cEntries, pColors));
2297 }
2298 else
2299 return(0);
2300}
2301//******************************************************************************
2302//******************************************************************************
2303HPALETTE WIN32API CreateHalftonePalette(HDC hdc)
2304{
2305 dprintf(("GDI32: CreateHalftonePalette, not implemented\n"));
2306 return(NULL);
2307}
2308//******************************************************************************
2309//Maps colors to system palette; faster way to update window (instead of redrawing)
2310//We just redraw
2311//******************************************************************************
2312BOOL WIN32API UpdateColors(HDC hdc)
2313{
2314 dprintf(("GDI32: UpdateColors\n"));
2315 return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);
2316}
2317//******************************************************************************
2318//******************************************************************************
2319BOOL WIN32API GdiFlush()
2320{
2321 dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
2322 return(TRUE);
2323}
2324//******************************************************************************
2325//******************************************************************************
2326BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
2327{
2328 dprintf(("GDI32: GdiComment, not implemented (TRUE)\n"));
2329 return(TRUE);
2330}
2331//******************************************************************************
2332//******************************************************************************
2333BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
2334{
2335 dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
2336 return(FALSE);
2337}
2338//******************************************************************************
2339//******************************************************************************
2340BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
2341{
2342 dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
2343 return(FALSE);
2344}
2345//******************************************************************************
2346//******************************************************************************
2347BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
2348{
2349 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
2350 return(FALSE);
2351}
2352//******************************************************************************
2353//******************************************************************************
2354BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
2355 UINT iFirstChar,
2356 UINT iLastChar,
2357 LPABCFLOAT pxBUffer)
2358{
2359 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
2360 return(FALSE);
2361}
2362//******************************************************************************
2363//******************************************************************************
2364INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
2365 INT cbOutput, LPSTR lpszOutData)
2366{
2367 dprintf(("GDI32: ExtEscape, not implemented\n"));
2368 return(0);
2369}
2370//******************************************************************************
2371//******************************************************************************
2372int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
2373{
2374 dprintf(("GDI32: DrawEscape, not implemented\n"));
2375 return(0);
2376}
2377//******************************************************************************
2378//******************************************************************************
2379BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
2380{
2381 dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
2382 return(FALSE);
2383}
2384//******************************************************************************
2385//******************************************************************************
2386BOOL WIN32API PlgBlt(HDC hdcDest, CONST POINT *lpPoint, HDC hdcSrc, int nXSrc,
2387 int nYSrc, int nWidth, int nHeight, HBITMAP hbmMask,
2388 int xMast, int yMask)
2389{
2390 dprintf(("GDI32: PlgBlt, not implemented\n"));
2391 return(FALSE);
2392}
2393//******************************************************************************
2394//******************************************************************************
2395DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
2396 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
2397{
2398 dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
2399 return(GDI_ERROR);
2400}
2401//******************************************************************************
2402
2403//******************************************************************************
2404/*KSO Thu 21.05.1998*/
2405DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
2406 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
2407{
2408 dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
2409 return(GDI_ERROR);
2410}
2411//******************************************************************************
2412
2413//******************************************************************************
2414int WIN32API DescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR)
2415{
2416 dprintf(("GDI32: DescribePixelFormat, not implemented (GDI_ERROR)\n"));
2417 return(GDI_ERROR);
2418}
2419//******************************************************************************
2420//******************************************************************************
2421BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
2422{
2423 // Here is a guess for a undocumented entry
2424 dprintf(("GDI32: SetObjectOwner - stub (TRUE)\n"));
2425 return TRUE;
2426}
2427//******************************************************************************
2428
2429
2430/* Office 97 stubs - KSO Thu 21.05.1998*/
2431//******************************************************************************
2432BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
2433 HDC hdc,
2434 LPCSTR str,
2435 int count,
2436 int maxExt,
2437 LPINT lpnFit,
2438 LPINT alpDx,
2439 LPSIZE size)
2440{
2441 int index, nFit, extent;
2442 SIZE tSize;
2443
2444 dprintf(("GDI32: GetTextExtendExPointA\n"));
2445
2446 size->cx = size->cy = nFit = extent = 0;
2447 for(index = 0; index < count; index++)
2448 {
2449 if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
2450 if( extent+tSize.cx < maxExt )
2451 {
2452 extent+=tSize.cx;
2453 nFit++;
2454 str++;
2455 if( alpDx )
2456 alpDx[index] = extent;
2457 if( tSize.cy > size->cy ) size->cy = tSize.cy;
2458 }
2459 else break;
2460 }
2461 size->cx = extent;
2462
2463 if (lpnFit != NULL) // check if result is desired
2464 *lpnFit = nFit;
2465
2466 dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
2467 hdc,count,str,maxExt,nFit, size->cx,size->cy));
2468 return TRUE;
2469}
2470//******************************************************************************
2471//******************************************************************************
2472BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
2473 HDC arg1,
2474 LPCWSTR arg2,
2475 int arg3,
2476 int arg4,
2477 LPINT arg5,
2478 LPINT arg6,
2479 LPSIZE arg7
2480 )
2481{
2482 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2483 BOOL rc;
2484
2485 dprintf(("GDI32: GetTextExtendExPointW\n"));
2486 rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
2487 FreeAsciiString(astring);
2488 return rc;
2489}
2490//******************************************************************************
2491//******************************************************************************
2492BOOL WIN32API PlayEnhMetaFileRecord( /*KSO Thu 21.05.1998*/
2493 HDC arg1,
2494 LPHANDLETABLE arg2,
2495 CONST ENHMETARECORD *arg3,
2496 UINT arg4
2497 )
2498{
2499 dprintf(("GDI32: PlayEnhMetaFileRecord - stub\n"));
2500 return FALSE;
2501}
2502//******************************************************************************
2503UINT WIN32API GetEnhMetaFileDescriptionA( /*KSO Thu 21.05.1998*/
2504 HENHMETAFILE arg1,
2505 UINT arg2,
2506 LPSTR arg3
2507 )
2508{
2509 dprintf(("GDI32: GetEnhMetaFileDescriptionA - stub\n"));
2510 return FALSE;
2511}
2512//******************************************************************************
2513//******************************************************************************
2514UINT WIN32API GetEnhMetaFileDescriptionW( /*KSO Thu 21.05.1998*/
2515 HENHMETAFILE arg1,
2516 UINT arg2,
2517 LPWSTR arg3
2518 )
2519{
2520 dprintf(("GDI32: GetEnhMetaFileDescriptionW - stub\n"));
2521 return FALSE;
2522}
2523//******************************************************************************
2524//******************************************************************************
2525UINT WIN32API DeleteColorSpace( /*KSO Thu 21.05.1998*/
2526 HCOLORSPACE hColorSpace
2527 )
2528{
2529 dprintf(("GDI32: DeleteColorSpace - stub\n"));
2530 return FALSE;
2531}
2532//******************************************************************************
2533//******************************************************************************
2534BOOL WIN32API SetColorSpace( /*KSO Thu 21.05.1998*/
2535 HDC hdc,
2536 HCOLORSPACE hColorSpace
2537 )
2538{
2539 dprintf(("GDI32: SetColorSpace - stub\n"));
2540 return FALSE;
2541}
2542//******************************************************************************
2543//******************************************************************************
2544 HCOLORSPACE WIN32API CreateColorSpaceA( /*KSO Thu 21.05.1998*/
2545 LPLOGCOLORSPACEA lpLogColorSpace
2546 )
2547{
2548 dprintf(("GDI32: CreateColorSpaceA - stub\n"));
2549 return 0;
2550}
2551//******************************************************************************
2552//******************************************************************************
2553HCOLORSPACE WIN32API CreateColorSpaceW( /*KSO Thu 21.05.1998*/
2554 LPLOGCOLORSPACEW lpwLogColorSpace
2555 )
2556{
2557 dprintf(("GDI32: CreateColorSpaceW - stub\n"));
2558 return 0;
2559}
2560//******************************************************************************
2561//******************************************************************************
2562HANDLE WIN32API GetColorSpace( /*KSO Thu 21.05.1998*/
2563 HDC hdc
2564 )
2565{
2566 dprintf(("GDI32: GetColorSpace - stub\n"));
2567 return 0;
2568}
2569//******************************************************************************
2570//******************************************************************************
2571int WIN32API SetICMMode( /*KSO Thu 21.05.1998*/
2572 HDC hdc,
2573 int mode
2574 )
2575{
2576 dprintf(("GDI32: SetICMMode - stub\n"));
2577 return 0;
2578}
2579//******************************************************************************
2580
2581
2582
2583
2584/*****************************************************************************
2585 * Name : BOOL CancelDC
2586 * Purpose : The CancelDC function cancels any pending operation on the
2587 * specified device context (DC).
2588 * Parameters: HDC hdc handle of device context
2589 * Variables :
2590 * Result : TRUE / FALSE
2591 * Remark :
2592 * Status : UNTESTED STUB
2593 *
2594 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2595 *****************************************************************************/
2596
2597BOOL WIN32API CancelDC(HDC hdc)
2598{
2599 dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
2600 hdc));
2601
2602 return (FALSE);
2603}
2604
2605
2606/*****************************************************************************
2607 * Name : BOOL CheckColorsInGamut
2608 * Purpose : The CheckColorsInGamut function indicates whether the specified
2609 * color values are within the gamut of the specified device.
2610 * Parameters: HDC hdc handle of device context
2611 * LPVOID lpaRGBQuad
2612 * LPVOID lpResult
2613 * DWORD dwResult
2614 * Variables :
2615 * Result : TRUE / FALSE
2616 * Remark :
2617 * Status : UNTESTED STUB
2618 *
2619 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2620 *****************************************************************************/
2621
2622BOOL WIN32API CheckColorsInGamut(HDC hdc,
2623 LPVOID lpaRGBQuad,
2624 LPVOID lpResult,
2625 DWORD dwResult)
2626{
2627 dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2628 hdc,
2629 lpaRGBQuad,
2630 lpResult,
2631 dwResult));
2632
2633 return (FALSE);
2634}
2635
2636
2637/*****************************************************************************
2638 * Name : BOOL ColorMatchToTarget
2639 * Purpose : The ColorMatchToTarget function enables or disables preview for
2640 * the specified device context. When preview is enabled, colors
2641 * in subsequent output to the specified device context are
2642 * displayed as they would appear on the target device. This is
2643 * useful for checking how well the target maps the specified
2644 * colors in an image. To enable preview, image color matching
2645 * must be enabled for both the target and the preview device context.
2646 * Parameters: HDC hdc handle of device context
2647 * HDC hdcTarget handle of target device context
2648 * DWORD uiAction
2649 * Variables :
2650 * Result : TRUE / FALSE
2651 * Remark :
2652 * Status : UNTESTED STUB
2653 *
2654 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2655 *****************************************************************************/
2656
2657BOOL WIN32API ColorMatchToTarget(HDC hdc,
2658 HDC hdcTarget,
2659 DWORD uiAction)
2660{
2661 dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
2662 hdc,
2663 hdcTarget,
2664 uiAction));
2665
2666 return (FALSE);
2667}
2668
2669
2670/*****************************************************************************
2671 * Name : BOOL CombineTransform
2672 * Purpose : The CombineTransform function concatenates two world-space to
2673 * page-space transformations.
2674 * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
2675 * XFORM *lLPXFORM1 address of 1st transformation
2676 * XFORM *lLPXFORM2 address of 2nd transformation
2677 * Variables :
2678 * Result : TRUE / FALSE
2679 * Remark :
2680 * Status : UNTESTED
2681 *
2682 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2683 * Markus Montkowski [Wen, 1999/01/12 20:18]
2684 *****************************************************************************/
2685
2686BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
2687 CONST XFORM *lLPXFORM1,
2688 CONST XFORM *lLPXFORM2)
2689{
2690 dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh).\n",
2691 lLPXFORMResult,
2692 lLPXFORM1,
2693 lLPXFORM2));
2694
2695 XFORM xfrm;
2696 if( O32_IsBadWritePtr( (void*)lLPXFORMResult, sizeof(XFORM)) ||
2697 O32_IsBadReadPtr( (void*)lLPXFORM1, sizeof(XFORM)) ||
2698 O32_IsBadWritePtr( (void*)lLPXFORM2, sizeof(XFORM)) )
2699 return (FALSE);
2700
2701 // Add the translations
2702 lLPXFORMResult->eDx = lLPXFORM1->eDx + lLPXFORM2->eDx;
2703 lLPXFORMResult->eDy = lLPXFORM1->eDy + lLPXFORM2->eDy;
2704
2705 // Multiply the matrixes
2706 xfrm.eM11 = lLPXFORM1->eM11 * lLPXFORM2->eM11 + lLPXFORM1->eM21 * lLPXFORM1->eM12;
2707 xfrm.eM12 = lLPXFORM1->eM11 * lLPXFORM2->eM12 + lLPXFORM1->eM12 * lLPXFORM1->eM22;
2708 xfrm.eM21 = lLPXFORM1->eM21 * lLPXFORM2->eM11 + lLPXFORM1->eM22 * lLPXFORM1->eM21;
2709 xfrm.eM22 = lLPXFORM1->eM21 * lLPXFORM2->eM12 + lLPXFORM1->eM22 * lLPXFORM1->eM22;
2710
2711 // Now copy to resulting XFROM as the pt must not be distinct
2712 lLPXFORMResult->eM11 = xfrm.eM11;
2713 lLPXFORMResult->eM12 = xfrm.eM12;
2714 lLPXFORMResult->eM21 = xfrm.eM21;
2715 lLPXFORMResult->eM22 = xfrm.eM22;
2716
2717 return (TRUE);
2718}
2719
2720
2721
2722/*****************************************************************************
2723 * Name : HBRUSH CreateDIBPatternBrush
2724 * Purpose : The CreateDIBPatternBrush function creates a logical brush that
2725 * has the pattern specified by the specified device-independent
2726 * bitmap (DIB). The brush can subsequently be selected into any
2727 * device context that is associated with a device that supports
2728 * raster operations.
2729 * This function is provided only for compatibility with applications
2730 * written for versions of Windows earlier than 3.0. For Win32-based
2731 * applications, use the CreateDIBPatternBrushPt function.
2732 * Parameters: HGLOBAL hglbDIBPacked Identifies a global memory object containing
2733 * a packed DIB, which consists of a BITMAPINFO structure immediately
2734 * followed by an array of bytes defining the pixels of the bitmap.
2735 * UINT fuColorSpec color table data
2736 * Variables :
2737 * Result : TRUE / FALSE
2738 * Remark :
2739 * Status : UNTESTED
2740 *
2741 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2742 * Markus Montkowski [Wen, 1999/01/12 20:00]
2743 *****************************************************************************/
2744
2745HBRUSH WIN32API CreateDIBPatternBrush( HGLOBAL hglbDIBPacked,
2746 UINT fuColorSpec)
2747{
2748 LPVOID lpMem;
2749 HBRUSH ret = 0;
2750 dprintf(("GDI32: CreateDIBPatternBrush(%08xh, %08xh) \n",
2751 hglbDIBPacked,
2752 fuColorSpec));
2753
2754 lpMem = GlobalLock(hglbDIBPacked);
2755 if(NULL!=lpMem)
2756 {
2757
2758 ret = CreateDIBPatternBrushPt( lpMem,
2759 fuColorSpec);
2760 GlobalUnlock(hglbDIBPacked);
2761 }
2762
2763 return (ret);
2764}
2765
2766
2767
2768
2769/*****************************************************************************
2770 * Name : int EnumICMProfilesA
2771 * Purpose : The EnumICMProfilesA function enumerates the different color
2772 * profiles that the system supports for the specified device context.
2773 * Parameters: HDC hdc
2774 * ICMENUMPROC lpICMEnumFunc
2775 * LPARAM lParam
2776 * Variables :
2777 * Result : TRUE / FALSE
2778 * Remark :
2779 * Status : UNTESTED STUB
2780 *
2781 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2782 *****************************************************************************/
2783
2784int WIN32API EnumICMProfilesA(HDC hdc,
2785 ICMENUMPROCA lpICMEnumProc,
2786 LPARAM lParam)
2787{
2788 dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
2789 hdc,
2790 lpICMEnumProc,
2791 lParam));
2792
2793 return (-1);
2794}
2795
2796
2797/*****************************************************************************
2798 * Name : int EnumICMProfilesW
2799 * Purpose : The EnumICMProfilesW function enumerates the different color
2800 * profiles that the system supports for the specified device context.
2801 * Parameters: HDC hdc
2802 * ICMENUMPROC lpICMEnumFunc
2803 * LPARAM lParam
2804 * Variables :
2805 * Result : TRUE / FALSE
2806 * Remark :
2807 * Status : UNTESTED STUB
2808 *
2809 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2810 *****************************************************************************/
2811
2812int WIN32API EnumICMProfilesW(HDC hdc,
2813 ICMENUMPROCW lpICMEnumProc,
2814 LPARAM lParam)
2815{
2816 dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
2817 hdc,
2818 lpICMEnumProc,
2819 lParam));
2820
2821 return (-1);
2822}
2823
2824
2825/*****************************************************************************
2826 * Name : BOOL FixBrushOrgEx
2827 * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
2828 * It is provided for compatibility with Win32s. If called, the
2829 * function does nothing, and returns FALSE.
2830 * Parameters: HDC, int, int, LPPOINT
2831 * Variables :
2832 * Result : TRUE / FALSE
2833 * Remark : not implemented in Win32
2834 * Status : UNTESTED STUB
2835 *
2836 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2837 *****************************************************************************/
2838
2839BOOL WIN32API FixBrushOrgEx(HDC hdc,
2840 int iDummy1,
2841 int iDummy2,
2842 LPPOINT lpPoint)
2843{
2844 dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2845 hdc,
2846 iDummy1,
2847 iDummy2,
2848 lpPoint));
2849
2850 return (FALSE);
2851}
2852
2853
2854/*****************************************************************************
2855 * Name : DWORD GdiGetBatchLimit
2856 * Purpose : The GdiGetBatchLimit function returns the maximum number of
2857 * function calls that can be accumulated in the calling thread's
2858 * current batch. The system flushes the current batch whenever
2859 * this limit is exceeded.
2860 * Parameters:
2861 * Variables :
2862 * Result : 1
2863 * Remark :
2864 * Status : UNTESTED STUB
2865 *
2866 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2867 *****************************************************************************/
2868
2869DWORD WIN32API GdiGetBatchLimit(VOID)
2870{
2871 dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
2872
2873 return (1);
2874}
2875
2876
2877/*****************************************************************************
2878 * Name : DWORD GdiSetBatchLimit
2879 * Purpose : The GdiSetBatchLimit function sets the maximum number of
2880 * functions that can be accumulated in the calling thread's current
2881 * batch. The system flushes the current batch whenever this limit
2882 * is exceeded.
2883 * Parameters: DWORD dwLimit
2884 * Variables :
2885 * Result :
2886 * Remark :
2887 * Status : UNTESTED STUB
2888 *
2889 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2890 *****************************************************************************/
2891
2892DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
2893{
2894 dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
2895 dwLimit));
2896
2897 return (1);
2898}
2899
2900
2901/*****************************************************************************
2902 * Name : DWORD GetCharacterPlacementA
2903 * Purpose : The GetCharacterPlacementA function retrieves information about
2904 * a character string, such as character widths, caret positioning,
2905 * ordering within the string, and glyph rendering. The type of
2906 * information returned depends on the dwFlags parameter and is
2907 * based on the currently selected font in the given display context.
2908 * The function copies the information to the specified GCP_RESULTSA
2909 * structure or to one or more arrays specified by the structure.
2910 * Parameters: HDC hdc handle to device context
2911 * LPCSTR lpString pointer to string
2912 * int nCount number of characters in string
2913 * int nMaxExtent maximum extent for displayed string
2914 * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
2915 * DWORD dwFlags placement flags
2916 * Variables :
2917 * Result :
2918 * Remark :
2919 * Status : UNTESTED STUB
2920 *
2921 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2922 *****************************************************************************/
2923
2924DWORD WIN32API GetCharacterPlacementA(HDC hdc,
2925 LPCSTR lpString,
2926 int nCount,
2927 int nMaxExtent,
2928 GCP_RESULTSA * lpResults,
2929 DWORD dwFlags)
2930{
2931 dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2932 hdc,
2933 lpString,
2934 nCount,
2935 nMaxExtent,
2936 lpResults,
2937 dwFlags));
2938
2939 return (0);
2940}
2941
2942
2943/*****************************************************************************
2944 * Name : DWORD GetCharacterPlacementW
2945 * Purpose : The GetCharacterPlacementW function retrieves information about
2946 * a character string, such as character widths, caret positioning,
2947 * ordering within the string, and glyph rendering. The type of
2948 * information returned depends on the dwFlags parameter and is
2949 * based on the currently selected font in the given display context.
2950 * The function copies the information to the specified GCP_RESULTSW
2951 * structure or to one or more arrays specified by the structure.
2952 * Parameters: HDC hdc handle to device context
2953 * LPCSTR lpString pointer to string
2954 * int nCount number of characters in string
2955 * int nMaxExtent maximum extent for displayed string
2956 * GCP_RESULTSW *lpResults pointer to buffer for placement result
2957 * DWORD dwFlags placement flags
2958 * Variables :
2959 * Result :
2960 * Remark :
2961 * Status : UNTESTED STUB
2962 *
2963 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2964 *****************************************************************************/
2965
2966DWORD WIN32API GetCharacterPlacementW(HDC hdc,
2967 LPCWSTR lpString,
2968 int nCount,
2969 int nMaxExtent,
2970 GCP_RESULTSW *lpResults,
2971 DWORD dwFlags)
2972{
2973 dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2974 hdc,
2975 lpString,
2976 nCount,
2977 nMaxExtent,
2978 lpResults,
2979 dwFlags));
2980
2981 return (0);
2982}
2983
2984
2985/*****************************************************************************
2986 * Name : DWORD GetDeviceGammaRamp
2987 * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
2988 * direct color display boards.
2989 * Parameters: HDC hdc handle to device context
2990 * LPVOID lpRamp Gamma ramp array
2991 * Variables :
2992 * Result :
2993 * Remark :
2994 * Status : UNTESTED STUB
2995 *
2996 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2997 *****************************************************************************/
2998
2999DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
3000 LPVOID lpRamp)
3001{
3002 dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
3003 hdc,
3004 lpRamp));
3005
3006 return (FALSE);
3007}
3008
3009
3010
3011
3012/*****************************************************************************
3013 * Name : BOOL GetICMProfileA
3014 * Purpose : The GetICMProfileA function retrieves the name of the color
3015 * profile file for the device associated with the specified device
3016 * context.
3017 * Parameters: HDC hdc handle to device context
3018 * DWORD cbName
3019 * LPTSTR lpszFilename
3020 * Variables :
3021 * Result : TRUE / FALSE
3022 * Remark :
3023 * Status : UNTESTED STUB
3024 *
3025 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3026 *****************************************************************************/
3027
3028BOOL WIN32API GetICMProfileA(HDC hdc,
3029 DWORD cbName,
3030 LPTSTR lpszFilename)
3031{
3032 dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
3033 hdc,
3034 cbName,
3035 lpszFilename));
3036
3037 return (FALSE);
3038}
3039
3040
3041/*****************************************************************************
3042 * Name : BOOL GetICMProfileW
3043 * Purpose : The GetICMProfileW function retrieves the name of the color
3044 * profile file for the device associated with the specified device
3045 * context.
3046 * Parameters: HDC hdc handle to device context
3047 * DWORD cbName
3048 * LPWSTR lpszFilename
3049 * Variables :
3050 * Result : TRUE / FALSE
3051 * Remark :
3052 * Status : UNTESTED STUB
3053 *
3054 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3055 *****************************************************************************/
3056
3057BOOL WIN32API GetICMProfileW(HDC hdc,
3058 DWORD cbName,
3059 LPTSTR lpszFilename)
3060{
3061 dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
3062 hdc,
3063 cbName,
3064 lpszFilename));
3065
3066 return (FALSE);
3067}
3068
3069
3070/*****************************************************************************
3071 * Name : BOOL GetLogColorSpaceA
3072 * Purpose : The GetLogColorSpace function retrieves information about the
3073 * logical color space identified by the specified handle.
3074 * Parameters: HCOLORSPACE hColorSpace
3075 * LPLOGCOLORSPACE lpbuffer
3076 * DWORD nSize
3077 * Variables :
3078 * Result : TRUE / FALSE
3079 * Remark :
3080 * Status : UNTESTED STUB
3081 *
3082 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3083 *****************************************************************************/
3084
3085#define LPLOGCOLORSPACE LPVOID
3086BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
3087 LPLOGCOLORSPACE lpBuffer,
3088 DWORD nSize)
3089{
3090 dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
3091 hColorSpace,
3092 lpBuffer,
3093 nSize));
3094
3095 return (FALSE);
3096}
3097
3098
3099/*****************************************************************************
3100 * Name : BOOL GetLogColorSpaceW
3101 * Purpose : The GetLogColorSpace function retrieves information about the
3102 * logical color space identified by the specified handle.
3103 * Parameters: HCOLORSPACE hColorSpace
3104 * LPLOGCOLORSPACE lpbuffer
3105 * DWORD nSize
3106 * Variables :
3107 * Result : TRUE / FALSE
3108 * Remark :
3109 * Status : UNTESTED STUB
3110 *
3111 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3112 *****************************************************************************/
3113
3114BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
3115 LPLOGCOLORSPACE lpBuffer,
3116 DWORD nSize)
3117{
3118 dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
3119 hColorSpace,
3120 lpBuffer,
3121 nSize));
3122
3123 return (FALSE);
3124}
3125
3126
3127/*****************************************************************************
3128 * Name : int GetMetaRgn
3129 * Purpose : The GetMetaRgn function retrieves the current metaregion for
3130 * the specified device context.
3131 * Parameters: HDC hdc handle of device context
3132 * HRGN hrgn handle of region
3133 * Variables :
3134 * Result : 0 / 1
3135 * Remark :
3136 * Status : UNTESTED STUB
3137 *
3138 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3139 *****************************************************************************/
3140
3141int WIN32API GetMetaRgn(HDC hdc,
3142 HRGN hrgn)
3143{
3144 dprintf(("GDI32: GetMetaRgn(%08xh, %08xh) not implemented.\n",
3145 hdc,
3146 hrgn));
3147
3148 return (0);
3149}
3150
3151
3152/*****************************************************************************
3153 * Name : int GetPixelFormat
3154 * Purpose : The GetPixelFormat function obtains the index of the specified
3155 * device context's currently selected pixel format.
3156 * Parameters: HDC hdc handle of device context
3157 * Variables :
3158 * Result : 0 / 1
3159 * Remark :
3160 * Status : UNTESTED STUB
3161 *
3162 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3163 *****************************************************************************/
3164
3165int WIN32API GetPixelFormat(HDC hdc)
3166{
3167 dprintf(("GDI32: GetPixelFormat(%08xh) not implemented.\n",
3168 hdc));
3169
3170 return (0);
3171}
3172
3173
3174/*****************************************************************************
3175 * Name : BOOL PolyTextOutA
3176 * Purpose : The PolyTextOutA function draws several strings using the font
3177 * and text colors currently selected in the specified device context.
3178 * Parameters: HDC hdc handle of device context
3179 * CONST POLYTEXT *pptxt address of array of structures that identify strings
3180 * int cStrings number of structures in array
3181 * Variables :
3182 * Result : TRUE / FALSE
3183 * Remark :
3184 * Status : UNTESTED STUB
3185 *
3186 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3187 *****************************************************************************/
3188
3189BOOL WIN32API PolyTextOutA(HDC hdc,
3190 POLYTEXTA *pptxt,
3191 int cStrings)
3192{
3193 dprintf(("GDI32: PolyTextOutA(%08xh, %08xh, %08xh) not implemented.\n",
3194 hdc,
3195 pptxt,
3196 cStrings));
3197
3198 return (FALSE);
3199}
3200
3201
3202#if 0
3203
3204The POLYTEXT structure describes how the PolyTextOut function should draw a string of text.
3205
3206Members
3207
3208x
3209
3210Specifies the horizontal reference point for the string. The string is aligned to this point using the current text-alignment mode.
3211
3212y
3213
3214Specifies the vertical reference point for the string. The string is aligned to this point using the current text-alignment mode.
3215
3216n
3217
3218Specifies the number of characters in the string.
3219
3220uiFlags
3221
3222Specifies 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:
3223
3224Value Meaning
3225ETO_OPAQUE The rectangles given for each string is to be opaqued with the current background color.
3226ETO_CLIPPED Each string is to be clipped to its given rectangle.
3227lpstr
3228
3229Points to a string of text to be drawn by the PolyTextOut function.
3230
3231rcl
3232
3233Specifies 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.
3234
3235pdx
3236
3237Specifies in an array the width value for each character in the string.
3238
3239See Also
3240
3241PolyTextOut
3242#endif
3243
3244
3245/*****************************************************************************
3246 * Name : BOOL PolyTextOutW
3247 * Purpose : The PolyTextOutW function draws several strings using the font
3248 * and text colors currently selected in the specified device context.
3249 * Parameters: HDC hdc handle of device context
3250 * CONST POLYTEXT *pptxt address of array of structures that identify strings
3251 * int cStrings number of structures in array
3252 * Variables :
3253 * Result : TRUE / FALSE
3254 * Remark :
3255 * Status : UNTESTED STUB
3256 *
3257 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3258 *****************************************************************************/
3259
3260BOOL WIN32API PolyTextOutW(HDC hdc,
3261 POLYTEXTW *pptxt,
3262 int cStrings)
3263{
3264 dprintf(("GDI32: PolyTextOutW(%08xh, %08xh, %08xh) not implemented.\n",
3265 hdc,
3266 pptxt,
3267 cStrings));
3268
3269 return (FALSE);
3270}
3271
3272
3273/*****************************************************************************
3274 * Name : BOOL SetDeviceGammaRamp
3275 * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
3276 * color display boards.
3277 * Parameters: HDC hdc handle of device context
3278 * LPVOID lpRamp
3279 * Variables :
3280 * Result : TRUE / FALSE
3281 * Remark :
3282 * Status : UNTESTED STUB
3283 *
3284 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3285 *****************************************************************************/
3286
3287BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
3288 LPVOID lpRamp)
3289{
3290 dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
3291 hdc,
3292 lpRamp));
3293
3294 return (FALSE);
3295}
3296
3297
3298/*****************************************************************************
3299 * Name : BOOL SetICMProfileA
3300 * Purpose : The SetICMProfileA function sets the color profile for the
3301 * specified device context.
3302 * Parameters: HDC hdc handle of device context
3303 * LPTSTR lpFileName
3304 * Variables :
3305 * Result : TRUE / FALSE
3306 * Remark :
3307 * Status : UNTESTED STUB
3308 *
3309 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3310 *****************************************************************************/
3311
3312BOOL WIN32API SetICMProfileA(HDC hdc,
3313 LPTSTR lpFileName)
3314{
3315 dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
3316 hdc,
3317 lpFileName));
3318
3319 return (FALSE);
3320}
3321
3322
3323/*****************************************************************************
3324 * Name : BOOL SetICMProfileW
3325 * Purpose : The SetICMProfileW function sets the color profile for the
3326 * specified device context.
3327 * Parameters: HDC hdc handle of device context
3328 * LPTSTR lpFileName
3329 * Variables :
3330 * Result : TRUE / FALSE
3331 * Remark :
3332 * Status : UNTESTED STUB
3333 *
3334 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3335 *****************************************************************************/
3336
3337BOOL WIN32API SetICMProfileW(HDC hdc,
3338 LPWSTR lpFileName)
3339{
3340 dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
3341 hdc,
3342 lpFileName));
3343
3344 return (FALSE);
3345}
3346
3347
3348/*****************************************************************************
3349 * Name : int SetMetaRgn
3350 * Purpose : The SetMetaRgn function intersects the current clipping region
3351 * for the specified device context with the current metaregion
3352 * and saves the combined region as the new metaregion for the
3353 * specified device context. The clipping region is reset to a null region.
3354 * Parameters: HDC hdc handle of device context
3355 * Variables :
3356 * Result : TRUE / FALSE
3357 * Remark :
3358 * Status : UNTESTED STUB
3359 *
3360 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3361 *****************************************************************************/
3362
3363BOOL WIN32API SetMetaRgn(HDC hdc)
3364{
3365 dprintf(("GDI32: SetMetaRgn(%08xh) not implemented.\n",
3366 hdc));
3367
3368 return (NULLREGION);
3369}
3370
3371
3372/*****************************************************************************
3373 * Name : BOOL UpdateICMRegKeyA
3374 * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
3375 * registry entries that identify ICC color profiles or color-matching
3376 * DLLs. The function carries out the action specified by the nCommand
3377 * parameter.
3378 * Parameters: DWORD dwReserved
3379 * DWORD CMID
3380 * LPTSTR lpszFileName
3381 * UINT nCommand
3382 * Variables :
3383 * Result : TRUE / FALSE
3384 * Remark :
3385 * Status : UNTESTED STUB
3386 *
3387 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3388 *****************************************************************************/
3389
3390BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
3391 DWORD CMID,
3392 LPTSTR lpszFileName,
3393 UINT nCommand)
3394{
3395 dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
3396 dwReserved,
3397 CMID,
3398 lpszFileName,
3399 nCommand));
3400
3401 return (FALSE);
3402}
3403
3404
3405/*****************************************************************************
3406 * Name : BOOL UpdateICMRegKeyW
3407 * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
3408 * registry entries that identify ICC color profiles or color-matching
3409 * DLLs. The function carries out the action specified by the nCommand
3410 * parameter.
3411 * Parameters: DWORD dwReserved
3412 * DWORD CMID
3413 * LPWSTR lpszFileName
3414 * UINT nCommand
3415 * Variables :
3416 * Result : TRUE / FALSE
3417 * Remark :
3418 * Status : UNTESTED STUB
3419 *
3420 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3421 *****************************************************************************/
3422
3423BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
3424 DWORD CMID,
3425 LPWSTR lpszFileName,
3426 UINT nCommand)
3427{
3428 dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
3429 dwReserved,
3430 CMID,
3431 lpszFileName,
3432 nCommand));
3433
3434 return (FALSE);
3435}
3436
3437
3438
Note: See TracBrowser for help on using the repository browser.