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

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

minor changes

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