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

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

Fixed GetObject for dib sections

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