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

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

callback fixes

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