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

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

region changes

File size: 84.0 KB
Line 
1/* $Id: gdi32.cpp,v 1.51 2000-06-14 13:17:50 sandervl Exp $ */
2
3/*
4 * GDI32 apis
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 * Copyright 1998 Patrick Haller
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include <stdlib.h>
14#include <stdarg.h>
15#include <string.h>
16#include <odinwrap.h>
17#include "misc.h"
18#include "callback.h"
19#include "unicode.h"
20#include "dibsect.h"
21#include <codepage.h>
22#include "oslibgpi.h"
23#include "oslibgdi.h"
24
25#define DBG_LOCALLOG DBG_gdi32
26#include "dbglocal.h"
27
28ODINDEBUGCHANNEL(GDI32-GDI32)
29
30//******************************************************************************
31//******************************************************************************
32BOOL WIN32API GetTextExtentPointA(HDC hdc, LPCSTR lpsz, int cbString, LPSIZE lpSize)
33{
34 BOOL rc;
35
36 lpSize->cx = lpSize->cy = 0;
37 rc = O32_GetTextExtentPoint(hdc, lpsz, cbString, lpSize);
38 dprintf(("GDI32: GetTextExtentPointA of %s returned %d\n", lpsz, rc));
39 return(rc);
40}
41//******************************************************************************
42//******************************************************************************
43COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor)
44{
45 dprintf(("GDI32: SetBkColor to %X\n", crColor));
46 return(O32_SetBkColor(hdc, crColor));
47}
48//******************************************************************************
49//******************************************************************************
50COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor)
51{
52 COLORREF clr;
53
54 clr = O32_SetTextColor(hdc, crColor);
55 dprintf(("GDI32: SetTextColor from %X to %X\n", clr, crColor));
56 return(clr);
57}
58//******************************************************************************
59//******************************************************************************
60
61static hFntDefaultGui = NULL;
62HGDIOBJ WIN32API GetStockObject(int arg1)
63{
64 HGDIOBJ obj;
65
66 switch(arg1)
67 {
68 case DEFAULT_GUI_FONT:
69 if(NULL==hFntDefaultGui)
70 hFntDefaultGui = CreateFontA( 9, 0, 0, 0, FW_MEDIUM, FALSE,
71 FALSE, FALSE, ANSI_CHARSET,
72 OUT_DEFAULT_PRECIS,
73 CLIP_DEFAULT_PRECIS,
74 DEFAULT_QUALITY,
75 FIXED_PITCH|FF_MODERN, "WarpSans");
76 obj = hFntDefaultGui;
77 break;
78 default:
79 obj = O32_GetStockObject(arg1);
80 break;
81 }
82 dprintf(("GDI32: GetStockObject %d returned %X\n", arg1, obj));
83 return(obj);
84}
85//******************************************************************************
86//******************************************************************************
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//******************************************************************************
758int WIN32API GetMapMode( HDC hdc)
759{
760 dprintf(("GDI32: GetMapMode %x", hdc));
761 return O32_GetMapMode(hdc);
762}
763//******************************************************************************
764//******************************************************************************
765BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
766{
767 dprintf(("GDI32: GetMiterLimit"));
768 return O32_GetMiterLimit(arg1, arg2);
769}
770//******************************************************************************
771//******************************************************************************
772COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2)
773{
774 dprintf(("GDI32: GetNearestColor\n"));
775 return O32_GetNearestColor(arg1, arg2);
776}
777//******************************************************************************
778//******************************************************************************
779UINT WIN32API GetOutlineTextMetricsA( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICA arg3)
780{
781 dprintf(("GDI32: GetOutlineTextMetricsA"));
782 return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
783}
784//******************************************************************************
785//******************************************************************************
786UINT WIN32API GetOutlineTextMetricsW( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICW arg3)
787{
788 dprintf(("GDI32: GetOutlineTextMetricsW STUB"));
789 // NOTE: This will not work as is (needs UNICODE support)
790// return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
791 return 0;
792}
793//******************************************************************************
794//******************************************************************************
795INT WIN32API GetPath( HDC arg1, PPOINT arg2, PBYTE arg3, int arg4)
796{
797 dprintf(("GDI32: GetPath"));
798 return O32_GetPath(arg1, arg2, arg3, arg4);
799}
800//******************************************************************************
801//******************************************************************************
802int WIN32API GetPolyFillMode( HDC arg1)
803{
804 dprintf(("GDI32: GetPolyFillMode"));
805 return O32_GetPolyFillMode(arg1);
806}
807//******************************************************************************
808//******************************************************************************
809int WIN32API GetROP2( HDC arg1)
810{
811 dprintf(("GDI32: GetROP2"));
812 return O32_GetROP2(arg1);
813}
814//******************************************************************************
815//******************************************************************************
816BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2)
817{
818 dprintf(("GDI32: GetRasterizerCaps"));
819 return O32_GetRasterizerCaps(arg1, arg2);
820}
821//******************************************************************************
822//******************************************************************************
823UINT WIN32API GetTextAlign( HDC arg1)
824{
825 dprintf(("GDI32: GetTextAlign"));
826 return O32_GetTextAlign(arg1);
827}
828//******************************************************************************
829//******************************************************************************
830int WIN32API GetTextCharacterExtra( HDC arg1)
831{
832 dprintf(("GDI32: GetTextCharacterExtra"));
833 return O32_GetTextCharacterExtra(arg1);
834}
835//******************************************************************************
836//******************************************************************************
837COLORREF WIN32API GetTextColor( HDC arg1)
838{
839 dprintf(("GDI32: GetTextColor"));
840 return O32_GetTextColor(arg1);
841}
842//******************************************************************************
843//******************************************************************************
844BOOL WIN32API GetTextExtentPoint32A( HDC hdc, LPCSTR lpsz, int cbString, PSIZE lpSize)
845{
846 BOOL rc;
847
848 lpSize->cx = lpSize->cy = 0;
849 rc = O32_GetTextExtentPoint32(hdc, lpsz, cbString, lpSize);
850 dprintf(("GDI32: GetTextExtentPoint32A %x %s %d returned %d (%d,%d)", hdc, lpsz, cbString, rc, lpSize->cx, lpSize->cy));
851 return rc;
852}
853//******************************************************************************
854//******************************************************************************
855BOOL WIN32API GetTextExtentPoint32W(HDC arg1, LPCWSTR arg2, int arg3, PSIZE lpSize)
856{
857 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
858 BOOL rc;
859
860 dprintf(("GDI32: GetTextExtentPoint32W %s\n", astring));
861 lpSize->cx = lpSize->cy = 0;
862 rc = O32_GetTextExtentPoint32(arg1, astring, arg3, lpSize);
863 FreeAsciiString(astring);
864 return(rc);
865}
866//******************************************************************************
867//******************************************************************************
868BOOL WIN32API GetTextExtentPointW(HDC hdc,
869 LPCWSTR lpString,
870 int cbString,
871 PSIZE lpSize)
872{
873 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
874 BOOL rc;
875
876 lpSize->cx = lpSize->cy = 0;
877 rc = O32_GetTextExtentPoint(hdc,
878 astring,
879 cbString,
880 lpSize);
881 dprintf(("GDI32: GetTextExtentPointW %X %s (size %08xh) returned %d\n", hdc, astring, cbString, rc));
882 dprintf(("GDI32: GetTextExtentPointW (%d,%d)\n", lpSize->cx, lpSize->cy));
883
884 FreeAsciiString(astring);
885 return(rc);
886}
887//******************************************************************************
888//******************************************************************************
889int WIN32API GetTextFaceA( HDC arg1, int arg2, LPSTR arg3)
890{
891 dprintf(("GDI32: GetTextFaceA"));
892 return O32_GetTextFace(arg1, arg2, arg3);
893}
894//******************************************************************************
895//******************************************************************************
896int WIN32API GetTextFaceW( HDC arg1, int arg2, LPWSTR arg3)
897{
898 char *astring = (char *)malloc(arg2+1);
899 int rc;
900
901 dprintf(("GDI32: GetTextFaceW"));
902 rc = O32_GetTextFace(arg1, arg2, astring);
903 AsciiToUnicode(astring, arg3);
904 free(astring);
905 return rc;
906}
907//******************************************************************************
908//******************************************************************************
909BOOL WIN32API GetTextMetricsA( HDC arg1, LPTEXTMETRICA arg2)
910{
911 BOOL rc;
912
913 rc = O32_GetTextMetrics(arg1, arg2);
914 dprintf(("GDI32: GetTextMetricsA returned %d\n", rc));
915 return(rc);
916}
917//******************************************************************************
918//******************************************************************************
919BOOL WIN32API GetTextMetricsW( HDC arg1, LPTEXTMETRICW pwtm)
920{
921 BOOL rc;
922 TEXTMETRICA atm;
923
924 dprintf(("GDI32: GetTextMetricsW"));
925
926 rc = O32_GetTextMetrics(arg1, &atm);
927 pwtm->tmHeight = atm.tmHeight;
928 pwtm->tmAscent = atm.tmAscent;
929 pwtm->tmDescent = atm.tmDescent;
930 pwtm->tmInternalLeading = atm.tmInternalLeading;
931 pwtm->tmExternalLeading = atm.tmExternalLeading;
932 pwtm->tmAveCharWidth = atm.tmAveCharWidth;
933 pwtm->tmMaxCharWidth = atm.tmMaxCharWidth;
934 pwtm->tmWeight = atm.tmWeight;
935 pwtm->tmOverhang = atm.tmOverhang;
936 pwtm->tmDigitizedAspectX = atm.tmDigitizedAspectX;
937 pwtm->tmDigitizedAspectY = atm.tmDigitizedAspectY;
938 pwtm->tmFirstChar = atm.tmFirstChar;
939 pwtm->tmLastChar = atm.tmLastChar;
940 pwtm->tmDefaultChar = atm.tmDefaultChar;
941 pwtm->tmBreakChar = atm.tmBreakChar;
942 pwtm->tmItalic = atm.tmItalic;
943 pwtm->tmUnderlined = atm.tmUnderlined;
944 pwtm->tmStruckOut = atm.tmStruckOut;
945 pwtm->tmPitchAndFamily = atm.tmPitchAndFamily;
946 pwtm->tmCharSet = atm.tmCharSet;
947 return(rc);
948}
949//******************************************************************************
950//******************************************************************************
951BOOL WIN32API GetViewportExtEx( HDC arg1, PSIZE arg2)
952{
953 dprintf(("GDI32: GetViewportExtEx"));
954 return O32_GetViewportExtEx(arg1, arg2);
955}
956//******************************************************************************
957//******************************************************************************
958BOOL WIN32API GetViewportOrgEx( HDC arg1, PPOINT arg2)
959{
960 dprintf(("GDI32: GetViewportOrgEx"));
961 return O32_GetViewportOrgEx(arg1, arg2);
962}
963//******************************************************************************
964//******************************************************************************
965BOOL WIN32API GetWindowOrgEx( HDC arg1, PPOINT arg2)
966{
967 dprintf(("GDI32: GetWindowOrgEx"));
968 return O32_GetWindowOrgEx(arg1, arg2);
969}
970//******************************************************************************
971//******************************************************************************
972BOOL WIN32API GetWorldTransform( HDC arg1, LPXFORM arg2)
973{
974 dprintf(("GDI32: GetWorldTransform"));
975 return O32_GetWorldTransform(arg1, arg2);
976}
977//******************************************************************************
978//******************************************************************************
979ODINFUNCTION3(BOOL, LPtoDP, HDC, hdc, PPOINT, lpPoints, int, nCount)
980{
981 return O32_LPtoDP(hdc, lpPoints, nCount);
982}
983//******************************************************************************
984//******************************************************************************
985BOOL WIN32API ModifyWorldTransform( HDC arg1, const XFORM *arg2, DWORD arg3)
986{
987 dprintf(("GDI32: ModifyWorldTransform"));
988 return O32_ModifyWorldTransform(arg1, (LPXFORM)arg2, arg3);
989}
990//******************************************************************************
991//******************************************************************************
992BOOL WIN32API OffsetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
993{
994 dprintf(("GDI32: OffsetViewportOrgEx"));
995 return O32_OffsetViewportOrgEx(arg1, arg2, arg3, arg4);
996}
997//******************************************************************************
998//******************************************************************************
999BOOL WIN32API OffsetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1000{
1001 dprintf(("GDI32: OffsetWindowOrgEx"));
1002 return O32_OffsetWindowOrgEx(arg1, arg2, arg3, arg4);
1003}
1004//******************************************************************************
1005//******************************************************************************
1006BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
1007 int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
1008 int nYRadial2)
1009{
1010 dprintf(("GDI32: Pie"));
1011 //CB: bug in O32_Pie
1012 if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
1013 return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
1014 else
1015 return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
1016}
1017//******************************************************************************
1018//******************************************************************************
1019BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
1020{
1021 dprintf(("GDI32: PolyBezier"));
1022 return O32_PolyBezier(arg1, arg2, (int)arg3);
1023}
1024//******************************************************************************
1025//******************************************************************************
1026BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
1027{
1028 dprintf(("GDI32: PolyBezierTo"));
1029 return O32_PolyBezierTo(arg1, arg2, arg3);
1030}
1031//******************************************************************************
1032//******************************************************************************
1033BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
1034{
1035 dprintf(("GDI32: PolyDraw"));
1036 return O32_PolyDraw(arg1, arg2, arg3, arg4);
1037}
1038//******************************************************************************
1039//******************************************************************************
1040BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
1041{
1042 dprintf(("GDI32: PolyPolygon"));
1043 return O32_PolyPolygon(arg1, arg2, arg3, arg4);
1044}
1045//******************************************************************************
1046//******************************************************************************
1047BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
1048{
1049 dprintf(("GDI32: PolyPolyline"));
1050
1051 return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
1052}
1053//******************************************************************************
1054//******************************************************************************
1055BOOL WIN32API Polygon( HDC arg1, const POINT * arg2, int arg3)
1056{
1057 dprintf(("GDI32: Polygon"));
1058 return O32_Polygon(arg1, arg2, arg3);
1059}
1060//******************************************************************************
1061//******************************************************************************
1062BOOL WIN32API PtVisible( HDC arg1, int arg2, int arg3)
1063{
1064 dprintf(("GDI32: PtVisible"));
1065 return O32_PtVisible(arg1, arg2, arg3);
1066}
1067//******************************************************************************
1068//******************************************************************************
1069BOOL WIN32API RectVisible( HDC arg1, const RECT * arg2)
1070{
1071 dprintf(("GDI32: RectVisible\n"));
1072 return O32_RectVisible(arg1, arg2);
1073}
1074//******************************************************************************
1075//******************************************************************************
1076HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
1077{
1078 dprintf(("GDI32: ResetDCA\n"));
1079 return (HDC)O32_ResetDC(arg1, arg2);
1080}
1081//******************************************************************************
1082//******************************************************************************
1083HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
1084{
1085 dprintf(("GDI32: ResetDCW\n"));
1086 // NOTE: This will not work as is (needs UNICODE support)
1087 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
1088}
1089//******************************************************************************
1090//******************************************************************************
1091BOOL WIN32API RestoreDC( HDC arg1, int arg2)
1092{
1093 dprintf(("GDI32: RestoreDC\n"));
1094 return O32_RestoreDC(arg1, arg2);
1095}
1096//******************************************************************************
1097//******************************************************************************
1098BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
1099{
1100 dprintf(("GDI32: RoundRect"));
1101 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1102}
1103//******************************************************************************
1104//******************************************************************************
1105int WIN32API SaveDC( HDC arg1)
1106{
1107 dprintf(("GDI32: SaveDC"));
1108 return O32_SaveDC(arg1);
1109}
1110//******************************************************************************
1111//******************************************************************************
1112BOOL WIN32API ScaleViewportExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1113{
1114 dprintf(("GDI32: ScaleViewportExtEx"));
1115 return O32_ScaleViewportExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1116}
1117//******************************************************************************
1118//******************************************************************************
1119BOOL WIN32API ScaleWindowExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
1120{
1121 dprintf(("GDI32: ScaleWindowExtEx"));
1122 return O32_ScaleWindowExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
1123}
1124//******************************************************************************
1125//******************************************************************************
1126int WIN32API SetArcDirection( HDC arg1, int arg2)
1127{
1128 dprintf(("GDI32: SetArcDirection"));
1129 return O32_SetArcDirection(arg1, arg2);
1130}
1131//******************************************************************************
1132//******************************************************************************
1133UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
1134{
1135 dprintf(("GDI32: SetBoundsRect"));
1136 return O32_SetBoundsRect(arg1, arg2, arg3);
1137}
1138//******************************************************************************
1139//******************************************************************************
1140BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1141{
1142 BOOL rc;
1143
1144 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
1145 dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc));
1146 return(rc);
1147}
1148//******************************************************************************
1149//******************************************************************************
1150int WIN32API SetGraphicsMode(HDC arg1, int arg2)
1151{
1152 dprintf(("GDI32: SetGraphicsMode"));
1153 return O32_SetGraphicsMode(arg1, arg2);
1154}
1155//******************************************************************************
1156//******************************************************************************
1157ODINFUNCTION2(int, SetMapMode, HDC, hdc, int, fnMapMode)
1158{
1159 return O32_SetMapMode(hdc, fnMapMode);
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 SetViewportExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
1200{
1201 dprintf(("GDI32: SetViewportExtEx"));
1202 return O32_SetViewportExtEx(arg1, arg2, arg3, arg4);
1203}
1204//******************************************************************************
1205//******************************************************************************
1206BOOL WIN32API SetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1207{
1208 dprintf(("GDI32: SetViewportOrgEx"));
1209 return O32_SetViewportOrgEx(arg1, arg2, arg3, arg4);
1210}
1211//******************************************************************************
1212//******************************************************************************
1213BOOL WIN32API SetWindowExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
1214{
1215 dprintf(("GDI32: SetWindowExtEx"));
1216 return O32_SetWindowExtEx(arg1, arg2, arg3, arg4);
1217}
1218//******************************************************************************
1219//******************************************************************************
1220BOOL WIN32API SetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
1221{
1222 dprintf(("GDI32: SetWindowOrgEx"));
1223 return O32_SetWindowOrgEx(arg1, arg2, arg3, arg4);
1224}
1225//******************************************************************************
1226//******************************************************************************
1227BOOL WIN32API SetWorldTransform( HDC arg1, const XFORM *arg2)
1228{
1229 dprintf(("GDI32: SetWorldTransform"));
1230 return O32_SetWorldTransform(arg1, (LPXFORM)arg2);
1231}
1232//******************************************************************************
1233//******************************************************************************
1234INT WIN32API StartDocA( HDC arg1, const DOCINFOA *arg2)
1235{
1236 dprintf(("GDI32: StartDocA"));
1237 return O32_StartDoc(arg1, (LPDOCINFOA)arg2);
1238}
1239//******************************************************************************
1240//******************************************************************************
1241INT WIN32API StartDocW( HDC arg1, const DOCINFOW *arg2)
1242{
1243 dprintf(("GDI32: StartDocW STUB"));
1244 // NOTE: This will not work as is (needs UNICODE support)
1245// return O32_StartDoc(arg1, arg2);
1246 return 0;
1247}
1248//******************************************************************************
1249//******************************************************************************
1250int WIN32API StartPage( HDC arg1)
1251{
1252 dprintf(("GDI32: StartPage"));
1253 return O32_StartPage(arg1);
1254}
1255//******************************************************************************
1256//******************************************************************************
1257BOOL WIN32API UnrealizeObject( HGDIOBJ hObject)
1258{
1259 dprintf(("GDI32: UnrealizeObject %x", hObject));
1260 return O32_UnrealizeObject(hObject);
1261}
1262//******************************************************************************
1263//******************************************************************************
1264BOOL WIN32API WidenPath( HDC hdc)
1265{
1266 dprintf(("GDI32: WidenPath %x", hdc));
1267 return O32_WidenPath(hdc);
1268}
1269//******************************************************************************
1270//TODO: Not implemented
1271//******************************************************************************
1272int WIN32API SetAbortProc(HDC hdc, ABORTPROC lpAbortProc)
1273{
1274 dprintf(("GDI32: SetAbortProc - stub (1)w\n"));
1275 return(1);
1276}
1277//******************************************************************************
1278//Selects the current path as a clipping region for a device context, combining
1279//any existing clipping region by using the specified mode
1280//TODO: Can be emulated with SelectClipRegion??
1281//******************************************************************************
1282BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
1283{
1284 dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
1285 return(TRUE);
1286}
1287//******************************************************************************
1288//TODO: Sets the color adjustment values for a device context. (used to adjust
1289// the input color of the src bitmap for calls of StretchBlt & StretchDIBits
1290// functions when HALFTONE mode is set
1291//******************************************************************************
1292BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
1293{
1294 dprintf(("GDI32: SetColorAdjustment, not implemented!(TRUE)\n"));
1295 return(TRUE);
1296}
1297//******************************************************************************
1298//Maps colors to system palette; faster way to update window (instead of redrawing)
1299//We just redraw
1300//******************************************************************************
1301BOOL WIN32API UpdateColors(HDC hdc)
1302{
1303 dprintf(("GDI32: UpdateColors\n"));
1304 return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);
1305}
1306//******************************************************************************
1307//******************************************************************************
1308BOOL WIN32API GdiFlush()
1309{
1310 dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
1311 return(TRUE);
1312}
1313//******************************************************************************
1314//******************************************************************************
1315BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
1316{
1317 dprintf(("GDI32: GdiComment, not implemented (TRUE)\n"));
1318 return(TRUE);
1319}
1320//******************************************************************************
1321//******************************************************************************
1322BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
1323{
1324 dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
1325 return(FALSE);
1326}
1327//******************************************************************************
1328//******************************************************************************
1329BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
1330{
1331 dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
1332 return(FALSE);
1333}
1334//******************************************************************************
1335//******************************************************************************
1336BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
1337{
1338 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
1339 return(FALSE);
1340}
1341//******************************************************************************
1342//******************************************************************************
1343BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
1344 UINT iFirstChar,
1345 UINT iLastChar,
1346 LPABCFLOAT pxBUffer)
1347{
1348 dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
1349 return(FALSE);
1350}
1351//******************************************************************************
1352//******************************************************************************
1353INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
1354 INT cbOutput, LPSTR lpszOutData)
1355{
1356 dprintf(("GDI32: ExtEscape, %x %x %d %x %d %x not implemented", hdc, nEscape, cbInput, lpszInData, cbOutput, lpszOutData));
1357#ifdef DEBUG
1358 if(cbInput && lpszInData) {
1359 ULONG *tmp = (ULONG *)lpszInData;
1360 for(int i=0;i<cbInput/4;i++) {
1361 dprintf(("GDI32: ExtEscape par %d: %x", i, *tmp++));
1362 }
1363 }
1364#endif
1365 return(0);
1366}
1367//******************************************************************************
1368//******************************************************************************
1369int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
1370{
1371 dprintf(("GDI32: DrawEscape, not implemented\n"));
1372 return(0);
1373}
1374//******************************************************************************
1375//******************************************************************************
1376BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
1377{
1378 dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
1379 return(FALSE);
1380}
1381//******************************************************************************
1382//******************************************************************************
1383DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
1384 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
1385{
1386 dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
1387 return(GDI_ERROR);
1388}
1389//******************************************************************************
1390
1391//******************************************************************************
1392/*KSO Thu 21.05.1998*/
1393DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
1394 DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
1395{
1396 dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
1397 return(GDI_ERROR);
1398}
1399//******************************************************************************
1400
1401//******************************************************************************
1402
1403
1404/* Office 97 stubs - KSO Thu 21.05.1998*/
1405//******************************************************************************
1406BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
1407 HDC hdc,
1408 LPCSTR str,
1409 int count,
1410 int maxExt,
1411 LPINT lpnFit,
1412 LPINT alpDx,
1413 LPSIZE size)
1414{
1415 int index, nFit, extent;
1416 SIZE tSize;
1417
1418 dprintf(("GDI32: GetTextExtendExPointA\n"));
1419
1420 size->cx = size->cy = nFit = extent = 0;
1421 for(index = 0; index < count; index++)
1422 {
1423 if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
1424 if( extent+tSize.cx < maxExt )
1425 {
1426 extent+=tSize.cx;
1427 nFit++;
1428 str++;
1429 if( alpDx )
1430 alpDx[index] = extent;
1431 if( tSize.cy > size->cy ) size->cy = tSize.cy;
1432 }
1433 else break;
1434 }
1435 size->cx = extent;
1436
1437 if (lpnFit != NULL) // check if result is desired
1438 *lpnFit = nFit;
1439
1440 dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
1441 hdc,count,str,maxExt,nFit, size->cx,size->cy));
1442 return TRUE;
1443}
1444//******************************************************************************
1445//******************************************************************************
1446BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
1447 HDC arg1,
1448 LPCWSTR arg2,
1449 int arg3,
1450 int arg4,
1451 LPINT arg5,
1452 LPINT arg6,
1453 LPSIZE arg7
1454 )
1455{
1456 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1457 BOOL rc;
1458
1459 dprintf(("GDI32: GetTextExtendExPointW\n"));
1460 rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
1461 FreeAsciiString(astring);
1462 return rc;
1463}
1464//******************************************************************************
1465//******************************************************************************
1466UINT WIN32API DeleteColorSpace( /*KSO Thu 21.05.1998*/
1467 HCOLORSPACE hColorSpace
1468 )
1469{
1470 dprintf(("GDI32: DeleteColorSpace - stub\n"));
1471 return FALSE;
1472}
1473//******************************************************************************
1474//******************************************************************************
1475BOOL WIN32API SetColorSpace( /*KSO Thu 21.05.1998*/
1476 HDC hdc,
1477 HCOLORSPACE hColorSpace
1478 )
1479{
1480 dprintf(("GDI32: SetColorSpace - stub\n"));
1481 return FALSE;
1482}
1483//******************************************************************************
1484//******************************************************************************
1485 HCOLORSPACE WIN32API CreateColorSpaceA( /*KSO Thu 21.05.1998*/
1486 LPLOGCOLORSPACEA lpLogColorSpace
1487 )
1488{
1489 dprintf(("GDI32: CreateColorSpaceA - stub\n"));
1490 return 0;
1491}
1492//******************************************************************************
1493//******************************************************************************
1494HCOLORSPACE WIN32API CreateColorSpaceW( /*KSO Thu 21.05.1998*/
1495 LPLOGCOLORSPACEW lpwLogColorSpace
1496 )
1497{
1498 dprintf(("GDI32: CreateColorSpaceW - stub\n"));
1499 return 0;
1500}
1501//******************************************************************************
1502//******************************************************************************
1503HANDLE WIN32API GetColorSpace( /*KSO Thu 21.05.1998*/
1504 HDC hdc
1505 )
1506{
1507 dprintf(("GDI32: GetColorSpace - stub\n"));
1508 return 0;
1509}
1510//******************************************************************************
1511//******************************************************************************
1512int WIN32API SetICMMode( /*KSO Thu 21.05.1998*/
1513 HDC hdc,
1514 int mode
1515 )
1516{
1517 dprintf(("GDI32: SetICMMode - stub\n"));
1518 return 0;
1519}
1520//******************************************************************************
1521
1522
1523
1524
1525/*****************************************************************************
1526 * Name : BOOL CancelDC
1527 * Purpose : The CancelDC function cancels any pending operation on the
1528 * specified device context (DC).
1529 * Parameters: HDC hdc handle of device context
1530 * Variables :
1531 * Result : TRUE / FALSE
1532 * Remark :
1533 * Status : UNTESTED STUB
1534 *
1535 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1536 *****************************************************************************/
1537
1538BOOL WIN32API CancelDC(HDC hdc)
1539{
1540 dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
1541 hdc));
1542
1543 return (FALSE);
1544}
1545
1546
1547/*****************************************************************************
1548 * Name : BOOL CheckColorsInGamut
1549 * Purpose : The CheckColorsInGamut function indicates whether the specified
1550 * color values are within the gamut of the specified device.
1551 * Parameters: HDC hdc handle of device context
1552 * LPVOID lpaRGBQuad
1553 * LPVOID lpResult
1554 * DWORD dwResult
1555 * Variables :
1556 * Result : TRUE / FALSE
1557 * Remark :
1558 * Status : UNTESTED STUB
1559 *
1560 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1561 *****************************************************************************/
1562
1563BOOL WIN32API CheckColorsInGamut(HDC hdc,
1564 LPVOID lpaRGBQuad,
1565 LPVOID lpResult,
1566 DWORD dwResult)
1567{
1568 dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1569 hdc,
1570 lpaRGBQuad,
1571 lpResult,
1572 dwResult));
1573
1574 return (FALSE);
1575}
1576
1577
1578/*****************************************************************************
1579 * Name : BOOL ColorMatchToTarget
1580 * Purpose : The ColorMatchToTarget function enables or disables preview for
1581 * the specified device context. When preview is enabled, colors
1582 * in subsequent output to the specified device context are
1583 * displayed as they would appear on the target device. This is
1584 * useful for checking how well the target maps the specified
1585 * colors in an image. To enable preview, image color matching
1586 * must be enabled for both the target and the preview device context.
1587 * Parameters: HDC hdc handle of device context
1588 * HDC hdcTarget handle of target device context
1589 * DWORD uiAction
1590 * Variables :
1591 * Result : TRUE / FALSE
1592 * Remark :
1593 * Status : UNTESTED STUB
1594 *
1595 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1596 *****************************************************************************/
1597
1598BOOL WIN32API ColorMatchToTarget(HDC hdc,
1599 HDC hdcTarget,
1600 DWORD uiAction)
1601{
1602 dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
1603 hdc,
1604 hdcTarget,
1605 uiAction));
1606
1607 return (FALSE);
1608}
1609
1610
1611/*****************************************************************************
1612 * Name : BOOL CombineTransform
1613 * Purpose : The CombineTransform function concatenates two world-space to
1614 * page-space transformations.
1615 * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
1616 * XFORM *lLPXFORM1 address of 1st transformation
1617 * XFORM *lLPXFORM2 address of 2nd transformation
1618 * Variables :
1619 * Result : TRUE / FALSE
1620 * Remark :
1621 * Status : UNTESTED
1622 *
1623 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1624 * Markus Montkowski [Wen, 1999/01/12 20:18]
1625 *****************************************************************************/
1626
1627BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
1628 CONST XFORM *lLPXFORM1,
1629 CONST XFORM *lLPXFORM2)
1630{
1631 dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh).\n",
1632 lLPXFORMResult,
1633 lLPXFORM1,
1634 lLPXFORM2));
1635
1636 XFORM xfrm;
1637 if( O32_IsBadWritePtr( (void*)lLPXFORMResult, sizeof(XFORM)) ||
1638 O32_IsBadReadPtr( (void*)lLPXFORM1, sizeof(XFORM)) ||
1639 O32_IsBadWritePtr( (void*)lLPXFORM2, sizeof(XFORM)) )
1640 return (FALSE);
1641
1642 // Add the translations
1643 lLPXFORMResult->eDx = lLPXFORM1->eDx + lLPXFORM2->eDx;
1644 lLPXFORMResult->eDy = lLPXFORM1->eDy + lLPXFORM2->eDy;
1645
1646 // Multiply the matrixes
1647 xfrm.eM11 = lLPXFORM1->eM11 * lLPXFORM2->eM11 + lLPXFORM1->eM21 * lLPXFORM1->eM12;
1648 xfrm.eM12 = lLPXFORM1->eM11 * lLPXFORM2->eM12 + lLPXFORM1->eM12 * lLPXFORM1->eM22;
1649 xfrm.eM21 = lLPXFORM1->eM21 * lLPXFORM2->eM11 + lLPXFORM1->eM22 * lLPXFORM1->eM21;
1650 xfrm.eM22 = lLPXFORM1->eM21 * lLPXFORM2->eM12 + lLPXFORM1->eM22 * lLPXFORM1->eM22;
1651
1652 // Now copy to resulting XFROM as the pt must not be distinct
1653 lLPXFORMResult->eM11 = xfrm.eM11;
1654 lLPXFORMResult->eM12 = xfrm.eM12;
1655 lLPXFORMResult->eM21 = xfrm.eM21;
1656 lLPXFORMResult->eM22 = xfrm.eM22;
1657
1658 return (TRUE);
1659}
1660
1661
1662
1663/*****************************************************************************
1664 * Name : HBRUSH CreateDIBPatternBrush
1665 * Purpose : The CreateDIBPatternBrush function creates a logical brush that
1666 * has the pattern specified by the specified device-independent
1667 * bitmap (DIB). The brush can subsequently be selected into any
1668 * device context that is associated with a device that supports
1669 * raster operations.
1670 * This function is provided only for compatibility with applications
1671 * written for versions of Windows earlier than 3.0. For Win32-based
1672 * applications, use the CreateDIBPatternBrushPt function.
1673 * Parameters: HGLOBAL hglbDIBPacked Identifies a global memory object containing
1674 * a packed DIB, which consists of a BITMAPINFO structure immediately
1675 * followed by an array of bytes defining the pixels of the bitmap.
1676 * UINT fuColorSpec color table data
1677 * Variables :
1678 * Result : TRUE / FALSE
1679 * Remark :
1680 * Status : UNTESTED
1681 *
1682 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1683 * Markus Montkowski [Wen, 1999/01/12 20:00]
1684 *****************************************************************************/
1685
1686HBRUSH WIN32API CreateDIBPatternBrush( HGLOBAL hglbDIBPacked,
1687 UINT fuColorSpec)
1688{
1689 LPVOID lpMem;
1690 HBRUSH ret = 0;
1691 dprintf(("GDI32: CreateDIBPatternBrush(%08xh, %08xh) \n",
1692 hglbDIBPacked,
1693 fuColorSpec));
1694
1695 lpMem = GlobalLock(hglbDIBPacked);
1696 if(NULL!=lpMem)
1697 {
1698
1699 ret = CreateDIBPatternBrushPt( lpMem,
1700 fuColorSpec);
1701 GlobalUnlock(hglbDIBPacked);
1702 }
1703
1704 return (ret);
1705}
1706
1707
1708
1709
1710/*****************************************************************************
1711 * Name : int EnumICMProfilesA
1712 * Purpose : The EnumICMProfilesA function enumerates the different color
1713 * profiles that the system supports for the specified device context.
1714 * Parameters: HDC hdc
1715 * ICMENUMPROC lpICMEnumFunc
1716 * LPARAM lParam
1717 * Variables :
1718 * Result : TRUE / FALSE
1719 * Remark :
1720 * Status : UNTESTED STUB
1721 *
1722 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1723 *****************************************************************************/
1724
1725int WIN32API EnumICMProfilesA(HDC hdc,
1726 ICMENUMPROCA lpICMEnumProc,
1727 LPARAM lParam)
1728{
1729 dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
1730 hdc,
1731 lpICMEnumProc,
1732 lParam));
1733
1734 return (-1);
1735}
1736
1737
1738/*****************************************************************************
1739 * Name : int EnumICMProfilesW
1740 * Purpose : The EnumICMProfilesW function enumerates the different color
1741 * profiles that the system supports for the specified device context.
1742 * Parameters: HDC hdc
1743 * ICMENUMPROC lpICMEnumFunc
1744 * LPARAM lParam
1745 * Variables :
1746 * Result : TRUE / FALSE
1747 * Remark :
1748 * Status : UNTESTED STUB
1749 *
1750 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1751 *****************************************************************************/
1752
1753int WIN32API EnumICMProfilesW(HDC hdc,
1754 ICMENUMPROCW lpICMEnumProc,
1755 LPARAM lParam)
1756{
1757 dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
1758 hdc,
1759 lpICMEnumProc,
1760 lParam));
1761
1762 return (-1);
1763}
1764
1765
1766/*****************************************************************************
1767 * Name : BOOL FixBrushOrgEx
1768 * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
1769 * It is provided for compatibility with Win32s. If called, the
1770 * function does nothing, and returns FALSE.
1771 * Parameters: HDC, int, int, LPPOINT
1772 * Variables :
1773 * Result : TRUE / FALSE
1774 * Remark : not implemented in Win32
1775 * Status : UNTESTED STUB
1776 *
1777 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1778 *****************************************************************************/
1779
1780BOOL WIN32API FixBrushOrgEx(HDC hdc,
1781 int iDummy1,
1782 int iDummy2,
1783 LPPOINT lpPoint)
1784{
1785 dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1786 hdc,
1787 iDummy1,
1788 iDummy2,
1789 lpPoint));
1790
1791 return (FALSE);
1792}
1793
1794
1795/*****************************************************************************
1796 * Name : DWORD GdiGetBatchLimit
1797 * Purpose : The GdiGetBatchLimit function returns the maximum number of
1798 * function calls that can be accumulated in the calling thread's
1799 * current batch. The system flushes the current batch whenever
1800 * this limit is exceeded.
1801 * Parameters:
1802 * Variables :
1803 * Result : 1
1804 * Remark :
1805 * Status : UNTESTED STUB
1806 *
1807 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1808 *****************************************************************************/
1809
1810DWORD WIN32API GdiGetBatchLimit(VOID)
1811{
1812 dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
1813
1814 return (1);
1815}
1816
1817
1818/*****************************************************************************
1819 * Name : DWORD GdiSetBatchLimit
1820 * Purpose : The GdiSetBatchLimit function sets the maximum number of
1821 * functions that can be accumulated in the calling thread's current
1822 * batch. The system flushes the current batch whenever this limit
1823 * is exceeded.
1824 * Parameters: DWORD dwLimit
1825 * Variables :
1826 * Result :
1827 * Remark :
1828 * Status : UNTESTED STUB
1829 *
1830 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1831 *****************************************************************************/
1832
1833DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
1834{
1835 dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
1836 dwLimit));
1837
1838 return (1);
1839}
1840
1841
1842/*****************************************************************************
1843 * Name : DWORD GetCharacterPlacementA
1844 * Purpose : The GetCharacterPlacementA function retrieves information about
1845 * a character string, such as character widths, caret positioning,
1846 * ordering within the string, and glyph rendering. The type of
1847 * information returned depends on the dwFlags parameter and is
1848 * based on the currently selected font in the given display context.
1849 * The function copies the information to the specified GCP_RESULTSA
1850 * structure or to one or more arrays specified by the structure.
1851 * Parameters: HDC hdc handle to device context
1852 * LPCSTR lpString pointer to string
1853 * int nCount number of characters in string
1854 * int nMaxExtent maximum extent for displayed string
1855 * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
1856 * DWORD dwFlags placement flags
1857 * Variables :
1858 * Result :
1859 * Remark :
1860 * Status : UNTESTED STUB
1861 *
1862 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1863 *****************************************************************************/
1864
1865DWORD WIN32API GetCharacterPlacementA(HDC hdc,
1866 LPCSTR lpString,
1867 int nCount,
1868 int nMaxExtent,
1869 GCP_RESULTSA * lpResults,
1870 DWORD dwFlags)
1871{
1872 dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1873 hdc,
1874 lpString,
1875 nCount,
1876 nMaxExtent,
1877 lpResults,
1878 dwFlags));
1879
1880 return (0);
1881}
1882
1883
1884/*****************************************************************************
1885 * Name : DWORD GetCharacterPlacementW
1886 * Purpose : The GetCharacterPlacementW function retrieves information about
1887 * a character string, such as character widths, caret positioning,
1888 * ordering within the string, and glyph rendering. The type of
1889 * information returned depends on the dwFlags parameter and is
1890 * based on the currently selected font in the given display context.
1891 * The function copies the information to the specified GCP_RESULTSW
1892 * structure or to one or more arrays specified by the structure.
1893 * Parameters: HDC hdc handle to device context
1894 * LPCSTR lpString pointer to string
1895 * int nCount number of characters in string
1896 * int nMaxExtent maximum extent for displayed string
1897 * GCP_RESULTSW *lpResults pointer to buffer for placement result
1898 * DWORD dwFlags placement flags
1899 * Variables :
1900 * Result :
1901 * Remark :
1902 * Status : UNTESTED STUB
1903 *
1904 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1905 *****************************************************************************/
1906
1907DWORD WIN32API GetCharacterPlacementW(HDC hdc,
1908 LPCWSTR lpString,
1909 int nCount,
1910 int nMaxExtent,
1911 GCP_RESULTSW *lpResults,
1912 DWORD dwFlags)
1913{
1914 dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1915 hdc,
1916 lpString,
1917 nCount,
1918 nMaxExtent,
1919 lpResults,
1920 dwFlags));
1921
1922 return (0);
1923}
1924
1925
1926/*****************************************************************************
1927 * Name : DWORD GetDeviceGammaRamp
1928 * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
1929 * direct color display boards.
1930 * Parameters: HDC hdc handle to device context
1931 * LPVOID lpRamp Gamma ramp array
1932 * Variables :
1933 * Result :
1934 * Remark :
1935 * Status : UNTESTED STUB
1936 *
1937 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1938 *****************************************************************************/
1939
1940DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
1941 LPVOID lpRamp)
1942{
1943 dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
1944 hdc,
1945 lpRamp));
1946
1947 return (FALSE);
1948}
1949
1950
1951
1952
1953/*****************************************************************************
1954 * Name : BOOL GetICMProfileA
1955 * Purpose : The GetICMProfileA function retrieves the name of the color
1956 * profile file for the device associated with the specified device
1957 * context.
1958 * Parameters: HDC hdc handle to device context
1959 * DWORD cbName
1960 * LPTSTR lpszFilename
1961 * Variables :
1962 * Result : TRUE / FALSE
1963 * Remark :
1964 * Status : UNTESTED STUB
1965 *
1966 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1967 *****************************************************************************/
1968
1969BOOL WIN32API GetICMProfileA(HDC hdc,
1970 DWORD cbName,
1971 LPTSTR lpszFilename)
1972{
1973 dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
1974 hdc,
1975 cbName,
1976 lpszFilename));
1977
1978 return (FALSE);
1979}
1980
1981
1982/*****************************************************************************
1983 * Name : BOOL GetICMProfileW
1984 * Purpose : The GetICMProfileW function retrieves the name of the color
1985 * profile file for the device associated with the specified device
1986 * context.
1987 * Parameters: HDC hdc handle to device context
1988 * DWORD cbName
1989 * LPWSTR lpszFilename
1990 * Variables :
1991 * Result : TRUE / FALSE
1992 * Remark :
1993 * Status : UNTESTED STUB
1994 *
1995 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1996 *****************************************************************************/
1997
1998BOOL WIN32API GetICMProfileW(HDC hdc,
1999 DWORD cbName,
2000 LPTSTR lpszFilename)
2001{
2002 dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
2003 hdc,
2004 cbName,
2005 lpszFilename));
2006
2007 return (FALSE);
2008}
2009
2010
2011/*****************************************************************************
2012 * Name : BOOL GetLogColorSpaceA
2013 * Purpose : The GetLogColorSpace function retrieves information about the
2014 * logical color space identified by the specified handle.
2015 * Parameters: HCOLORSPACE hColorSpace
2016 * LPLOGCOLORSPACE lpbuffer
2017 * DWORD nSize
2018 * Variables :
2019 * Result : TRUE / FALSE
2020 * Remark :
2021 * Status : UNTESTED STUB
2022 *
2023 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2024 *****************************************************************************/
2025
2026#define LPLOGCOLORSPACE LPVOID
2027BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
2028 LPLOGCOLORSPACE lpBuffer,
2029 DWORD nSize)
2030{
2031 dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
2032 hColorSpace,
2033 lpBuffer,
2034 nSize));
2035
2036 return (FALSE);
2037}
2038
2039
2040/*****************************************************************************
2041 * Name : BOOL GetLogColorSpaceW
2042 * Purpose : The GetLogColorSpace function retrieves information about the
2043 * logical color space identified by the specified handle.
2044 * Parameters: HCOLORSPACE hColorSpace
2045 * LPLOGCOLORSPACE lpbuffer
2046 * DWORD nSize
2047 * Variables :
2048 * Result : TRUE / FALSE
2049 * Remark :
2050 * Status : UNTESTED STUB
2051 *
2052 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2053 *****************************************************************************/
2054
2055BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
2056 LPLOGCOLORSPACE lpBuffer,
2057 DWORD nSize)
2058{
2059 dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
2060 hColorSpace,
2061 lpBuffer,
2062 nSize));
2063
2064 return (FALSE);
2065}
2066
2067
2068/*****************************************************************************
2069 * Name : BOOL SetDeviceGammaRamp
2070 * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
2071 * color display boards.
2072 * Parameters: HDC hdc handle of device context
2073 * LPVOID lpRamp
2074 * Variables :
2075 * Result : TRUE / FALSE
2076 * Remark :
2077 * Status : UNTESTED STUB
2078 *
2079 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2080 *****************************************************************************/
2081
2082BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
2083 LPVOID lpRamp)
2084{
2085 dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
2086 hdc,
2087 lpRamp));
2088
2089 return (FALSE);
2090}
2091
2092
2093/*****************************************************************************
2094 * Name : BOOL SetICMProfileA
2095 * Purpose : The SetICMProfileA function sets the color profile for the
2096 * specified device context.
2097 * Parameters: HDC hdc handle of device context
2098 * LPTSTR lpFileName
2099 * Variables :
2100 * Result : TRUE / FALSE
2101 * Remark :
2102 * Status : UNTESTED STUB
2103 *
2104 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2105 *****************************************************************************/
2106
2107BOOL WIN32API SetICMProfileA(HDC hdc,
2108 LPTSTR lpFileName)
2109{
2110 dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
2111 hdc,
2112 lpFileName));
2113
2114 return (FALSE);
2115}
2116
2117
2118/*****************************************************************************
2119 * Name : BOOL SetICMProfileW
2120 * Purpose : The SetICMProfileW function sets the color profile for the
2121 * specified device context.
2122 * Parameters: HDC hdc handle of device context
2123 * LPTSTR lpFileName
2124 * Variables :
2125 * Result : TRUE / FALSE
2126 * Remark :
2127 * Status : UNTESTED STUB
2128 *
2129 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2130 *****************************************************************************/
2131
2132BOOL WIN32API SetICMProfileW(HDC hdc,
2133 LPWSTR lpFileName)
2134{
2135 dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
2136 hdc,
2137 lpFileName));
2138
2139 return (FALSE);
2140}
2141
2142
2143
2144/*****************************************************************************
2145 * Name : BOOL UpdateICMRegKeyA
2146 * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
2147 * registry entries that identify ICC color profiles or color-matching
2148 * DLLs. The function carries out the action specified by the nCommand
2149 * parameter.
2150 * Parameters: DWORD dwReserved
2151 * DWORD CMID
2152 * LPTSTR lpszFileName
2153 * UINT nCommand
2154 * Variables :
2155 * Result : TRUE / FALSE
2156 * Remark :
2157 * Status : UNTESTED STUB
2158 *
2159 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2160 *****************************************************************************/
2161
2162BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
2163 DWORD CMID,
2164 LPTSTR lpszFileName,
2165 UINT nCommand)
2166{
2167 dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
2168 dwReserved,
2169 CMID,
2170 lpszFileName,
2171 nCommand));
2172
2173 return (FALSE);
2174}
2175
2176
2177/*****************************************************************************
2178 * Name : BOOL UpdateICMRegKeyW
2179 * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
2180 * registry entries that identify ICC color profiles or color-matching
2181 * DLLs. The function carries out the action specified by the nCommand
2182 * parameter.
2183 * Parameters: DWORD dwReserved
2184 * DWORD CMID
2185 * LPWSTR lpszFileName
2186 * UINT nCommand
2187 * Variables :
2188 * Result : TRUE / FALSE
2189 * Remark :
2190 * Status : UNTESTED STUB
2191 *
2192 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2193 *****************************************************************************/
2194
2195BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
2196 DWORD CMID,
2197 LPWSTR lpszFileName,
2198 UINT nCommand)
2199{
2200 dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
2201 dwReserved,
2202 CMID,
2203 lpszFileName,
2204 nCommand));
2205
2206 return (FALSE);
2207}
2208
2209
2210
Note: See TracBrowser for help on using the repository browser.