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

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

DeleteDC + CreateDIBSection fixes

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