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

Last change on this file since 3929 was 3929, checked in by bird, 25 years ago

Corrected/Updated some states.

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