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

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

Moved GetClipRgn & GetClipBox into user32 (dc.cpp)

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