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

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

OffsetRgn fix + small changes

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