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

Last change on this file since 117 was 117, checked in by phaller, 26 years ago

Fix: GDI32:OS2DPtoLP recursed, and I cursed, too :)

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