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

Last change on this file since 5760 was 5760, checked in by sandervl, 24 years ago

LPtoDP/DPtoLP: check input because GpiConvert doesn't like illegal values

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