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

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

SetDIBitsToDevice fix + more logging

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