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

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

CB's Pie bugfix

File size: 138.9 KB
Line 
1/* $Id: gdi32.cpp,v 1.9 1999-10-11 15:26:35 sandervl 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 hdc, int nLeftRect, int nTopRect, int nRightRect,
1658 int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
1659 int nYRadial2)
1660{
1661 dprintf(("GDI32: OS2Pie"));
1662 //CB: bug in O32_Pie
1663 if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
1664 return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
1665 else
1666 return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
1667}
1668//******************************************************************************
1669//******************************************************************************
1670BOOL WIN32API PlayEnhMetaFile( HDC arg1, HENHMETAFILE arg2, const RECT * arg3)
1671{
1672 dprintf(("GDI32: OS2PlayEnhMetaFile"));
1673 return O32_PlayEnhMetaFile(arg1, arg2, arg3);
1674}
1675//******************************************************************************
1676//******************************************************************************
1677BOOL WIN32API PlayMetaFile( HDC arg1, HMETAFILE arg2)
1678{
1679 dprintf(("GDI32: OS2PlayMetaFile"));
1680 return O32_PlayMetaFile(arg1, arg2);
1681}
1682//******************************************************************************
1683//******************************************************************************
1684BOOL WIN32API PlayMetaFileRecord( HDC arg1, LPHANDLETABLE arg2, LPMETARECORD arg3, UINT arg4)
1685{
1686 dprintf(("GDI32: OS2PlayMetaFileRecord"));
1687 return O32_PlayMetaFileRecord(arg1, arg2, arg3, (int)arg4);
1688}
1689//******************************************************************************
1690//******************************************************************************
1691BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
1692{
1693 dprintf(("GDI32: OS2PolyBezier"));
1694 return O32_PolyBezier(arg1, arg2, (int)arg3);
1695}
1696//******************************************************************************
1697//******************************************************************************
1698BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
1699{
1700 dprintf(("GDI32: OS2PolyBezierTo"));
1701 return O32_PolyBezierTo(arg1, arg2, arg3);
1702}
1703//******************************************************************************
1704//******************************************************************************
1705BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
1706{
1707 dprintf(("GDI32: OS2PolyDraw"));
1708 return O32_PolyDraw(arg1, arg2, arg3, arg4);
1709}
1710//******************************************************************************
1711//******************************************************************************
1712BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
1713{
1714 dprintf(("GDI32: OS2PolyPolygon"));
1715 return O32_PolyPolygon(arg1, arg2, arg3, arg4);
1716}
1717//******************************************************************************
1718//******************************************************************************
1719BOOL WIN32API PolyPolyline( HDC arg1, const POINT * arg2, const DWORD * arg3, DWORD arg4)
1720{
1721 dprintf(("GDI32: OS2PolyPolyline"));
1722 return O32_PolyPolyline(arg1, arg2, arg3, arg4);
1723}
1724//******************************************************************************
1725//******************************************************************************
1726BOOL WIN32API Polygon( HDC arg1, const POINT * arg2, int arg3)
1727{
1728 dprintf(("GDI32: OS2Polygon"));
1729 return O32_Polygon(arg1, arg2, arg3);
1730}
1731//******************************************************************************
1732//******************************************************************************
1733BOOL WIN32API Polyline( HDC arg1, const POINT * arg2, int arg3)
1734{
1735 dprintf(("GDI32: OS2Polyline"));
1736 return O32_Polyline(arg1, arg2, arg3);
1737}
1738//******************************************************************************
1739//******************************************************************************
1740BOOL WIN32API PolylineTo( HDC arg1, const POINT * arg2, DWORD arg3)
1741{
1742 dprintf(("GDI32: OS2PolylineTo"));
1743 return O32_PolylineTo(arg1, arg2, arg3);
1744}
1745//******************************************************************************
1746//******************************************************************************
1747BOOL WIN32API PtInRegion( HRGN arg1, int arg2, int arg3)
1748{
1749 dprintf(("GDI32: OS2PtInRegion"));
1750 return O32_PtInRegion(arg1, arg2, arg3);
1751}
1752//******************************************************************************
1753//******************************************************************************
1754BOOL WIN32API PtVisible( HDC arg1, int arg2, int arg3)
1755{
1756 dprintf(("GDI32: OS2PtVisible"));
1757 return O32_PtVisible(arg1, arg2, arg3);
1758}
1759//******************************************************************************
1760//******************************************************************************
1761BOOL WIN32API RectInRegion( HRGN arg1, const RECT * arg2)
1762{
1763 dprintf(("GDI32: OS2RectInRegion"));
1764 return O32_RectInRegion(arg1, arg2);
1765}
1766//******************************************************************************
1767//******************************************************************************
1768BOOL WIN32API RectVisible( HDC arg1, const RECT * arg2)
1769{
1770 dprintf(("GDI32: OS2RectVisible\n"));
1771 return O32_RectVisible(arg1, arg2);
1772}
1773//******************************************************************************
1774//******************************************************************************
1775BOOL WIN32API RemoveFontResourceA( LPCSTR arg1)
1776{
1777 dprintf(("GDI32: OS2RemoveFontResourceA %s\n", arg1));
1778 return O32_RemoveFontResource(arg1);
1779}
1780//******************************************************************************
1781//******************************************************************************
1782BOOL WIN32API RemoveFontResourceW(LPCWSTR arg1)
1783{
1784 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
1785 BOOL rc;
1786
1787 dprintf(("GDI32: OS2RemoveFontResourceW\n"));
1788 rc = O32_RemoveFontResource(astring);
1789 FreeAsciiString(astring);
1790 return(rc);
1791}
1792//******************************************************************************
1793//******************************************************************************
1794HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
1795{
1796 dprintf(("GDI32: OS2ResetDCA\n"));
1797 return (HDC)O32_ResetDC(arg1, arg2);
1798}
1799//******************************************************************************
1800//******************************************************************************
1801HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
1802{
1803 dprintf(("GDI32: OS2ResetDCW\n"));
1804 // NOTE: This will not work as is (needs UNICODE support)
1805 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
1806}
1807//******************************************************************************
1808//******************************************************************************
1809BOOL WIN32API ResizePalette( HPALETTE arg1, UINT arg2)
1810{
1811 dprintf(("GDI32: OS2ResizePalette\n"));
1812 return O32_ResizePalette(arg1, arg2);
1813}
1814//******************************************************************************
1815//******************************************************************************
1816BOOL WIN32API RestoreDC( HDC arg1, int arg2)
1817{
1818 dprintf(("GDI32: OS2RestoreDC\n"));
1819 return O32_RestoreDC(arg1, arg2);
1820}
1821//******************************************************************************
1822//******************************************************************************
1823BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
1824{
1825 dprintf(("GDI32: OS2RoundRect"));
1826 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1827}
1828//******************************************************************************
1829//******************************************************************************
1830int WIN32API SaveDC( HDC arg1)
1831{
1832 dprintf(("GDI32: OS2SaveDC"));
1833 return O32_SaveDC(arg1);
1834}
1835//******************************************************************************
1836//******************************************************************************
1837BOOL WIN32API ScaleViewportExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1838{
1839 dprintf(("GDI32: OS2ScaleViewportExtEx"));
1840 return O32_ScaleViewportExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1841}
1842//******************************************************************************
1843//******************************************************************************
1844BOOL WIN32API ScaleWindowExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1845{
1846 dprintf(("GDI32: OS2ScaleWindowExtEx"));
1847 return O32_ScaleWindowExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1848}
1849//******************************************************************************
1850//******************************************************************************
1851int WIN32API SelectClipRgn( HDC arg1, HRGN arg2)
1852{
1853 dprintf(("GDI32: OS2SelectClipRgn"));
1854 return O32_SelectClipRgn(arg1, arg2);
1855}
1856//******************************************************************************
1857//******************************************************************************
1858int WIN32API SetArcDirection( HDC arg1, int arg2)
1859{
1860 dprintf(("GDI32: OS2SetArcDirection"));
1861 return O32_SetArcDirection(arg1, arg2);
1862}
1863//******************************************************************************
1864//******************************************************************************
1865LONG WIN32API SetBitmapBits( HBITMAP arg1, LONG arg2, const VOID * arg3)
1866{
1867 dprintf(("GDI32: OS2SetBitmapBits"));
1868 return O32_SetBitmapBits(arg1, (DWORD)arg2, arg3);
1869}
1870//******************************************************************************
1871//******************************************************************************
1872BOOL WIN32API SetBitmapDimensionEx( HBITMAP arg1, int arg2, int arg3, PSIZE arg4)
1873{
1874 dprintf(("GDI32: OS2SetBitmapDimensionEx"));
1875 return O32_SetBitmapDimensionEx(arg1, arg2, arg3, arg4);
1876}
1877//******************************************************************************
1878//******************************************************************************
1879UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
1880{
1881 dprintf(("GDI32: OS2SetBoundsRect"));
1882 return O32_SetBoundsRect(arg1, arg2, arg3);
1883}
1884//******************************************************************************
1885//******************************************************************************
1886BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1887{
1888 BOOL rc;
1889
1890 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
1891 dprintf(("GDI32: OS2SetBrushOrgEx returned %d\n", rc));
1892 return(rc);
1893}
1894//******************************************************************************
1895//******************************************************************************
1896int WIN32API SetDIBits( HDC arg1, HBITMAP arg2, UINT arg3, UINT arg4, const VOID * arg5, const BITMAPINFO * arg6, UINT arg7)
1897{
1898 dprintf(("GDI32: OS2SetDIBits\n"));
1899 return O32_SetDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1900}
1901//******************************************************************************
1902//******************************************************************************
1903INT 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)
1904{
1905 INT result, imgsize, palsize;
1906 char *ptr;
1907
1908 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",
1909 hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (LPVOID) bits, (PBITMAPINFO)info, coloruse));
1910
1911 // EB: ->>> Crazy. Nobody seen this Open32 bug ?
1912 // Dont't like dirty pointers, but Open32 needs a bit help.
1913 // Only tested with winmine.
1914 palsize = QueryPaletteSize((BITMAPINFOHEADER*)&info->bmiHeader);
1915 imgsize = CalcBitmapSize(info->bmiHeader.biBitCount,
1916 info->bmiHeader.biWidth, info->bmiHeader.biHeight);
1917 ptr = ((char *)info) + palsize + sizeof(BITMAPINFOHEADER);
1918 if(bits >= ptr && bits < ptr + imgsize)
1919 {
1920 bits = (char *)bits - imgsize +
1921 CalcBitmapSize(info->bmiHeader.biBitCount,
1922 info->bmiHeader.biWidth, lines);
1923 }
1924 // EB: <<<-
1925
1926 result = O32_SetDIBitsToDevice(hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (PVOID) bits, (PBITMAPINFO)info, coloruse);
1927 return result;
1928}
1929//******************************************************************************
1930//******************************************************************************
1931HENHMETAFILE WIN32API SetEnhMetaFileBits( UINT arg1, const BYTE * arg2)
1932{
1933 dprintf(("GDI32: OS2SetEnhMetaFileBits"));
1934 return O32_SetEnhMetaFileBits(arg1, arg2);
1935}
1936//******************************************************************************
1937//******************************************************************************
1938int WIN32API SetGraphicsMode(HDC arg1, int arg2)
1939{
1940 dprintf(("GDI32: OS2SetGraphicsMode"));
1941 return O32_SetGraphicsMode(arg1, arg2);
1942}
1943//******************************************************************************
1944//******************************************************************************
1945int WIN32API SetMapMode( HDC arg1, int arg2)
1946{
1947 dprintf(("GDI32: OS2SetMapMode"));
1948 return O32_SetMapMode(arg1, arg2);
1949}
1950//******************************************************************************
1951//******************************************************************************
1952DWORD WIN32API SetMapperFlags( HDC arg1, DWORD arg2)
1953{
1954 dprintf(("GDI32: OS2SetMapperFlags"));
1955 return O32_SetMapperFlags(arg1, arg2);
1956}
1957//******************************************************************************
1958//******************************************************************************
1959HMETAFILE WIN32API SetMetaFileBitsEx( UINT arg1, const BYTE * arg2)
1960{
1961 dprintf(("GDI32: OS2SetMetaFileBitsEx"));
1962 return O32_SetMetaFileBitsEx(arg1, (PBYTE)arg2);
1963}
1964//******************************************************************************
1965//******************************************************************************
1966BOOL WIN32API SetMiterLimit( HDC arg1, float arg2, float * arg3)
1967{
1968 dprintf(("GDI32: OS2SetMiterLimit"));
1969 return O32_SetMiterLimit(arg1, arg2, arg3);
1970}
1971//******************************************************************************
1972//******************************************************************************
1973UINT WIN32API SetPaletteEntries( HPALETTE arg1, UINT arg2, UINT arg3, PALETTEENTRY * arg4)
1974{
1975 dprintf(("GDI32: OS2SetPaletteEntries"));
1976 return O32_SetPaletteEntries(arg1, arg2, arg3, (const PALETTEENTRY *)arg4);
1977}
1978//******************************************************************************
1979//******************************************************************************
1980int WIN32API SetPolyFillMode( HDC arg1, int arg2)
1981{
1982 dprintf(("GDI32: OS2SetPolyFillMode"));
1983 return O32_SetPolyFillMode(arg1, arg2);
1984}
1985//******************************************************************************
1986//******************************************************************************
1987BOOL WIN32API SetRectRgn( HRGN arg1, int arg2, int arg3, int arg4, int arg5)
1988{
1989 dprintf(("GDI32: OS2SetRectRgn"));
1990 return O32_SetRectRgn(arg1, arg2, arg3, arg4, arg5);
1991}
1992//******************************************************************************
1993//******************************************************************************
1994UINT WIN32API SetTextAlign( HDC arg1, UINT arg2)
1995{
1996 dprintf(("GDI32: OS2SetTextAlign"));
1997 return O32_SetTextAlign(arg1, arg2);
1998}
1999//******************************************************************************
2000//******************************************************************************
2001int WIN32API SetTextCharacterExtra( HDC arg1, int arg2)
2002{
2003 dprintf(("GDI32: OS2SetTextCharacterExtra"));
2004 return O32_SetTextCharacterExtra(arg1, arg2);
2005}
2006//******************************************************************************
2007//******************************************************************************
2008BOOL WIN32API SetTextJustification( HDC arg1, int arg2, int arg3)
2009{
2010 dprintf(("GDI32: OS2SetTextJustification"));
2011 return O32_SetTextJustification(arg1, arg2, arg3);
2012}
2013//******************************************************************************
2014//******************************************************************************
2015BOOL WIN32API SetViewportExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
2016{
2017 dprintf(("GDI32: OS2SetViewportExtEx"));
2018 return O32_SetViewportExtEx(arg1, arg2, arg3, arg4);
2019}
2020//******************************************************************************
2021//******************************************************************************
2022BOOL WIN32API SetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
2023{
2024 dprintf(("GDI32: OS2SetViewportOrgEx"));
2025 return O32_SetViewportOrgEx(arg1, arg2, arg3, arg4);
2026}
2027//******************************************************************************
2028//******************************************************************************
2029HENHMETAFILE WIN32API SetWinMetaFileBits( UINT arg1, const BYTE * arg2, HDC arg3, const METAFILEPICT * arg4)
2030{
2031 dprintf(("GDI32: OS2SetWinMetaFileBits"));
2032 return O32_SetWinMetaFileBits(arg1, arg2, arg3, arg4);
2033}
2034//******************************************************************************
2035//******************************************************************************
2036BOOL WIN32API SetWindowExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
2037{
2038 dprintf(("GDI32: OS2SetWindowExtEx"));
2039 return O32_SetWindowExtEx(arg1, arg2, arg3, arg4);
2040}
2041//******************************************************************************
2042//******************************************************************************
2043BOOL WIN32API SetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
2044{
2045 dprintf(("GDI32: OS2SetWindowOrgEx"));
2046 return O32_SetWindowOrgEx(arg1, arg2, arg3, arg4);
2047}
2048//******************************************************************************
2049//******************************************************************************
2050BOOL WIN32API SetWorldTransform( HDC arg1, const XFORM *arg2)
2051{
2052 dprintf(("GDI32: OS2SetWorldTransform"));
2053 return O32_SetWorldTransform(arg1, (LPXFORM)arg2);
2054}
2055//******************************************************************************
2056//******************************************************************************
2057INT WIN32API StartDocA( HDC arg1, const DOCINFOA *arg2)
2058{
2059 dprintf(("GDI32: OS2StartDocA"));
2060 return O32_StartDoc(arg1, (LPDOCINFOA)arg2);
2061}
2062//******************************************************************************
2063//******************************************************************************
2064INT WIN32API StartDocW( HDC arg1, const DOCINFOW *arg2)
2065{
2066 dprintf(("GDI32: OS2StartDocW STUB"));
2067 // NOTE: This will not work as is (needs UNICODE support)
2068// return O32_StartDoc(arg1, arg2);
2069 return 0;
2070}
2071//******************************************************************************
2072//******************************************************************************
2073int WIN32API StartPage( HDC arg1)
2074{
2075 dprintf(("GDI32: OS2StartPage"));
2076 return O32_StartPage(arg1);
2077}
2078//******************************************************************************
2079//******************************************************************************
2080BOOL WIN32API TextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5)
2081{
2082 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
2083 BOOL rc;
2084
2085 dprintf(("GDI32: OS2TextOutW"));
2086 // NOTE: This will not work as is (needs UNICODE support)
2087 rc = O32_TextOut(arg1, arg2, arg3, astring, arg5);
2088 FreeAsciiString(astring);
2089 return rc;
2090}
2091//******************************************************************************
2092//******************************************************************************
2093BOOL WIN32API UnrealizeObject( HGDIOBJ arg1)
2094{
2095 dprintf(("GDI32: OS2UnrealizeObject"));
2096 return O32_UnrealizeObject(arg1);
2097}
2098//******************************************************************************
2099//******************************************************************************
2100BOOL WIN32API WidenPath( HDC arg1)
2101{
2102 dprintf(("GDI32: OS2WidenPath"));
2103 return O32_WidenPath(arg1);
2104}
2105//******************************************************************************
2106//CreateDisardableBitmap is obsolete and can be replaced by CreateCompatibleBitmap
2107//******************************************************************************
2108HBITMAP WIN32API CreateDiscardableBitmap(HDC hDC, int nWidth, int nHeight)
2109{
2110 dprintf(("GDI32: OS2CreateDisardableBitmap\n"));
2111 return O32_CreateCompatibleBitmap(hDC, nWidth, nHeight);
2112}
2113//******************************************************************************
2114//TODO: Not implemented
2115//******************************************************************************
2116int WIN32API SetAbortProc(HDC hdc, ABORTPROC lpAbortProc)
2117{
2118 dprintf(("GDI32: OS2SetAbortProc - stub (1)w\n"));
2119 return(1);
2120}
2121//******************************************************************************
2122//TODO:
2123//Should return the character set of the font currently selected into the hdc
2124//******************************************************************************
2125UINT WIN32API GetTextCharset(HDC hdc)
2126{
2127 dprintf(("GDI32: OS2GetTextCharset, not complete\n"));
2128 return(ANSI_CHARSET);
2129}
2130//******************************************************************************
2131//Selects the current path as a clipping region for a device context, combining
2132//any existing clipping region by using the specified mode
2133//TODO: Can be emulated with SelectClipRegion??
2134//******************************************************************************
2135BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
2136{
2137 dprintf(("GDI32: OS2SelectClipPath, not implemented!(TRUE)\n"));
2138 return(TRUE);
2139}
2140//******************************************************************************
2141//TODO: Sets the color adjustment values for a device context. (used to adjust
2142// the input color of the src bitmap for calls of StretchBlt & StretchDIBits
2143// functions when HALFTONE mode is set
2144//******************************************************************************
2145BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
2146{
2147 dprintf(("GDI32: OS2SetColorAdjustment, not implemented!(TRUE)\n"));
2148 return(TRUE);
2149}
2150//******************************************************************************
2151//WINE: OBJECTS\DIB.C
2152//******************************************************************************
2153HBITMAP WIN32API CreateDIBSection(HDC hdc, BITMAPINFO *pbmi, UINT iUsage,
2154 VOID **ppvBits, HANDLE hSection, DWORD dwOffset)
2155{
2156 HBITMAP res = 0;
2157 BOOL fFlip = 0;
2158
2159 dprintf(("GDI32: OS2CreateDIBSection, partly implemented!\n"));
2160 if(hSection) {
2161 dprintf(("GDI32: OS2CreateDIBSection, hSection != NULL, not supported!\n"));
2162 return NULL;
2163 }
2164
2165 //SvL: 13-9-98: StarCraft uses bitmap with negative height
2166 if(pbmi->bmiHeader.biWidth < 0) {
2167 pbmi->bmiHeader.biWidth = -pbmi->bmiHeader.biWidth;
2168 fFlip = FLIP_HOR;
2169 }
2170 if(pbmi->bmiHeader.biHeight < 0) {
2171 pbmi->bmiHeader.biHeight = -pbmi->bmiHeader.biHeight;
2172 fFlip |= FLIP_VERT;
2173 }
2174
2175 res = O32_CreateDIBitmap(hdc, &pbmi->bmiHeader, 0, NULL, pbmi, 0);
2176 if (res)
2177 {
2178 DIBSection *dsect = new DIBSection((WINBITMAPINFOHEADER *)&pbmi->bmiHeader, (DWORD)res, fFlip);
2179 *ppvBits = dsect->GetDIBObject();
2180 return(res);
2181 }
2182
2183 /* Error. */
2184 if (res) DeleteObject(res);
2185 *ppvBits = NULL;
2186#ifdef DEBUG
2187 dprintf(("GDI32: CreateDIBSection, error!\n"));
2188 dprintf(("pbmi->biWidth %d", pbmi->bmiHeader.biWidth));
2189 dprintf(("pbmi->biHeight %d", pbmi->bmiHeader.biHeight));
2190 dprintf(("pbmi->biBitCount %d", pbmi->bmiHeader.biBitCount));
2191#endif
2192
2193 return 0;
2194}
2195//******************************************************************************
2196//******************************************************************************
2197UINT WIN32API GetDIBColorTable(HDC hdc, UINT uStartIndex, UINT cEntries,
2198 RGBQUAD *pColors)
2199{
2200 HPALETTE hpal = O32_GetCurrentObject(hdc, OBJ_PAL);
2201 UINT rc;
2202 int i;
2203
2204 dprintf(("GDI32: OS2GetDIBColorTable, not implemented?\n"));
2205 rc = O32_GetPaletteEntries(hpal,
2206 uStartIndex,
2207 cEntries,
2208 (PALETTEENTRY *)pColors);
2209 for(i=0;
2210 i<cEntries;
2211 i++)
2212 {
2213 pColors[i].rgbReserved = 0;
2214 }
2215 dprintf(("GDI32: GetDIBColor returns %d\n", rc));
2216 return(rc);
2217}
2218//******************************************************************************
2219//******************************************************************************
2220UINT WIN32API SetDIBColorTable(HDC hdc, UINT uStartIndex, UINT cEntries,
2221 RGBQUAD *pColors)
2222{
2223 DIBSection *dsect = DIBSection::findHDC(hdc);
2224
2225 dprintf(("GDI32: OS2SetDIBColorTable\n"));
2226 if(dsect) {
2227 return(dsect->SetDIBColorTable(uStartIndex, cEntries, pColors));
2228 }
2229 else return(0);
2230}
2231//******************************************************************************
2232//******************************************************************************
2233INT WIN32API EnumFontFamiliesExA( HDC arg1, LPLOGFONTA arg2, FONTENUMPROCEXA arg3, LPARAM arg4, DWORD dwFlags)
2234{
2235 dprintf(("GDI32: OS2EnumFontFamiliesExA, not implemented\n"));
2236 return 0;
2237}
2238//******************************************************************************
2239//******************************************************************************
2240INT WIN32API EnumFontFamiliesExW( HDC arg1, LPLOGFONTW arg2, FONTENUMPROCEXW arg3, LPARAM arg4, DWORD dwFlags)
2241{
2242 dprintf(("GDI32: OS2EnumFontFamiliesW, not implemented\n"));
2243 // NOTE: This will not work as is (needs UNICODE support)
2244 return 0;
2245}
2246//******************************************************************************
2247//******************************************************************************
2248HPALETTE WIN32API CreateHalftonePalette(HDC hdc)
2249{
2250 dprintf(("GDI32: OS2CreateHalftonePalette, not implemented\n"));
2251 return(NULL);
2252}
2253//******************************************************************************
2254//******************************************************************************
2255UINT WIN32API TranslateCharsetInfo(DWORD *lpSrc, LPCHARSETINFO lpCs, DWORD dwFlags)
2256{
2257 dprintf(("GDI32: OS2TranslateCharsetInfo, not implemented\n"));
2258 return(0);
2259}
2260//******************************************************************************
2261//Maps colors to system palette; faster way to update window (instead of redrawing)
2262//We just redraw
2263//******************************************************************************
2264BOOL WIN32API UpdateColors(HDC hdc)
2265{
2266 dprintf(("GDI32: OS2UpdateColors\n"));
2267 return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);
2268}
2269//******************************************************************************
2270//******************************************************************************
2271BOOL WIN32API GdiFlush()
2272{
2273 dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
2274 return(TRUE);
2275}
2276//******************************************************************************
2277//******************************************************************************
2278BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
2279{
2280 dprintf(("GDI32: GdiComment, not implemented (TRUE)\n"));
2281 return(TRUE);
2282}
2283//******************************************************************************
2284//******************************************************************************
2285BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
2286{
2287 dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
2288 return(FALSE);
2289}
2290//******************************************************************************
2291//******************************************************************************
2292BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
2293{
2294 dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
2295 return(FALSE);
2296}
2297//******************************************************************************
2298//******************************************************************************
2299BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
2300{
2301 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
2302 return(FALSE);
2303}
2304//******************************************************************************
2305//******************************************************************************
2306BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
2307 UINT iFirstChar,
2308 UINT iLastChar,
2309 LPABCFLOAT pxBUffer)
2310{
2311 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
2312 return(FALSE);
2313}
2314//******************************************************************************
2315//******************************************************************************
2316INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
2317 INT cbOutput, LPSTR lpszOutData)
2318{
2319 dprintf(("GDI32: ExtEscape, not implemented\n"));
2320 return(0);
2321}
2322//******************************************************************************
2323//******************************************************************************
2324int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
2325{
2326 dprintf(("GDI32: DrawEscape, not implemented\n"));
2327 return(0);
2328}
2329//******************************************************************************
2330//******************************************************************************
2331BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
2332{
2333 dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
2334 return(FALSE);
2335}
2336//******************************************************************************
2337//******************************************************************************
2338BOOL WIN32API PlgBlt(HDC hdcDest, CONST POINT *lpPoint, HDC hdcSrc, int nXSrc,
2339 int nYSrc, int nWidth, int nHeight, HBITMAP hbmMask,
2340 int xMast, int yMask)
2341{
2342 dprintf(("GDI32: PlgBlt, not implemented\n"));
2343 return(FALSE);
2344}
2345//******************************************************************************
2346//******************************************************************************
2347DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
2348 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
2349{
2350 dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
2351 return(GDI_ERROR);
2352}
2353//******************************************************************************
2354
2355//******************************************************************************
2356/*KSO Thu 21.05.1998*/
2357DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
2358 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
2359{
2360 dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
2361 return(GDI_ERROR);
2362}
2363//******************************************************************************
2364
2365//******************************************************************************
2366DWORD WIN32API GetFontData(HDC hdc, DWORD dwTable, DWORD dwOffset, LPVOID lpvBuffer,
2367 DWORD dbData)
2368{
2369 dprintf(("GDI32: GetFontData, not implemented (GDI_ERROR)\n"));
2370 return(GDI_ERROR);
2371}
2372//******************************************************************************
2373//******************************************************************************
2374int WIN32API DescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR)
2375{
2376 dprintf(("GDI32: GetFontData, not implemented (GDI_ERROR)\n"));
2377 return(GDI_ERROR);
2378}
2379//******************************************************************************
2380//******************************************************************************
2381UINT WIN32API SetSystemPaletteUse(HDC hdc, UINT flags)
2382{
2383 dprintf(("GDI32: SetSystemPaletteUse %X %X, not implemented (GDI_ERROR)\n", hdc, flags));
2384 return(GDI_ERROR);
2385}
2386//******************************************************************************
2387//******************************************************************************
2388BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
2389{
2390 // Here is a guess for a undocumented entry
2391 dprintf(("GDI32: SetObjectOwner - stub (TRUE)\n"));
2392 return TRUE;
2393}
2394//******************************************************************************
2395
2396
2397/* Office 97 stubs - KSO Thu 21.05.1998*/
2398//******************************************************************************
2399BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
2400 HDC hdc,
2401 LPCSTR str,
2402 int count,
2403 int maxExt,
2404 LPINT lpnFit,
2405 LPINT alpDx,
2406 LPSIZE size)
2407{
2408 int index, nFit, extent;
2409 SIZE tSize;
2410
2411 dprintf(("GDI32: GetTextExtendExPointA\n"));
2412
2413 size->cx = size->cy = nFit = extent = 0;
2414 for(index = 0; index < count; index++)
2415 {
2416 if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
2417 if( extent+tSize.cx < maxExt )
2418 {
2419 extent+=tSize.cx;
2420 nFit++;
2421 str++;
2422 if( alpDx )
2423 alpDx[index] = extent;
2424 if( tSize.cy > size->cy ) size->cy = tSize.cy;
2425 }
2426 else break;
2427 }
2428 size->cx = extent;
2429
2430 if (lpnFit != NULL) // check if result is desired
2431 *lpnFit = nFit;
2432
2433 dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
2434 hdc,count,str,maxExt,nFit, size->cx,size->cy));
2435 return TRUE;
2436}
2437//******************************************************************************
2438//******************************************************************************
2439BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
2440 HDC arg1,
2441 LPCWSTR arg2,
2442 int arg3,
2443 int arg4,
2444 LPINT arg5,
2445 LPINT arg6,
2446 LPSIZE arg7
2447 )
2448{
2449 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2450 BOOL rc;
2451
2452 dprintf(("GDI32: GetTextExtendExPointW\n"));
2453 rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
2454 FreeAsciiString(astring);
2455 return rc;
2456}
2457//******************************************************************************
2458//******************************************************************************
2459UINT WIN32API GetTextCharsetInfo( /*KSO Thu 21.05.1998*/
2460 HDC hdc,
2461 LPFONTSIGNATURE lpSig,
2462 DWORD dwFlags
2463 )
2464{
2465 dprintf(("GDI32: GetTextCharsetInfo - stub\n"));
2466 return FALSE;
2467}
2468//******************************************************************************
2469//******************************************************************************
2470UINT WIN32API GetSystemPaletteUse( /*KSO Thu 21.05.1998*/
2471 HDC hdc
2472 )
2473{
2474 dprintf(("GDI32: GetSystemPaletteUse - stub\n"));
2475 return FALSE; /*?*/
2476}
2477//******************************************************************************
2478//******************************************************************************
2479BOOL WIN32API PlayEnhMetaFileRecord( /*KSO Thu 21.05.1998*/
2480 HDC arg1,
2481 LPHANDLETABLE arg2,
2482 CONST ENHMETARECORD *arg3,
2483 UINT arg4
2484 )
2485{
2486 dprintf(("GDI32: PlayEnhMetaFileRecord - stub\n"));
2487 return FALSE;
2488}
2489//******************************************************************************
2490UINT WIN32API GetEnhMetaFileDescriptionA( /*KSO Thu 21.05.1998*/
2491 HENHMETAFILE arg1,
2492 UINT arg2,
2493 LPSTR arg3
2494 )
2495{
2496 dprintf(("GDI32: GetEnhMetaFileDescriptionA - stub\n"));
2497 return FALSE;
2498}
2499//******************************************************************************
2500//******************************************************************************
2501UINT WIN32API GetEnhMetaFileDescriptionW( /*KSO Thu 21.05.1998*/
2502 HENHMETAFILE arg1,
2503 UINT arg2,
2504 LPWSTR arg3
2505 )
2506{
2507 dprintf(("GDI32: GetEnhMetaFileDescriptionW - stub\n"));
2508 return FALSE;
2509}
2510//******************************************************************************
2511//******************************************************************************
2512UINT WIN32API DeleteColorSpace( /*KSO Thu 21.05.1998*/
2513 HCOLORSPACE hColorSpace
2514 )
2515{
2516 dprintf(("GDI32: DeleteColorSpace - stub\n"));
2517 return FALSE;
2518}
2519//******************************************************************************
2520//******************************************************************************
2521BOOL WIN32API SetColorSpace( /*KSO Thu 21.05.1998*/
2522 HDC hdc,
2523 HCOLORSPACE hColorSpace
2524 )
2525{
2526 dprintf(("GDI32: SetColorSpace - stub\n"));
2527 return FALSE;
2528}
2529//******************************************************************************
2530//******************************************************************************
2531 HCOLORSPACE WIN32API CreateColorSpaceA( /*KSO Thu 21.05.1998*/
2532 LPLOGCOLORSPACEA lpLogColorSpace
2533 )
2534{
2535 dprintf(("GDI32: CreateColorSpaceA - stub\n"));
2536 return 0;
2537}
2538//******************************************************************************
2539//******************************************************************************
2540HCOLORSPACE WIN32API CreateColorSpaceW( /*KSO Thu 21.05.1998*/
2541 LPLOGCOLORSPACEW lpwLogColorSpace
2542 )
2543{
2544 dprintf(("GDI32: CreateColorSpaceW - stub\n"));
2545 return 0;
2546}
2547//******************************************************************************
2548//******************************************************************************
2549HANDLE WIN32API GetColorSpace( /*KSO Thu 21.05.1998*/
2550 HDC hdc
2551 )
2552{
2553 dprintf(("GDI32: GetColorSpace - stub\n"));
2554 return 0;
2555}
2556//******************************************************************************
2557//******************************************************************************
2558int WIN32API SetICMMode( /*KSO Thu 21.05.1998*/
2559 HDC hdc,
2560 int mode
2561 )
2562{
2563 dprintf(("GDI32: SetICMMode - stub\n"));
2564 return 0;
2565}
2566//******************************************************************************
2567
2568
2569
2570
2571/*****************************************************************************
2572 * Name : BOOL CancelDC
2573 * Purpose : The CancelDC function cancels any pending operation on the
2574 * specified device context (DC).
2575 * Parameters: HDC hdc handle of device context
2576 * Variables :
2577 * Result : TRUE / FALSE
2578 * Remark :
2579 * Status : UNTESTED STUB
2580 *
2581 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2582 *****************************************************************************/
2583
2584BOOL WIN32API CancelDC(HDC hdc)
2585{
2586 dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
2587 hdc));
2588
2589 return (FALSE);
2590}
2591
2592
2593/*****************************************************************************
2594 * Name : BOOL CheckColorsInGamut
2595 * Purpose : The CheckColorsInGamut function indicates whether the specified
2596 * color values are within the gamut of the specified device.
2597 * Parameters: HDC hdc handle of device context
2598 * LPVOID lpaRGBQuad
2599 * LPVOID lpResult
2600 * DWORD dwResult
2601 * Variables :
2602 * Result : TRUE / FALSE
2603 * Remark :
2604 * Status : UNTESTED STUB
2605 *
2606 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2607 *****************************************************************************/
2608
2609BOOL WIN32API CheckColorsInGamut(HDC hdc,
2610 LPVOID lpaRGBQuad,
2611 LPVOID lpResult,
2612 DWORD dwResult)
2613{
2614 dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2615 hdc,
2616 lpaRGBQuad,
2617 lpResult,
2618 dwResult));
2619
2620 return (FALSE);
2621}
2622
2623
2624/*****************************************************************************
2625 * Name : BOOL ColorMatchToTarget
2626 * Purpose : The ColorMatchToTarget function enables or disables preview for
2627 * the specified device context. When preview is enabled, colors
2628 * in subsequent output to the specified device context are
2629 * displayed as they would appear on the target device. This is
2630 * useful for checking how well the target maps the specified
2631 * colors in an image. To enable preview, image color matching
2632 * must be enabled for both the target and the preview device context.
2633 * Parameters: HDC hdc handle of device context
2634 * HDC hdcTarget handle of target device context
2635 * DWORD uiAction
2636 * Variables :
2637 * Result : TRUE / FALSE
2638 * Remark :
2639 * Status : UNTESTED STUB
2640 *
2641 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2642 *****************************************************************************/
2643
2644BOOL WIN32API ColorMatchToTarget(HDC hdc,
2645 HDC hdcTarget,
2646 DWORD uiAction)
2647{
2648 dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
2649 hdc,
2650 hdcTarget,
2651 uiAction));
2652
2653 return (FALSE);
2654}
2655
2656
2657/*****************************************************************************
2658 * Name : BOOL CombineTransform
2659 * Purpose : The CombineTransform function concatenates two world-space to
2660 * page-space transformations.
2661 * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
2662 * XFORM *lLPXFORM1 address of 1st transformation
2663 * XFORM *lLPXFORM2 address of 2nd transformation
2664 * Variables :
2665 * Result : TRUE / FALSE
2666 * Remark :
2667 * Status : UNTESTED STUB
2668 *
2669 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2670 *****************************************************************************/
2671
2672BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
2673 CONST XFORM *lLPXFORM1,
2674 CONST XFORM *lLPXFORM2)
2675{
2676 dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh) not implemented.\n",
2677 lLPXFORMResult,
2678 lLPXFORM1,
2679 lLPXFORM2));
2680
2681 return (FALSE);
2682}
2683
2684
2685
2686/*****************************************************************************
2687 * Name : HBRUSH CreateDIBPatternBrush
2688 * Purpose : The CreateDIBPatternBrush function creates a logical brush that
2689 * has the pattern specified by the specified device-independent
2690 * bitmap (DIB). The brush can subsequently be selected into any
2691 * device context that is associated with a device that supports
2692 * raster operations.
2693 * This function is provided only for compatibility with applications
2694 * written for versions of Windows earlier than 3.0. For Win32-based
2695 * applications, use the CreateDIBPatternBrushPt function.
2696 * Parameters: HGLOBAL hglbDIBPacked handle of device-independent bitmap
2697 * UINT fuColorSpec color table data
2698 * Variables :
2699 * Result : TRUE / FALSE
2700 * Remark :
2701 * Status : UNTESTED STUB
2702 *
2703 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2704 *****************************************************************************/
2705
2706HBRUSH WIN32API CreateDIBPatternBrush(HGLOBAL hglbDIBPacked,
2707 UINT fuColorSpec)
2708{
2709 dprintf(("GDI32: CreateDIBPatternBrush(%08xh, %08xh) not implemented.\n",
2710 hglbDIBPacked,
2711 fuColorSpec));
2712
2713 return (0);
2714}
2715
2716
2717/*****************************************************************************
2718 * Name : BOOL CreateScalableFontResourceA
2719 * Purpose : The CreateScalableFontResourceA function creates a font resource
2720 * file for a scalable font.
2721 * Parameters: DWORD fdwHidden flag for read-only embedded font
2722 * LPCSTR lpszFontRes address of filename for font resource
2723 * LPCSTR lpszFontFile address of filename for scalable font
2724 * LPCSTR lpszCurrentPath address of path to font file
2725 * Variables :
2726 * Result : TRUE / FALSE
2727 * Remark :
2728 * Status : UNTESTED STUB
2729 *
2730 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2731 *****************************************************************************/
2732
2733BOOL WIN32API CreateScalableFontResourceA(DWORD fdwHidden,
2734 LPCSTR lpszFontRes,
2735 LPCSTR lpszFontFile,
2736 LPCSTR lpszCurrentPath)
2737{
2738 dprintf(("GDI32: CreateScalableFontResourceA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2739 fdwHidden,
2740 lpszFontRes,
2741 lpszFontFile,
2742 lpszCurrentPath));
2743
2744 return (FALSE);
2745}
2746
2747
2748/*****************************************************************************
2749 * Name : BOOL CreateScalableFontResourceW
2750 * Purpose : The CreateScalableFontResourceW function creates a font resource
2751 * file for a scalable font.
2752 * Parameters: DWORD fdwHidden flag for read-only embedded font
2753 * LPCSTR lpszFontRes address of filename for font resource
2754 * LPCSTR lpszFontFile address of filename for scalable font
2755 * LPCSTR lpszCurrentPath address of path to font file
2756 * Variables :
2757 * Result : TRUE / FALSE
2758 * Remark :
2759 * Status : UNTESTED STUB
2760 *
2761 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2762 *****************************************************************************/
2763
2764BOOL WIN32API CreateScalableFontResourceW(DWORD fdwHidden,
2765 LPCWSTR lpszFontRes,
2766 LPCWSTR lpszFontFile,
2767 LPCWSTR lpszCurrentPath)
2768{
2769 dprintf(("GDI32: CreateScalableFontResourceW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2770 fdwHidden,
2771 lpszFontRes,
2772 lpszFontFile,
2773 lpszCurrentPath));
2774
2775 return (FALSE);
2776}
2777
2778
2779/*****************************************************************************
2780 * Name : int EnumICMProfilesA
2781 * Purpose : The EnumICMProfilesA function enumerates the different color
2782 * profiles that the system supports for the specified device context.
2783 * Parameters: HDC hdc
2784 * ICMENUMPROC lpICMEnumFunc
2785 * LPARAM lParam
2786 * Variables :
2787 * Result : TRUE / FALSE
2788 * Remark :
2789 * Status : UNTESTED STUB
2790 *
2791 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2792 *****************************************************************************/
2793
2794int WIN32API EnumICMProfilesA(HDC hdc,
2795 ICMENUMPROCA lpICMEnumProc,
2796 LPARAM lParam)
2797{
2798 dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
2799 hdc,
2800 lpICMEnumProc,
2801 lParam));
2802
2803 return (-1);
2804}
2805
2806
2807/*****************************************************************************
2808 * Name : int EnumICMProfilesW
2809 * Purpose : The EnumICMProfilesW function enumerates the different color
2810 * profiles that the system supports for the specified device context.
2811 * Parameters: HDC hdc
2812 * ICMENUMPROC lpICMEnumFunc
2813 * LPARAM lParam
2814 * Variables :
2815 * Result : TRUE / FALSE
2816 * Remark :
2817 * Status : UNTESTED STUB
2818 *
2819 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2820 *****************************************************************************/
2821
2822int WIN32API EnumICMProfilesW(HDC hdc,
2823 ICMENUMPROCW lpICMEnumProc,
2824 LPARAM lParam)
2825{
2826 dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
2827 hdc,
2828 lpICMEnumProc,
2829 lParam));
2830
2831 return (-1);
2832}
2833
2834
2835/*****************************************************************************
2836 * Name : BOOL FixBrushOrgEx
2837 * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
2838 * It is provided for compatibility with Win32s. If called, the
2839 * function does nothing, and returns FALSE.
2840 * Parameters: HDC, int, int, LPPOINT
2841 * Variables :
2842 * Result : TRUE / FALSE
2843 * Remark : not implemented in Win32
2844 * Status : UNTESTED STUB
2845 *
2846 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2847 *****************************************************************************/
2848
2849BOOL WIN32API FixBrushOrgEx(HDC hdc,
2850 int iDummy1,
2851 int iDummy2,
2852 LPPOINT lpPoint)
2853{
2854 dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2855 hdc,
2856 iDummy1,
2857 iDummy2,
2858 lpPoint));
2859
2860 return (FALSE);
2861}
2862
2863
2864/*****************************************************************************
2865 * Name : DWORD GdiGetBatchLimit
2866 * Purpose : The GdiGetBatchLimit function returns the maximum number of
2867 * function calls that can be accumulated in the calling thread's
2868 * current batch. The system flushes the current batch whenever
2869 * this limit is exceeded.
2870 * Parameters:
2871 * Variables :
2872 * Result : 1
2873 * Remark :
2874 * Status : UNTESTED STUB
2875 *
2876 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2877 *****************************************************************************/
2878
2879DWORD WIN32API GdiGetBatchLimit(VOID)
2880{
2881 dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
2882
2883 return (1);
2884}
2885
2886
2887/*****************************************************************************
2888 * Name : DWORD GdiSetBatchLimit
2889 * Purpose : The GdiSetBatchLimit function sets the maximum number of
2890 * functions that can be accumulated in the calling thread's current
2891 * batch. The system flushes the current batch whenever this limit
2892 * is exceeded.
2893 * Parameters: DWORD dwLimit
2894 * Variables :
2895 * Result :
2896 * Remark :
2897 * Status : UNTESTED STUB
2898 *
2899 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2900 *****************************************************************************/
2901
2902DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
2903{
2904 dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
2905 dwLimit));
2906
2907 return (1);
2908}
2909
2910
2911/*****************************************************************************
2912 * Name : DWORD GetCharacterPlacementA
2913 * Purpose : The GetCharacterPlacementA function retrieves information about
2914 * a character string, such as character widths, caret positioning,
2915 * ordering within the string, and glyph rendering. The type of
2916 * information returned depends on the dwFlags parameter and is
2917 * based on the currently selected font in the given display context.
2918 * The function copies the information to the specified GCP_RESULTSA
2919 * structure or to one or more arrays specified by the structure.
2920 * Parameters: HDC hdc handle to device context
2921 * LPCSTR lpString pointer to string
2922 * int nCount number of characters in string
2923 * int nMaxExtent maximum extent for displayed string
2924 * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
2925 * DWORD dwFlags placement flags
2926 * Variables :
2927 * Result :
2928 * Remark :
2929 * Status : UNTESTED STUB
2930 *
2931 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2932 *****************************************************************************/
2933
2934DWORD WIN32API GetCharacterPlacementA(HDC hdc,
2935 LPCSTR lpString,
2936 int nCount,
2937 int nMaxExtent,
2938 GCP_RESULTSA * lpResults,
2939 DWORD dwFlags)
2940{
2941 dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2942 hdc,
2943 lpString,
2944 nCount,
2945 nMaxExtent,
2946 lpResults,
2947 dwFlags));
2948
2949 return (0);
2950}
2951
2952
2953/*****************************************************************************
2954 * Name : DWORD GetCharacterPlacementW
2955 * Purpose : The GetCharacterPlacementW function retrieves information about
2956 * a character string, such as character widths, caret positioning,
2957 * ordering within the string, and glyph rendering. The type of
2958 * information returned depends on the dwFlags parameter and is
2959 * based on the currently selected font in the given display context.
2960 * The function copies the information to the specified GCP_RESULTSW
2961 * structure or to one or more arrays specified by the structure.
2962 * Parameters: HDC hdc handle to device context
2963 * LPCSTR lpString pointer to string
2964 * int nCount number of characters in string
2965 * int nMaxExtent maximum extent for displayed string
2966 * GCP_RESULTSW *lpResults pointer to buffer for placement result
2967 * DWORD dwFlags placement flags
2968 * Variables :
2969 * Result :
2970 * Remark :
2971 * Status : UNTESTED STUB
2972 *
2973 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2974 *****************************************************************************/
2975
2976DWORD WIN32API GetCharacterPlacementW(HDC hdc,
2977 LPCWSTR lpString,
2978 int nCount,
2979 int nMaxExtent,
2980 GCP_RESULTSW *lpResults,
2981 DWORD dwFlags)
2982{
2983 dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2984 hdc,
2985 lpString,
2986 nCount,
2987 nMaxExtent,
2988 lpResults,
2989 dwFlags));
2990
2991 return (0);
2992}
2993
2994
2995/*****************************************************************************
2996 * Name : DWORD GetDeviceGammaRamp
2997 * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
2998 * direct color display boards.
2999 * Parameters: HDC hdc handle to device context
3000 * LPVOID lpRamp Gamma ramp array
3001 * Variables :
3002 * Result :
3003 * Remark :
3004 * Status : UNTESTED STUB
3005 *
3006 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3007 *****************************************************************************/
3008
3009DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
3010 LPVOID lpRamp)
3011{
3012 dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
3013 hdc,
3014 lpRamp));
3015
3016 return (FALSE);
3017}
3018
3019
3020/*****************************************************************************
3021 * Name : DWORD GetFontLanguageInfo
3022 * Purpose : The GetFontLanguageInfo function returns information about the
3023 * currently selected font for the specified display context.
3024 * Applications typically use this information and the
3025 * GetCharacterPlacement function to prepare a character string for display.
3026 * Parameters: HDC hdc handle to device context
3027 * Variables :
3028 * Result :
3029 * Remark :
3030 * Status : UNTESTED STUB
3031 *
3032 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3033 *****************************************************************************/
3034
3035DWORD WIN32API GetFontLanguageInfo(HDC hdc)
3036{
3037 dprintf(("GDI32: GetFontLanguageInfo(%08xh) not implemented.\n",
3038 hdc));
3039
3040 return (0);
3041}
3042
3043
3044/*****************************************************************************
3045 * Name : BOOL GetICMProfileA
3046 * Purpose : The GetICMProfileA function retrieves the name of the color
3047 * profile file for the device associated with the specified device
3048 * context.
3049 * Parameters: HDC hdc handle to device context
3050 * DWORD cbName
3051 * LPTSTR lpszFilename
3052 * Variables :
3053 * Result : TRUE / FALSE
3054 * Remark :
3055 * Status : UNTESTED STUB
3056 *
3057 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3058 *****************************************************************************/
3059
3060BOOL WIN32API GetICMProfileA(HDC hdc,
3061 DWORD cbName,
3062 LPTSTR lpszFilename)
3063{
3064 dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
3065 hdc,
3066 cbName,
3067 lpszFilename));
3068
3069 return (FALSE);
3070}
3071
3072
3073/*****************************************************************************
3074 * Name : BOOL GetICMProfileW
3075 * Purpose : The GetICMProfileW function retrieves the name of the color
3076 * profile file for the device associated with the specified device
3077 * context.
3078 * Parameters: HDC hdc handle to device context
3079 * DWORD cbName
3080 * LPWSTR lpszFilename
3081 * Variables :
3082 * Result : TRUE / FALSE
3083 * Remark :
3084 * Status : UNTESTED STUB
3085 *
3086 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3087 *****************************************************************************/
3088
3089BOOL WIN32API GetICMProfileW(HDC hdc,
3090 DWORD cbName,
3091 LPTSTR lpszFilename)
3092{
3093 dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
3094 hdc,
3095 cbName,
3096 lpszFilename));
3097
3098 return (FALSE);
3099}
3100
3101
3102/*****************************************************************************
3103 * Name : BOOL GetLogColorSpaceA
3104 * Purpose : The GetLogColorSpace function retrieves information about the
3105 * logical color space identified by the specified handle.
3106 * Parameters: HCOLORSPACE hColorSpace
3107 * LPLOGCOLORSPACE lpbuffer
3108 * DWORD nSize
3109 * Variables :
3110 * Result : TRUE / FALSE
3111 * Remark :
3112 * Status : UNTESTED STUB
3113 *
3114 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3115 *****************************************************************************/
3116
3117#define LPLOGCOLORSPACE LPVOID
3118BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
3119 LPLOGCOLORSPACE lpBuffer,
3120 DWORD nSize)
3121{
3122 dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
3123 hColorSpace,
3124 lpBuffer,
3125 nSize));
3126
3127 return (FALSE);
3128}
3129
3130
3131/*****************************************************************************
3132 * Name : BOOL GetLogColorSpaceW
3133 * Purpose : The GetLogColorSpace function retrieves information about the
3134 * logical color space identified by the specified handle.
3135 * Parameters: HCOLORSPACE hColorSpace
3136 * LPLOGCOLORSPACE lpbuffer
3137 * DWORD nSize
3138 * Variables :
3139 * Result : TRUE / FALSE
3140 * Remark :
3141 * Status : UNTESTED STUB
3142 *
3143 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3144 *****************************************************************************/
3145
3146BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
3147 LPLOGCOLORSPACE lpBuffer,
3148 DWORD nSize)
3149{
3150 dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
3151 hColorSpace,
3152 lpBuffer,
3153 nSize));
3154
3155 return (FALSE);
3156}
3157
3158
3159/*****************************************************************************
3160 * Name : int GetMetaRgn
3161 * Purpose : The GetMetaRgn function retrieves the current metaregion for
3162 * the specified device context.
3163 * Parameters: HDC hdc handle of device context
3164 * HRGN hrgn handle of region
3165 * Variables :
3166 * Result : 0 / 1
3167 * Remark :
3168 * Status : UNTESTED STUB
3169 *
3170 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3171 *****************************************************************************/
3172
3173int WIN32API GetMetaRgn(HDC hdc,
3174 HRGN hrgn)
3175{
3176 dprintf(("GDI32: GetMetaRgn(%08xh, %08xh) not implemented.\n",
3177 hdc,
3178 hrgn));
3179
3180 return (0);
3181}
3182
3183
3184/*****************************************************************************
3185 * Name : int GetPixelFormat
3186 * Purpose : The GetPixelFormat function obtains the index of the specified
3187 * device context's currently selected pixel format.
3188 * Parameters: HDC hdc handle of device context
3189 * Variables :
3190 * Result : 0 / 1
3191 * Remark :
3192 * Status : UNTESTED STUB
3193 *
3194 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3195 *****************************************************************************/
3196
3197int WIN32API GetPixelFormat(HDC hdc)
3198{
3199 dprintf(("GDI32: GetPixelFormat(%08xh) not implemented.\n",
3200 hdc));
3201
3202 return (0);
3203}
3204
3205
3206/*****************************************************************************
3207 * Name : BOOL PolyTextOutA
3208 * Purpose : The PolyTextOutA function draws several strings using the font
3209 * and text colors currently selected in the specified device context.
3210 * Parameters: HDC hdc handle of device context
3211 * CONST POLYTEXT *pptxt address of array of structures that identify strings
3212 * int cStrings number of structures in array
3213 * Variables :
3214 * Result : TRUE / FALSE
3215 * Remark :
3216 * Status : UNTESTED STUB
3217 *
3218 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3219 *****************************************************************************/
3220
3221BOOL WIN32API PolyTextOutA(HDC hdc,
3222 POLYTEXTA *pptxt,
3223 int cStrings)
3224{
3225 dprintf(("GDI32: PolyTextOutA(%08xh, %08xh, %08xh) not implemented.\n",
3226 hdc,
3227 pptxt,
3228 cStrings));
3229
3230 return (FALSE);
3231}
3232
3233
3234#if 0
3235
3236The POLYTEXT structure describes how the PolyTextOut function should draw a string of text.
3237
3238Members
3239
3240x
3241
3242Specifies the horizontal reference point for the string. The string is aligned to this point using the current text-alignment mode.
3243
3244y
3245
3246Specifies the vertical reference point for the string. The string is aligned to this point using the current text-alignment mode.
3247
3248n
3249
3250Specifies the number of characters in the string.
3251
3252uiFlags
3253
3254Specifies 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:
3255
3256Value Meaning
3257ETO_OPAQUE The rectangles given for each string is to be opaqued with the current background color.
3258ETO_CLIPPED Each string is to be clipped to its given rectangle.
3259lpstr
3260
3261Points to a string of text to be drawn by the PolyTextOut function.
3262
3263rcl
3264
3265Specifies 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.
3266
3267pdx
3268
3269Specifies in an array the width value for each character in the string.
3270
3271See Also
3272
3273PolyTextOut
3274#endif
3275
3276
3277/*****************************************************************************
3278 * Name : BOOL PolyTextOutW
3279 * Purpose : The PolyTextOutW function draws several strings using the font
3280 * and text colors currently selected in the specified device context.
3281 * Parameters: HDC hdc handle of device context
3282 * CONST POLYTEXT *pptxt address of array of structures that identify strings
3283 * int cStrings number of structures in array
3284 * Variables :
3285 * Result : TRUE / FALSE
3286 * Remark :
3287 * Status : UNTESTED STUB
3288 *
3289 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3290 *****************************************************************************/
3291
3292BOOL WIN32API PolyTextOutW(HDC hdc,
3293 POLYTEXTW *pptxt,
3294 int cStrings)
3295{
3296 dprintf(("GDI32: PolyTextOutW(%08xh, %08xh, %08xh) not implemented.\n",
3297 hdc,
3298 pptxt,
3299 cStrings));
3300
3301 return (FALSE);
3302}
3303
3304
3305/*****************************************************************************
3306 * Name : BOOL SetDeviceGammaRamp
3307 * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
3308 * color display boards.
3309 * Parameters: HDC hdc handle of device context
3310 * LPVOID lpRamp
3311 * Variables :
3312 * Result : TRUE / FALSE
3313 * Remark :
3314 * Status : UNTESTED STUB
3315 *
3316 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3317 *****************************************************************************/
3318
3319BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
3320 LPVOID lpRamp)
3321{
3322 dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
3323 hdc,
3324 lpRamp));
3325
3326 return (FALSE);
3327}
3328
3329
3330/*****************************************************************************
3331 * Name : BOOL SetICMProfileA
3332 * Purpose : The SetICMProfileA function sets the color profile for the
3333 * specified device context.
3334 * Parameters: HDC hdc handle of device context
3335 * LPTSTR lpFileName
3336 * Variables :
3337 * Result : TRUE / FALSE
3338 * Remark :
3339 * Status : UNTESTED STUB
3340 *
3341 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3342 *****************************************************************************/
3343
3344BOOL WIN32API SetICMProfileA(HDC hdc,
3345 LPTSTR lpFileName)
3346{
3347 dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
3348 hdc,
3349 lpFileName));
3350
3351 return (FALSE);
3352}
3353
3354
3355/*****************************************************************************
3356 * Name : BOOL SetICMProfileW
3357 * Purpose : The SetICMProfileW function sets the color profile for the
3358 * specified device context.
3359 * Parameters: HDC hdc handle of device context
3360 * LPTSTR lpFileName
3361 * Variables :
3362 * Result : TRUE / FALSE
3363 * Remark :
3364 * Status : UNTESTED STUB
3365 *
3366 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3367 *****************************************************************************/
3368
3369BOOL WIN32API SetICMProfileW(HDC hdc,
3370 LPWSTR lpFileName)
3371{
3372 dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
3373 hdc,
3374 lpFileName));
3375
3376 return (FALSE);
3377}
3378
3379
3380/*****************************************************************************
3381 * Name : int SetMetaRgn
3382 * Purpose : The SetMetaRgn function intersects the current clipping region
3383 * for the specified device context with the current metaregion
3384 * and saves the combined region as the new metaregion for the
3385 * specified device context. The clipping region is reset to a null region.
3386 * Parameters: HDC hdc handle of device context
3387 * Variables :
3388 * Result : TRUE / FALSE
3389 * Remark :
3390 * Status : UNTESTED STUB
3391 *
3392 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3393 *****************************************************************************/
3394
3395BOOL WIN32API SetMetaRgn(HDC hdc)
3396{
3397 dprintf(("GDI32: SetMetaRgn(%08xh) not implemented.\n",
3398 hdc));
3399
3400 return (NULLREGION);
3401}
3402
3403
3404/*****************************************************************************
3405 * Name : BOOL UpdateICMRegKeyA
3406 * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
3407 * registry entries that identify ICC color profiles or color-matching
3408 * DLLs. The function carries out the action specified by the nCommand
3409 * parameter.
3410 * Parameters: DWORD dwReserved
3411 * DWORD CMID
3412 * LPTSTR lpszFileName
3413 * UINT nCommand
3414 * Variables :
3415 * Result : TRUE / FALSE
3416 * Remark :
3417 * Status : UNTESTED STUB
3418 *
3419 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3420 *****************************************************************************/
3421
3422BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
3423 DWORD CMID,
3424 LPTSTR lpszFileName,
3425 UINT nCommand)
3426{
3427 dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
3428 dwReserved,
3429 CMID,
3430 lpszFileName,
3431 nCommand));
3432
3433 return (FALSE);
3434}
3435
3436
3437/*****************************************************************************
3438 * Name : BOOL UpdateICMRegKeyW
3439 * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
3440 * registry entries that identify ICC color profiles or color-matching
3441 * DLLs. The function carries out the action specified by the nCommand
3442 * parameter.
3443 * Parameters: DWORD dwReserved
3444 * DWORD CMID
3445 * LPWSTR lpszFileName
3446 * UINT nCommand
3447 * Variables :
3448 * Result : TRUE / FALSE
3449 * Remark :
3450 * Status : UNTESTED STUB
3451 *
3452 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
3453 *****************************************************************************/
3454
3455BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
3456 DWORD CMID,
3457 LPWSTR lpszFileName,
3458 UINT nCommand)
3459{
3460 dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
3461 dwReserved,
3462 CMID,
3463 lpszFileName,
3464 nCommand));
3465
3466 return (FALSE);
3467}
3468
3469
Note: See TracBrowser for help on using the repository browser.