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

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

DeleteDC check for DIB section + SelectObject fixes

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