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

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

hiho

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