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

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

EB's GetTextFaceW fix

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