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

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

moved line API's to line.cpp, first work on InternalTextOut

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