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

Last change on this file since 136 was 136, checked in by buerkle, 26 years ago

* empty log message *

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