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

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

GetTextExtentPoint reimplemented

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