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

Last change on this file since 3677 was 3677, checked in by sandervl, 25 years ago

moved clip region/rect functions to user32

File size: 87.0 KB
Line 
1/* $Id: gdi32.cpp,v 1.50 2000-06-08 18:07:06 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 <odinwrap.h>
17#include "misc.h"
18#include "callback.h"
19#include "unicode.h"
20#include "dibsect.h"
21#include <codepage.h>
22#include "oslibgpi.h"
23#include "oslibgdi.h"
24
25#define DBG_LOCALLOG DBG_gdi32
26#include "dbglocal.h"
27
28ODINDEBUGCHANNEL(GDI32-GDI32)
29
30//******************************************************************************
31//******************************************************************************
32BOOL WIN32API GetTextExtentPointA(HDC hdc, LPCSTR lpsz, int cbString, LPSIZE lpSize)
33{
34 BOOL rc;
35
36 lpSize->cx = lpSize->cy = 0;
37 rc = O32_GetTextExtentPoint(hdc, lpsz, cbString, lpSize);
38 dprintf(("GDI32: GetTextExtentPointA of %s returned %d\n", lpsz, rc));
39 return(rc);
40}
41//******************************************************************************
42//******************************************************************************
43COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor)
44{
45 dprintf(("GDI32: SetBkColor to %X\n", crColor));
46 return(O32_SetBkColor(hdc, crColor));
47}
48//******************************************************************************
49//******************************************************************************
50COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor)
51{
52 COLORREF clr;
53
54 clr = O32_SetTextColor(hdc, crColor);
55 dprintf(("GDI32: SetTextColor from %X to %X\n", clr, crColor));
56 return(clr);
57}
58//******************************************************************************
59//******************************************************************************
60
61static hFntDefaultGui = NULL;
62HGDIOBJ WIN32API GetStockObject(int arg1)
63{
64 HGDIOBJ obj;
65
66 switch(arg1)
67 {
68 case DEFAULT_GUI_FONT:
69 if(NULL==hFntDefaultGui)
70 hFntDefaultGui = CreateFontA( 9, 0, 0, 0, FW_MEDIUM, FALSE,
71 FALSE, FALSE, ANSI_CHARSET,
72 OUT_DEFAULT_PRECIS,
73 CLIP_DEFAULT_PRECIS,
74 DEFAULT_QUALITY,
75 FIXED_PITCH|FF_MODERN, "WarpSans");
76 obj = hFntDefaultGui;
77 break;
78 default:
79 obj = O32_GetStockObject(arg1);
80 break;
81 }
82 dprintf(("GDI32: GetStockObject %d returned %X\n", arg1, obj));
83 return(obj);
84}
85//******************************************************************************
86//******************************************************************************
87int WIN32API GetObjectA( HGDIOBJ hObject, int size, void *lpBuffer)
88{
89 int rc;
90
91 if(size == 0 || lpBuffer == NULL) {
92 SetLastError(ERROR_INVALID_PARAMETER);
93 return 0;
94 }
95
96 if(DIBSection::getSection() != NULL)
97 {
98 DIBSection *dsect = DIBSection::find(hObject);
99 if(dsect)
100 {
101 rc = dsect->GetDIBSection(size, lpBuffer);
102 if(rc == 0) {
103 SetLastError(ERROR_INVALID_PARAMETER);
104 return 0;
105 }
106 SetLastError(ERROR_SUCCESS);
107 return rc;
108 }
109 }
110
111 dprintf(("GDI32: GetObject %X %X %X\n", hObject, size, lpBuffer));
112 return O32_GetObject(hObject, size, lpBuffer);
113}
114//******************************************************************************
115//******************************************************************************
116int WIN32API GetObjectW( HGDIOBJ arg1, int arg2, void * arg3)
117{
118 dprintf(("GDI32: GetObjectW %X, %d %X not complete!", arg1, arg2, arg3));
119 return GetObjectA(arg1, arg2, arg3);
120}
121//******************************************************************************
122//******************************************************************************
123DWORD WIN32API GetObjectType( HGDIOBJ arg1)
124{
125 dprintf2(("GDI32: GetObjectType\n"));
126 return O32_GetObjectType(arg1);
127}
128//******************************************************************************
129//******************************************************************************
130BOOL WIN32API DeleteObject(HANDLE hObj)
131{
132 dprintf(("GDI32: DeleteObject %x", hObj));
133 DIBSection::deleteSection((DWORD)hObj);
134 return O32_DeleteObject(hObj);
135}
136//******************************************************************************
137//******************************************************************************
138BOOL WIN32API DeleteDC( HDC hdc)
139{
140 dprintf(("GDI32: DeleteDC %x", hdc));
141 return O32_DeleteDC(hdc);
142}
143//******************************************************************************
144//******************************************************************************
145HBRUSH WIN32API CreatePatternBrush(HBITMAP arg1)
146{
147 HBRUSH brush;
148
149 brush = O32_CreatePatternBrush(arg1);
150 dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", arg1, brush));
151 return(brush);
152}
153//******************************************************************************
154//******************************************************************************
155HPEN WIN32API CreatePen( int fnPenStyle, int nWidth, COLORREF crColor)
156{
157 dprintf(("GDI32: CreatePen\n"));
158
159 //CB: todo: PS_DOT is different in Win32 (. . . . and not - - - -)
160 // Open32 looks like LINETYPE_SHORTDASH instead of LINETYPE_DOT!!!
161 // -> difficult to fix without performance decrease!
162
163 return O32_CreatePen(fnPenStyle,nWidth,crColor);
164}
165//******************************************************************************
166//******************************************************************************
167HPEN WIN32API CreatePenIndirect( const LOGPEN * lplgpn)
168{
169 dprintf(("GDI32: CreatePenIndirect\n"));
170 return O32_CreatePenIndirect(lplgpn);
171}
172//******************************************************************************
173//******************************************************************************
174HBRUSH WIN32API CreateDIBPatternBrushPt( const VOID * arg1, UINT arg2)
175{
176 dprintf(("GDI32: CreateDIBPatternBrushPt\n"));
177 return O32_CreateDIBPatternBrushPt(arg1, arg2);
178}
179//******************************************************************************
180//******************************************************************************
181HDC WIN32API CreateCompatibleDC( HDC hdc)
182{
183 HDC newHdc;
184
185 newHdc = O32_CreateCompatibleDC(hdc);
186 ULONG oldcp = OSLibGpiQueryCp(hdc);
187 if (!oldcp) /* If new DC is to be created */
188 oldcp = GetDisplayCodepage();
189
190 OSLibGpiSetCp(newHdc, oldcp);
191 dprintf(("CreateCompatibleDC %X returned %x", hdc, newHdc));
192 return newHdc;
193}
194//******************************************************************************
195//******************************************************************************
196BOOL WIN32API StrokeAndFillPath( HDC arg1)
197{
198 dprintf(("GDI32: StrokeAndFillPath\n"));
199 return O32_StrokeAndFillPath(arg1);
200}
201//******************************************************************************
202//******************************************************************************
203BOOL WIN32API StrokePath( HDC arg1)
204{
205 dprintf(("GDI32: StrokePath\n"));
206 return O32_StrokePath(arg1);
207}
208//******************************************************************************
209//******************************************************************************
210HGDIOBJ WIN32API SelectObject(HDC hdc, HGDIOBJ hObj)
211{
212 HGDIOBJ rc;
213
214 dprintf2(("GDI32: SelectObject %x %x", hdc, hObj));
215
216 if(DIBSection::getSection() != NULL)
217 {
218 DIBSection *dsect;
219
220 dsect = DIBSection::find(hdc);
221 if(dsect)
222 {
223 //remove previously selected dibsection
224 dsect->UnSelectDIBObject();
225 }
226 dsect = DIBSection::find((DWORD)hObj);
227 if(dsect)
228 {
229 dsect->SelectDIBObject(hdc);
230 }
231 }
232 rc = O32_SelectObject(hdc, hObj);
233 if(rc != 0 && DIBSection::getSection != NULL)
234 {
235 DIBSection *dsect = DIBSection::find((DWORD)rc);
236 if(dsect)
237 {
238 dsect->UnSelectDIBObject();
239 }
240 }
241 return(rc);
242}
243//******************************************************************************
244//******************************************************************************
245int WIN32API SetBkMode( HDC hdc, int mode)
246{
247 dprintf(("GDI32: SetBkMode %x %d (old %d)", hdc, mode, O32_GetBkMode(hdc)));
248 return O32_SetBkMode(hdc, mode);
249}
250//******************************************************************************
251//******************************************************************************
252COLORREF WIN32API GetPixel( HDC arg1, int arg2, int arg3)
253{
254//// dprintf(("GDI32: GetPixel\n"));
255 return O32_GetPixel(arg1, arg2, arg3);
256}
257//******************************************************************************
258//******************************************************************************
259COLORREF WIN32API SetPixel( HDC arg1, int arg2, int arg3, COLORREF arg4)
260{
261//// dprintf(("GDI32: SetPixel\n"));
262 return O32_SetPixel(arg1, arg2, arg3, arg4);
263}
264//******************************************************************************
265//Faster version of SetPixel (since it doesn't need to return the original color)
266//Just use SetPixel for now
267//******************************************************************************
268BOOL WIN32API SetPixelV(HDC arg1, int arg2, int arg3, COLORREF arg4)
269{
270 COLORREF rc;
271
272//// dprintf(("GDI32: SetPixelV\n"));
273 rc = O32_SetPixel(arg1, arg2, arg3, arg4);
274 if(rc == GDI_ERROR) // || rc == COLOR_INVALID)
275 return(FALSE);
276 return(TRUE);
277}
278//******************************************************************************
279//******************************************************************************
280BOOL WIN32API GetDCOrgEx(HDC arg1, PPOINT arg2)
281{
282 dprintf(("GDI32: GetDCOrgEx\n"));
283 return O32_GetDCOrgEx(arg1, arg2);
284}
285//******************************************************************************
286//******************************************************************************
287BOOL WIN32API GetWindowExtEx(HDC arg1, PSIZE arg2)
288{
289 dprintf(("GDI32: GetWindowExtEx\n"));
290 return O32_GetWindowExtEx(arg1, arg2);
291}
292//******************************************************************************
293//******************************************************************************
294int WIN32API AbortDoc( HDC arg1)
295{
296 dprintf(("GDI32: AbortDoc"));
297 return O32_AbortDoc(arg1);
298}
299//******************************************************************************
300//******************************************************************************
301BOOL WIN32API AbortPath( HDC arg1)
302{
303 dprintf(("GDI32: AbortPath"));
304 return O32_AbortPath(arg1);
305}
306//******************************************************************************
307//******************************************************************************
308BOOL WIN32API AngleArc( HDC arg1, int arg2, int arg3, DWORD arg4, float arg5, float arg6)
309{
310 dprintf(("GDI32: AngleArc"));
311 return O32_AngleArc(arg1, arg2, arg3, arg4, arg5, arg6);
312}
313//******************************************************************************
314//******************************************************************************
315BOOL WIN32API Arc( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
316{
317 dprintf(("GDI32: Arc"));
318 return O32_Arc(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
319}
320//******************************************************************************
321//******************************************************************************
322BOOL WIN32API ArcTo( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
323{
324 dprintf(("GDI32: ArcTo"));
325 return O32_ArcTo(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
326}
327//******************************************************************************
328//******************************************************************************
329BOOL WIN32API BeginPath( HDC arg1)
330{
331 dprintf(("GDI32: BeginPath"));
332 return O32_BeginPath(arg1);
333}
334//******************************************************************************
335//******************************************************************************
336BOOL WIN32API Chord( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
337{
338 dprintf(("GDI32: Chord"));
339 return O32_Chord(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
340}
341//******************************************************************************
342//******************************************************************************
343BOOL WIN32API CloseFigure( HDC arg1)
344{
345 dprintf(("GDI32: CloseFigure"));
346 return O32_CloseFigure(arg1);
347}
348//******************************************************************************
349//******************************************************************************
350HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH * arg1)
351{
352 dprintf(("GDI32: CreateBrushIndirect"));
353 return O32_CreateBrushIndirect((LPLOGBRUSH)arg1);
354}
355//******************************************************************************
356//******************************************************************************
357HDC WIN32API CreateDCA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput, const DEVMODEA *lpInitData)
358{
359 HDC hdc;
360
361 hdc = O32_CreateDC(lpszDriver, lpszDevice, lpszOutput, lpInitData);
362 dprintf(("GDI32: CreateDCA %s %s %s %x returned %x", lpszDriver, lpszDevice, lpszOutput, lpInitData, hdc));
363 return hdc;
364}
365//******************************************************************************
366//******************************************************************************
367HDC WIN32API CreateDCW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
368{
369 char *astring4, *astring5;
370
371 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
372 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
373 char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
374
375 if(arg4)
376 {
377 astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
378 astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
379 }
380
381 HDC rc;
382 DEVMODEA devmode;
383
384 dprintf(("GDI32: CreateDCW"));
385
386 if(arg4)
387 {
388 strcpy((char*)devmode.dmDeviceName, astring4);
389 strcpy((char*)devmode.dmFormName, astring5);
390
391 devmode.dmSpecVersion = arg4->dmSpecVersion;
392 devmode.dmDriverVersion = arg4->dmDriverVersion;
393 devmode.dmSize = arg4->dmSize;
394 devmode.dmDriverExtra = arg4->dmDriverExtra;
395 devmode.dmFields = arg4->dmFields;
396 devmode.dmOrientation = arg4->dmOrientation;
397 devmode.dmPaperSize = arg4->dmPaperSize;
398 devmode.dmPaperLength = arg4->dmPaperLength;
399 devmode.dmPaperWidth = arg4->dmPaperWidth;
400 devmode.dmScale = arg4->dmScale;
401 devmode.dmCopies = arg4->dmCopies;
402 devmode.dmDefaultSource = arg4->dmDefaultSource;
403 devmode.dmPrintQuality = arg4->dmPrintQuality;
404 devmode.dmColor = arg4->dmColor;
405 devmode.dmDuplex = arg4->dmDuplex;
406 devmode.dmYResolution = arg4->dmYResolution;
407 devmode.dmTTOption = arg4->dmTTOption;
408 devmode.dmCollate = arg4->dmCollate;
409 devmode.dmLogPixels = arg4->dmLogPixels;
410 devmode.dmBitsPerPel = arg4->dmBitsPerPel;
411 devmode.dmPelsWidth = arg4->dmPelsWidth;
412 devmode.dmPelsHeight = arg4->dmPelsHeight;
413 devmode.dmDisplayFlags = arg4->dmDisplayFlags;
414 devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
415 devmode.dmICMMethod = arg4->dmICMMethod;
416 devmode.dmICMIntent = arg4->dmICMIntent;
417 devmode.dmMediaType = arg4->dmMediaType;
418 devmode.dmDitherType = arg4->dmDitherType;
419 devmode.dmReserved1 = arg4->dmReserved1;
420 devmode.dmReserved2 = arg4->dmReserved2;
421 rc = O32_CreateDC(astring1,astring2,astring3,&devmode);
422 }
423 else
424 rc = O32_CreateDC(astring1,astring2,astring3, NULL);
425
426 FreeAsciiString(astring1);
427 FreeAsciiString(astring2);
428 FreeAsciiString(astring3);
429
430 if(arg4)
431 {
432 FreeAsciiString(astring4);
433 FreeAsciiString(astring5);
434 }
435
436 return rc;
437}
438//******************************************************************************
439//******************************************************************************
440HBRUSH WIN32API CreateHatchBrush( int arg1, COLORREF arg2)
441{
442 dprintf(("GDI32: CreateHatchBrush"));
443 return O32_CreateHatchBrush(arg1, arg2);
444}
445//******************************************************************************
446//******************************************************************************
447HDC WIN32API CreateICA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput,
448 const DEVMODEA *lpdvmInit)
449{
450 static char *szDisplay = "DISPLAY";
451
452 dprintf(("GDI32: CreateICA"));
453 //SvL: Open32 tests for "DISPLAY"
454 if(lpszDriver && !strcmp(lpszDriver, "display")) {
455 lpszDriver = szDisplay;
456 }
457 //SvL: Open32 tests lpszDriver for NULL even though it's ignored
458 if(lpszDriver == NULL) {
459 lpszDriver = lpszDevice;
460 }
461 return O32_CreateIC(lpszDriver, lpszDevice, lpszOutput, lpdvmInit);
462}
463//******************************************************************************
464//******************************************************************************
465HDC WIN32API CreateICW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
466{
467 char *astring4, *astring5;
468
469 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
470 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
471 char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
472 if(arg4)
473 {
474 astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
475 astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
476 }
477
478 HDC rc;
479 DEVMODEA devmode;
480
481 dprintf(("GDI32: CreateICW"));
482
483 if(arg4)
484 {
485 strcpy((char*)devmode.dmDeviceName, astring4);
486 strcpy((char*)devmode.dmFormName, astring5);
487
488 devmode.dmSpecVersion = arg4->dmSpecVersion;
489 devmode.dmDriverVersion = arg4->dmDriverVersion;
490 devmode.dmSize = arg4->dmSize;
491 devmode.dmDriverExtra = arg4->dmDriverExtra;
492 devmode.dmFields = arg4->dmFields;
493 devmode.dmOrientation = arg4->dmOrientation;
494 devmode.dmPaperSize = arg4->dmPaperSize;
495 devmode.dmPaperLength = arg4->dmPaperLength;
496 devmode.dmPaperWidth = arg4->dmPaperWidth;
497 devmode.dmScale = arg4->dmScale;
498 devmode.dmCopies = arg4->dmCopies;
499 devmode.dmDefaultSource = arg4->dmDefaultSource;
500 devmode.dmPrintQuality = arg4->dmPrintQuality;
501 devmode.dmColor = arg4->dmColor;
502 devmode.dmDuplex = arg4->dmDuplex;
503 devmode.dmYResolution = arg4->dmYResolution;
504 devmode.dmTTOption = arg4->dmTTOption;
505 devmode.dmCollate = arg4->dmCollate;
506 devmode.dmLogPixels = arg4->dmLogPixels;
507 devmode.dmBitsPerPel = arg4->dmBitsPerPel;
508 devmode.dmPelsWidth = arg4->dmPelsWidth;
509 devmode.dmPelsHeight = arg4->dmPelsHeight;
510 devmode.dmDisplayFlags = arg4->dmDisplayFlags;
511 devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
512 devmode.dmICMMethod = arg4->dmICMMethod;
513 devmode.dmICMIntent = arg4->dmICMIntent;
514 devmode.dmMediaType = arg4->dmMediaType;
515 devmode.dmDitherType = arg4->dmDitherType;
516 devmode.dmReserved1 = arg4->dmReserved1;
517 devmode.dmReserved2 = arg4->dmReserved2;
518
519 rc = CreateICA(astring1,astring2,astring3,&devmode);
520 }
521 else
522 rc = CreateICA(astring1,astring2,astring3, NULL);
523
524 FreeAsciiString(astring1);
525 FreeAsciiString(astring2);
526 FreeAsciiString(astring3);
527 if(arg4)
528 {
529 FreeAsciiString(astring4);
530 FreeAsciiString(astring5);
531 }
532
533 return rc;
534}
535//******************************************************************************
536//******************************************************************************
537HBRUSH WIN32API CreateSolidBrush( COLORREF arg1)
538{
539 dprintf(("GDI32: CreateSolidBrush\n"));
540 return O32_CreateSolidBrush(arg1);
541}
542//******************************************************************************
543//******************************************************************************
544BOOL WIN32API DPtoLP( HDC arg1, PPOINT arg2, int arg3)
545{
546 dprintf(("GDI32: DPtoLP\n"));
547 return O32_DPtoLP(arg1, arg2, arg3);
548}
549//******************************************************************************
550//******************************************************************************
551BOOL WIN32API Ellipse( HDC arg1, int arg2, int arg3, int arg4, int arg5)
552{
553 dprintf(("GDI32: Ellipse"));
554 return O32_Ellipse(arg1, arg2, arg3, arg4, arg5);
555}
556//******************************************************************************
557//******************************************************************************
558int WIN32API EndDoc( HDC arg1)
559{
560 dprintf(("GDI32: EndDoc"));
561 return O32_EndDoc(arg1);
562}
563//******************************************************************************
564//******************************************************************************
565int WIN32API EndPage( HDC arg1)
566{
567 dprintf(("GDI32: EndPage"));
568 return O32_EndPage(arg1);
569}
570//******************************************************************************
571//******************************************************************************
572BOOL WIN32API EndPath( HDC arg1)
573{
574 dprintf(("GDI32: EndPath"));
575 return O32_EndPath(arg1);
576}
577//******************************************************************************
578//******************************************************************************
579BOOL WIN32API Rectangle( HDC arg1, int arg2, int arg3, int arg4, int arg5)
580{
581 dprintf(("GDI32: Rectangle\n"));
582 return O32_Rectangle(arg1, arg2, arg3, arg4, arg5);
583}
584//******************************************************************************
585//******************************************************************************
586VOID dumpROP2(INT rop2)
587{
588 CHAR *name;
589
590 switch (rop2)
591 {
592 case R2_BLACK:
593 name = "R2_BLACK";
594 break;
595
596 case R2_COPYPEN:
597 name = "R2_COPYPEN";
598 break;
599
600 case R2_MASKNOTPEN:
601 name = "R2_MASKNOTPEN";
602 break;
603
604 case R2_MASKPEN:
605 name = "R2_MASKPEN";
606 break;
607
608 case R2_MASKPENNOT:
609 name = "R2_MASKPENNOT";
610 break;
611
612 case R2_MERGENOTPEN:
613 name = "R2_MERGENOTPEN";
614 break;
615
616 case R2_MERGEPEN:
617 name = "R2_MERGEPEN";
618 break;
619
620 case R2_MERGEPENNOT:
621 name = "R2_MERGEPENNOT";
622 break;
623
624 case R2_NOP:
625 name = "R2_NOP";
626 break;
627
628 case R2_NOT:
629 name = "R2_NOT";
630 break;
631
632 case R2_NOTCOPYPEN:
633 name = "R2_NOTCOPYPEN";
634 break;
635
636 case R2_NOTMASKPEN:
637 name = "R2_NOTMASKPEN";
638 break;
639
640 case R2_NOTMERGEPEN:
641 name = "R2_NOTMERGEPEN";
642 break;
643
644 case R2_WHITE:
645 name = "R2_WHITE";
646 break;
647
648 case R2_XORPEN:
649 name = "R2_XORPEN";
650 break;
651
652 default:
653 name = "unknown mode!!!";
654 break;
655 }
656
657 dprintf((" ROP2 mode = %s",name));
658}
659//******************************************************************************
660//******************************************************************************
661int WIN32API SetROP2( HDC hdc, int rop2)
662{
663 dprintf(("GDI32: SetROP2 %x %x", hdc, rop2));
664 #ifdef DEBUG
665 dumpROP2(rop2);
666 #endif
667 return O32_SetROP2(hdc, rop2);
668}
669//******************************************************************************
670//******************************************************************************
671int WIN32API EnumObjects( HDC arg1, int arg2, GOBJENUMPROC arg3, LPARAM arg4)
672{
673 dprintf(("GDI32: EnumObjects STUB"));
674 //calling convention differences
675// return O32_EnumObjects(arg1, arg2, arg3, arg4);
676 return 0;
677}
678//******************************************************************************
679//******************************************************************************
680int WIN32API Escape( HDC arg1, int arg2, int arg3, LPCSTR arg4, PVOID arg5)
681{
682 dprintf(("GDI32: Escape"));
683 return O32_Escape(arg1, arg2, arg3, arg4, arg5);
684}
685//******************************************************************************
686//******************************************************************************
687HPEN WIN32API ExtCreatePen( DWORD arg1, DWORD arg2, const LOGBRUSH * arg3, DWORD arg4, const DWORD * arg5)
688{
689 dprintf(("GDI32: ExtCreatePen"));
690 return O32_ExtCreatePen(arg1, arg2, arg3, arg4, arg5);
691}
692//******************************************************************************
693//******************************************************************************
694BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5)
695{
696 dprintf(("GDI32: ExtFloodFill"));
697 return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5);
698}
699//******************************************************************************
700//******************************************************************************
701BOOL WIN32API FillPath( HDC arg1)
702{
703 dprintf(("GDI32: FillPath"));
704 return O32_FillPath(arg1);
705}
706//******************************************************************************
707//******************************************************************************
708BOOL WIN32API FlattenPath( HDC arg1)
709{
710 dprintf(("GDI32: FlattenPath"));
711 return O32_FlattenPath(arg1);
712}
713//******************************************************************************
714//******************************************************************************
715BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4)
716{
717 dprintf(("GDI32: FloodFill"));
718 return O32_FloodFill(arg1, arg2, arg3, arg4);
719}
720//******************************************************************************
721//******************************************************************************
722int WIN32API GetArcDirection( HDC arg1)
723{
724 dprintf(("GDI32: GetArcDirection"));
725 return O32_GetArcDirection(arg1);
726}
727//******************************************************************************
728//******************************************************************************
729BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2)
730{
731 dprintf(("GDI32: GetAspectRatioFilterEx"));
732 return O32_GetAspectRatioFilterEx(arg1, arg2);
733}
734//******************************************************************************
735//******************************************************************************
736COLORREF WIN32API GetBkColor( HDC arg1)
737{
738 dprintf(("GDI32: GetBkColor"));
739 return O32_GetBkColor(arg1);
740}
741//******************************************************************************
742//******************************************************************************
743int WIN32API GetBkMode( HDC arg1)
744{
745 dprintf(("GDI32: GetBkMode"));
746 return O32_GetBkMode(arg1);
747}
748//******************************************************************************
749//******************************************************************************
750UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3)
751{
752 dprintf(("GDI32: GetBoundsRect"));
753 return O32_GetBoundsRect(arg1, arg2, arg3);
754}
755//******************************************************************************
756//******************************************************************************
757BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2)
758{
759 dprintf(("GDI32: GetBrushOrgEx"));
760 return O32_GetBrushOrgEx(arg1, arg2);
761}
762//******************************************************************************
763//******************************************************************************
764BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
765{
766 dprintf(("GDI32: GetCharABCWidthsA"));
767 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
768}
769//******************************************************************************
770//******************************************************************************
771BOOL WIN32API GetCharABCWidthsW( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
772{
773 dprintf(("GDI32: GetCharABCWidthsW not properly implemented."));
774 // NOTE: This will not work as is (needs UNICODE support)
775 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
776}
777//******************************************************************************
778//******************************************************************************
779BOOL WIN32API GetCharWidth32A( HDC arg1, UINT arg2, UINT arg3, PINT arg4)
780{
781 dprintf(("GDI32: GetCharWidth32A"));
782 return O32_GetCharWidth(arg1, arg2, arg3, arg4);
783}
784//******************************************************************************
785//TODO: Cut off Unicode chars?
786//******************************************************************************
787BOOL WIN32API GetCharWidth32W(HDC arg1, UINT iFirstChar, UINT iLastChar, PINT arg4)
788{
789 dprintf(("GDI32: GetCharWidth32W, not properly implemented"));
790 return O32_GetCharWidth(arg1, iFirstChar, iLastChar, arg4);
791}
792//******************************************************************************
793//******************************************************************************
794HANDLE WIN32API GetCurrentObject( HDC hdc, UINT arg2)
795{
796 dprintf(("GDI32: GetCurrentObject %x %x", hdc, arg2));
797 return (HANDLE)O32_GetCurrentObject(hdc, arg2);
798}
799//******************************************************************************
800//******************************************************************************
801BOOL WIN32API GetCurrentPositionEx( HDC arg1, PPOINT arg2)
802{
803 dprintf(("GDI32: GetCurrentPositionEx"));
804 return O32_GetCurrentPositionEx(arg1, arg2);
805}
806//******************************************************************************
807//******************************************************************************
808int WIN32API GetDeviceCaps(HDC hdc, int nIndex)
809{
810 int rc;
811
812 rc = O32_GetDeviceCaps(hdc, nIndex);
813 dprintf(("GDI32: GetDeviceCaps %X, %d returned %d\n", hdc, nIndex, rc));
814 //SvL: 13-9-'98: NT returns -1 when using 16 bits colors, NOT 65536!
815 if(nIndex == NUMCOLORS && rc > 256)
816 return -1;
817
818 return(rc);
819}
820//******************************************************************************
821//******************************************************************************
822int WIN32API GetGraphicsMode(HDC arg1)
823{
824 dprintf(("GDI32: GetGraphicsMode"));
825 return O32_GetGraphicsMode(arg1);
826}
827//******************************************************************************
828//******************************************************************************
829DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
830{
831 dprintf(("GDI32: GetKerningPairsA"));
832 return O32_GetKerningPairs(arg1, arg2, arg3);
833}
834//******************************************************************************
835//******************************************************************************
836DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
837{
838 dprintf(("GDI32: GetKerningPairsW"));
839 // NOTE: This will not work as is (needs UNICODE support)
840 return O32_GetKerningPairs(arg1, arg2, arg3);
841}
842//******************************************************************************
843//******************************************************************************
844int WIN32API GetMapMode( HDC hdc)
845{
846 dprintf(("GDI32: GetMapMode %x", hdc));
847 return O32_GetMapMode(hdc);
848}
849//******************************************************************************
850//******************************************************************************
851BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
852{
853 dprintf(("GDI32: GetMiterLimit"));
854 return O32_GetMiterLimit(arg1, arg2);
855}
856//******************************************************************************
857//******************************************************************************
858COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2)
859{
860 dprintf(("GDI32: GetNearestColor\n"));
861 return O32_GetNearestColor(arg1, arg2);
862}
863//******************************************************************************
864//******************************************************************************
865UINT WIN32API GetOutlineTextMetricsA( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICA arg3)
866{
867 dprintf(("GDI32: GetOutlineTextMetricsA"));
868 return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
869}
870//******************************************************************************
871//******************************************************************************
872UINT WIN32API GetOutlineTextMetricsW( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICW arg3)
873{
874 dprintf(("GDI32: GetOutlineTextMetricsW STUB"));
875 // NOTE: This will not work as is (needs UNICODE support)
876// return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
877 return 0;
878}
879//******************************************************************************
880//******************************************************************************
881INT WIN32API GetPath( HDC arg1, PPOINT arg2, PBYTE arg3, int arg4)
882{
883 dprintf(("GDI32: GetPath"));
884 return O32_GetPath(arg1, arg2, arg3, arg4);
885}
886//******************************************************************************
887//******************************************************************************
888int WIN32API GetPolyFillMode( HDC arg1)
889{
890 dprintf(("GDI32: GetPolyFillMode"));
891 return O32_GetPolyFillMode(arg1);
892}
893//******************************************************************************
894//******************************************************************************
895int WIN32API GetROP2( HDC arg1)
896{
897 dprintf(("GDI32: GetROP2"));
898 return O32_GetROP2(arg1);
899}
900//******************************************************************************
901//******************************************************************************
902BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2)
903{
904 dprintf(("GDI32: GetRasterizerCaps"));
905 return O32_GetRasterizerCaps(arg1, arg2);
906}
907//******************************************************************************
908//******************************************************************************
909UINT WIN32API GetTextAlign( HDC arg1)
910{
911 dprintf(("GDI32: GetTextAlign"));
912 return O32_GetTextAlign(arg1);
913}
914//******************************************************************************
915//******************************************************************************
916int WIN32API GetTextCharacterExtra( HDC arg1)
917{
918 dprintf(("GDI32: GetTextCharacterExtra"));
919 return O32_GetTextCharacterExtra(arg1);
920}
921//******************************************************************************
922//******************************************************************************
923COLORREF WIN32API GetTextColor( HDC arg1)
924{
925 dprintf(("GDI32: GetTextColor"));
926 return O32_GetTextColor(arg1);
927}
928//******************************************************************************
929//******************************************************************************
930BOOL WIN32API GetTextExtentPoint32A( HDC hdc, LPCSTR lpsz, int cbString, PSIZE lpSize)
931{
932 BOOL rc;
933
934 lpSize->cx = lpSize->cy = 0;
935 rc = O32_GetTextExtentPoint32(hdc, lpsz, cbString, lpSize);
936 dprintf(("GDI32: GetTextExtentPoint32A %x %s %d returned %d (%d,%d)", hdc, lpsz, cbString, rc, lpSize->cx, lpSize->cy));
937 return rc;
938}
939//******************************************************************************
940//******************************************************************************
941BOOL WIN32API GetTextExtentPoint32W(HDC arg1, LPCWSTR arg2, int arg3, PSIZE lpSize)
942{
943 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
944 BOOL rc;
945
946 dprintf(("GDI32: GetTextExtentPoint32W %s\n", astring));
947 lpSize->cx = lpSize->cy = 0;
948 rc = O32_GetTextExtentPoint32(arg1, astring, arg3, lpSize);
949 FreeAsciiString(astring);
950 return(rc);
951}
952//******************************************************************************
953//******************************************************************************
954BOOL WIN32API GetTextExtentPointW(HDC hdc,
955 LPCWSTR lpString,
956 int cbString,
957 PSIZE lpSize)
958{
959 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
960 BOOL rc;
961
962 lpSize->cx = lpSize->cy = 0;
963 rc = O32_GetTextExtentPoint(hdc,
964 astring,
965 cbString,
966 lpSize);
967 dprintf(("GDI32: GetTextExtentPointW %X %s (size %08xh) returned %d\n", hdc, astring, cbString, rc));
968 dprintf(("GDI32: GetTextExtentPointW (%d,%d)\n", lpSize->cx, lpSize->cy));
969
970 FreeAsciiString(astring);
971 return(rc);
972}
973//******************************************************************************
974//******************************************************************************
975int WIN32API GetTextFaceA( HDC arg1, int arg2, LPSTR arg3)
976{
977 dprintf(("GDI32: GetTextFaceA"));
978 return O32_GetTextFace(arg1, arg2, arg3);
979}
980//******************************************************************************
981//******************************************************************************
982int WIN32API GetTextFaceW( HDC arg1, int arg2, LPWSTR arg3)
983{
984 char *astring = (char *)malloc(arg2+1);
985 int rc;
986
987 dprintf(("GDI32: GetTextFaceW"));
988 rc = O32_GetTextFace(arg1, arg2, astring);
989 AsciiToUnicode(astring, arg3);
990 free(astring);
991 return rc;
992}
993//******************************************************************************
994//******************************************************************************
995BOOL WIN32API GetTextMetricsA( HDC arg1, LPTEXTMETRICA arg2)
996{
997 BOOL rc;
998
999 rc = O32_GetTextMetrics(arg1, arg2);
1000 dprintf(("GDI32: GetTextMetricsA returned %d\n", rc));
1001 return(rc);
1002}
1003//******************************************************************************
1004//******************************************************************************
1005BOOL WIN32API GetTextMetricsW( HDC arg1, LPTEXTMETRICW pwtm)
1006{
1007 BOOL rc;
1008 TEXTMETRICA atm;
1009
1010 dprintf(("GDI32: GetTextMetricsW"));
1011
1012 rc = O32_GetTextMetrics(arg1, &atm);
1013 pwtm->tmHeight = atm.tmHeight;
1014 pwtm->tmAscent = atm.tmAscent;
1015 pwtm->tmDescent = atm.tmDescent;
1016 pwtm->tmInternalLeading = atm.tmInternalLeading;
1017 pwtm->tmExternalLeading = atm.tmExternalLeading;
1018 pwtm->tmAveCharWidth = atm.tmAveCharWidth;
1019 pwtm->tmMaxCharWidth = atm.tmMaxCharWidth;
1020 pwtm->tmWeight = atm.tmWeight;
1021 pwtm->tmOverhang = atm.tmOverhang;
1022 pwtm->tmDigitizedAspectX = atm.tmDigitizedAspectX;
1023 pwtm->tmDigitizedAspectY = atm.tmDigitizedAspectY;
1024 pwtm->tmFirstChar = atm.tmFirstChar;
1025 pwtm->tmLastChar = atm.tmLastChar;
1026 pwtm->tmDefaultChar = atm.tmDefaultChar;
1027 pwtm->tmBreakChar = atm.tmBreakChar;
1028 pwtm->tmItalic = atm.tmItalic;
1029 pwtm->tmUnderlined = atm.tmUnderlined;
1030 pwtm->tmStruckOut = atm.tmStruckOut;
1031 pwtm->tmPitchAndFamily = atm.tmPitchAndFamily;
1032 pwtm->tmCharSet = atm.tmCharSet;
1033 return(rc);
1034}
1035//******************************************************************************
1036//******************************************************************************
1037BOOL WIN32API GetViewportExtEx( HDC arg1, PSIZE arg2)
1038{
1039 dprintf(("GDI32: GetViewportExtEx"));
1040 return O32_GetViewportExtEx(arg1, arg2);
1041}
1042//******************************************************************************
1043//******************************************************************************
1044BOOL WIN32API GetViewportOrgEx( HDC arg1, PPOINT arg2)
1045{
1046 dprintf(("GDI32: GetViewportOrgEx"));
1047 return O32_GetViewportOrgEx(arg1, arg2);
1048}
1049//******************************************************************************
1050//******************************************************************************
1051BOOL WIN32API GetWindowOrgEx( HDC arg1, PPOINT arg2)
1052{
1053 dprintf(("GDI32: GetWindowOrgEx"));
1054 return O32_GetWindowOrgEx(arg1, arg2);
1055}
1056//******************************************************************************
1057//******************************************************************************
1058BOOL WIN32API GetWorldTransform( HDC arg1, LPXFORM arg2)
1059{
1060 dprintf(("GDI32: GetWorldTransform"));
1061 return O32_GetWorldTransform(arg1, arg2);
1062}
1063//******************************************************************************
1064//******************************************************************************
1065ODINFUNCTION3(BOOL, LPtoDP, HDC, hdc, PPOINT, lpPoints, int, nCount)
1066{
1067 return O32_LPtoDP(hdc, lpPoints, nCount);
1068}
1069//******************************************************************************
1070//******************************************************************************
1071BOOL WIN32API ModifyWorldTransform( HDC arg1, const XFORM *arg2, DWORD arg3)
1072{
1073 dprintf(("GDI32: ModifyWorldTransform"));
1074 return O32_ModifyWorldTransform(arg1, (LPXFORM)arg2, arg3);
1075}
1076//******************************************************************************
1077//******************************************************************************
1078BOOL WIN32API OffsetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1079{
1080 dprintf(("GDI32: OffsetViewportOrgEx"));
1081 return O32_OffsetViewportOrgEx(arg1, arg2, arg3, arg4);
1082}
1083//******************************************************************************
1084//******************************************************************************
1085BOOL WIN32API OffsetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1086{
1087 dprintf(("GDI32: OffsetWindowOrgEx"));
1088 return O32_OffsetWindowOrgEx(arg1, arg2, arg3, arg4);
1089}
1090//******************************************************************************
1091//******************************************************************************
1092BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
1093 int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
1094 int nYRadial2)
1095{
1096 dprintf(("GDI32: Pie"));
1097 //CB: bug in O32_Pie
1098 if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
1099 return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
1100 else
1101 return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
1102}
1103//******************************************************************************
1104//******************************************************************************
1105BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
1106{
1107 dprintf(("GDI32: PolyBezier"));
1108 return O32_PolyBezier(arg1, arg2, (int)arg3);
1109}
1110//******************************************************************************
1111//******************************************************************************
1112BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
1113{
1114 dprintf(("GDI32: PolyBezierTo"));
1115 return O32_PolyBezierTo(arg1, arg2, arg3);
1116}
1117//******************************************************************************
1118//******************************************************************************
1119BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
1120{
1121 dprintf(("GDI32: PolyDraw"));
1122 return O32_PolyDraw(arg1, arg2, arg3, arg4);
1123}
1124//******************************************************************************
1125//******************************************************************************
1126BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
1127{
1128 dprintf(("GDI32: PolyPolygon"));
1129 return O32_PolyPolygon(arg1, arg2, arg3, arg4);
1130}
1131//******************************************************************************
1132//******************************************************************************
1133BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
1134{
1135 dprintf(("GDI32: PolyPolyline"));
1136
1137 return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
1138}
1139//******************************************************************************
1140//******************************************************************************
1141BOOL WIN32API Polygon( HDC arg1, const POINT * arg2, int arg3)
1142{
1143 dprintf(("GDI32: Polygon"));
1144 return O32_Polygon(arg1, arg2, arg3);
1145}
1146//******************************************************************************
1147//******************************************************************************
1148BOOL WIN32API PtVisible( HDC arg1, int arg2, int arg3)
1149{
1150 dprintf(("GDI32: PtVisible"));
1151 return O32_PtVisible(arg1, arg2, arg3);
1152}
1153//******************************************************************************
1154//******************************************************************************
1155BOOL WIN32API RectVisible( HDC arg1, const RECT * arg2)
1156{
1157 dprintf(("GDI32: RectVisible\n"));
1158 return O32_RectVisible(arg1, arg2);
1159}
1160//******************************************************************************
1161//******************************************************************************
1162HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
1163{
1164 dprintf(("GDI32: ResetDCA\n"));
1165 return (HDC)O32_ResetDC(arg1, arg2);
1166}
1167//******************************************************************************
1168//******************************************************************************
1169HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
1170{
1171 dprintf(("GDI32: ResetDCW\n"));
1172 // NOTE: This will not work as is (needs UNICODE support)
1173 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
1174}
1175//******************************************************************************
1176//******************************************************************************
1177BOOL WIN32API RestoreDC( HDC arg1, int arg2)
1178{
1179 dprintf(("GDI32: RestoreDC\n"));
1180 return O32_RestoreDC(arg1, arg2);
1181}
1182//******************************************************************************
1183//******************************************************************************
1184BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
1185{
1186 dprintf(("GDI32: RoundRect"));
1187 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1188}
1189//******************************************************************************
1190//******************************************************************************
1191int WIN32API SaveDC( HDC arg1)
1192{
1193 dprintf(("GDI32: SaveDC"));
1194 return O32_SaveDC(arg1);
1195}
1196//******************************************************************************
1197//******************************************************************************
1198BOOL WIN32API ScaleViewportExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1199{
1200 dprintf(("GDI32: ScaleViewportExtEx"));
1201 return O32_ScaleViewportExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1202}
1203//******************************************************************************
1204//******************************************************************************
1205BOOL WIN32API ScaleWindowExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1206{
1207 dprintf(("GDI32: ScaleWindowExtEx"));
1208 return O32_ScaleWindowExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1209}
1210//******************************************************************************
1211//******************************************************************************
1212int WIN32API SetArcDirection( HDC arg1, int arg2)
1213{
1214 dprintf(("GDI32: SetArcDirection"));
1215 return O32_SetArcDirection(arg1, arg2);
1216}
1217//******************************************************************************
1218//******************************************************************************
1219UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
1220{
1221 dprintf(("GDI32: SetBoundsRect"));
1222 return O32_SetBoundsRect(arg1, arg2, arg3);
1223}
1224//******************************************************************************
1225//******************************************************************************
1226BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1227{
1228 BOOL rc;
1229
1230 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
1231 dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc));
1232 return(rc);
1233}
1234//******************************************************************************
1235//******************************************************************************
1236int WIN32API SetGraphicsMode(HDC arg1, int arg2)
1237{
1238 dprintf(("GDI32: SetGraphicsMode"));
1239 return O32_SetGraphicsMode(arg1, arg2);
1240}
1241//******************************************************************************
1242//******************************************************************************
1243ODINFUNCTION2(int, SetMapMode, HDC, hdc, int, fnMapMode)
1244{
1245 return O32_SetMapMode(hdc, fnMapMode);
1246}
1247//******************************************************************************
1248//******************************************************************************
1249ODINFUNCTION2(DWORD, SetMapperFlags, HDC, hdc, DWORD, dwFlag)
1250{
1251 return O32_SetMapperFlags(hdc, dwFlag);
1252}
1253//******************************************************************************
1254//******************************************************************************
1255ODINFUNCTION3(BOOL, SetMiterLimit, HDC, hdc, float, eNewLimit, float* ,peOldLimit)
1256{
1257 return O32_SetMiterLimit(hdc, eNewLimit, peOldLimit);
1258}
1259//******************************************************************************
1260//******************************************************************************
1261ODINFUNCTION2(int, SetPolyFillMode, HDC, hdc, int, iPolyFillMode)
1262{
1263 return O32_SetPolyFillMode(hdc, iPolyFillMode);
1264}
1265//******************************************************************************
1266//******************************************************************************
1267ODINFUNCTION2(UINT, SetTextAlign, HDC, hdc, UINT, fMode)
1268{
1269 return O32_SetTextAlign(hdc, fMode);
1270}
1271//******************************************************************************
1272//******************************************************************************
1273ODINFUNCTION2(int, SetTextCharacterExtra, HDC, hdc, int, nCharExtra)
1274{
1275 return O32_SetTextCharacterExtra(hdc, nCharExtra);
1276}
1277//******************************************************************************
1278//******************************************************************************
1279ODINFUNCTION3(BOOL, SetTextJustification, HDC, hdc, int, nBreakExtra, int, nBreakCount)
1280{
1281 return O32_SetTextJustification(hdc, nBreakExtra, nBreakCount);
1282}
1283//******************************************************************************
1284//******************************************************************************
1285BOOL WIN32API SetViewportExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
1286{
1287 dprintf(("GDI32: SetViewportExtEx"));
1288 return O32_SetViewportExtEx(arg1, arg2, arg3, arg4);
1289}
1290//******************************************************************************
1291//******************************************************************************
1292BOOL WIN32API SetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1293{
1294 dprintf(("GDI32: SetViewportOrgEx"));
1295 return O32_SetViewportOrgEx(arg1, arg2, arg3, arg4);
1296}
1297//******************************************************************************
1298//******************************************************************************
1299BOOL WIN32API SetWindowExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
1300{
1301 dprintf(("GDI32: SetWindowExtEx"));
1302 return O32_SetWindowExtEx(arg1, arg2, arg3, arg4);
1303}
1304//******************************************************************************
1305//******************************************************************************
1306BOOL WIN32API SetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1307{
1308 dprintf(("GDI32: SetWindowOrgEx"));
1309 return O32_SetWindowOrgEx(arg1, arg2, arg3, arg4);
1310}
1311//******************************************************************************
1312//******************************************************************************
1313BOOL WIN32API SetWorldTransform( HDC arg1, const XFORM *arg2)
1314{
1315 dprintf(("GDI32: SetWorldTransform"));
1316 return O32_SetWorldTransform(arg1, (LPXFORM)arg2);
1317}
1318//******************************************************************************
1319//******************************************************************************
1320INT WIN32API StartDocA( HDC arg1, const DOCINFOA *arg2)
1321{
1322 dprintf(("GDI32: StartDocA"));
1323 return O32_StartDoc(arg1, (LPDOCINFOA)arg2);
1324}
1325//******************************************************************************
1326//******************************************************************************
1327INT WIN32API StartDocW( HDC arg1, const DOCINFOW *arg2)
1328{
1329 dprintf(("GDI32: StartDocW STUB"));
1330 // NOTE: This will not work as is (needs UNICODE support)
1331// return O32_StartDoc(arg1, arg2);
1332 return 0;
1333}
1334//******************************************************************************
1335//******************************************************************************
1336int WIN32API StartPage( HDC arg1)
1337{
1338 dprintf(("GDI32: StartPage"));
1339 return O32_StartPage(arg1);
1340}
1341//******************************************************************************
1342//******************************************************************************
1343BOOL WIN32API UnrealizeObject( HGDIOBJ hObject)
1344{
1345 dprintf(("GDI32: UnrealizeObject %x", hObject));
1346 return O32_UnrealizeObject(hObject);
1347}
1348//******************************************************************************
1349//******************************************************************************
1350BOOL WIN32API WidenPath( HDC hdc)
1351{
1352 dprintf(("GDI32: WidenPath %x", hdc));
1353 return O32_WidenPath(hdc);
1354}
1355//******************************************************************************
1356//TODO: Not implemented
1357//******************************************************************************
1358int WIN32API SetAbortProc(HDC hdc, ABORTPROC lpAbortProc)
1359{
1360 dprintf(("GDI32: SetAbortProc - stub (1)w\n"));
1361 return(1);
1362}
1363//******************************************************************************
1364//Selects the current path as a clipping region for a device context, combining
1365//any existing clipping region by using the specified mode
1366//TODO: Can be emulated with SelectClipRegion??
1367//******************************************************************************
1368BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
1369{
1370 dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
1371 return(TRUE);
1372}
1373//******************************************************************************
1374//TODO: Sets the color adjustment values for a device context. (used to adjust
1375// the input color of the src bitmap for calls of StretchBlt & StretchDIBits
1376// functions when HALFTONE mode is set
1377//******************************************************************************
1378BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
1379{
1380 dprintf(("GDI32: SetColorAdjustment, not implemented!(TRUE)\n"));
1381 return(TRUE);
1382}
1383//******************************************************************************
1384//Maps colors to system palette; faster way to update window (instead of redrawing)
1385//We just redraw
1386//******************************************************************************
1387BOOL WIN32API UpdateColors(HDC hdc)
1388{
1389 dprintf(("GDI32: UpdateColors\n"));
1390 return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);
1391}
1392//******************************************************************************
1393//******************************************************************************
1394BOOL WIN32API GdiFlush()
1395{
1396 dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
1397 return(TRUE);
1398}
1399//******************************************************************************
1400//******************************************************************************
1401BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
1402{
1403 dprintf(("GDI32: GdiComment, not implemented (TRUE)\n"));
1404 return(TRUE);
1405}
1406//******************************************************************************
1407//******************************************************************************
1408BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
1409{
1410 dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
1411 return(FALSE);
1412}
1413//******************************************************************************
1414//******************************************************************************
1415BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
1416{
1417 dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
1418 return(FALSE);
1419}
1420//******************************************************************************
1421//******************************************************************************
1422BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
1423{
1424 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
1425 return(FALSE);
1426}
1427//******************************************************************************
1428//******************************************************************************
1429BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
1430 UINT iFirstChar,
1431 UINT iLastChar,
1432 LPABCFLOAT pxBUffer)
1433{
1434 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
1435 return(FALSE);
1436}
1437//******************************************************************************
1438//******************************************************************************
1439INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
1440 INT cbOutput, LPSTR lpszOutData)
1441{
1442 dprintf(("GDI32: ExtEscape, %x %x %d %x %d %x not implemented", hdc, nEscape, cbInput, lpszInData, cbOutput, lpszOutData));
1443#ifdef DEBUG
1444 if(cbInput && lpszInData) {
1445 ULONG *tmp = (ULONG *)lpszInData;
1446 for(int i=0;i<cbInput/4;i++) {
1447 dprintf(("GDI32: ExtEscape par %d: %x", i, *tmp++));
1448 }
1449 }
1450#endif
1451 return(0);
1452}
1453//******************************************************************************
1454//******************************************************************************
1455int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
1456{
1457 dprintf(("GDI32: DrawEscape, not implemented\n"));
1458 return(0);
1459}
1460//******************************************************************************
1461//******************************************************************************
1462BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
1463{
1464 dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
1465 return(FALSE);
1466}
1467//******************************************************************************
1468//******************************************************************************
1469DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
1470 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
1471{
1472 dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
1473 return(GDI_ERROR);
1474}
1475//******************************************************************************
1476
1477//******************************************************************************
1478/*KSO Thu 21.05.1998*/
1479DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
1480 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
1481{
1482 dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
1483 return(GDI_ERROR);
1484}
1485//******************************************************************************
1486
1487//******************************************************************************
1488BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
1489{
1490 // Here is a guess for a undocumented entry
1491 dprintf(("GDI32: SetObjectOwner - stub (TRUE)\n"));
1492 return TRUE;
1493}
1494//******************************************************************************
1495
1496
1497/* Office 97 stubs - KSO Thu 21.05.1998*/
1498//******************************************************************************
1499BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
1500 HDC hdc,
1501 LPCSTR str,
1502 int count,
1503 int maxExt,
1504 LPINT lpnFit,
1505 LPINT alpDx,
1506 LPSIZE size)
1507{
1508 int index, nFit, extent;
1509 SIZE tSize;
1510
1511 dprintf(("GDI32: GetTextExtendExPointA\n"));
1512
1513 size->cx = size->cy = nFit = extent = 0;
1514 for(index = 0; index < count; index++)
1515 {
1516 if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
1517 if( extent+tSize.cx < maxExt )
1518 {
1519 extent+=tSize.cx;
1520 nFit++;
1521 str++;
1522 if( alpDx )
1523 alpDx[index] = extent;
1524 if( tSize.cy > size->cy ) size->cy = tSize.cy;
1525 }
1526 else break;
1527 }
1528 size->cx = extent;
1529
1530 if (lpnFit != NULL) // check if result is desired
1531 *lpnFit = nFit;
1532
1533 dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
1534 hdc,count,str,maxExt,nFit, size->cx,size->cy));
1535 return TRUE;
1536}
1537//******************************************************************************
1538//******************************************************************************
1539BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
1540 HDC arg1,
1541 LPCWSTR arg2,
1542 int arg3,
1543 int arg4,
1544 LPINT arg5,
1545 LPINT arg6,
1546 LPSIZE arg7
1547 )
1548{
1549 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1550 BOOL rc;
1551
1552 dprintf(("GDI32: GetTextExtendExPointW\n"));
1553 rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
1554 FreeAsciiString(astring);
1555 return rc;
1556}
1557//******************************************************************************
1558//******************************************************************************
1559UINT WIN32API DeleteColorSpace( /*KSO Thu 21.05.1998*/
1560 HCOLORSPACE hColorSpace
1561 )
1562{
1563 dprintf(("GDI32: DeleteColorSpace - stub\n"));
1564 return FALSE;
1565}
1566//******************************************************************************
1567//******************************************************************************
1568BOOL WIN32API SetColorSpace( /*KSO Thu 21.05.1998*/
1569 HDC hdc,
1570 HCOLORSPACE hColorSpace
1571 )
1572{
1573 dprintf(("GDI32: SetColorSpace - stub\n"));
1574 return FALSE;
1575}
1576//******************************************************************************
1577//******************************************************************************
1578 HCOLORSPACE WIN32API CreateColorSpaceA( /*KSO Thu 21.05.1998*/
1579 LPLOGCOLORSPACEA lpLogColorSpace
1580 )
1581{
1582 dprintf(("GDI32: CreateColorSpaceA - stub\n"));
1583 return 0;
1584}
1585//******************************************************************************
1586//******************************************************************************
1587HCOLORSPACE WIN32API CreateColorSpaceW( /*KSO Thu 21.05.1998*/
1588 LPLOGCOLORSPACEW lpwLogColorSpace
1589 )
1590{
1591 dprintf(("GDI32: CreateColorSpaceW - stub\n"));
1592 return 0;
1593}
1594//******************************************************************************
1595//******************************************************************************
1596HANDLE WIN32API GetColorSpace( /*KSO Thu 21.05.1998*/
1597 HDC hdc
1598 )
1599{
1600 dprintf(("GDI32: GetColorSpace - stub\n"));
1601 return 0;
1602}
1603//******************************************************************************
1604//******************************************************************************
1605int WIN32API SetICMMode( /*KSO Thu 21.05.1998*/
1606 HDC hdc,
1607 int mode
1608 )
1609{
1610 dprintf(("GDI32: SetICMMode - stub\n"));
1611 return 0;
1612}
1613//******************************************************************************
1614
1615
1616
1617
1618/*****************************************************************************
1619 * Name : BOOL CancelDC
1620 * Purpose : The CancelDC function cancels any pending operation on the
1621 * specified device context (DC).
1622 * Parameters: HDC hdc handle of device context
1623 * Variables :
1624 * Result : TRUE / FALSE
1625 * Remark :
1626 * Status : UNTESTED STUB
1627 *
1628 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1629 *****************************************************************************/
1630
1631BOOL WIN32API CancelDC(HDC hdc)
1632{
1633 dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
1634 hdc));
1635
1636 return (FALSE);
1637}
1638
1639
1640/*****************************************************************************
1641 * Name : BOOL CheckColorsInGamut
1642 * Purpose : The CheckColorsInGamut function indicates whether the specified
1643 * color values are within the gamut of the specified device.
1644 * Parameters: HDC hdc handle of device context
1645 * LPVOID lpaRGBQuad
1646 * LPVOID lpResult
1647 * DWORD dwResult
1648 * Variables :
1649 * Result : TRUE / FALSE
1650 * Remark :
1651 * Status : UNTESTED STUB
1652 *
1653 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1654 *****************************************************************************/
1655
1656BOOL WIN32API CheckColorsInGamut(HDC hdc,
1657 LPVOID lpaRGBQuad,
1658 LPVOID lpResult,
1659 DWORD dwResult)
1660{
1661 dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1662 hdc,
1663 lpaRGBQuad,
1664 lpResult,
1665 dwResult));
1666
1667 return (FALSE);
1668}
1669
1670
1671/*****************************************************************************
1672 * Name : BOOL ColorMatchToTarget
1673 * Purpose : The ColorMatchToTarget function enables or disables preview for
1674 * the specified device context. When preview is enabled, colors
1675 * in subsequent output to the specified device context are
1676 * displayed as they would appear on the target device. This is
1677 * useful for checking how well the target maps the specified
1678 * colors in an image. To enable preview, image color matching
1679 * must be enabled for both the target and the preview device context.
1680 * Parameters: HDC hdc handle of device context
1681 * HDC hdcTarget handle of target device context
1682 * DWORD uiAction
1683 * Variables :
1684 * Result : TRUE / FALSE
1685 * Remark :
1686 * Status : UNTESTED STUB
1687 *
1688 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1689 *****************************************************************************/
1690
1691BOOL WIN32API ColorMatchToTarget(HDC hdc,
1692 HDC hdcTarget,
1693 DWORD uiAction)
1694{
1695 dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
1696 hdc,
1697 hdcTarget,
1698 uiAction));
1699
1700 return (FALSE);
1701}
1702
1703
1704/*****************************************************************************
1705 * Name : BOOL CombineTransform
1706 * Purpose : The CombineTransform function concatenates two world-space to
1707 * page-space transformations.
1708 * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
1709 * XFORM *lLPXFORM1 address of 1st transformation
1710 * XFORM *lLPXFORM2 address of 2nd transformation
1711 * Variables :
1712 * Result : TRUE / FALSE
1713 * Remark :
1714 * Status : UNTESTED
1715 *
1716 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1717 * Markus Montkowski [Wen, 1999/01/12 20:18]
1718 *****************************************************************************/
1719
1720BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
1721 CONST XFORM *lLPXFORM1,
1722 CONST XFORM *lLPXFORM2)
1723{
1724 dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh).\n",
1725 lLPXFORMResult,
1726 lLPXFORM1,
1727 lLPXFORM2));
1728
1729 XFORM xfrm;
1730 if( O32_IsBadWritePtr( (void*)lLPXFORMResult, sizeof(XFORM)) ||
1731 O32_IsBadReadPtr( (void*)lLPXFORM1, sizeof(XFORM)) ||
1732 O32_IsBadWritePtr( (void*)lLPXFORM2, sizeof(XFORM)) )
1733 return (FALSE);
1734
1735 // Add the translations
1736 lLPXFORMResult->eDx = lLPXFORM1->eDx + lLPXFORM2->eDx;
1737 lLPXFORMResult->eDy = lLPXFORM1->eDy + lLPXFORM2->eDy;
1738
1739 // Multiply the matrixes
1740 xfrm.eM11 = lLPXFORM1->eM11 * lLPXFORM2->eM11 + lLPXFORM1->eM21 * lLPXFORM1->eM12;
1741 xfrm.eM12 = lLPXFORM1->eM11 * lLPXFORM2->eM12 + lLPXFORM1->eM12 * lLPXFORM1->eM22;
1742 xfrm.eM21 = lLPXFORM1->eM21 * lLPXFORM2->eM11 + lLPXFORM1->eM22 * lLPXFORM1->eM21;
1743 xfrm.eM22 = lLPXFORM1->eM21 * lLPXFORM2->eM12 + lLPXFORM1->eM22 * lLPXFORM1->eM22;
1744
1745 // Now copy to resulting XFROM as the pt must not be distinct
1746 lLPXFORMResult->eM11 = xfrm.eM11;
1747 lLPXFORMResult->eM12 = xfrm.eM12;
1748 lLPXFORMResult->eM21 = xfrm.eM21;
1749 lLPXFORMResult->eM22 = xfrm.eM22;
1750
1751 return (TRUE);
1752}
1753
1754
1755
1756/*****************************************************************************
1757 * Name : HBRUSH CreateDIBPatternBrush
1758 * Purpose : The CreateDIBPatternBrush function creates a logical brush that
1759 * has the pattern specified by the specified device-independent
1760 * bitmap (DIB). The brush can subsequently be selected into any
1761 * device context that is associated with a device that supports
1762 * raster operations.
1763 * This function is provided only for compatibility with applications
1764 * written for versions of Windows earlier than 3.0. For Win32-based
1765 * applications, use the CreateDIBPatternBrushPt function.
1766 * Parameters: HGLOBAL hglbDIBPacked Identifies a global memory object containing
1767 * a packed DIB, which consists of a BITMAPINFO structure immediately
1768 * followed by an array of bytes defining the pixels of the bitmap.
1769 * UINT fuColorSpec color table data
1770 * Variables :
1771 * Result : TRUE / FALSE
1772 * Remark :
1773 * Status : UNTESTED
1774 *
1775 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1776 * Markus Montkowski [Wen, 1999/01/12 20:00]
1777 *****************************************************************************/
1778
1779HBRUSH WIN32API CreateDIBPatternBrush( HGLOBAL hglbDIBPacked,
1780 UINT fuColorSpec)
1781{
1782 LPVOID lpMem;
1783 HBRUSH ret = 0;
1784 dprintf(("GDI32: CreateDIBPatternBrush(%08xh, %08xh) \n",
1785 hglbDIBPacked,
1786 fuColorSpec));
1787
1788 lpMem = GlobalLock(hglbDIBPacked);
1789 if(NULL!=lpMem)
1790 {
1791
1792 ret = CreateDIBPatternBrushPt( lpMem,
1793 fuColorSpec);
1794 GlobalUnlock(hglbDIBPacked);
1795 }
1796
1797 return (ret);
1798}
1799
1800
1801
1802
1803/*****************************************************************************
1804 * Name : int EnumICMProfilesA
1805 * Purpose : The EnumICMProfilesA function enumerates the different color
1806 * profiles that the system supports for the specified device context.
1807 * Parameters: HDC hdc
1808 * ICMENUMPROC lpICMEnumFunc
1809 * LPARAM lParam
1810 * Variables :
1811 * Result : TRUE / FALSE
1812 * Remark :
1813 * Status : UNTESTED STUB
1814 *
1815 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1816 *****************************************************************************/
1817
1818int WIN32API EnumICMProfilesA(HDC hdc,
1819 ICMENUMPROCA lpICMEnumProc,
1820 LPARAM lParam)
1821{
1822 dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
1823 hdc,
1824 lpICMEnumProc,
1825 lParam));
1826
1827 return (-1);
1828}
1829
1830
1831/*****************************************************************************
1832 * Name : int EnumICMProfilesW
1833 * Purpose : The EnumICMProfilesW function enumerates the different color
1834 * profiles that the system supports for the specified device context.
1835 * Parameters: HDC hdc
1836 * ICMENUMPROC lpICMEnumFunc
1837 * LPARAM lParam
1838 * Variables :
1839 * Result : TRUE / FALSE
1840 * Remark :
1841 * Status : UNTESTED STUB
1842 *
1843 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1844 *****************************************************************************/
1845
1846int WIN32API EnumICMProfilesW(HDC hdc,
1847 ICMENUMPROCW lpICMEnumProc,
1848 LPARAM lParam)
1849{
1850 dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
1851 hdc,
1852 lpICMEnumProc,
1853 lParam));
1854
1855 return (-1);
1856}
1857
1858
1859/*****************************************************************************
1860 * Name : BOOL FixBrushOrgEx
1861 * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
1862 * It is provided for compatibility with Win32s. If called, the
1863 * function does nothing, and returns FALSE.
1864 * Parameters: HDC, int, int, LPPOINT
1865 * Variables :
1866 * Result : TRUE / FALSE
1867 * Remark : not implemented in Win32
1868 * Status : UNTESTED STUB
1869 *
1870 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1871 *****************************************************************************/
1872
1873BOOL WIN32API FixBrushOrgEx(HDC hdc,
1874 int iDummy1,
1875 int iDummy2,
1876 LPPOINT lpPoint)
1877{
1878 dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1879 hdc,
1880 iDummy1,
1881 iDummy2,
1882 lpPoint));
1883
1884 return (FALSE);
1885}
1886
1887
1888/*****************************************************************************
1889 * Name : DWORD GdiGetBatchLimit
1890 * Purpose : The GdiGetBatchLimit function returns the maximum number of
1891 * function calls that can be accumulated in the calling thread's
1892 * current batch. The system flushes the current batch whenever
1893 * this limit is exceeded.
1894 * Parameters:
1895 * Variables :
1896 * Result : 1
1897 * Remark :
1898 * Status : UNTESTED STUB
1899 *
1900 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1901 *****************************************************************************/
1902
1903DWORD WIN32API GdiGetBatchLimit(VOID)
1904{
1905 dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
1906
1907 return (1);
1908}
1909
1910
1911/*****************************************************************************
1912 * Name : DWORD GdiSetBatchLimit
1913 * Purpose : The GdiSetBatchLimit function sets the maximum number of
1914 * functions that can be accumulated in the calling thread's current
1915 * batch. The system flushes the current batch whenever this limit
1916 * is exceeded.
1917 * Parameters: DWORD dwLimit
1918 * Variables :
1919 * Result :
1920 * Remark :
1921 * Status : UNTESTED STUB
1922 *
1923 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1924 *****************************************************************************/
1925
1926DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
1927{
1928 dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
1929 dwLimit));
1930
1931 return (1);
1932}
1933
1934
1935/*****************************************************************************
1936 * Name : DWORD GetCharacterPlacementA
1937 * Purpose : The GetCharacterPlacementA function retrieves information about
1938 * a character string, such as character widths, caret positioning,
1939 * ordering within the string, and glyph rendering. The type of
1940 * information returned depends on the dwFlags parameter and is
1941 * based on the currently selected font in the given display context.
1942 * The function copies the information to the specified GCP_RESULTSA
1943 * structure or to one or more arrays specified by the structure.
1944 * Parameters: HDC hdc handle to device context
1945 * LPCSTR lpString pointer to string
1946 * int nCount number of characters in string
1947 * int nMaxExtent maximum extent for displayed string
1948 * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
1949 * DWORD dwFlags placement flags
1950 * Variables :
1951 * Result :
1952 * Remark :
1953 * Status : UNTESTED STUB
1954 *
1955 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1956 *****************************************************************************/
1957
1958DWORD WIN32API GetCharacterPlacementA(HDC hdc,
1959 LPCSTR lpString,
1960 int nCount,
1961 int nMaxExtent,
1962 GCP_RESULTSA * lpResults,
1963 DWORD dwFlags)
1964{
1965 dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1966 hdc,
1967 lpString,
1968 nCount,
1969 nMaxExtent,
1970 lpResults,
1971 dwFlags));
1972
1973 return (0);
1974}
1975
1976
1977/*****************************************************************************
1978 * Name : DWORD GetCharacterPlacementW
1979 * Purpose : The GetCharacterPlacementW function retrieves information about
1980 * a character string, such as character widths, caret positioning,
1981 * ordering within the string, and glyph rendering. The type of
1982 * information returned depends on the dwFlags parameter and is
1983 * based on the currently selected font in the given display context.
1984 * The function copies the information to the specified GCP_RESULTSW
1985 * structure or to one or more arrays specified by the structure.
1986 * Parameters: HDC hdc handle to device context
1987 * LPCSTR lpString pointer to string
1988 * int nCount number of characters in string
1989 * int nMaxExtent maximum extent for displayed string
1990 * GCP_RESULTSW *lpResults pointer to buffer for placement result
1991 * DWORD dwFlags placement flags
1992 * Variables :
1993 * Result :
1994 * Remark :
1995 * Status : UNTESTED STUB
1996 *
1997 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1998 *****************************************************************************/
1999
2000DWORD WIN32API GetCharacterPlacementW(HDC hdc,
2001 LPCWSTR lpString,
2002 int nCount,
2003 int nMaxExtent,
2004 GCP_RESULTSW *lpResults,
2005 DWORD dwFlags)
2006{
2007 dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2008 hdc,
2009 lpString,
2010 nCount,
2011 nMaxExtent,
2012 lpResults,
2013 dwFlags));
2014
2015 return (0);
2016}
2017
2018
2019/*****************************************************************************
2020 * Name : DWORD GetDeviceGammaRamp
2021 * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
2022 * direct color display boards.
2023 * Parameters: HDC hdc handle to device context
2024 * LPVOID lpRamp Gamma ramp array
2025 * Variables :
2026 * Result :
2027 * Remark :
2028 * Status : UNTESTED STUB
2029 *
2030 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2031 *****************************************************************************/
2032
2033DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
2034 LPVOID lpRamp)
2035{
2036 dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
2037 hdc,
2038 lpRamp));
2039
2040 return (FALSE);
2041}
2042
2043
2044
2045
2046/*****************************************************************************
2047 * Name : BOOL GetICMProfileA
2048 * Purpose : The GetICMProfileA function retrieves the name of the color
2049 * profile file for the device associated with the specified device
2050 * context.
2051 * Parameters: HDC hdc handle to device context
2052 * DWORD cbName
2053 * LPTSTR lpszFilename
2054 * Variables :
2055 * Result : TRUE / FALSE
2056 * Remark :
2057 * Status : UNTESTED STUB
2058 *
2059 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2060 *****************************************************************************/
2061
2062BOOL WIN32API GetICMProfileA(HDC hdc,
2063 DWORD cbName,
2064 LPTSTR lpszFilename)
2065{
2066 dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
2067 hdc,
2068 cbName,
2069 lpszFilename));
2070
2071 return (FALSE);
2072}
2073
2074
2075/*****************************************************************************
2076 * Name : BOOL GetICMProfileW
2077 * Purpose : The GetICMProfileW function retrieves the name of the color
2078 * profile file for the device associated with the specified device
2079 * context.
2080 * Parameters: HDC hdc handle to device context
2081 * DWORD cbName
2082 * LPWSTR lpszFilename
2083 * Variables :
2084 * Result : TRUE / FALSE
2085 * Remark :
2086 * Status : UNTESTED STUB
2087 *
2088 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2089 *****************************************************************************/
2090
2091BOOL WIN32API GetICMProfileW(HDC hdc,
2092 DWORD cbName,
2093 LPTSTR lpszFilename)
2094{
2095 dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
2096 hdc,
2097 cbName,
2098 lpszFilename));
2099
2100 return (FALSE);
2101}
2102
2103
2104/*****************************************************************************
2105 * Name : BOOL GetLogColorSpaceA
2106 * Purpose : The GetLogColorSpace function retrieves information about the
2107 * logical color space identified by the specified handle.
2108 * Parameters: HCOLORSPACE hColorSpace
2109 * LPLOGCOLORSPACE lpbuffer
2110 * DWORD nSize
2111 * Variables :
2112 * Result : TRUE / FALSE
2113 * Remark :
2114 * Status : UNTESTED STUB
2115 *
2116 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2117 *****************************************************************************/
2118
2119#define LPLOGCOLORSPACE LPVOID
2120BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
2121 LPLOGCOLORSPACE lpBuffer,
2122 DWORD nSize)
2123{
2124 dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
2125 hColorSpace,
2126 lpBuffer,
2127 nSize));
2128
2129 return (FALSE);
2130}
2131
2132
2133/*****************************************************************************
2134 * Name : BOOL GetLogColorSpaceW
2135 * Purpose : The GetLogColorSpace function retrieves information about the
2136 * logical color space identified by the specified handle.
2137 * Parameters: HCOLORSPACE hColorSpace
2138 * LPLOGCOLORSPACE lpbuffer
2139 * DWORD nSize
2140 * Variables :
2141 * Result : TRUE / FALSE
2142 * Remark :
2143 * Status : UNTESTED STUB
2144 *
2145 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2146 *****************************************************************************/
2147
2148BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
2149 LPLOGCOLORSPACE lpBuffer,
2150 DWORD nSize)
2151{
2152 dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
2153 hColorSpace,
2154 lpBuffer,
2155 nSize));
2156
2157 return (FALSE);
2158}
2159
2160
2161/*****************************************************************************
2162 * Name : BOOL SetDeviceGammaRamp
2163 * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
2164 * color display boards.
2165 * Parameters: HDC hdc handle of device context
2166 * LPVOID lpRamp
2167 * Variables :
2168 * Result : TRUE / FALSE
2169 * Remark :
2170 * Status : UNTESTED STUB
2171 *
2172 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2173 *****************************************************************************/
2174
2175BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
2176 LPVOID lpRamp)
2177{
2178 dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
2179 hdc,
2180 lpRamp));
2181
2182 return (FALSE);
2183}
2184
2185
2186/*****************************************************************************
2187 * Name : BOOL SetICMProfileA
2188 * Purpose : The SetICMProfileA function sets the color profile for the
2189 * specified device context.
2190 * Parameters: HDC hdc handle of device context
2191 * LPTSTR lpFileName
2192 * Variables :
2193 * Result : TRUE / FALSE
2194 * Remark :
2195 * Status : UNTESTED STUB
2196 *
2197 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2198 *****************************************************************************/
2199
2200BOOL WIN32API SetICMProfileA(HDC hdc,
2201 LPTSTR lpFileName)
2202{
2203 dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
2204 hdc,
2205 lpFileName));
2206
2207 return (FALSE);
2208}
2209
2210
2211/*****************************************************************************
2212 * Name : BOOL SetICMProfileW
2213 * Purpose : The SetICMProfileW function sets the color profile for the
2214 * specified device context.
2215 * Parameters: HDC hdc handle of device context
2216 * LPTSTR lpFileName
2217 * Variables :
2218 * Result : TRUE / FALSE
2219 * Remark :
2220 * Status : UNTESTED STUB
2221 *
2222 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2223 *****************************************************************************/
2224
2225BOOL WIN32API SetICMProfileW(HDC hdc,
2226 LPWSTR lpFileName)
2227{
2228 dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
2229 hdc,
2230 lpFileName));
2231
2232 return (FALSE);
2233}
2234
2235
2236
2237/*****************************************************************************
2238 * Name : BOOL UpdateICMRegKeyA
2239 * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
2240 * registry entries that identify ICC color profiles or color-matching
2241 * DLLs. The function carries out the action specified by the nCommand
2242 * parameter.
2243 * Parameters: DWORD dwReserved
2244 * DWORD CMID
2245 * LPTSTR lpszFileName
2246 * UINT nCommand
2247 * Variables :
2248 * Result : TRUE / FALSE
2249 * Remark :
2250 * Status : UNTESTED STUB
2251 *
2252 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2253 *****************************************************************************/
2254
2255BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
2256 DWORD CMID,
2257 LPTSTR lpszFileName,
2258 UINT nCommand)
2259{
2260 dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
2261 dwReserved,
2262 CMID,
2263 lpszFileName,
2264 nCommand));
2265
2266 return (FALSE);
2267}
2268
2269
2270/*****************************************************************************
2271 * Name : BOOL UpdateICMRegKeyW
2272 * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
2273 * registry entries that identify ICC color profiles or color-matching
2274 * DLLs. The function carries out the action specified by the nCommand
2275 * parameter.
2276 * Parameters: DWORD dwReserved
2277 * DWORD CMID
2278 * LPWSTR lpszFileName
2279 * UINT nCommand
2280 * Variables :
2281 * Result : TRUE / FALSE
2282 * Remark :
2283 * Status : UNTESTED STUB
2284 *
2285 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2286 *****************************************************************************/
2287
2288BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
2289 DWORD CMID,
2290 LPWSTR lpszFileName,
2291 UINT nCommand)
2292{
2293 dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
2294 dwReserved,
2295 CMID,
2296 lpszFileName,
2297 nCommand));
2298
2299 return (FALSE);
2300}
2301
2302
2303
Note: See TracBrowser for help on using the repository browser.