1 | /* $Id: gdi32.cpp,v 1.87 2002-12-28 10:16:20 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 | #include "font.h"
|
---|
27 | #include <stats.h>
|
---|
28 | #include <objhandle.h>
|
---|
29 |
|
---|
30 | #define DBG_LOCALLOG DBG_gdi32
|
---|
31 | #include "dbglocal.h"
|
---|
32 |
|
---|
33 | ODINDEBUGCHANNEL(GDI32-GDI32)
|
---|
34 |
|
---|
35 | //******************************************************************************
|
---|
36 | //******************************************************************************
|
---|
37 | //******************************************************************************
|
---|
38 | //******************************************************************************
|
---|
39 | COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor)
|
---|
40 | {
|
---|
41 | return(O32_SetBkColor(hdc, crColor));
|
---|
42 | }
|
---|
43 | //******************************************************************************
|
---|
44 | //******************************************************************************
|
---|
45 | COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor)
|
---|
46 | {
|
---|
47 | return O32_SetTextColor(hdc, crColor);
|
---|
48 | }
|
---|
49 | //******************************************************************************
|
---|
50 | //******************************************************************************
|
---|
51 | HGDIOBJ WIN32API GetStockObject(int arg1)
|
---|
52 | {
|
---|
53 | HGDIOBJ obj;
|
---|
54 |
|
---|
55 | switch(arg1)
|
---|
56 | {
|
---|
57 | case DEFAULT_GUI_FONT:
|
---|
58 | if(NULL==hFntDefaultGui) {
|
---|
59 | hFntDefaultGui = CreateFontA( -9, 0, 0, 0, FW_MEDIUM, FALSE,
|
---|
60 | FALSE, FALSE, ANSI_CHARSET,
|
---|
61 | OUT_DEFAULT_PRECIS,
|
---|
62 | CLIP_DEFAULT_PRECIS,
|
---|
63 | DEFAULT_QUALITY,
|
---|
64 | FIXED_PITCH|FF_MODERN, "WarpSans");
|
---|
65 | //This object can't be deleted by applications
|
---|
66 | ObjSetHandleFlag(hFntDefaultGui, OBJHANDLE_FLAG_NODELETE, TRUE);
|
---|
67 | }
|
---|
68 | obj = hFntDefaultGui;
|
---|
69 | break;
|
---|
70 | default:
|
---|
71 | obj = O32_GetStockObject(arg1);
|
---|
72 | break;
|
---|
73 | }
|
---|
74 | return(obj);
|
---|
75 | }
|
---|
76 | //******************************************************************************
|
---|
77 | //******************************************************************************
|
---|
78 | HPEN WIN32API CreatePen(int fnPenStyle, int nWidth, COLORREF crColor)
|
---|
79 | {
|
---|
80 | HPEN hPen;
|
---|
81 |
|
---|
82 | //CB: todo: PS_DOT is different in Win32 (. . . . and not - - - -)
|
---|
83 | // Open32 looks like LINETYPE_SHORTDASH instead of LINETYPE_DOT!!!
|
---|
84 | // -> difficult to fix without performance decrease!
|
---|
85 |
|
---|
86 | hPen = O32_CreatePen(fnPenStyle,nWidth,crColor);
|
---|
87 | if(hPen) STATS_CreatePen(hPen, fnPenStyle,nWidth,crColor);
|
---|
88 | return hPen;
|
---|
89 | }
|
---|
90 | //******************************************************************************
|
---|
91 | //******************************************************************************
|
---|
92 | HPEN WIN32API CreatePenIndirect(const LOGPEN * lplgpn)
|
---|
93 | {
|
---|
94 | HPEN hPen;
|
---|
95 |
|
---|
96 | hPen = O32_CreatePenIndirect(lplgpn);
|
---|
97 | if(hPen) STATS_CreatePenIndirect(hPen, lplgpn);
|
---|
98 | return hPen;
|
---|
99 | }
|
---|
100 | //******************************************************************************
|
---|
101 | //******************************************************************************
|
---|
102 | HPEN WIN32API ExtCreatePen(DWORD dwPenStyle, DWORD dwWidth, const LOGBRUSH *lplb,
|
---|
103 | DWORD dwStyleCount, const DWORD *lpStyle)
|
---|
104 | {
|
---|
105 | HPEN hPen;
|
---|
106 |
|
---|
107 | hPen = O32_ExtCreatePen(dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle);
|
---|
108 | if(hPen) STATS_ExtCreatePen(hPen, dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle);
|
---|
109 | return hPen;
|
---|
110 | }
|
---|
111 | //******************************************************************************
|
---|
112 | //******************************************************************************
|
---|
113 | HBRUSH WIN32API CreatePatternBrush(HBITMAP hBitmap)
|
---|
114 | {
|
---|
115 | HBRUSH hBrush;
|
---|
116 |
|
---|
117 | hBrush = O32_CreatePatternBrush(hBitmap);
|
---|
118 | if(hBrush) STATS_CreatePatternBrush(hBrush, hBitmap);
|
---|
119 | return(hBrush);
|
---|
120 | }
|
---|
121 | //******************************************************************************
|
---|
122 | //******************************************************************************
|
---|
123 | HBRUSH WIN32API CreateSolidBrush(COLORREF color)
|
---|
124 | {
|
---|
125 | HBRUSH hBrush;
|
---|
126 |
|
---|
127 | hBrush = O32_CreateSolidBrush(color);
|
---|
128 | if(hBrush) STATS_CreateSolidBrush(hBrush, color);
|
---|
129 | return(hBrush);
|
---|
130 | }
|
---|
131 | //******************************************************************************
|
---|
132 | //******************************************************************************
|
---|
133 | HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH *pLogBrush)
|
---|
134 | {
|
---|
135 | HBRUSH hBrush;
|
---|
136 |
|
---|
137 | hBrush = O32_CreateBrushIndirect((LPLOGBRUSH)pLogBrush);
|
---|
138 | dprintf(("GDI32: CreateBrushIndirect %x %x %x returned %x", pLogBrush->lbStyle, pLogBrush->lbColor, pLogBrush->lbHatch, hBrush));
|
---|
139 | if(hBrush) STATS_CreateBrushIndirect(hBrush, (LPLOGBRUSH)pLogBrush);
|
---|
140 | return hBrush;
|
---|
141 | }
|
---|
142 | //******************************************************************************
|
---|
143 | //******************************************************************************
|
---|
144 | HBRUSH WIN32API CreateHatchBrush(int fnStyle, COLORREF clrref)
|
---|
145 | {
|
---|
146 | HBRUSH hBrush;
|
---|
147 |
|
---|
148 | hBrush = O32_CreateHatchBrush(fnStyle, clrref);
|
---|
149 | if(hBrush) STATS_CreateHatchBrush(hBrush, fnStyle, clrref);
|
---|
150 | return hBrush;
|
---|
151 | }
|
---|
152 | //******************************************************************************
|
---|
153 | //******************************************************************************
|
---|
154 | HBRUSH WIN32API CreateDIBPatternBrushPt( const VOID * buffer, UINT usage)
|
---|
155 | {
|
---|
156 | HBRUSH hBrush;
|
---|
157 |
|
---|
158 | hBrush = O32_CreateDIBPatternBrushPt(buffer, usage);
|
---|
159 | if(hBrush) STATS_CreateDIBPatternBrushPt(hBrush, buffer, usage);
|
---|
160 | return hBrush;
|
---|
161 | }
|
---|
162 | /*****************************************************************************
|
---|
163 | * Name : HBRUSH CreateDIBPatternBrush
|
---|
164 | * Purpose : The CreateDIBPatternBrush function creates a logical brush that
|
---|
165 | * has the pattern specified by the specified device-independent
|
---|
166 | * bitmap (DIB). The brush can subsequently be selected into any
|
---|
167 | * device context that is associated with a device that supports
|
---|
168 | * raster operations.
|
---|
169 | *
|
---|
170 | * This function is provided only for compatibility with applications
|
---|
171 | * written for versions of Windows earlier than 3.0. For Win32-based
|
---|
172 | * applications, use the CreateDIBPatternBrushPt function.
|
---|
173 | * Parameters: HGLOBAL hglbDIBPacked Identifies a global memory object containing
|
---|
174 | * a packed DIB, which consists of a BITMAPINFO structure immediately
|
---|
175 | * followed by an array of bytes defining the pixels of the bitmap.
|
---|
176 | * UINT fuColorSpec color table data
|
---|
177 | * Variables :
|
---|
178 | * Result : TRUE / FALSE
|
---|
179 | * Remark :
|
---|
180 | * Status : ODIN32 COMPLETELY UNTESTED
|
---|
181 | *
|
---|
182 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
183 | * Markus Montkowski [Wen, 1999/01/12 20:00]
|
---|
184 | *****************************************************************************/
|
---|
185 |
|
---|
186 | HBRUSH WIN32API CreateDIBPatternBrush( HGLOBAL hglbDIBPacked,
|
---|
187 | UINT fuColorSpec)
|
---|
188 | {
|
---|
189 | BITMAPINFO *lpMem;
|
---|
190 | HBRUSH ret = 0;
|
---|
191 |
|
---|
192 | lpMem = (BITMAPINFO *)GlobalLock(hglbDIBPacked);
|
---|
193 | if(NULL!=lpMem)
|
---|
194 | {
|
---|
195 | dprintf(("GDI32: CreateDIBPatternBrush (%08xh, %08xh) %x (%d,%d) bpp %d",
|
---|
196 | hglbDIBPacked, fuColorSpec, lpMem, lpMem->bmiHeader.biWidth,
|
---|
197 | lpMem->bmiHeader.biHeight, lpMem->bmiHeader.biBitCount));
|
---|
198 |
|
---|
199 | ret = CreateDIBPatternBrushPt( lpMem,
|
---|
200 | fuColorSpec);
|
---|
201 | GlobalUnlock(hglbDIBPacked);
|
---|
202 | }
|
---|
203 | else {
|
---|
204 | dprintf(("!ERROR!: CreateDIBPatternBrush (%08xh, %08xh) -> INVALID memory handle!!",
|
---|
205 | hglbDIBPacked, fuColorSpec));
|
---|
206 | }
|
---|
207 | return (ret);
|
---|
208 | }
|
---|
209 | //******************************************************************************
|
---|
210 | //******************************************************************************
|
---|
211 | HDC WIN32API CreateCompatibleDC( HDC hdc)
|
---|
212 | {
|
---|
213 | HDC newHdc;
|
---|
214 |
|
---|
215 | newHdc = O32_CreateCompatibleDC(hdc);
|
---|
216 | ULONG oldcp = OSLibGpiQueryCp(hdc);
|
---|
217 | if (!oldcp) /* If new DC is to be created */
|
---|
218 | oldcp = GetDisplayCodepage();
|
---|
219 |
|
---|
220 | if(newHdc) STATS_CreateCompatibleDC(hdc, newHdc);
|
---|
221 | OSLibGpiSetCp(newHdc, oldcp);
|
---|
222 | //PF Open32 seems not to move coordinates to 0,0 in newHdc
|
---|
223 | MoveToEx(newHdc, 0, 0 , NULL);
|
---|
224 |
|
---|
225 | return newHdc;
|
---|
226 | }
|
---|
227 | //******************************************************************************
|
---|
228 | //******************************************************************************
|
---|
229 | BOOL WIN32API DeleteDC(HDC hdc)
|
---|
230 | {
|
---|
231 | pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc);
|
---|
232 | if(!pHps)
|
---|
233 | {
|
---|
234 | dprintf(("WARNING: DeleteDC %x; invalid hdc!", hdc));
|
---|
235 | SetLastError(ERROR_INVALID_HANDLE);
|
---|
236 | return 0;
|
---|
237 | }
|
---|
238 | SetLastError(ERROR_SUCCESS);
|
---|
239 |
|
---|
240 | DIBSection *dsect = DIBSection::findHDC(hdc);
|
---|
241 | if(dsect)
|
---|
242 | {
|
---|
243 | //remove previously selected dibsection
|
---|
244 | dprintf(("DeleteDC %x, unselect DIB section %x", hdc, dsect->GetBitmapHandle()));
|
---|
245 | dsect->UnSelectDIBObject();
|
---|
246 | }
|
---|
247 |
|
---|
248 | //Must call ReleaseDC for window dcs
|
---|
249 | if(pHps->hdcType == TYPE_1) {
|
---|
250 | return ReleaseDC(OS2ToWin32Handle(pHps->hwnd), hdc);
|
---|
251 | }
|
---|
252 |
|
---|
253 | STATS_DeleteDC(hdc);
|
---|
254 | return O32_DeleteDC(hdc);
|
---|
255 | }
|
---|
256 | //******************************************************************************
|
---|
257 | //******************************************************************************
|
---|
258 | BOOL WIN32API StrokeAndFillPath(HDC hdc)
|
---|
259 | {
|
---|
260 | return O32_StrokeAndFillPath(hdc);
|
---|
261 | }
|
---|
262 | //******************************************************************************
|
---|
263 | //******************************************************************************
|
---|
264 | BOOL WIN32API StrokePath(HDC hdc)
|
---|
265 | {
|
---|
266 | return O32_StrokePath(hdc);
|
---|
267 | }
|
---|
268 | //******************************************************************************
|
---|
269 | //******************************************************************************
|
---|
270 | int WIN32API SetBkMode( HDC hdc, int mode)
|
---|
271 | {
|
---|
272 | return O32_SetBkMode(hdc, mode);
|
---|
273 | }
|
---|
274 | //******************************************************************************
|
---|
275 | //******************************************************************************
|
---|
276 | COLORREF WIN32API GetPixel( HDC hdc, int x, int y)
|
---|
277 | {
|
---|
278 | return O32_GetPixel(hdc, x, y);
|
---|
279 | }
|
---|
280 | //******************************************************************************
|
---|
281 | //******************************************************************************
|
---|
282 | COLORREF WIN32API SetPixel( HDC hdc, int x, int y, COLORREF color)
|
---|
283 | {
|
---|
284 | return O32_SetPixel(hdc, x, y, color);
|
---|
285 | }
|
---|
286 | //******************************************************************************
|
---|
287 | //Faster version of SetPixel (since it doesn't need to return the original color)
|
---|
288 | //Just use SetPixel for now
|
---|
289 | //******************************************************************************
|
---|
290 | BOOL WIN32API SetPixelV(HDC arg1, int arg2, int arg3, COLORREF arg4)
|
---|
291 | {
|
---|
292 | COLORREF rc;
|
---|
293 |
|
---|
294 | rc = O32_SetPixel(arg1, arg2, arg3, arg4);
|
---|
295 | if(rc == GDI_ERROR) // || rc == COLOR_INVALID)
|
---|
296 | return(FALSE);
|
---|
297 | return(TRUE);
|
---|
298 | }
|
---|
299 | //******************************************************************************
|
---|
300 | //******************************************************************************
|
---|
301 | BOOL WIN32API GetDCOrgEx(HDC hdc, PPOINT lpPoint)
|
---|
302 | {
|
---|
303 | if(lpPoint == NULL) {
|
---|
304 | dprintf(("WARNING: GDI32: GetDCOrgEx %x NULL", hdc));
|
---|
305 | return FALSE;
|
---|
306 | }
|
---|
307 | return O32_GetDCOrgEx(hdc, lpPoint);
|
---|
308 | }
|
---|
309 | //******************************************************************************
|
---|
310 | //******************************************************************************
|
---|
311 | BOOL WIN32API AbortPath(HDC hdc)
|
---|
312 | {
|
---|
313 | return O32_AbortPath(hdc);
|
---|
314 | }
|
---|
315 | //******************************************************************************
|
---|
316 | //******************************************************************************
|
---|
317 | BOOL WIN32API AngleArc( HDC arg1, int arg2, int arg3, DWORD arg4, float arg5, float arg6)
|
---|
318 | {
|
---|
319 | return O32_AngleArc(arg1, arg2, arg3, arg4, arg5, arg6);
|
---|
320 | }
|
---|
321 | //******************************************************************************
|
---|
322 | //******************************************************************************
|
---|
323 | BOOL WIN32API Arc( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
|
---|
324 | {
|
---|
325 | return O32_Arc(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
|
---|
326 | }
|
---|
327 | //******************************************************************************
|
---|
328 | //******************************************************************************
|
---|
329 | BOOL WIN32API ArcTo( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
|
---|
330 | {
|
---|
331 | return O32_ArcTo(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
|
---|
332 | }
|
---|
333 | //******************************************************************************
|
---|
334 | //******************************************************************************
|
---|
335 | BOOL WIN32API BeginPath(HDC hdc)
|
---|
336 | {
|
---|
337 | return O32_BeginPath(hdc);
|
---|
338 | }
|
---|
339 | //******************************************************************************
|
---|
340 | //******************************************************************************
|
---|
341 | BOOL WIN32API Chord( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
|
---|
342 | {
|
---|
343 | return O32_Chord(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
|
---|
344 | }
|
---|
345 | //******************************************************************************
|
---|
346 | //******************************************************************************
|
---|
347 | BOOL WIN32API CloseFigure(HDC hdc)
|
---|
348 | {
|
---|
349 | return O32_CloseFigure(hdc);
|
---|
350 | }
|
---|
351 | //******************************************************************************
|
---|
352 | //******************************************************************************
|
---|
353 | HDC WIN32API CreateDCA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput, const DEVMODEA *lpInitData)
|
---|
354 | {
|
---|
355 | HDC hdc;
|
---|
356 |
|
---|
357 | // 2001-05-28 PH
|
---|
358 | // Ziff Davis Benchmarks come in here with "display".
|
---|
359 | // Obviously, Windows does accept case-insensitive driver names,
|
---|
360 | // whereas Open32 doesn't.
|
---|
361 | if (*lpszDriver == 'd') // quick check
|
---|
362 | {
|
---|
363 | // then do a double-check and use the uppercase constant
|
---|
364 | // instead
|
---|
365 | if (stricmp(lpszDriver, "DISPLAY") == 0)
|
---|
366 | lpszDriver = "DISPLAY";
|
---|
367 | }
|
---|
368 |
|
---|
369 | hdc = O32_CreateDC(lpszDriver, lpszDevice, lpszOutput, lpInitData);
|
---|
370 | if(hdc) {
|
---|
371 | OSLibGpiSetCp(hdc, GetDisplayCodepage());
|
---|
372 | STATS_CreateDCA(hdc, lpszDriver, lpszDevice, lpszOutput, lpInitData);
|
---|
373 | }
|
---|
374 |
|
---|
375 | dprintf(("GDI32: CreateDCA %s %s %s %x returned %x", lpszDriver, lpszDevice, lpszOutput, lpInitData, hdc));
|
---|
376 | return hdc;
|
---|
377 | }
|
---|
378 | //******************************************************************************
|
---|
379 | //******************************************************************************
|
---|
380 | HDC WIN32API CreateDCW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
|
---|
381 | {
|
---|
382 | char *astring4, *astring5;
|
---|
383 |
|
---|
384 | char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
|
---|
385 | char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
|
---|
386 | char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
|
---|
387 |
|
---|
388 | if(arg4)
|
---|
389 | {
|
---|
390 | astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
|
---|
391 | astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
|
---|
392 | }
|
---|
393 |
|
---|
394 | HDC rc;
|
---|
395 | DEVMODEA devmode;
|
---|
396 |
|
---|
397 | if(arg4)
|
---|
398 | {
|
---|
399 | strcpy((char*)devmode.dmDeviceName, astring4);
|
---|
400 | strcpy((char*)devmode.dmFormName, astring5);
|
---|
401 |
|
---|
402 | devmode.dmSpecVersion = arg4->dmSpecVersion;
|
---|
403 | devmode.dmDriverVersion = arg4->dmDriverVersion;
|
---|
404 | devmode.dmSize = arg4->dmSize;
|
---|
405 | devmode.dmDriverExtra = arg4->dmDriverExtra;
|
---|
406 | devmode.dmFields = arg4->dmFields;
|
---|
407 | #if (__IBMCPP__ == 360)
|
---|
408 | devmode.dmOrientation = arg4->dmOrientation;
|
---|
409 | devmode.dmPaperSize = arg4->dmPaperSize;
|
---|
410 | devmode.dmPaperLength = arg4->dmPaperLength;
|
---|
411 | devmode.dmPaperWidth = arg4->dmPaperWidth;
|
---|
412 | #else
|
---|
413 | devmode.s1.dmOrientation = arg4->s1.dmOrientation;
|
---|
414 | devmode.s1.dmPaperSize = arg4->s1.dmPaperSize;
|
---|
415 | devmode.s1.dmPaperLength = arg4->s1.dmPaperLength;
|
---|
416 | devmode.s1.dmPaperWidth = arg4->s1.dmPaperWidth;
|
---|
417 | #endif
|
---|
418 | devmode.dmScale = arg4->dmScale;
|
---|
419 | devmode.dmCopies = arg4->dmCopies;
|
---|
420 | devmode.dmDefaultSource = arg4->dmDefaultSource;
|
---|
421 | devmode.dmPrintQuality = arg4->dmPrintQuality;
|
---|
422 | devmode.dmColor = arg4->dmColor;
|
---|
423 | devmode.dmDuplex = arg4->dmDuplex;
|
---|
424 | devmode.dmYResolution = arg4->dmYResolution;
|
---|
425 | devmode.dmTTOption = arg4->dmTTOption;
|
---|
426 | devmode.dmCollate = arg4->dmCollate;
|
---|
427 | devmode.dmLogPixels = arg4->dmLogPixels;
|
---|
428 | devmode.dmBitsPerPel = arg4->dmBitsPerPel;
|
---|
429 | devmode.dmPelsWidth = arg4->dmPelsWidth;
|
---|
430 | devmode.dmPelsHeight = arg4->dmPelsHeight;
|
---|
431 | devmode.dmDisplayFlags = arg4->dmDisplayFlags;
|
---|
432 | devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
|
---|
433 | devmode.dmICMMethod = arg4->dmICMMethod;
|
---|
434 | devmode.dmICMIntent = arg4->dmICMIntent;
|
---|
435 | devmode.dmMediaType = arg4->dmMediaType;
|
---|
436 | devmode.dmDitherType = arg4->dmDitherType;
|
---|
437 | devmode.dmReserved1 = arg4->dmReserved1;
|
---|
438 | devmode.dmReserved2 = arg4->dmReserved2;
|
---|
439 | rc = CreateDCA(astring1,astring2,astring3,&devmode);
|
---|
440 | }
|
---|
441 | else
|
---|
442 | rc = CreateDCA(astring1,astring2,astring3, NULL);
|
---|
443 |
|
---|
444 | FreeAsciiString(astring1);
|
---|
445 | FreeAsciiString(astring2);
|
---|
446 | FreeAsciiString(astring3);
|
---|
447 |
|
---|
448 | if(arg4)
|
---|
449 | {
|
---|
450 | FreeAsciiString(astring4);
|
---|
451 | FreeAsciiString(astring5);
|
---|
452 | }
|
---|
453 |
|
---|
454 | return rc;
|
---|
455 | }
|
---|
456 | //******************************************************************************
|
---|
457 | //******************************************************************************
|
---|
458 | HDC WIN32API CreateICA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput,
|
---|
459 | const DEVMODEA *lpdvmInit)
|
---|
460 | {
|
---|
461 | static char *szDisplay = "DISPLAY";
|
---|
462 | HDC hdc;
|
---|
463 |
|
---|
464 | //SvL: Open32 tests for "DISPLAY"
|
---|
465 | if(lpszDriver && !strcmp(lpszDriver, "display")) {
|
---|
466 | lpszDriver = szDisplay;
|
---|
467 | }
|
---|
468 | //SvL: Open32 tests lpszDriver for NULL even though it's ignored
|
---|
469 | if(lpszDriver == NULL) {
|
---|
470 | lpszDriver = lpszDevice;
|
---|
471 | }
|
---|
472 | hdc = O32_CreateIC(lpszDriver, lpszDevice, lpszOutput, lpdvmInit);
|
---|
473 | if(hdc) STATS_CreateICA(hdc, lpszDriver, lpszDevice, lpszOutput, lpdvmInit);
|
---|
474 | return hdc;
|
---|
475 | }
|
---|
476 | //******************************************************************************
|
---|
477 | //******************************************************************************
|
---|
478 | HDC WIN32API CreateICW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
|
---|
479 | {
|
---|
480 | char *astring4, *astring5;
|
---|
481 |
|
---|
482 | char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
|
---|
483 | char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
|
---|
484 | char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
|
---|
485 | if(arg4)
|
---|
486 | {
|
---|
487 | astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
|
---|
488 | astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
|
---|
489 | }
|
---|
490 |
|
---|
491 | HDC rc;
|
---|
492 | DEVMODEA devmode;
|
---|
493 |
|
---|
494 | if(arg4)
|
---|
495 | {
|
---|
496 | strcpy((char*)devmode.dmDeviceName, astring4);
|
---|
497 | strcpy((char*)devmode.dmFormName, astring5);
|
---|
498 |
|
---|
499 | devmode.dmSpecVersion = arg4->dmSpecVersion;
|
---|
500 | devmode.dmDriverVersion = arg4->dmDriverVersion;
|
---|
501 | devmode.dmSize = arg4->dmSize;
|
---|
502 | devmode.dmDriverExtra = arg4->dmDriverExtra;
|
---|
503 | devmode.dmFields = arg4->dmFields;
|
---|
504 | #if (__IBMCPP__ == 360)
|
---|
505 | devmode.dmOrientation = arg4->dmOrientation;
|
---|
506 | devmode.dmPaperSize = arg4->dmPaperSize;
|
---|
507 | devmode.dmPaperLength = arg4->dmPaperLength;
|
---|
508 | devmode.dmPaperWidth = arg4->dmPaperWidth;
|
---|
509 | #else
|
---|
510 | devmode.s1.dmOrientation = arg4->s1.dmOrientation;
|
---|
511 | devmode.s1.dmPaperSize = arg4->s1.dmPaperSize;
|
---|
512 | devmode.s1.dmPaperLength = arg4->s1.dmPaperLength;
|
---|
513 | devmode.s1.dmPaperWidth = arg4->s1.dmPaperWidth;
|
---|
514 | #endif
|
---|
515 | devmode.dmScale = arg4->dmScale;
|
---|
516 | devmode.dmCopies = arg4->dmCopies;
|
---|
517 | devmode.dmDefaultSource = arg4->dmDefaultSource;
|
---|
518 | devmode.dmPrintQuality = arg4->dmPrintQuality;
|
---|
519 | devmode.dmColor = arg4->dmColor;
|
---|
520 | devmode.dmDuplex = arg4->dmDuplex;
|
---|
521 | devmode.dmYResolution = arg4->dmYResolution;
|
---|
522 | devmode.dmTTOption = arg4->dmTTOption;
|
---|
523 | devmode.dmCollate = arg4->dmCollate;
|
---|
524 | devmode.dmLogPixels = arg4->dmLogPixels;
|
---|
525 | devmode.dmBitsPerPel = arg4->dmBitsPerPel;
|
---|
526 | devmode.dmPelsWidth = arg4->dmPelsWidth;
|
---|
527 | devmode.dmPelsHeight = arg4->dmPelsHeight;
|
---|
528 | devmode.dmDisplayFlags = arg4->dmDisplayFlags;
|
---|
529 | devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
|
---|
530 | devmode.dmICMMethod = arg4->dmICMMethod;
|
---|
531 | devmode.dmICMIntent = arg4->dmICMIntent;
|
---|
532 | devmode.dmMediaType = arg4->dmMediaType;
|
---|
533 | devmode.dmDitherType = arg4->dmDitherType;
|
---|
534 | devmode.dmReserved1 = arg4->dmReserved1;
|
---|
535 | devmode.dmReserved2 = arg4->dmReserved2;
|
---|
536 |
|
---|
537 | rc = CreateICA(astring1,astring2,astring3,&devmode);
|
---|
538 | }
|
---|
539 | else
|
---|
540 | rc = CreateICA(astring1,astring2,astring3, NULL);
|
---|
541 |
|
---|
542 | FreeAsciiString(astring1);
|
---|
543 | FreeAsciiString(astring2);
|
---|
544 | FreeAsciiString(astring3);
|
---|
545 | if(arg4)
|
---|
546 | {
|
---|
547 | FreeAsciiString(astring4);
|
---|
548 | FreeAsciiString(astring5);
|
---|
549 | }
|
---|
550 |
|
---|
551 | return rc;
|
---|
552 | }
|
---|
553 | //******************************************************************************
|
---|
554 | //******************************************************************************
|
---|
555 | BOOL WIN32API Ellipse(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
|
---|
556 | int nBottomRect)
|
---|
557 | {
|
---|
558 | dprintf(("GDI32: Ellipse %x (%d,%d)(%d,%d)", nLeftRect, nTopRect, nRightRect, nBottomRect));
|
---|
559 | return O32_Ellipse(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
|
---|
560 | }
|
---|
561 | //******************************************************************************
|
---|
562 | //******************************************************************************
|
---|
563 | BOOL WIN32API EndPath( HDC hdc)
|
---|
564 | {
|
---|
565 | return O32_EndPath(hdc);
|
---|
566 | }
|
---|
567 | //******************************************************************************
|
---|
568 | //******************************************************************************
|
---|
569 | BOOL WIN32API Rectangle(HDC hdc, int left, int top, int right, int bottom)
|
---|
570 | {
|
---|
571 | return O32_Rectangle(hdc, left, top, right, bottom);
|
---|
572 | }
|
---|
573 | //******************************************************************************
|
---|
574 | //******************************************************************************
|
---|
575 | #ifdef DEBUG
|
---|
576 | VOID dumpROP2(INT rop2)
|
---|
577 | {
|
---|
578 | CHAR *name;
|
---|
579 |
|
---|
580 | switch (rop2)
|
---|
581 | {
|
---|
582 | case R2_BLACK:
|
---|
583 | name = "R2_BLACK";
|
---|
584 | break;
|
---|
585 |
|
---|
586 | case R2_COPYPEN:
|
---|
587 | name = "R2_COPYPEN";
|
---|
588 | break;
|
---|
589 |
|
---|
590 | case R2_MASKNOTPEN:
|
---|
591 | name = "R2_MASKNOTPEN";
|
---|
592 | break;
|
---|
593 |
|
---|
594 | case R2_MASKPEN:
|
---|
595 | name = "R2_MASKPEN";
|
---|
596 | break;
|
---|
597 |
|
---|
598 | case R2_MASKPENNOT:
|
---|
599 | name = "R2_MASKPENNOT";
|
---|
600 | break;
|
---|
601 |
|
---|
602 | case R2_MERGENOTPEN:
|
---|
603 | name = "R2_MERGENOTPEN";
|
---|
604 | break;
|
---|
605 |
|
---|
606 | case R2_MERGEPEN:
|
---|
607 | name = "R2_MERGEPEN";
|
---|
608 | break;
|
---|
609 |
|
---|
610 | case R2_MERGEPENNOT:
|
---|
611 | name = "R2_MERGEPENNOT";
|
---|
612 | break;
|
---|
613 |
|
---|
614 | case R2_NOP:
|
---|
615 | name = "R2_NOP";
|
---|
616 | break;
|
---|
617 |
|
---|
618 | case R2_NOT:
|
---|
619 | name = "R2_NOT";
|
---|
620 | break;
|
---|
621 |
|
---|
622 | case R2_NOTCOPYPEN:
|
---|
623 | name = "R2_NOTCOPYPEN";
|
---|
624 | break;
|
---|
625 |
|
---|
626 | case R2_NOTMASKPEN:
|
---|
627 | name = "R2_NOTMASKPEN";
|
---|
628 | break;
|
---|
629 |
|
---|
630 | case R2_NOTMERGEPEN:
|
---|
631 | name = "R2_NOTMERGEPEN";
|
---|
632 | break;
|
---|
633 |
|
---|
634 | case R2_WHITE:
|
---|
635 | name = "R2_WHITE";
|
---|
636 | break;
|
---|
637 |
|
---|
638 | case R2_XORPEN:
|
---|
639 | name = "R2_XORPEN";
|
---|
640 | break;
|
---|
641 |
|
---|
642 | case R2_NOTXORPEN:
|
---|
643 | name = "R2_NOTXORPEN";
|
---|
644 | break;
|
---|
645 |
|
---|
646 | default:
|
---|
647 | name = "unknown mode!!!";
|
---|
648 | break;
|
---|
649 | }
|
---|
650 |
|
---|
651 | dprintf((" ROP2 mode = %s",name));
|
---|
652 | }
|
---|
653 | #endif
|
---|
654 | //******************************************************************************
|
---|
655 | //******************************************************************************
|
---|
656 | int WIN32API SetROP2( HDC hdc, int rop2)
|
---|
657 | {
|
---|
658 | #ifdef DEBUG
|
---|
659 | dumpROP2(rop2);
|
---|
660 | #endif
|
---|
661 | return O32_SetROP2(hdc, rop2);
|
---|
662 | }
|
---|
663 | //******************************************************************************
|
---|
664 | //******************************************************************************
|
---|
665 | int WIN32API Escape( HDC hdc, int nEscape, int cbInput, LPCSTR lpvInData, PVOID lpvOutData)
|
---|
666 | {
|
---|
667 | int rc;
|
---|
668 |
|
---|
669 | #ifdef DEBUG
|
---|
670 | if(cbInput && lpvInData) {
|
---|
671 | ULONG *tmp = (ULONG *)lpvInData;
|
---|
672 | for(int i=0;i<cbInput/4;i++) {
|
---|
673 | dprintf(("GDI32: Escape par %d: %x", i, *tmp++));
|
---|
674 | }
|
---|
675 | }
|
---|
676 | #endif
|
---|
677 | rc = O32_Escape(hdc, nEscape, cbInput, lpvInData, lpvOutData);
|
---|
678 | if(rc == 0) {
|
---|
679 | dprintf(("GDI32: Escape %x %d %d %x %x returned %d (WARNING: might not be implemented!!) ", hdc, nEscape, cbInput, lpvInData, lpvOutData, rc));
|
---|
680 | }
|
---|
681 | else dprintf(("GDI32: Escape %x %d %d %x %x returned %d ", hdc, nEscape, cbInput, lpvInData, lpvOutData, rc));
|
---|
682 |
|
---|
683 | return rc;
|
---|
684 | }
|
---|
685 | //******************************************************************************
|
---|
686 | //******************************************************************************
|
---|
687 | BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5)
|
---|
688 | {
|
---|
689 | return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5);
|
---|
690 | }
|
---|
691 | //******************************************************************************
|
---|
692 | //******************************************************************************
|
---|
693 | BOOL WIN32API FillPath( HDC arg1)
|
---|
694 | {
|
---|
695 | return O32_FillPath(arg1);
|
---|
696 | }
|
---|
697 | //******************************************************************************
|
---|
698 | //******************************************************************************
|
---|
699 | BOOL WIN32API FlattenPath( HDC arg1)
|
---|
700 | {
|
---|
701 | return O32_FlattenPath(arg1);
|
---|
702 | }
|
---|
703 | //******************************************************************************
|
---|
704 | //******************************************************************************
|
---|
705 | BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4)
|
---|
706 | {
|
---|
707 | return O32_FloodFill(arg1, arg2, arg3, arg4);
|
---|
708 | }
|
---|
709 | //******************************************************************************
|
---|
710 | //******************************************************************************
|
---|
711 | int WIN32API GetArcDirection( HDC arg1)
|
---|
712 | {
|
---|
713 | return O32_GetArcDirection(arg1);
|
---|
714 | }
|
---|
715 | //******************************************************************************
|
---|
716 | //******************************************************************************
|
---|
717 | BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2)
|
---|
718 | {
|
---|
719 | return O32_GetAspectRatioFilterEx(arg1, arg2);
|
---|
720 | }
|
---|
721 | //******************************************************************************
|
---|
722 | //******************************************************************************
|
---|
723 | COLORREF WIN32API GetBkColor(HDC hdc)
|
---|
724 | {
|
---|
725 | return O32_GetBkColor(hdc);
|
---|
726 | }
|
---|
727 | //******************************************************************************
|
---|
728 | //******************************************************************************
|
---|
729 | int WIN32API GetBkMode(HDC hdc)
|
---|
730 | {
|
---|
731 | return O32_GetBkMode(hdc);
|
---|
732 | }
|
---|
733 | //******************************************************************************
|
---|
734 | //******************************************************************************
|
---|
735 | UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3)
|
---|
736 | {
|
---|
737 | return O32_GetBoundsRect(arg1, arg2, arg3);
|
---|
738 | }
|
---|
739 | //******************************************************************************
|
---|
740 | //******************************************************************************
|
---|
741 | BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2)
|
---|
742 | {
|
---|
743 | return O32_GetBrushOrgEx(arg1, arg2);
|
---|
744 | }
|
---|
745 | //******************************************************************************
|
---|
746 | //******************************************************************************
|
---|
747 | BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
|
---|
748 | {
|
---|
749 | return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
|
---|
750 | }
|
---|
751 | //******************************************************************************
|
---|
752 | //******************************************************************************
|
---|
753 | BOOL WIN32API GetCharABCWidthsW( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
|
---|
754 | {
|
---|
755 | dprintf(("GDI32: GetCharABCWidthsW not properly implemented."));
|
---|
756 | // NOTE: This will not work as is (needs UNICODE support)
|
---|
757 | return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
|
---|
758 | }
|
---|
759 | //******************************************************************************
|
---|
760 | //******************************************************************************
|
---|
761 | BOOL WIN32API GetCharWidth32A( HDC hdc, UINT iFirstChar, UINT iLastChar, PINT pWidthArray)
|
---|
762 | {
|
---|
763 | BOOL ret;
|
---|
764 |
|
---|
765 | dprintf(("GDI32: GetCharWidth32A %x %x %x %x", hdc, iFirstChar, iLastChar, pWidthArray));
|
---|
766 | ret = O32_GetCharWidth(hdc, iFirstChar, iLastChar, pWidthArray);
|
---|
767 | dprintf(("GDI32: GetCharWidth32A returned %d", ret));
|
---|
768 | #ifdef DEBUG
|
---|
769 | if(ret) {
|
---|
770 | for(int i=iFirstChar;i<iLastChar;i++) {
|
---|
771 | if((i >= 'a' && i <= 'z') || (i >= 'A' && i <= 'Z')) {
|
---|
772 | dprintf2(("Char %c -> width %d", i, pWidthArray[i]));
|
---|
773 | }
|
---|
774 | else dprintf2(("Char %x -> width %d", i, pWidthArray[i]));
|
---|
775 | }
|
---|
776 | }
|
---|
777 | #endif
|
---|
778 | return ret;
|
---|
779 | }
|
---|
780 | //******************************************************************************
|
---|
781 | //TODO: Cut off Unicode chars?
|
---|
782 | //******************************************************************************
|
---|
783 | BOOL WIN32API GetCharWidth32W(HDC hdc, UINT iFirstChar, UINT iLastChar, PINT pWidthArray)
|
---|
784 | {
|
---|
785 | dprintf(("GDI32: GetCharWidth32W might not work properly %x %x %x %x", hdc, iFirstChar, iLastChar, pWidthArray));
|
---|
786 | return O32_GetCharWidth(hdc, iFirstChar, iLastChar, pWidthArray);
|
---|
787 | }
|
---|
788 | //******************************************************************************
|
---|
789 | //******************************************************************************
|
---|
790 | BOOL WIN32API GetCurrentPositionEx( HDC hdc, PPOINT lpPoint)
|
---|
791 | {
|
---|
792 | BOOL rc;
|
---|
793 |
|
---|
794 | rc = O32_GetCurrentPositionEx(hdc, lpPoint);
|
---|
795 | dprintf(("GDI32: GetCurrentPositionEx returned %d (%d,%d)", rc, lpPoint->x, lpPoint->y));
|
---|
796 | return rc;
|
---|
797 | }
|
---|
798 | //******************************************************************************
|
---|
799 | //******************************************************************************
|
---|
800 | int WIN32API GetDeviceCaps(HDC hdc, int nIndex)
|
---|
801 | {
|
---|
802 | int rc;
|
---|
803 |
|
---|
804 | rc = O32_GetDeviceCaps(hdc, nIndex);
|
---|
805 | dprintf(("GDI32: GetDeviceCaps %X, %d returned %d\n", hdc, nIndex, rc));
|
---|
806 | //SvL: 13-9-'98: NT returns -1 when using 16 bits colors, NOT 65536!
|
---|
807 | if(nIndex == NUMCOLORS && rc > 256)
|
---|
808 | return -1;
|
---|
809 |
|
---|
810 | return(rc);
|
---|
811 | }
|
---|
812 | //******************************************************************************
|
---|
813 | //******************************************************************************
|
---|
814 | DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
|
---|
815 | {
|
---|
816 | return O32_GetKerningPairs(arg1, arg2, arg3);
|
---|
817 | }
|
---|
818 | //******************************************************************************
|
---|
819 | //******************************************************************************
|
---|
820 | DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
|
---|
821 | {
|
---|
822 | dprintf(("GDI32: GetKerningPairsW; might not work"));
|
---|
823 | // NOTE: This will not work as is (needs UNICODE support)
|
---|
824 | return O32_GetKerningPairs(arg1, arg2, arg3);
|
---|
825 | }
|
---|
826 | //******************************************************************************
|
---|
827 | //******************************************************************************
|
---|
828 | BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
|
---|
829 | {
|
---|
830 | return O32_GetMiterLimit(arg1, arg2);
|
---|
831 | }
|
---|
832 | //******************************************************************************
|
---|
833 | //******************************************************************************
|
---|
834 | COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2)
|
---|
835 | {
|
---|
836 | return O32_GetNearestColor(arg1, arg2);
|
---|
837 | }
|
---|
838 | //******************************************************************************
|
---|
839 | //******************************************************************************
|
---|
840 | INT WIN32API GetPath( HDC hdc, PPOINT arg2, PBYTE arg3, int arg4)
|
---|
841 | {
|
---|
842 | return O32_GetPath(hdc, arg2, arg3, arg4);
|
---|
843 | }
|
---|
844 | //******************************************************************************
|
---|
845 | //******************************************************************************
|
---|
846 | int WIN32API GetPolyFillMode( HDC hdc)
|
---|
847 | {
|
---|
848 | return O32_GetPolyFillMode(hdc);
|
---|
849 | }
|
---|
850 | //******************************************************************************
|
---|
851 | //******************************************************************************
|
---|
852 | int WIN32API GetROP2( HDC hdc)
|
---|
853 | {
|
---|
854 | return O32_GetROP2(hdc);
|
---|
855 | }
|
---|
856 | //******************************************************************************
|
---|
857 | //******************************************************************************
|
---|
858 | BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2)
|
---|
859 | {
|
---|
860 | return O32_GetRasterizerCaps(arg1, arg2);
|
---|
861 | }
|
---|
862 | //******************************************************************************
|
---|
863 | //******************************************************************************
|
---|
864 | UINT WIN32API GetTextAlign( HDC hdc)
|
---|
865 | {
|
---|
866 | return O32_GetTextAlign(hdc);
|
---|
867 | }
|
---|
868 | //******************************************************************************
|
---|
869 | //******************************************************************************
|
---|
870 | int WIN32API GetTextCharacterExtra( HDC hdc)
|
---|
871 | {
|
---|
872 | return O32_GetTextCharacterExtra(hdc);
|
---|
873 | }
|
---|
874 | //******************************************************************************
|
---|
875 | //******************************************************************************
|
---|
876 | COLORREF WIN32API GetTextColor( HDC hdc)
|
---|
877 | {
|
---|
878 | return O32_GetTextColor(hdc);
|
---|
879 | }
|
---|
880 | //******************************************************************************
|
---|
881 | //******************************************************************************
|
---|
882 | BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
|
---|
883 | int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
|
---|
884 | int nYRadial2)
|
---|
885 | {
|
---|
886 | dprintf(("GDI32: Pie %x (%d,%d)(%d,%d) (%d,%d) (%d,%d)", hdc, nLeftRect, nTopRect, nRightRect,
|
---|
887 | nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2));
|
---|
888 |
|
---|
889 | //CB: bug in O32_Pie
|
---|
890 | if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
|
---|
891 | return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
|
---|
892 | else
|
---|
893 | return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
|
---|
894 | }
|
---|
895 | //******************************************************************************
|
---|
896 | //******************************************************************************
|
---|
897 | BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
|
---|
898 | {
|
---|
899 | return O32_PolyBezier(arg1, arg2, (int)arg3);
|
---|
900 | }
|
---|
901 | //******************************************************************************
|
---|
902 | //******************************************************************************
|
---|
903 | BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
|
---|
904 | {
|
---|
905 | return O32_PolyBezierTo(arg1, arg2, arg3);
|
---|
906 | }
|
---|
907 | //******************************************************************************
|
---|
908 | //******************************************************************************
|
---|
909 | BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
|
---|
910 | {
|
---|
911 | return O32_PolyDraw(arg1, arg2, arg3, arg4);
|
---|
912 | }
|
---|
913 | //******************************************************************************
|
---|
914 | //******************************************************************************
|
---|
915 | BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
|
---|
916 | {
|
---|
917 | return O32_PolyPolygon(arg1, arg2, arg3, arg4);
|
---|
918 | }
|
---|
919 | //******************************************************************************
|
---|
920 | //******************************************************************************
|
---|
921 | BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
|
---|
922 | {
|
---|
923 | return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
|
---|
924 | }
|
---|
925 | //******************************************************************************
|
---|
926 | //******************************************************************************
|
---|
927 | BOOL WIN32API Polygon( HDC hdc, const POINT *lpPoints, int count)
|
---|
928 | {
|
---|
929 | return O32_Polygon(hdc, lpPoints, count);
|
---|
930 | }
|
---|
931 | //******************************************************************************
|
---|
932 | //******************************************************************************
|
---|
933 | BOOL WIN32API PtVisible( HDC hdc, int x, int y)
|
---|
934 | {
|
---|
935 | dprintf(("GDI32: PtVisible %x (%d,%d)", hdc, x, y));
|
---|
936 | return O32_PtVisible(hdc, x, y);
|
---|
937 | }
|
---|
938 | //******************************************************************************
|
---|
939 | //******************************************************************************
|
---|
940 | BOOL WIN32API RectVisible( HDC hdc, const RECT *lpRect)
|
---|
941 | {
|
---|
942 | if(lpRect == NULL) {
|
---|
943 | dprintf(("WARNING: GDI32: RectVisible %x lpRect == NULL!"));
|
---|
944 | return FALSE;
|
---|
945 | }
|
---|
946 | dprintf(("GDI32: RectVisible %x (%d,%d)(%d,%d)", hdc, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom));
|
---|
947 | return O32_RectVisible(hdc, lpRect);
|
---|
948 | }
|
---|
949 | //******************************************************************************
|
---|
950 | //******************************************************************************
|
---|
951 | HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
|
---|
952 | {
|
---|
953 | return (HDC)O32_ResetDC(arg1, arg2);
|
---|
954 | }
|
---|
955 | //******************************************************************************
|
---|
956 | //******************************************************************************
|
---|
957 | HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
|
---|
958 | {
|
---|
959 | dprintf(("GDI32: ResetDCW: not properly implemented"));
|
---|
960 | DebugInt3();
|
---|
961 | // NOTE: This will not work as is (needs UNICODE support)
|
---|
962 | return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
|
---|
963 | }
|
---|
964 | //******************************************************************************
|
---|
965 | //******************************************************************************
|
---|
966 | BOOL WIN32API RestoreDC(HDC hdc, int id)
|
---|
967 | {
|
---|
968 | BOOL ret;
|
---|
969 |
|
---|
970 | ret = O32_RestoreDC(hdc, id);
|
---|
971 | if(ret == FALSE) {
|
---|
972 | dprintf(("ERROR: GDI32: RestoreDC %x %d FAILED", hdc, id));
|
---|
973 | }
|
---|
974 | return ret;
|
---|
975 | }
|
---|
976 | //******************************************************************************
|
---|
977 | //******************************************************************************
|
---|
978 | BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
|
---|
979 | {
|
---|
980 | return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
---|
981 | }
|
---|
982 | //******************************************************************************
|
---|
983 | //******************************************************************************
|
---|
984 | int WIN32API SaveDC( HDC hdc)
|
---|
985 | {
|
---|
986 | int id;
|
---|
987 |
|
---|
988 | id = O32_SaveDC(hdc);
|
---|
989 | if(id == 0) {
|
---|
990 | dprintf(("ERROR: GDI32: SaveDC %x FAILED", hdc));
|
---|
991 | }
|
---|
992 | else dprintf(("GDI32: SaveDC %x returned %d", hdc, id));
|
---|
993 | return id;
|
---|
994 | }
|
---|
995 | //******************************************************************************
|
---|
996 | //******************************************************************************
|
---|
997 | int WIN32API SetArcDirection( HDC arg1, int arg2)
|
---|
998 | {
|
---|
999 | return O32_SetArcDirection(arg1, arg2);
|
---|
1000 | }
|
---|
1001 | //******************************************************************************
|
---|
1002 | //******************************************************************************
|
---|
1003 | UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
|
---|
1004 | {
|
---|
1005 | return O32_SetBoundsRect(arg1, arg2, arg3);
|
---|
1006 | }
|
---|
1007 | //******************************************************************************
|
---|
1008 | //******************************************************************************
|
---|
1009 | BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
|
---|
1010 | {
|
---|
1011 | return O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
|
---|
1012 | }
|
---|
1013 | //******************************************************************************
|
---|
1014 | //******************************************************************************
|
---|
1015 | DWORD WIN32API SetMapperFlags(HDC hdc, DWORD dwFlag)
|
---|
1016 | {
|
---|
1017 | return O32_SetMapperFlags(hdc, dwFlag);
|
---|
1018 | }
|
---|
1019 | //******************************************************************************
|
---|
1020 | //******************************************************************************
|
---|
1021 | BOOL WIN32API SetMiterLimit(HDC hdc, float eNewLimit, float* peOldLimit)
|
---|
1022 | {
|
---|
1023 | return O32_SetMiterLimit(hdc, eNewLimit, peOldLimit);
|
---|
1024 | }
|
---|
1025 | //******************************************************************************
|
---|
1026 | //******************************************************************************
|
---|
1027 | int WIN32API SetPolyFillMode(HDC hdc, int iPolyFillMode)
|
---|
1028 | {
|
---|
1029 | return O32_SetPolyFillMode(hdc, iPolyFillMode);
|
---|
1030 | }
|
---|
1031 | //******************************************************************************
|
---|
1032 | //******************************************************************************
|
---|
1033 | UINT WIN32API SetTextAlign(HDC hdc, UINT fMode)
|
---|
1034 | {
|
---|
1035 | return O32_SetTextAlign(hdc, fMode);
|
---|
1036 | }
|
---|
1037 | //******************************************************************************
|
---|
1038 | //******************************************************************************
|
---|
1039 | int WIN32API SetTextCharacterExtra(HDC hdc, int nCharExtra)
|
---|
1040 | {
|
---|
1041 | return O32_SetTextCharacterExtra(hdc, nCharExtra);
|
---|
1042 | }
|
---|
1043 | //******************************************************************************
|
---|
1044 | //******************************************************************************
|
---|
1045 | BOOL WIN32API SetTextJustification(HDC hdc, int nBreakExtra, int nBreakCount)
|
---|
1046 | {
|
---|
1047 | return O32_SetTextJustification(hdc, nBreakExtra, nBreakCount);
|
---|
1048 | }
|
---|
1049 | //******************************************************************************
|
---|
1050 | //******************************************************************************
|
---|
1051 | BOOL WIN32API WidenPath( HDC hdc)
|
---|
1052 | {
|
---|
1053 | return O32_WidenPath(hdc);
|
---|
1054 | }
|
---|
1055 | //******************************************************************************
|
---|
1056 | //Selects the current path as a clipping region for a device context, combining
|
---|
1057 | //any existing clipping region by using the specified mode
|
---|
1058 | //TODO: Can be emulated with SelectClipRegion??
|
---|
1059 | //******************************************************************************
|
---|
1060 | BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
|
---|
1061 | {
|
---|
1062 | dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
|
---|
1063 | return(TRUE);
|
---|
1064 | }
|
---|
1065 | //******************************************************************************
|
---|
1066 | //TODO: Sets the color adjustment values for a device context. (used to adjust
|
---|
1067 | // the input color of the src bitmap for calls of StretchBlt & StretchDIBits
|
---|
1068 | // functions when HALFTONE mode is set
|
---|
1069 | //******************************************************************************
|
---|
1070 | BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
|
---|
1071 | {
|
---|
1072 | dprintf(("GDI32: SetColorAdjustment, not implemented!(TRUE)\n"));
|
---|
1073 | return(TRUE);
|
---|
1074 | }
|
---|
1075 | //******************************************************************************
|
---|
1076 | //Maps colors to system palette; faster way to update window (instead of redrawing)
|
---|
1077 | //We just redraw
|
---|
1078 | //******************************************************************************
|
---|
1079 | BOOL WIN32API UpdateColors(HDC hdc)
|
---|
1080 | {
|
---|
1081 | return InvalidateRect(WindowFromDC(hdc), NULL, FALSE);
|
---|
1082 | }
|
---|
1083 | //******************************************************************************
|
---|
1084 | //******************************************************************************
|
---|
1085 | BOOL WIN32API GdiFlush()
|
---|
1086 | {
|
---|
1087 | dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
|
---|
1088 | return(TRUE);
|
---|
1089 | }
|
---|
1090 | //******************************************************************************
|
---|
1091 | //******************************************************************************
|
---|
1092 | BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
|
---|
1093 | {
|
---|
1094 | dprintf(("GDI32: GdiComment %x %d %x NOT IMPLEMENTED", hdc, cbSize, lpData));
|
---|
1095 | // return O32_GdiComment(hdc, cbSize, lpData);
|
---|
1096 | return TRUE;
|
---|
1097 | }
|
---|
1098 | //******************************************************************************
|
---|
1099 | //******************************************************************************
|
---|
1100 | BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
|
---|
1101 | {
|
---|
1102 | dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
|
---|
1103 | return(FALSE);
|
---|
1104 | }
|
---|
1105 | //******************************************************************************
|
---|
1106 | //******************************************************************************
|
---|
1107 | BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
|
---|
1108 | {
|
---|
1109 | dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
|
---|
1110 | return(FALSE);
|
---|
1111 | }
|
---|
1112 | //******************************************************************************
|
---|
1113 | //******************************************************************************
|
---|
1114 | BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
|
---|
1115 | {
|
---|
1116 | dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
|
---|
1117 | return(FALSE);
|
---|
1118 | }
|
---|
1119 | //******************************************************************************
|
---|
1120 | //******************************************************************************
|
---|
1121 | BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
|
---|
1122 | UINT iFirstChar,
|
---|
1123 | UINT iLastChar,
|
---|
1124 | LPABCFLOAT pxBUffer)
|
---|
1125 | {
|
---|
1126 | dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
|
---|
1127 | return(FALSE);
|
---|
1128 | }
|
---|
1129 | //******************************************************************************
|
---|
1130 | //******************************************************************************
|
---|
1131 | INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
|
---|
1132 | INT cbOutput, LPSTR lpszOutData)
|
---|
1133 | {
|
---|
1134 | dprintf(("GDI32: ExtEscape, %x %x %d %x %d %x not implemented", hdc, nEscape, cbInput, lpszInData, cbOutput, lpszOutData));
|
---|
1135 | #ifdef DEBUG
|
---|
1136 | if(cbInput && lpszInData) {
|
---|
1137 | ULONG *tmp = (ULONG *)lpszInData;
|
---|
1138 | for(int i=0;i<cbInput/4;i++) {
|
---|
1139 | dprintf(("GDI32: ExtEscape par %d: %x", i, *tmp++));
|
---|
1140 | }
|
---|
1141 | }
|
---|
1142 | #endif
|
---|
1143 | return(0);
|
---|
1144 | }
|
---|
1145 | //******************************************************************************
|
---|
1146 | //******************************************************************************
|
---|
1147 | int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
|
---|
1148 | {
|
---|
1149 | dprintf(("GDI32: DrawEscape, not implemented\n"));
|
---|
1150 | return(0);
|
---|
1151 | }
|
---|
1152 | //******************************************************************************
|
---|
1153 | //******************************************************************************
|
---|
1154 | BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
|
---|
1155 | {
|
---|
1156 | dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
|
---|
1157 | return(FALSE);
|
---|
1158 | }
|
---|
1159 | //******************************************************************************
|
---|
1160 | //******************************************************************************
|
---|
1161 | DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
|
---|
1162 | DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
|
---|
1163 | {
|
---|
1164 | dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
|
---|
1165 | return(GDI_ERROR);
|
---|
1166 | }
|
---|
1167 | //******************************************************************************
|
---|
1168 |
|
---|
1169 | //******************************************************************************
|
---|
1170 | /*KSO Thu 21.05.1998*/
|
---|
1171 | DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
|
---|
1172 | DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
|
---|
1173 | {
|
---|
1174 | dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
|
---|
1175 | return(GDI_ERROR);
|
---|
1176 | }
|
---|
1177 | //******************************************************************************
|
---|
1178 |
|
---|
1179 | //******************************************************************************
|
---|
1180 |
|
---|
1181 |
|
---|
1182 | /* Office 97 stubs - KSO Thu 21.05.1998*/
|
---|
1183 | //******************************************************************************
|
---|
1184 | BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
|
---|
1185 | HDC hdc,
|
---|
1186 | LPCSTR str,
|
---|
1187 | int count,
|
---|
1188 | int maxExt,
|
---|
1189 | LPINT lpnFit,
|
---|
1190 | LPINT alpDx,
|
---|
1191 | LPSIZE size)
|
---|
1192 | {
|
---|
1193 | int index, nFit, extent;
|
---|
1194 | SIZE tSize;
|
---|
1195 |
|
---|
1196 | dprintf(("GDI32: GetTextExtendExPointA\n"));
|
---|
1197 |
|
---|
1198 | size->cx = size->cy = nFit = extent = 0;
|
---|
1199 | for(index = 0; index < count; index++)
|
---|
1200 | {
|
---|
1201 | if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
|
---|
1202 | if( extent+tSize.cx < maxExt )
|
---|
1203 | {
|
---|
1204 | extent+=tSize.cx;
|
---|
1205 | nFit++;
|
---|
1206 | str++;
|
---|
1207 | if( alpDx )
|
---|
1208 | alpDx[index] = extent;
|
---|
1209 | if( tSize.cy > size->cy ) size->cy = tSize.cy;
|
---|
1210 | }
|
---|
1211 | else break;
|
---|
1212 | }
|
---|
1213 | size->cx = extent;
|
---|
1214 |
|
---|
1215 | if (lpnFit != NULL) // check if result is desired
|
---|
1216 | *lpnFit = nFit;
|
---|
1217 |
|
---|
1218 | dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
|
---|
1219 | hdc,count,str,maxExt,nFit, size->cx,size->cy));
|
---|
1220 | return TRUE;
|
---|
1221 | }
|
---|
1222 | //******************************************************************************
|
---|
1223 | //******************************************************************************
|
---|
1224 | BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
|
---|
1225 | HDC arg1,
|
---|
1226 | LPCWSTR arg2,
|
---|
1227 | int arg3,
|
---|
1228 | int arg4,
|
---|
1229 | LPINT arg5,
|
---|
1230 | LPINT arg6,
|
---|
1231 | LPSIZE arg7
|
---|
1232 | )
|
---|
1233 | {
|
---|
1234 | char *astring = UnicodeToAsciiString((LPWSTR)arg2);
|
---|
1235 | BOOL rc;
|
---|
1236 |
|
---|
1237 | dprintf(("GDI32: GetTextExtendExPointW\n"));
|
---|
1238 | rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
|
---|
1239 | FreeAsciiString(astring);
|
---|
1240 | return rc;
|
---|
1241 | }
|
---|
1242 | //******************************************************************************
|
---|
1243 |
|
---|
1244 |
|
---|
1245 | /*****************************************************************************
|
---|
1246 | * Name : BOOL CancelDC
|
---|
1247 | * Purpose : The CancelDC function cancels any pending operation on the
|
---|
1248 | * specified device context (DC).
|
---|
1249 | * Parameters: HDC hdc handle of device context
|
---|
1250 | * Variables :
|
---|
1251 | * Result : TRUE / FALSE
|
---|
1252 | * Remark :
|
---|
1253 | * Status : UNTESTED STUB
|
---|
1254 | *
|
---|
1255 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
1256 | *****************************************************************************/
|
---|
1257 |
|
---|
1258 | BOOL WIN32API CancelDC(HDC hdc)
|
---|
1259 | {
|
---|
1260 | dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
|
---|
1261 | hdc));
|
---|
1262 |
|
---|
1263 | return (FALSE);
|
---|
1264 | }
|
---|
1265 |
|
---|
1266 | /*****************************************************************************
|
---|
1267 | * Name : BOOL CombineTransform
|
---|
1268 | * Purpose : The CombineTransform function concatenates two world-space to
|
---|
1269 | * page-space transformations.
|
---|
1270 | * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
|
---|
1271 | * XFORM *lLPXFORM1 address of 1st transformation
|
---|
1272 | * XFORM *lLPXFORM2 address of 2nd transformation
|
---|
1273 | * Variables :
|
---|
1274 | * Result : TRUE / FALSE
|
---|
1275 | * Remark :
|
---|
1276 | * Status : COMPLETELY UNTESTED
|
---|
1277 | *
|
---|
1278 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
1279 | * Markus Montkowski [Wen, 1999/01/12 20:18]
|
---|
1280 | *****************************************************************************/
|
---|
1281 |
|
---|
1282 | BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
|
---|
1283 | CONST XFORM *lLPXFORM1,
|
---|
1284 | CONST XFORM *lLPXFORM2)
|
---|
1285 | {
|
---|
1286 | dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh).\n",
|
---|
1287 | lLPXFORMResult,
|
---|
1288 | lLPXFORM1,
|
---|
1289 | lLPXFORM2));
|
---|
1290 |
|
---|
1291 | XFORM xfrm;
|
---|
1292 | if( IsBadWritePtr( (void*)lLPXFORMResult, sizeof(XFORM)) ||
|
---|
1293 | IsBadReadPtr( (void*)lLPXFORM1, sizeof(XFORM)) ||
|
---|
1294 | IsBadWritePtr( (void*)lLPXFORM2, sizeof(XFORM)) )
|
---|
1295 | return (FALSE);
|
---|
1296 |
|
---|
1297 | // Add the translations
|
---|
1298 | lLPXFORMResult->eDx = lLPXFORM1->eDx + lLPXFORM2->eDx;
|
---|
1299 | lLPXFORMResult->eDy = lLPXFORM1->eDy + lLPXFORM2->eDy;
|
---|
1300 |
|
---|
1301 | // Multiply the matrixes
|
---|
1302 | xfrm.eM11 = lLPXFORM1->eM11 * lLPXFORM2->eM11 + lLPXFORM1->eM21 * lLPXFORM1->eM12;
|
---|
1303 | xfrm.eM12 = lLPXFORM1->eM11 * lLPXFORM2->eM12 + lLPXFORM1->eM12 * lLPXFORM1->eM22;
|
---|
1304 | xfrm.eM21 = lLPXFORM1->eM21 * lLPXFORM2->eM11 + lLPXFORM1->eM22 * lLPXFORM1->eM21;
|
---|
1305 | xfrm.eM22 = lLPXFORM1->eM21 * lLPXFORM2->eM12 + lLPXFORM1->eM22 * lLPXFORM1->eM22;
|
---|
1306 |
|
---|
1307 | // Now copy to resulting XFROM as the pt must not be distinct
|
---|
1308 | lLPXFORMResult->eM11 = xfrm.eM11;
|
---|
1309 | lLPXFORMResult->eM12 = xfrm.eM12;
|
---|
1310 | lLPXFORMResult->eM21 = xfrm.eM21;
|
---|
1311 | lLPXFORMResult->eM22 = xfrm.eM22;
|
---|
1312 |
|
---|
1313 | return (TRUE);
|
---|
1314 | }
|
---|
1315 |
|
---|
1316 |
|
---|
1317 | /*****************************************************************************
|
---|
1318 | * Name : BOOL FixBrushOrgEx
|
---|
1319 | * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
|
---|
1320 | * It is provided for compatibility with Win32s. If called, the
|
---|
1321 | * function does nothing, and returns FALSE.
|
---|
1322 | * Parameters: HDC, int, int, LPPOINT
|
---|
1323 | * Variables :
|
---|
1324 | * Result : TRUE / FALSE
|
---|
1325 | * Remark : not implemented in Win32
|
---|
1326 | * Status : UNTESTED STUB
|
---|
1327 | *
|
---|
1328 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
1329 | *****************************************************************************/
|
---|
1330 |
|
---|
1331 | BOOL WIN32API FixBrushOrgEx(HDC hdc,
|
---|
1332 | int iDummy1,
|
---|
1333 | int iDummy2,
|
---|
1334 | LPPOINT lpPoint)
|
---|
1335 | {
|
---|
1336 | dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1337 | hdc,
|
---|
1338 | iDummy1,
|
---|
1339 | iDummy2,
|
---|
1340 | lpPoint));
|
---|
1341 |
|
---|
1342 | return (FALSE);
|
---|
1343 | }
|
---|
1344 |
|
---|
1345 |
|
---|
1346 | /*****************************************************************************
|
---|
1347 | * Name : DWORD GdiGetBatchLimit
|
---|
1348 | * Purpose : The GdiGetBatchLimit function returns the maximum number of
|
---|
1349 | * function calls that can be accumulated in the calling thread's
|
---|
1350 | * current batch. The system flushes the current batch whenever
|
---|
1351 | * this limit is exceeded.
|
---|
1352 | * Parameters:
|
---|
1353 | * Variables :
|
---|
1354 | * Result : 1
|
---|
1355 | * Remark :
|
---|
1356 | * Status : UNTESTED STUB
|
---|
1357 | *
|
---|
1358 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
1359 | *****************************************************************************/
|
---|
1360 |
|
---|
1361 | DWORD WIN32API GdiGetBatchLimit(VOID)
|
---|
1362 | {
|
---|
1363 | dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
|
---|
1364 |
|
---|
1365 | return (1);
|
---|
1366 | }
|
---|
1367 |
|
---|
1368 |
|
---|
1369 | /*****************************************************************************
|
---|
1370 | * Name : DWORD GdiSetBatchLimit
|
---|
1371 | * Purpose : The GdiSetBatchLimit function sets the maximum number of
|
---|
1372 | * functions that can be accumulated in the calling thread's current
|
---|
1373 | * batch. The system flushes the current batch whenever this limit
|
---|
1374 | * is exceeded.
|
---|
1375 | * Parameters: DWORD dwLimit
|
---|
1376 | * Variables :
|
---|
1377 | * Result :
|
---|
1378 | * Remark :
|
---|
1379 | * Status : UNTESTED STUB
|
---|
1380 | *
|
---|
1381 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
1382 | *****************************************************************************/
|
---|
1383 |
|
---|
1384 | DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
|
---|
1385 | {
|
---|
1386 | dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
|
---|
1387 | dwLimit));
|
---|
1388 |
|
---|
1389 | return (1);
|
---|
1390 | }
|
---|
1391 |
|
---|
1392 |
|
---|
1393 | /*****************************************************************************
|
---|
1394 | * Name : DWORD GetCharacterPlacementA
|
---|
1395 | * Purpose : The GetCharacterPlacementA function retrieves information about
|
---|
1396 | * a character string, such as character widths, caret positioning,
|
---|
1397 | * ordering within the string, and glyph rendering. The type of
|
---|
1398 | * information returned depends on the dwFlags parameter and is
|
---|
1399 | * based on the currently selected font in the given display context.
|
---|
1400 | * The function copies the information to the specified GCP_RESULTSA
|
---|
1401 | * structure or to one or more arrays specified by the structure.
|
---|
1402 | * Parameters: HDC hdc handle to device context
|
---|
1403 | * LPCSTR lpString pointer to string
|
---|
1404 | * int nCount number of characters in string
|
---|
1405 | * int nMaxExtent maximum extent for displayed string
|
---|
1406 | * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
|
---|
1407 | * DWORD dwFlags placement flags
|
---|
1408 | * Variables :
|
---|
1409 | * Result :
|
---|
1410 | * Remark :
|
---|
1411 | * Status : UNTESTED STUB
|
---|
1412 | *
|
---|
1413 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
1414 | *****************************************************************************/
|
---|
1415 |
|
---|
1416 | DWORD WIN32API GetCharacterPlacementA(HDC hdc,
|
---|
1417 | LPCSTR lpString,
|
---|
1418 | int nCount,
|
---|
1419 | int nMaxExtent,
|
---|
1420 | GCP_RESULTSA * lpResults,
|
---|
1421 | DWORD dwFlags)
|
---|
1422 | {
|
---|
1423 | dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1424 | hdc,
|
---|
1425 | lpString,
|
---|
1426 | nCount,
|
---|
1427 | nMaxExtent,
|
---|
1428 | lpResults,
|
---|
1429 | dwFlags));
|
---|
1430 |
|
---|
1431 | return (0);
|
---|
1432 | }
|
---|
1433 |
|
---|
1434 |
|
---|
1435 | /*****************************************************************************
|
---|
1436 | * Name : DWORD GetCharacterPlacementW
|
---|
1437 | * Purpose : The GetCharacterPlacementW function retrieves information about
|
---|
1438 | * a character string, such as character widths, caret positioning,
|
---|
1439 | * ordering within the string, and glyph rendering. The type of
|
---|
1440 | * information returned depends on the dwFlags parameter and is
|
---|
1441 | * based on the currently selected font in the given display context.
|
---|
1442 | * The function copies the information to the specified GCP_RESULTSW
|
---|
1443 | * structure or to one or more arrays specified by the structure.
|
---|
1444 | * Parameters: HDC hdc handle to device context
|
---|
1445 | * LPCSTR lpString pointer to string
|
---|
1446 | * int nCount number of characters in string
|
---|
1447 | * int nMaxExtent maximum extent for displayed string
|
---|
1448 | * GCP_RESULTSW *lpResults pointer to buffer for placement result
|
---|
1449 | * DWORD dwFlags placement flags
|
---|
1450 | * Variables :
|
---|
1451 | * Result :
|
---|
1452 | * Remark :
|
---|
1453 | * Status : UNTESTED STUB
|
---|
1454 | *
|
---|
1455 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
1456 | *****************************************************************************/
|
---|
1457 |
|
---|
1458 | DWORD WIN32API GetCharacterPlacementW(HDC hdc,
|
---|
1459 | LPCWSTR lpString,
|
---|
1460 | int nCount,
|
---|
1461 | int nMaxExtent,
|
---|
1462 | GCP_RESULTSW *lpResults,
|
---|
1463 | DWORD dwFlags)
|
---|
1464 | {
|
---|
1465 | dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1466 | hdc,
|
---|
1467 | lpString,
|
---|
1468 | nCount,
|
---|
1469 | nMaxExtent,
|
---|
1470 | lpResults,
|
---|
1471 | dwFlags));
|
---|
1472 |
|
---|
1473 | return (0);
|
---|
1474 | }
|
---|