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