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

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

EB's EnumFontFamiliesA/W implementation

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