| 1 | /* $Id: gdi32.cpp,v 1.34 2000-01-28 22:24:57 sandervl Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * GDI32 apis
|
|---|
| 5 | *
|
|---|
| 6 | * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
|
|---|
| 7 | * Copyright 1998 Patrick Haller
|
|---|
| 8 | *
|
|---|
| 9 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 10 | *
|
|---|
| 11 | */
|
|---|
| 12 | #include <os2win.h>
|
|---|
| 13 | #include <stdlib.h>
|
|---|
| 14 | #include <stdarg.h>
|
|---|
| 15 | #include <string.h>
|
|---|
| 16 | #include "misc.h"
|
|---|
| 17 | #include "callback.h"
|
|---|
| 18 | #include "unicode.h"
|
|---|
| 19 | #include "dibsect.h"
|
|---|
| 20 | #include <codepage.h>
|
|---|
| 21 | #include "oslibgpi.h"
|
|---|
| 22 | #include "oslibgdi.h"
|
|---|
| 23 |
|
|---|
| 24 | static ULONG QueryPaletteSize(BITMAPINFOHEADER *pBHdr)
|
|---|
| 25 | {
|
|---|
| 26 | ULONG cbPalette;
|
|---|
| 27 |
|
|---|
| 28 | switch (pBHdr->biBitCount)
|
|---|
| 29 | {
|
|---|
| 30 | case 1:
|
|---|
| 31 | case 4:
|
|---|
| 32 | case 8:
|
|---|
| 33 | cbPalette = (1 << pBHdr->biBitCount) * sizeof(RGBQUAD);
|
|---|
| 34 | break;
|
|---|
| 35 |
|
|---|
| 36 | case 16:
|
|---|
| 37 | case 24:
|
|---|
| 38 | case 32:
|
|---|
| 39 | cbPalette = 0;
|
|---|
| 40 | break;
|
|---|
| 41 |
|
|---|
| 42 | default:
|
|---|
| 43 | dprintf(("QueryPaletteSize: error pBHdr->biBitCount = %d", pBHdr->biBitCount));
|
|---|
| 44 | cbPalette = -1;
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | return cbPalette;
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | static ULONG CalcBitmapSize(ULONG cBits, LONG cx, LONG cy)
|
|---|
| 51 | {
|
|---|
| 52 | ULONG alignment;
|
|---|
| 53 | ULONG factor;
|
|---|
| 54 | BOOL flag = TRUE; //true: '*' false: '/'
|
|---|
| 55 |
|
|---|
| 56 | cy = cy < 0 ? -cy : cy;
|
|---|
| 57 |
|
|---|
| 58 | switch(cBits)
|
|---|
| 59 | {
|
|---|
| 60 | case 1:
|
|---|
| 61 | factor = 8;
|
|---|
| 62 | flag = FALSE;
|
|---|
| 63 | break;
|
|---|
| 64 |
|
|---|
| 65 | case 4:
|
|---|
| 66 | factor = 2;
|
|---|
| 67 | flag = FALSE;
|
|---|
| 68 | break;
|
|---|
| 69 |
|
|---|
| 70 | case 8:
|
|---|
| 71 | factor = 1;
|
|---|
| 72 | break;
|
|---|
| 73 |
|
|---|
| 74 | case 16:
|
|---|
| 75 | factor = 2;
|
|---|
| 76 | break;
|
|---|
| 77 |
|
|---|
| 78 | case 24:
|
|---|
| 79 | factor = 3;
|
|---|
| 80 | break;
|
|---|
| 81 |
|
|---|
| 82 | case 32:
|
|---|
| 83 | return cx*cy;
|
|---|
| 84 |
|
|---|
| 85 | default:
|
|---|
| 86 | return 0;
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | if (flag)
|
|---|
| 90 | alignment = (cx = (cx*factor)) % 4;
|
|---|
| 91 | else
|
|---|
| 92 | alignment = (cx = ((cx+factor-1)/factor)) % 4;
|
|---|
| 93 |
|
|---|
| 94 | if (alignment != 0)
|
|---|
| 95 | cx += 4 - alignment;
|
|---|
| 96 |
|
|---|
| 97 | return cx*cy;
|
|---|
| 98 | }
|
|---|
| 99 |
|
|---|
| 100 | //******************************************************************************
|
|---|
| 101 | //******************************************************************************
|
|---|
| 102 | BOOL WIN32API GetTextExtentPointA(HDC hdc, LPCSTR lpsz, int cbString, LPSIZE lpSize)
|
|---|
| 103 | {
|
|---|
| 104 | BOOL rc;
|
|---|
| 105 |
|
|---|
| 106 | lpSize->cx = lpSize->cy = 0;
|
|---|
| 107 | rc = O32_GetTextExtentPoint(hdc, lpsz, cbString, lpSize);
|
|---|
| 108 | dprintf(("GDI32: GetTextExtentPointA of %s returned %d\n", lpsz, rc));
|
|---|
| 109 | return(rc);
|
|---|
| 110 | }
|
|---|
| 111 | //******************************************************************************
|
|---|
| 112 | //******************************************************************************
|
|---|
| 113 | COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor)
|
|---|
| 114 | {
|
|---|
| 115 | dprintf(("GDI32: SetBkColor to %X\n", crColor));
|
|---|
| 116 | return(O32_SetBkColor(hdc, crColor));
|
|---|
| 117 | }
|
|---|
| 118 | //******************************************************************************
|
|---|
| 119 | //******************************************************************************
|
|---|
| 120 | COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor)
|
|---|
| 121 | {
|
|---|
| 122 | COLORREF clr;
|
|---|
| 123 |
|
|---|
| 124 | clr = O32_SetTextColor(hdc, crColor);
|
|---|
| 125 | dprintf(("GDI32: SetTextColor from %X to %X\n", clr, crColor));
|
|---|
| 126 | return(clr);
|
|---|
| 127 | }
|
|---|
| 128 | //******************************************************************************
|
|---|
| 129 | //******************************************************************************
|
|---|
| 130 |
|
|---|
| 131 | static hFntDefaultGui = NULL;
|
|---|
| 132 | HGDIOBJ WIN32API GetStockObject(int arg1)
|
|---|
| 133 | {
|
|---|
| 134 | HGDIOBJ obj;
|
|---|
| 135 |
|
|---|
| 136 | switch(arg1)
|
|---|
| 137 | {
|
|---|
| 138 | case DEFAULT_GUI_FONT:
|
|---|
| 139 | if(NULL==hFntDefaultGui)
|
|---|
| 140 | hFntDefaultGui = CreateFontA( 9, 0, 0, 0, FW_MEDIUM, FALSE,
|
|---|
| 141 | FALSE, FALSE, ANSI_CHARSET,
|
|---|
| 142 | OUT_DEFAULT_PRECIS,
|
|---|
| 143 | CLIP_DEFAULT_PRECIS,
|
|---|
| 144 | DEFAULT_QUALITY,
|
|---|
| 145 | FIXED_PITCH|FF_MODERN, "WarpSans");
|
|---|
| 146 | obj = hFntDefaultGui;
|
|---|
| 147 | break;
|
|---|
| 148 | default:
|
|---|
| 149 | obj = O32_GetStockObject(arg1);
|
|---|
| 150 | break;
|
|---|
| 151 | }
|
|---|
| 152 | dprintf(("GDI32: GetStockObject %d returned %X\n", arg1, obj));
|
|---|
| 153 | return(obj);
|
|---|
| 154 | }
|
|---|
| 155 | //******************************************************************************
|
|---|
| 156 | //******************************************************************************
|
|---|
| 157 | UINT WIN32API RealizePalette( HDC arg1)
|
|---|
| 158 | {
|
|---|
| 159 | dprintf(("GDI32: RealizePalette(0x%08X)\n",arg1));
|
|---|
| 160 | return O32_RealizePalette(arg1);
|
|---|
| 161 | }
|
|---|
| 162 | //******************************************************************************
|
|---|
| 163 | //******************************************************************************
|
|---|
| 164 | int WIN32API GetObjectA( HGDIOBJ hObject, int size, void *lpBuffer)
|
|---|
| 165 | {
|
|---|
| 166 | int rc;
|
|---|
| 167 |
|
|---|
| 168 | if(size == 0 || lpBuffer == NULL) {
|
|---|
| 169 | SetLastError(ERROR_INVALID_PARAMETER);
|
|---|
| 170 | return 0;
|
|---|
| 171 | }
|
|---|
| 172 |
|
|---|
| 173 | if(DIBSection::getSection() != NULL)
|
|---|
| 174 | {
|
|---|
| 175 | DIBSection *dsect = DIBSection::find(hObject);
|
|---|
| 176 | if(dsect)
|
|---|
| 177 | {
|
|---|
| 178 | rc = dsect->GetDIBSection(size, lpBuffer);
|
|---|
| 179 | if(rc == 0) {
|
|---|
| 180 | SetLastError(ERROR_INVALID_PARAMETER);
|
|---|
| 181 | return 0;
|
|---|
| 182 | }
|
|---|
| 183 | SetLastError(ERROR_SUCCESS);
|
|---|
| 184 | return rc;
|
|---|
| 185 | }
|
|---|
| 186 | }
|
|---|
| 187 |
|
|---|
| 188 | dprintf(("GDI32: GetObject %X %X %X\n", hObject, size, lpBuffer));
|
|---|
| 189 | return O32_GetObject(hObject, size, lpBuffer);
|
|---|
| 190 | }
|
|---|
| 191 | //******************************************************************************
|
|---|
| 192 | //******************************************************************************
|
|---|
| 193 | int WIN32API GetObjectW( HGDIOBJ arg1, int arg2, void * arg3)
|
|---|
| 194 | {
|
|---|
| 195 | dprintf(("GDI32: GetObjectW %X, %d %X not complete!", arg1, arg2, arg3));
|
|---|
| 196 | return GetObjectA(arg1, arg2, arg3);
|
|---|
| 197 | }
|
|---|
| 198 | //******************************************************************************
|
|---|
| 199 | //******************************************************************************
|
|---|
| 200 | DWORD WIN32API GetObjectType( HGDIOBJ arg1)
|
|---|
| 201 | {
|
|---|
| 202 | dprintf2(("GDI32: GetObjectType\n"));
|
|---|
| 203 | return O32_GetObjectType(arg1);
|
|---|
| 204 | }
|
|---|
| 205 | //******************************************************************************
|
|---|
| 206 | //******************************************************************************
|
|---|
| 207 | BOOL WIN32API DeleteObject(HANDLE hObj)
|
|---|
| 208 | {
|
|---|
| 209 | dprintf(("GDI32: DeleteObject %x", hObj));
|
|---|
| 210 | DIBSection::deleteSection((DWORD)hObj);
|
|---|
| 211 | return O32_DeleteObject(hObj);
|
|---|
| 212 | }
|
|---|
| 213 | //******************************************************************************
|
|---|
| 214 | //******************************************************************************
|
|---|
| 215 | BOOL WIN32API DeleteDC( HDC hdc)
|
|---|
| 216 | {
|
|---|
| 217 | dprintf(("GDI32: DeleteDC %x", hdc));
|
|---|
| 218 | return O32_DeleteDC(hdc);
|
|---|
| 219 | }
|
|---|
| 220 | //******************************************************************************
|
|---|
| 221 | //******************************************************************************
|
|---|
| 222 | HPALETTE WIN32API CreatePalette( const LOGPALETTE * arg1)
|
|---|
| 223 | {
|
|---|
| 224 | HPALETTE rc;
|
|---|
| 225 | dprintf(("GDI32: CreatePalette\n"));
|
|---|
| 226 | for(int i=0; i<arg1->palNumEntries;i++)
|
|---|
| 227 | {
|
|---|
| 228 | dprintf2(("Index %d : 0x%08X\n",i, *((DWORD*)(&arg1->palPalEntry[i])) ));
|
|---|
| 229 | }
|
|---|
| 230 | rc = O32_CreatePalette(arg1);
|
|---|
| 231 | dprintf((" returns 0x%08X\n",rc));
|
|---|
| 232 |
|
|---|
| 233 | return rc;
|
|---|
| 234 | }
|
|---|
| 235 | //******************************************************************************
|
|---|
| 236 | //******************************************************************************
|
|---|
| 237 | HBRUSH WIN32API CreatePatternBrush(HBITMAP arg1)
|
|---|
| 238 | {
|
|---|
| 239 | HBRUSH brush;
|
|---|
| 240 |
|
|---|
| 241 | brush = O32_CreatePatternBrush(arg1);
|
|---|
| 242 | dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", arg1, brush));
|
|---|
| 243 | return(brush);
|
|---|
| 244 | }
|
|---|
| 245 | //******************************************************************************
|
|---|
| 246 | //******************************************************************************
|
|---|
| 247 | HPEN WIN32API CreatePen( int arg1, int arg2, COLORREF arg3)
|
|---|
| 248 | {
|
|---|
| 249 | dprintf(("GDI32: CreatePen\n"));
|
|---|
| 250 | return O32_CreatePen(arg1, arg2, arg3);
|
|---|
| 251 | }
|
|---|
| 252 | //******************************************************************************
|
|---|
| 253 | //******************************************************************************
|
|---|
| 254 | HPEN WIN32API CreatePenIndirect( const LOGPEN * arg1)
|
|---|
| 255 | {
|
|---|
| 256 | dprintf(("GDI32: CreatePenIndirect\n"));
|
|---|
| 257 | return O32_CreatePenIndirect(arg1);
|
|---|
| 258 | }
|
|---|
| 259 | //******************************************************************************
|
|---|
| 260 | //******************************************************************************
|
|---|
| 261 | HRGN WIN32API CreatePolyPolygonRgn( const POINT * arg1, const INT * arg2, int arg3, int arg4)
|
|---|
| 262 | {
|
|---|
| 263 | dprintf(("GDI32: CreatePolyPolygonRgn\n"));
|
|---|
| 264 | return O32_CreatePolyPolygonRgn(arg1, arg2, arg3, arg4);
|
|---|
| 265 | }
|
|---|
| 266 | //******************************************************************************
|
|---|
| 267 | //******************************************************************************
|
|---|
| 268 | HRGN WIN32API CreatePolygonRgn(const POINT * arg1, int arg2, int arg3)
|
|---|
| 269 | {
|
|---|
| 270 | dprintf(("GDI32: CreatePolygonRgn"));
|
|---|
| 271 | return O32_CreatePolygonRgn(arg1, arg2, arg3);
|
|---|
| 272 | }
|
|---|
| 273 | //******************************************************************************
|
|---|
| 274 | //******************************************************************************
|
|---|
| 275 | HBRUSH WIN32API CreateDIBPatternBrushPt( const VOID * arg1, UINT arg2)
|
|---|
| 276 | {
|
|---|
| 277 | dprintf(("GDI32: CreateDIBPatternBrushPt\n"));
|
|---|
| 278 | return O32_CreateDIBPatternBrushPt(arg1, arg2);
|
|---|
| 279 | }
|
|---|
| 280 | //******************************************************************************
|
|---|
| 281 | //******************************************************************************
|
|---|
| 282 | HBITMAP WIN32API CreateDIBitmap(HDC arg1, const BITMAPINFOHEADER * arg2, DWORD arg3, const void * arg4, const BITMAPINFO * arg5, UINT arg6)
|
|---|
| 283 | {
|
|---|
| 284 | int iHeight;
|
|---|
| 285 | HBITMAP rc;
|
|---|
| 286 | dprintf(("GDI32: CreateDIBitmap\n"));
|
|---|
| 287 |
|
|---|
| 288 | //TEMPORARY HACK TO PREVENT CRASH IN OPEN32 (WSeB GA)
|
|---|
| 289 |
|
|---|
| 290 | iHeight = arg2->biHeight;
|
|---|
| 291 | if(arg2->biHeight < 0)
|
|---|
| 292 | {
|
|---|
| 293 | ((BITMAPINFOHEADER *)arg2)->biHeight = -arg2->biHeight;
|
|---|
| 294 | }
|
|---|
| 295 |
|
|---|
| 296 | rc = O32_CreateDIBitmap(arg1, arg2, arg3, arg4, arg5, arg6);
|
|---|
| 297 |
|
|---|
| 298 | ((BITMAPINFOHEADER *)arg2)->biHeight = iHeight;
|
|---|
| 299 |
|
|---|
| 300 | return rc;
|
|---|
| 301 | }
|
|---|
| 302 | //******************************************************************************
|
|---|
| 303 | //******************************************************************************
|
|---|
| 304 | HBITMAP WIN32API CreateCompatibleBitmap( HDC arg1, int arg2, int arg3)
|
|---|
| 305 | {
|
|---|
| 306 | dprintf(("GDI32: CreateCompatibleBitmap\n"));
|
|---|
| 307 | return O32_CreateCompatibleBitmap(arg1, arg2, arg3);
|
|---|
| 308 | }
|
|---|
| 309 | //******************************************************************************
|
|---|
| 310 | //******************************************************************************
|
|---|
| 311 | HDC WIN32API CreateCompatibleDC( HDC hdc)
|
|---|
| 312 | {
|
|---|
| 313 | HDC newHdc;
|
|---|
| 314 |
|
|---|
| 315 | newHdc = O32_CreateCompatibleDC(hdc);
|
|---|
| 316 | ULONG oldcp = OSLibGpiQueryCp(hdc);
|
|---|
| 317 | if (!oldcp) /* If new DC is to be created */
|
|---|
| 318 | oldcp = GetDisplayCodepage();
|
|---|
| 319 |
|
|---|
| 320 | OSLibGpiSetCp(newHdc, oldcp);
|
|---|
| 321 | return newHdc;
|
|---|
| 322 | }
|
|---|
| 323 | //******************************************************************************
|
|---|
| 324 | //******************************************************************************
|
|---|
| 325 | INT WIN32API StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
|
|---|
| 326 | INT heightDst, INT xSrc, INT ySrc, INT widthSrc,
|
|---|
| 327 | INT heightSrc, const void *bits,
|
|---|
| 328 | const BITMAPINFO *info, UINT wUsage, DWORD dwRop )
|
|---|
| 329 | {
|
|---|
| 330 | #if 1
|
|---|
| 331 | dprintf(("GDI32: StretchDIBits"));
|
|---|
| 332 |
|
|---|
| 333 | if(wUsage == DIB_PAL_COLORS && info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))
|
|---|
| 334 | {
|
|---|
| 335 | // workaround for open32 bug.
|
|---|
| 336 | // If syscolors > 256 and wUsage == DIB_PAL_COLORS.
|
|---|
| 337 |
|
|---|
| 338 | int i;
|
|---|
| 339 | USHORT *pColorIndex = (USHORT *)info->bmiColors;
|
|---|
| 340 | RGBQUAD *pColors = (RGBQUAD *) alloca(info->bmiHeader.biClrUsed *
|
|---|
| 341 | sizeof(RGBQUAD));
|
|---|
| 342 | BITMAPINFO *infoLoc = (BITMAPINFO *) alloca(sizeof(BITMAPINFO) +
|
|---|
| 343 | info->bmiHeader.biClrUsed * sizeof(RGBQUAD));
|
|---|
| 344 |
|
|---|
| 345 | memcpy(infoLoc, info, sizeof(BITMAPINFO));
|
|---|
| 346 |
|
|---|
| 347 | if(GetDIBColorTable(hdc, 0, info->bmiHeader.biClrUsed, pColors) == 0)
|
|---|
| 348 | return FALSE;
|
|---|
| 349 |
|
|---|
| 350 | for(i=0;i<info->bmiHeader.biClrUsed;i++, pColorIndex++)
|
|---|
| 351 | {
|
|---|
| 352 | infoLoc->bmiColors[i] = pColors[*pColorIndex];
|
|---|
| 353 | }
|
|---|
| 354 |
|
|---|
| 355 | return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,
|
|---|
| 356 | widthSrc, heightSrc, (void *)bits,
|
|---|
| 357 | (PBITMAPINFO)infoLoc, DIB_RGB_COLORS, dwRop);
|
|---|
| 358 | }
|
|---|
| 359 |
|
|---|
| 360 | return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,
|
|---|
| 361 | widthSrc, heightSrc, (void *)bits,
|
|---|
| 362 | (PBITMAPINFO)info, wUsage, dwRop);
|
|---|
| 363 | #else
|
|---|
| 364 | dprintf(("GDI32: StretchDIBits\n"));
|
|---|
| 365 | return O32_StretchDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, (void *)arg10, (PBITMAPINFO)arg11, arg12, arg13);
|
|---|
| 366 | #endif
|
|---|
| 367 | }
|
|---|
| 368 | //******************************************************************************
|
|---|
| 369 | //******************************************************************************
|
|---|
| 370 | BOOL WIN32API StretchBlt(HDC hdcDest, int nXOriginDest, int nYOriginDest,
|
|---|
| 371 | int nWidthDest, int nHeightDest,
|
|---|
| 372 | HDC hdcSrc, int nXOriginSrc, int nYOriginSrc,
|
|---|
| 373 | int nWidthSrc, int nHeightSrc, DWORD dwRop)
|
|---|
| 374 | {
|
|---|
| 375 | dprintf(("GDI32: StretchBlt Dest: (%d, %d) size (%d, %d)\n",
|
|---|
| 376 | nXOriginDest, nYOriginDest, nWidthDest, nHeightDest));
|
|---|
| 377 | dprintf(("GDI32: StretchBlt Src : (%d, %d) size (%d, %d)\n",
|
|---|
| 378 | nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc));
|
|---|
| 379 | if(DIBSection::getSection() != NULL)
|
|---|
| 380 | {
|
|---|
| 381 | DIBSection *dsect = DIBSection::findHDC(hdcSrc);
|
|---|
| 382 | if(dsect)
|
|---|
| 383 | {
|
|---|
| 384 | dprintf((" Do stretched DIB Blt\n"));
|
|---|
| 385 | return(dsect->BitBlt( hdcDest,
|
|---|
| 386 | nXOriginDest, nYOriginDest, nWidthDest, nHeightDest,
|
|---|
| 387 | nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc,
|
|---|
| 388 | dwRop));
|
|---|
| 389 | }
|
|---|
| 390 | }
|
|---|
| 391 | return O32_StretchBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, dwRop);
|
|---|
| 392 | }
|
|---|
| 393 | //******************************************************************************
|
|---|
| 394 | //******************************************************************************
|
|---|
| 395 | BOOL WIN32API StrokeAndFillPath( HDC arg1)
|
|---|
| 396 | {
|
|---|
| 397 | dprintf(("GDI32: StrokeAndFillPath\n"));
|
|---|
| 398 | return O32_StrokeAndFillPath(arg1);
|
|---|
| 399 | }
|
|---|
| 400 | //******************************************************************************
|
|---|
| 401 | //******************************************************************************
|
|---|
| 402 | BOOL WIN32API StrokePath( HDC arg1)
|
|---|
| 403 | {
|
|---|
| 404 | dprintf(("GDI32: StrokePath\n"));
|
|---|
| 405 | return O32_StrokePath(arg1);
|
|---|
| 406 | }
|
|---|
| 407 | //******************************************************************************
|
|---|
| 408 | //******************************************************************************
|
|---|
| 409 | int WIN32API SetStretchBltMode( HDC arg1, int arg2)
|
|---|
| 410 | {
|
|---|
| 411 | dprintf(("GDI32: SetStretchBltMode 0x%08X, 0x%08X\n",arg1, arg2));
|
|---|
| 412 |
|
|---|
| 413 | if(DIBSection::getSection() != NULL)
|
|---|
| 414 | {
|
|---|
| 415 | DIBSection *dsect = DIBSection::findHDC(arg1);
|
|---|
| 416 | if(dsect)
|
|---|
| 417 | {
|
|---|
| 418 | dprintf((" - DC is DIBSection\n"));
|
|---|
| 419 | }
|
|---|
| 420 | }
|
|---|
| 421 | return O32_SetStretchBltMode(arg1, arg2);
|
|---|
| 422 | }
|
|---|
| 423 | //******************************************************************************
|
|---|
| 424 | //******************************************************************************
|
|---|
| 425 | HGDIOBJ WIN32API SelectObject(HDC hdc, HGDIOBJ hObj)
|
|---|
| 426 | {
|
|---|
| 427 | HGDIOBJ rc;
|
|---|
| 428 |
|
|---|
| 429 | //// dprintf(("GDI32: SelectObject\n"));
|
|---|
| 430 |
|
|---|
| 431 | if(DIBSection::getSection() != NULL)
|
|---|
| 432 | {
|
|---|
| 433 | DIBSection *dsect;
|
|---|
| 434 |
|
|---|
| 435 | dsect = DIBSection::find(hdc);
|
|---|
| 436 | if(dsect)
|
|---|
| 437 | {
|
|---|
| 438 | //remove previously selected dibsection
|
|---|
| 439 | dsect->UnSelectDIBObject();
|
|---|
| 440 | }
|
|---|
| 441 | dsect = DIBSection::find((DWORD)hObj);
|
|---|
| 442 | if(dsect)
|
|---|
| 443 | {
|
|---|
| 444 | dsect->SelectDIBObject(hdc);
|
|---|
| 445 | }
|
|---|
| 446 | }
|
|---|
| 447 | rc = O32_SelectObject(hdc, hObj);
|
|---|
| 448 | if(rc != 0 && DIBSection::getSection != NULL)
|
|---|
| 449 | {
|
|---|
| 450 | DIBSection *dsect = DIBSection::find((DWORD)rc);
|
|---|
| 451 | if(dsect)
|
|---|
| 452 | {
|
|---|
| 453 | dsect->UnSelectDIBObject();
|
|---|
| 454 | }
|
|---|
| 455 | }
|
|---|
| 456 | return(rc);
|
|---|
| 457 | }
|
|---|
| 458 | //******************************************************************************
|
|---|
| 459 | //******************************************************************************
|
|---|
| 460 | HPALETTE WIN32API SelectPalette(HDC arg1, HPALETTE arg2, BOOL arg3)
|
|---|
| 461 | {
|
|---|
| 462 | dprintf(("GDI32: SelectPalette (0x%08X, 0x%08X, 0x%08X)\n", arg1, arg2, arg3));
|
|---|
| 463 | if(DIBSection::getSection() != NULL)
|
|---|
| 464 | {
|
|---|
| 465 | DIBSection *dsect = DIBSection::findHDC(arg1);
|
|---|
| 466 | if(dsect)
|
|---|
| 467 | {
|
|---|
| 468 | PALETTEENTRY Pal[256];
|
|---|
| 469 | char PalSize = dsect->GetBitCount();
|
|---|
| 470 | dprintf((" - Set Palette Values in DIBSection\n"));
|
|---|
| 471 | if(PalSize<=8)
|
|---|
| 472 | {
|
|---|
| 473 | GetPaletteEntries( arg2, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal);
|
|---|
| 474 | dsect->SetDIBColorTable(0, 1<< PalSize, (RGBQUAD*)&Pal);
|
|---|
| 475 | }
|
|---|
| 476 |
|
|---|
| 477 | }
|
|---|
| 478 | }
|
|---|
| 479 | return O32_SelectPalette(arg1, arg2, arg3);
|
|---|
| 480 | }
|
|---|
| 481 | //******************************************************************************
|
|---|
| 482 | //******************************************************************************
|
|---|
| 483 | int WIN32API SetBkMode( HDC arg1, int arg2)
|
|---|
| 484 | {
|
|---|
| 485 | dprintf(("GDI32: SetBkMode\n"));
|
|---|
| 486 | return O32_SetBkMode(arg1, arg2);
|
|---|
| 487 | }
|
|---|
| 488 | //******************************************************************************
|
|---|
| 489 | //******************************************************************************
|
|---|
| 490 | COLORREF WIN32API GetPixel( HDC arg1, int arg2, int arg3)
|
|---|
| 491 | {
|
|---|
| 492 | //// dprintf(("GDI32: GetPixel\n"));
|
|---|
| 493 | return O32_GetPixel(arg1, arg2, arg3);
|
|---|
| 494 | }
|
|---|
| 495 | //******************************************************************************
|
|---|
| 496 | //******************************************************************************
|
|---|
| 497 | COLORREF WIN32API SetPixel( HDC arg1, int arg2, int arg3, COLORREF arg4)
|
|---|
| 498 | {
|
|---|
| 499 | //// dprintf(("GDI32: SetPixel\n"));
|
|---|
| 500 | return O32_SetPixel(arg1, arg2, arg3, arg4);
|
|---|
| 501 | }
|
|---|
| 502 | //******************************************************************************
|
|---|
| 503 | //Faster version of SetPixel (since it doesn't need to return the original color)
|
|---|
| 504 | //Just use SetPixel for now
|
|---|
| 505 | //******************************************************************************
|
|---|
| 506 | BOOL WIN32API SetPixelV(HDC arg1, int arg2, int arg3, COLORREF arg4)
|
|---|
| 507 | {
|
|---|
| 508 | COLORREF rc;
|
|---|
| 509 |
|
|---|
| 510 | //// dprintf(("GDI32: SetPixelV\n"));
|
|---|
| 511 | rc = O32_SetPixel(arg1, arg2, arg3, arg4);
|
|---|
| 512 | if(rc == GDI_ERROR) // || rc == COLOR_INVALID)
|
|---|
| 513 | return(FALSE);
|
|---|
| 514 | return(TRUE);
|
|---|
| 515 | }
|
|---|
| 516 | //******************************************************************************
|
|---|
| 517 | //******************************************************************************
|
|---|
| 518 | BOOL WIN32API GetDCOrgEx(HDC arg1, PPOINT arg2)
|
|---|
| 519 | {
|
|---|
| 520 | dprintf(("GDI32: GetDCOrgEx\n"));
|
|---|
| 521 | return O32_GetDCOrgEx(arg1, arg2);
|
|---|
| 522 | }
|
|---|
| 523 | //******************************************************************************
|
|---|
| 524 | //******************************************************************************
|
|---|
| 525 | BOOL WIN32API GetWindowExtEx(HDC arg1, PSIZE arg2)
|
|---|
| 526 | {
|
|---|
| 527 | dprintf(("GDI32: GetWindowExtEx\n"));
|
|---|
| 528 | return O32_GetWindowExtEx(arg1, arg2);
|
|---|
| 529 | }
|
|---|
| 530 | //******************************************************************************
|
|---|
| 531 | //******************************************************************************
|
|---|
| 532 | int WIN32API AbortDoc( HDC arg1)
|
|---|
| 533 | {
|
|---|
| 534 | dprintf(("GDI32: AbortDoc"));
|
|---|
| 535 | return O32_AbortDoc(arg1);
|
|---|
| 536 | }
|
|---|
| 537 | //******************************************************************************
|
|---|
| 538 | //******************************************************************************
|
|---|
| 539 | BOOL WIN32API AbortPath( HDC arg1)
|
|---|
| 540 | {
|
|---|
| 541 | dprintf(("GDI32: AbortPath"));
|
|---|
| 542 | return O32_AbortPath(arg1);
|
|---|
| 543 | }
|
|---|
| 544 | //******************************************************************************
|
|---|
| 545 | //******************************************************************************
|
|---|
| 546 | BOOL WIN32API AngleArc( HDC arg1, int arg2, int arg3, DWORD arg4, float arg5, float arg6)
|
|---|
| 547 | {
|
|---|
| 548 | dprintf(("GDI32: AngleArc"));
|
|---|
| 549 | return O32_AngleArc(arg1, arg2, arg3, arg4, arg5, arg6);
|
|---|
| 550 | }
|
|---|
| 551 | //******************************************************************************
|
|---|
| 552 | //******************************************************************************
|
|---|
| 553 | BOOL WIN32API AnimatePalette( HPALETTE arg1, UINT arg2, UINT arg3, const PALETTEENTRY * arg4)
|
|---|
| 554 | {
|
|---|
| 555 | dprintf(("GDI32: AnimatePalette"));
|
|---|
| 556 | return O32_AnimatePalette(arg1, arg2, arg3, arg4);
|
|---|
| 557 | }
|
|---|
| 558 | //******************************************************************************
|
|---|
| 559 | //******************************************************************************
|
|---|
| 560 | BOOL WIN32API Arc( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
|
|---|
| 561 | {
|
|---|
| 562 | dprintf(("GDI32: Arc"));
|
|---|
| 563 | return O32_Arc(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
|
|---|
| 564 | }
|
|---|
| 565 | //******************************************************************************
|
|---|
| 566 | //******************************************************************************
|
|---|
| 567 | BOOL WIN32API ArcTo( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
|
|---|
| 568 | {
|
|---|
| 569 | dprintf(("GDI32: ArcTo"));
|
|---|
| 570 | return O32_ArcTo(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
|
|---|
| 571 | }
|
|---|
| 572 | //******************************************************************************
|
|---|
| 573 | //******************************************************************************
|
|---|
| 574 | BOOL WIN32API BeginPath( HDC arg1)
|
|---|
| 575 | {
|
|---|
| 576 | dprintf(("GDI32: BeginPath"));
|
|---|
| 577 | return O32_BeginPath(arg1);
|
|---|
| 578 | }
|
|---|
| 579 | //******************************************************************************
|
|---|
| 580 | //******************************************************************************
|
|---|
| 581 | BOOL WIN32API BitBlt(HDC hdcDest, int arg2, int arg3, int arg4, int arg5, HDC hdcSrc, int arg7, int arg8, DWORD arg9)
|
|---|
| 582 | {
|
|---|
| 583 | if(DIBSection::getSection() != NULL) {
|
|---|
| 584 | DIBSection *dsect = DIBSection::findHDC(hdcSrc);
|
|---|
| 585 | if(dsect) {
|
|---|
| 586 | return(dsect->BitBlt(hdcDest, arg2, arg3, arg4, arg5, arg7, arg8, arg4, arg5, arg9));
|
|---|
| 587 | }
|
|---|
| 588 | }
|
|---|
| 589 | dprintf(("GDI32: BitBlt to hdc %X from (%d,%d) to (%d,%d), (%d,%d) rop %X\n", hdcDest, arg7, arg8, arg2, arg3, arg4, arg5, arg9));
|
|---|
| 590 | return O32_BitBlt(hdcDest, arg2, arg3, arg4, arg5, hdcSrc, arg7, arg8, arg9);
|
|---|
| 591 | }
|
|---|
| 592 | //******************************************************************************
|
|---|
| 593 | //******************************************************************************
|
|---|
| 594 | BOOL WIN32API Chord( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
|
|---|
| 595 | {
|
|---|
| 596 | dprintf(("GDI32: Chord"));
|
|---|
| 597 | return O32_Chord(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
|
|---|
| 598 | }
|
|---|
| 599 | //******************************************************************************
|
|---|
| 600 | //******************************************************************************
|
|---|
| 601 | HENHMETAFILE WIN32API CloseEnhMetaFile( HDC arg1)
|
|---|
| 602 | {
|
|---|
| 603 | dprintf(("GDI32: CloseEnhMetaFile"));
|
|---|
| 604 | return O32_CloseEnhMetaFile(arg1);
|
|---|
| 605 | }
|
|---|
| 606 | //******************************************************************************
|
|---|
| 607 | //******************************************************************************
|
|---|
| 608 | BOOL WIN32API CloseFigure( HDC arg1)
|
|---|
| 609 | {
|
|---|
| 610 | dprintf(("GDI32: CloseFigure"));
|
|---|
| 611 | return O32_CloseFigure(arg1);
|
|---|
| 612 | }
|
|---|
| 613 | //******************************************************************************
|
|---|
| 614 | //******************************************************************************
|
|---|
| 615 | HMETAFILE WIN32API CloseMetaFile( HDC arg1)
|
|---|
| 616 | {
|
|---|
| 617 | dprintf(("GDI32: CloseMetaFile"));
|
|---|
| 618 | return O32_CloseMetaFile(arg1);
|
|---|
| 619 | }
|
|---|
| 620 | //******************************************************************************
|
|---|
| 621 | //******************************************************************************
|
|---|
| 622 | int WIN32API CombineRgn( HRGN arg1, HRGN arg2, HRGN arg3, int arg4)
|
|---|
| 623 | {
|
|---|
| 624 | dprintf(("GDI32: CombineRgn"));
|
|---|
| 625 | return O32_CombineRgn(arg1, arg2, arg3, arg4);
|
|---|
| 626 | }
|
|---|
| 627 | //******************************************************************************
|
|---|
| 628 | //******************************************************************************
|
|---|
| 629 | HENHMETAFILE WIN32API CopyEnhMetaFileA( HENHMETAFILE arg1, LPCSTR arg2)
|
|---|
| 630 | {
|
|---|
| 631 | dprintf(("GDI32: CopyEnhMetaFileA"));
|
|---|
| 632 | return O32_CopyEnhMetaFile(arg1, arg2);
|
|---|
| 633 | }
|
|---|
| 634 | //******************************************************************************
|
|---|
| 635 | //******************************************************************************
|
|---|
| 636 | HENHMETAFILE WIN32API CopyEnhMetaFileW( HENHMETAFILE arg1, LPCWSTR arg2)
|
|---|
| 637 | {
|
|---|
| 638 | char *astring = UnicodeToAsciiString((LPWSTR)arg2);
|
|---|
| 639 | HENHMETAFILE rc;
|
|---|
| 640 |
|
|---|
| 641 | dprintf(("GDI32: CopyEnhMetaFileW"));
|
|---|
| 642 | rc = O32_CopyEnhMetaFile(arg1, astring);
|
|---|
| 643 | FreeAsciiString(astring);
|
|---|
| 644 | return rc;
|
|---|
| 645 | }
|
|---|
| 646 | //******************************************************************************
|
|---|
| 647 | //******************************************************************************
|
|---|
| 648 | HMETAFILE WIN32API CopyMetaFileA( HMETAFILE arg1, LPCSTR arg2)
|
|---|
| 649 | {
|
|---|
| 650 | dprintf(("GDI32: CopyMetaFileA"));
|
|---|
| 651 | return O32_CopyMetaFile(arg1, arg2);
|
|---|
| 652 | }
|
|---|
| 653 | //******************************************************************************
|
|---|
| 654 | //******************************************************************************
|
|---|
| 655 | HMETAFILE WIN32API CopyMetaFileW( HMETAFILE arg1, LPCWSTR arg2)
|
|---|
| 656 | {
|
|---|
| 657 | char *astring = UnicodeToAsciiString((LPWSTR)arg2);
|
|---|
| 658 | HMETAFILE rc;
|
|---|
| 659 |
|
|---|
| 660 | dprintf(("GDI32: CopyMetaFileW"));
|
|---|
| 661 | rc = O32_CopyMetaFile(arg1, astring);
|
|---|
| 662 | FreeAsciiString(astring);
|
|---|
| 663 | return rc;
|
|---|
| 664 | }
|
|---|
| 665 | //******************************************************************************
|
|---|
| 666 | //******************************************************************************
|
|---|
| 667 | HBITMAP WIN32API CreateBitmap(int nWidth, int nHeight, UINT cPlanes,
|
|---|
| 668 | UINT cBitsPerPel, const void *lpvBits)
|
|---|
| 669 | {
|
|---|
| 670 | HBITMAP rc;
|
|---|
| 671 |
|
|---|
| 672 | rc = O32_CreateBitmap(nWidth, nHeight, cPlanes, cBitsPerPel, lpvBits);
|
|---|
| 673 | dprintf(("GDI32: CreateBitmap (%d,%d) bps %d returned %d\n", nWidth, nHeight, cBitsPerPel, rc));
|
|---|
| 674 | return(rc);
|
|---|
| 675 | }
|
|---|
| 676 | //******************************************************************************
|
|---|
| 677 | //******************************************************************************
|
|---|
| 678 | HBITMAP WIN32API CreateBitmapIndirect( const BITMAP * arg1)
|
|---|
| 679 | {
|
|---|
| 680 | dprintf(("GDI32: CreateBitmapIndirect"));
|
|---|
| 681 | return O32_CreateBitmapIndirect(arg1);
|
|---|
| 682 | }
|
|---|
| 683 | //******************************************************************************
|
|---|
| 684 | //******************************************************************************
|
|---|
| 685 | HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH * arg1)
|
|---|
| 686 | {
|
|---|
| 687 | dprintf(("GDI32: CreateBrushIndirect"));
|
|---|
| 688 | return O32_CreateBrushIndirect((LPLOGBRUSH)arg1);
|
|---|
| 689 | }
|
|---|
| 690 | //******************************************************************************
|
|---|
| 691 | //******************************************************************************
|
|---|
| 692 | HDC WIN32API CreateDCA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput, const DEVMODEA *lpInitData)
|
|---|
| 693 | {
|
|---|
| 694 | HDC hdc;
|
|---|
| 695 |
|
|---|
| 696 | hdc = O32_CreateDC(lpszDriver, lpszDevice, lpszOutput, lpInitData);
|
|---|
| 697 | dprintf(("GDI32: CreateDCA %s %s %s %x returned %x", lpszDriver, lpszDevice, lpszOutput, lpInitData, hdc));
|
|---|
| 698 | return hdc;
|
|---|
| 699 | }
|
|---|
| 700 | //******************************************************************************
|
|---|
| 701 | //******************************************************************************
|
|---|
| 702 | HDC WIN32API CreateDCW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
|
|---|
| 703 | {
|
|---|
| 704 | char *astring4, *astring5;
|
|---|
| 705 |
|
|---|
| 706 | char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
|
|---|
| 707 | char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
|
|---|
| 708 | char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
|
|---|
| 709 |
|
|---|
| 710 | if(arg4)
|
|---|
| 711 | {
|
|---|
| 712 | astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
|
|---|
| 713 | astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
|
|---|
| 714 | }
|
|---|
| 715 |
|
|---|
| 716 | HDC rc;
|
|---|
| 717 | DEVMODEA devmode;
|
|---|
| 718 |
|
|---|
| 719 | dprintf(("GDI32: CreateDCW"));
|
|---|
| 720 |
|
|---|
| 721 | if(arg4)
|
|---|
| 722 | {
|
|---|
| 723 | strcpy((char*)devmode.dmDeviceName, astring4);
|
|---|
| 724 | strcpy((char*)devmode.dmFormName, astring5);
|
|---|
| 725 |
|
|---|
| 726 | devmode.dmSpecVersion = arg4->dmSpecVersion;
|
|---|
| 727 | devmode.dmDriverVersion = arg4->dmDriverVersion;
|
|---|
| 728 | devmode.dmSize = arg4->dmSize;
|
|---|
| 729 | devmode.dmDriverExtra = arg4->dmDriverExtra;
|
|---|
| 730 | devmode.dmFields = arg4->dmFields;
|
|---|
| 731 | devmode.dmOrientation = arg4->dmOrientation;
|
|---|
| 732 | devmode.dmPaperSize = arg4->dmPaperSize;
|
|---|
| 733 | devmode.dmPaperLength = arg4->dmPaperLength;
|
|---|
| 734 | devmode.dmPaperWidth = arg4->dmPaperWidth;
|
|---|
| 735 | devmode.dmScale = arg4->dmScale;
|
|---|
| 736 | devmode.dmCopies = arg4->dmCopies;
|
|---|
| 737 | devmode.dmDefaultSource = arg4->dmDefaultSource;
|
|---|
| 738 | devmode.dmPrintQuality = arg4->dmPrintQuality;
|
|---|
| 739 | devmode.dmColor = arg4->dmColor;
|
|---|
| 740 | devmode.dmDuplex = arg4->dmDuplex;
|
|---|
| 741 | devmode.dmYResolution = arg4->dmYResolution;
|
|---|
| 742 | devmode.dmTTOption = arg4->dmTTOption;
|
|---|
| 743 | devmode.dmCollate = arg4->dmCollate;
|
|---|
| 744 | devmode.dmLogPixels = arg4->dmLogPixels;
|
|---|
| 745 | devmode.dmBitsPerPel = arg4->dmBitsPerPel;
|
|---|
| 746 | devmode.dmPelsWidth = arg4->dmPelsWidth;
|
|---|
| 747 | devmode.dmPelsHeight = arg4->dmPelsHeight;
|
|---|
| 748 | devmode.dmDisplayFlags = arg4->dmDisplayFlags;
|
|---|
| 749 | devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
|
|---|
| 750 | devmode.dmICMMethod = arg4->dmICMMethod;
|
|---|
| 751 | devmode.dmICMIntent = arg4->dmICMIntent;
|
|---|
| 752 | devmode.dmMediaType = arg4->dmMediaType;
|
|---|
| 753 | devmode.dmDitherType = arg4->dmDitherType;
|
|---|
| 754 | devmode.dmReserved1 = arg4->dmReserved1;
|
|---|
| 755 | devmode.dmReserved2 = arg4->dmReserved2;
|
|---|
| 756 | rc = O32_CreateDC(astring1,astring2,astring3,&devmode);
|
|---|
| 757 | }
|
|---|
| 758 | else
|
|---|
| 759 | rc = O32_CreateDC(astring1,astring2,astring3, NULL);
|
|---|
| 760 |
|
|---|
| 761 | FreeAsciiString(astring1);
|
|---|
| 762 | FreeAsciiString(astring2);
|
|---|
| 763 | FreeAsciiString(astring3);
|
|---|
| 764 |
|
|---|
| 765 | if(arg4)
|
|---|
| 766 | {
|
|---|
| 767 | FreeAsciiString(astring4);
|
|---|
| 768 | FreeAsciiString(astring5);
|
|---|
| 769 | }
|
|---|
| 770 |
|
|---|
| 771 | return rc;
|
|---|
| 772 | }
|
|---|
| 773 | //******************************************************************************
|
|---|
| 774 | //******************************************************************************
|
|---|
| 775 | HRGN WIN32API CreateEllipticRgn( int arg1, int arg2, int arg3, int arg4)
|
|---|
| 776 | {
|
|---|
| 777 | dprintf(("GDI32: CreateEllipticRgn"));
|
|---|
| 778 | return O32_CreateEllipticRgn(arg1, arg2, arg3, arg4);
|
|---|
| 779 | }
|
|---|
| 780 | //******************************************************************************
|
|---|
| 781 | //******************************************************************************
|
|---|
| 782 | HRGN WIN32API CreateEllipticRgnIndirect( const RECT * arg1)
|
|---|
| 783 | {
|
|---|
| 784 | dprintf(("GDI32: CreateEllipticRgnIndirect"));
|
|---|
| 785 | return O32_CreateEllipticRgnIndirect(arg1);
|
|---|
| 786 | }
|
|---|
| 787 | //******************************************************************************
|
|---|
| 788 | //******************************************************************************
|
|---|
| 789 | HENHMETAFILE WIN32API CreateEnhMetaFileA( HDC arg1, LPCSTR arg2, const RECT * arg3, LPCSTR arg4)
|
|---|
| 790 | {
|
|---|
| 791 | dprintf(("GDI32: CreateEnhMetaFileA"));
|
|---|
| 792 | return O32_CreateEnhMetaFile(arg1, arg2, arg3, arg4);
|
|---|
| 793 | }
|
|---|
| 794 | //******************************************************************************
|
|---|
| 795 | //******************************************************************************
|
|---|
| 796 | HENHMETAFILE WIN32API CreateEnhMetaFileW( HDC arg1, LPCWSTR arg2, const RECT * arg3, LPCWSTR arg4)
|
|---|
| 797 | {
|
|---|
| 798 | char *astring1 = UnicodeToAsciiString((LPWSTR)arg2);
|
|---|
| 799 | char *astring2 = UnicodeToAsciiString((LPWSTR)arg4);
|
|---|
| 800 | HENHMETAFILE rc;
|
|---|
| 801 |
|
|---|
| 802 | dprintf(("GDI32: CreateMetaFileW"));
|
|---|
| 803 | rc = O32_CreateEnhMetaFile(arg1,astring1,arg3,astring2);
|
|---|
| 804 | FreeAsciiString(astring1);
|
|---|
| 805 | FreeAsciiString(astring2);
|
|---|
| 806 | return rc;
|
|---|
| 807 | }
|
|---|
| 808 | //******************************************************************************
|
|---|
| 809 | //******************************************************************************
|
|---|
| 810 | //******************************************************************************
|
|---|
| 811 | //******************************************************************************
|
|---|
| 812 | HBRUSH WIN32API CreateHatchBrush( int arg1, COLORREF arg2)
|
|---|
| 813 | {
|
|---|
| 814 | dprintf(("GDI32: CreateHatchBrush"));
|
|---|
| 815 | return O32_CreateHatchBrush(arg1, arg2);
|
|---|
| 816 | }
|
|---|
| 817 | //******************************************************************************
|
|---|
| 818 | //******************************************************************************
|
|---|
| 819 | HDC WIN32API CreateICA( LPCSTR arg1, LPCSTR arg2, LPCSTR arg3, const DEVMODEA * arg4)
|
|---|
| 820 | {
|
|---|
| 821 | dprintf(("GDI32: CreateICA"));
|
|---|
| 822 | return O32_CreateIC(arg1, arg2, arg3, arg4);
|
|---|
| 823 | }
|
|---|
| 824 | //******************************************************************************
|
|---|
| 825 | //******************************************************************************
|
|---|
| 826 | HDC WIN32API CreateICW( LPCWSTR arg1, LPCWSTR arg2, LPCWSTR arg3, const DEVMODEW * arg4)
|
|---|
| 827 | {
|
|---|
| 828 | char *astring4, *astring5;
|
|---|
| 829 |
|
|---|
| 830 | char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
|
|---|
| 831 | char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
|
|---|
| 832 | char *astring3 = UnicodeToAsciiString((LPWSTR)arg3);
|
|---|
| 833 | if(arg4)
|
|---|
| 834 | {
|
|---|
| 835 | astring4 = UnicodeToAsciiString((LPWSTR)(arg4->dmDeviceName));
|
|---|
| 836 | astring5 = UnicodeToAsciiString((LPWSTR)(arg4->dmFormName));
|
|---|
| 837 | }
|
|---|
| 838 |
|
|---|
| 839 | HDC rc;
|
|---|
| 840 | DEVMODEA devmode;
|
|---|
| 841 |
|
|---|
| 842 | dprintf(("GDI32: CreateICW"));
|
|---|
| 843 |
|
|---|
| 844 | if(arg4)
|
|---|
| 845 | {
|
|---|
| 846 | strcpy((char*)devmode.dmDeviceName, astring4);
|
|---|
| 847 | strcpy((char*)devmode.dmFormName, astring5);
|
|---|
| 848 |
|
|---|
| 849 | devmode.dmSpecVersion = arg4->dmSpecVersion;
|
|---|
| 850 | devmode.dmDriverVersion = arg4->dmDriverVersion;
|
|---|
| 851 | devmode.dmSize = arg4->dmSize;
|
|---|
| 852 | devmode.dmDriverExtra = arg4->dmDriverExtra;
|
|---|
| 853 | devmode.dmFields = arg4->dmFields;
|
|---|
| 854 | devmode.dmOrientation = arg4->dmOrientation;
|
|---|
| 855 | devmode.dmPaperSize = arg4->dmPaperSize;
|
|---|
| 856 | devmode.dmPaperLength = arg4->dmPaperLength;
|
|---|
| 857 | devmode.dmPaperWidth = arg4->dmPaperWidth;
|
|---|
| 858 | devmode.dmScale = arg4->dmScale;
|
|---|
| 859 | devmode.dmCopies = arg4->dmCopies;
|
|---|
| 860 | devmode.dmDefaultSource = arg4->dmDefaultSource;
|
|---|
| 861 | devmode.dmPrintQuality = arg4->dmPrintQuality;
|
|---|
| 862 | devmode.dmColor = arg4->dmColor;
|
|---|
| 863 | devmode.dmDuplex = arg4->dmDuplex;
|
|---|
| 864 | devmode.dmYResolution = arg4->dmYResolution;
|
|---|
| 865 | devmode.dmTTOption = arg4->dmTTOption;
|
|---|
| 866 | devmode.dmCollate = arg4->dmCollate;
|
|---|
| 867 | devmode.dmLogPixels = arg4->dmLogPixels;
|
|---|
| 868 | devmode.dmBitsPerPel = arg4->dmBitsPerPel;
|
|---|
| 869 | devmode.dmPelsWidth = arg4->dmPelsWidth;
|
|---|
| 870 | devmode.dmPelsHeight = arg4->dmPelsHeight;
|
|---|
| 871 | devmode.dmDisplayFlags = arg4->dmDisplayFlags;
|
|---|
| 872 | devmode.dmDisplayFrequency = arg4->dmDisplayFrequency;
|
|---|
| 873 | devmode.dmICMMethod = arg4->dmICMMethod;
|
|---|
| 874 | devmode.dmICMIntent = arg4->dmICMIntent;
|
|---|
| 875 | devmode.dmMediaType = arg4->dmMediaType;
|
|---|
| 876 | devmode.dmDitherType = arg4->dmDitherType;
|
|---|
| 877 | devmode.dmReserved1 = arg4->dmReserved1;
|
|---|
| 878 | devmode.dmReserved2 = arg4->dmReserved2;
|
|---|
| 879 |
|
|---|
| 880 | rc = O32_CreateIC(astring1,astring2,astring3,&devmode);
|
|---|
| 881 | }
|
|---|
| 882 | else
|
|---|
| 883 | rc = O32_CreateIC(astring1,astring2,astring3, NULL);
|
|---|
| 884 |
|
|---|
| 885 | FreeAsciiString(astring1);
|
|---|
| 886 | FreeAsciiString(astring2);
|
|---|
| 887 | FreeAsciiString(astring3);
|
|---|
| 888 | if(arg4)
|
|---|
| 889 | {
|
|---|
| 890 | FreeAsciiString(astring4);
|
|---|
| 891 | FreeAsciiString(astring5);
|
|---|
| 892 | }
|
|---|
| 893 |
|
|---|
| 894 | return rc;
|
|---|
| 895 | }
|
|---|
| 896 | //******************************************************************************
|
|---|
| 897 | //******************************************************************************
|
|---|
| 898 | HDC WIN32API CreateMetaFileA( LPCSTR arg1)
|
|---|
| 899 | {
|
|---|
| 900 | dprintf(("GDI32: CreateMetaFileA"));
|
|---|
| 901 | return O32_CreateMetaFile(arg1);
|
|---|
| 902 | }
|
|---|
| 903 | //******************************************************************************
|
|---|
| 904 | //******************************************************************************
|
|---|
| 905 | HDC WIN32API CreateMetaFileW( LPCWSTR arg1)
|
|---|
| 906 | {
|
|---|
| 907 | char *astring = UnicodeToAsciiString((LPWSTR)arg1);
|
|---|
| 908 | HDC rc;
|
|---|
| 909 |
|
|---|
| 910 | dprintf(("GDI32: CreateMetaFileW"));
|
|---|
| 911 | rc = O32_CreateMetaFile(astring);
|
|---|
| 912 | FreeAsciiString(astring);
|
|---|
| 913 | return rc;
|
|---|
| 914 | }
|
|---|
| 915 | //******************************************************************************
|
|---|
| 916 | //******************************************************************************
|
|---|
| 917 | HRGN WIN32API CreateRectRgn( int nLeftRect, int nTopRect, int nRightRect, int nBottomRect)
|
|---|
| 918 | {
|
|---|
| 919 | dprintf(("GDI32: CreateRectRgn (%d,%d)(%d,%d)", nLeftRect, nTopRect, nRightRect, nBottomRect));
|
|---|
| 920 | return O32_CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect);
|
|---|
| 921 | }
|
|---|
| 922 | //******************************************************************************
|
|---|
| 923 | //******************************************************************************
|
|---|
| 924 | HRGN WIN32API CreateRectRgnIndirect( const RECT * lpRect)
|
|---|
| 925 | {
|
|---|
| 926 | if(lpRect == NULL) {
|
|---|
| 927 | SetLastError(ERROR_INVALID_PARAMETER);
|
|---|
| 928 | return 0;
|
|---|
| 929 | }
|
|---|
| 930 | dprintf(("GDI32: CreateRectRgnIndirect (%d,%d)(%d,%d)", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom));
|
|---|
| 931 | return O32_CreateRectRgnIndirect(lpRect);
|
|---|
| 932 | }
|
|---|
| 933 | //******************************************************************************
|
|---|
| 934 | //******************************************************************************
|
|---|
| 935 | HRGN WIN32API CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect,
|
|---|
| 936 | int nWidthEllipse, int nHeightEllipse)
|
|---|
| 937 | {
|
|---|
| 938 | dprintf(("GDI32: CreateRoundRectRgn (%d,%d)(%d,%d) (%d,%d)", nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse));
|
|---|
| 939 | return O32_CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse);
|
|---|
| 940 | }
|
|---|
| 941 | //******************************************************************************
|
|---|
| 942 | //******************************************************************************
|
|---|
| 943 | HBRUSH WIN32API CreateSolidBrush( COLORREF arg1)
|
|---|
| 944 | {
|
|---|
| 945 | dprintf(("GDI32: CreateSolidBrush\n"));
|
|---|
| 946 | return O32_CreateSolidBrush(arg1);
|
|---|
| 947 | }
|
|---|
| 948 | //******************************************************************************
|
|---|
| 949 | //******************************************************************************
|
|---|
| 950 | BOOL WIN32API DPtoLP( HDC arg1, PPOINT arg2, int arg3)
|
|---|
| 951 | {
|
|---|
| 952 | dprintf(("GDI32: DPtoLP\n"));
|
|---|
| 953 | return O32_DPtoLP(arg1, arg2, arg3);
|
|---|
| 954 | }
|
|---|
| 955 | //******************************************************************************
|
|---|
| 956 | //******************************************************************************
|
|---|
| 957 | BOOL WIN32API DeleteEnhMetaFile( HENHMETAFILE arg1)
|
|---|
| 958 | {
|
|---|
| 959 | dprintf(("GDI32: DeleteEnhMetaFile\n"));
|
|---|
| 960 | return O32_DeleteEnhMetaFile(arg1);
|
|---|
| 961 | }
|
|---|
| 962 | //******************************************************************************
|
|---|
| 963 | //******************************************************************************
|
|---|
| 964 | BOOL WIN32API DeleteMetaFile( HMETAFILE arg1)
|
|---|
| 965 | {
|
|---|
| 966 | dprintf(("GDI32: DeleteMetaFile"));
|
|---|
| 967 | return O32_DeleteMetaFile(arg1);
|
|---|
| 968 | }
|
|---|
| 969 | //******************************************************************************
|
|---|
| 970 | //******************************************************************************
|
|---|
| 971 | BOOL WIN32API Ellipse( HDC arg1, int arg2, int arg3, int arg4, int arg5)
|
|---|
| 972 | {
|
|---|
| 973 | dprintf(("GDI32: Ellipse"));
|
|---|
| 974 | return O32_Ellipse(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 975 | }
|
|---|
| 976 | //******************************************************************************
|
|---|
| 977 | //******************************************************************************
|
|---|
| 978 | int WIN32API EndDoc( HDC arg1)
|
|---|
| 979 | {
|
|---|
| 980 | dprintf(("GDI32: EndDoc"));
|
|---|
| 981 | return O32_EndDoc(arg1);
|
|---|
| 982 | }
|
|---|
| 983 | //******************************************************************************
|
|---|
| 984 | //******************************************************************************
|
|---|
| 985 | int WIN32API EndPage( HDC arg1)
|
|---|
| 986 | {
|
|---|
| 987 | dprintf(("GDI32: EndPage"));
|
|---|
| 988 | return O32_EndPage(arg1);
|
|---|
| 989 | }
|
|---|
| 990 | //******************************************************************************
|
|---|
| 991 | //******************************************************************************
|
|---|
| 992 | BOOL WIN32API EndPath( HDC arg1)
|
|---|
| 993 | {
|
|---|
| 994 | dprintf(("GDI32: EndPath"));
|
|---|
| 995 | return O32_EndPath(arg1);
|
|---|
| 996 | }
|
|---|
| 997 | //******************************************************************************
|
|---|
| 998 | //******************************************************************************
|
|---|
| 999 | BOOL WIN32API EnumEnhMetaFile( HDC arg1, HENHMETAFILE arg2, ENHMFENUMPROC arg3, PVOID arg4, const RECT * arg5)
|
|---|
| 1000 | {
|
|---|
| 1001 | dprintf(("GDI32: EnumEnhMetaFile DOESN'T WORK!"));
|
|---|
| 1002 | // return O32_EnumEnhMetaFile(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1003 | return 0;
|
|---|
| 1004 | }
|
|---|
| 1005 | //******************************************************************************
|
|---|
| 1006 | //******************************************************************************
|
|---|
| 1007 | BOOL WIN32API PatBlt(HDC hdc,int nXLeft,int nYLeft,int nWidth,int nHeight,DWORD dwRop)
|
|---|
| 1008 | {
|
|---|
| 1009 | BOOL rc;
|
|---|
| 1010 |
|
|---|
| 1011 | //CB: Open32 bug: negative width/height not supported!
|
|---|
| 1012 | if (nWidth < 0)
|
|---|
| 1013 | {
|
|---|
| 1014 | nXLeft += nWidth+1;
|
|---|
| 1015 | nWidth = -nWidth;
|
|---|
| 1016 | }
|
|---|
| 1017 | if (nHeight < 0)
|
|---|
| 1018 | {
|
|---|
| 1019 | nYLeft += nHeight+1;
|
|---|
| 1020 | nHeight = -nHeight;
|
|---|
| 1021 | }
|
|---|
| 1022 | rc = O32_PatBlt(hdc,nXLeft,nYLeft,nWidth,nHeight,dwRop);
|
|---|
| 1023 | dprintf(("GDI32: PatBlt (%d,%d) (%d,%d) returned %d\n",nXLeft,nYLeft,nWidth,nHeight,rc));
|
|---|
| 1024 | return(rc);
|
|---|
| 1025 | }
|
|---|
| 1026 | //******************************************************************************
|
|---|
| 1027 | //******************************************************************************
|
|---|
| 1028 | BOOL WIN32API Rectangle( HDC arg1, int arg2, int arg3, int arg4, int arg5)
|
|---|
| 1029 | {
|
|---|
| 1030 | dprintf(("GDI32: Rectangle\n"));
|
|---|
| 1031 | return O32_Rectangle(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1032 | }
|
|---|
| 1033 | //******************************************************************************
|
|---|
| 1034 | //******************************************************************************
|
|---|
| 1035 | int WIN32API SetROP2( HDC hdc, int rop2)
|
|---|
| 1036 | {
|
|---|
| 1037 | dprintf(("GDI32: SetROP2 %x %x", hdc, rop2));
|
|---|
| 1038 | return O32_SetROP2(hdc, rop2);
|
|---|
| 1039 | }
|
|---|
| 1040 | //******************************************************************************
|
|---|
| 1041 | //TODO: Callback
|
|---|
| 1042 | //******************************************************************************
|
|---|
| 1043 | BOOL WIN32API EnumMetaFile( HDC arg1, HMETAFILE arg2, MFENUMPROC arg3, LPARAM arg4)
|
|---|
| 1044 | {
|
|---|
| 1045 | dprintf(("GDI32: EnumMetaFile STUB"));
|
|---|
| 1046 | //calling convention differences
|
|---|
| 1047 | // return O32_EnumMetaFile(arg1, arg2, arg3, arg4);
|
|---|
| 1048 | return 0;
|
|---|
| 1049 | }
|
|---|
| 1050 | //******************************************************************************
|
|---|
| 1051 | //******************************************************************************
|
|---|
| 1052 | int WIN32API EnumObjects( HDC arg1, int arg2, GOBJENUMPROC arg3, LPARAM arg4)
|
|---|
| 1053 | {
|
|---|
| 1054 | dprintf(("GDI32: EnumObjects STUB"));
|
|---|
| 1055 | //calling convention differences
|
|---|
| 1056 | // return O32_EnumObjects(arg1, arg2, arg3, arg4);
|
|---|
| 1057 | return 0;
|
|---|
| 1058 | }
|
|---|
| 1059 | //******************************************************************************
|
|---|
| 1060 | //******************************************************************************
|
|---|
| 1061 | BOOL WIN32API EqualRgn( HRGN arg1, HRGN arg2)
|
|---|
| 1062 | {
|
|---|
| 1063 | dprintf(("GDI32: EqualRgn"));
|
|---|
| 1064 | return O32_EqualRgn(arg1, arg2);
|
|---|
| 1065 | }
|
|---|
| 1066 | //******************************************************************************
|
|---|
| 1067 | //******************************************************************************
|
|---|
| 1068 | int WIN32API Escape( HDC arg1, int arg2, int arg3, LPCSTR arg4, PVOID arg5)
|
|---|
| 1069 | {
|
|---|
| 1070 | dprintf(("GDI32: Escape"));
|
|---|
| 1071 | return O32_Escape(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1072 | }
|
|---|
| 1073 | //******************************************************************************
|
|---|
| 1074 | //******************************************************************************
|
|---|
| 1075 | int WIN32API ExcludeClipRect( HDC arg1, int arg2, int arg3, int arg4, int arg5)
|
|---|
| 1076 | {
|
|---|
| 1077 | dprintf(("GDI32: ExcludeClipRect"));
|
|---|
| 1078 | return O32_ExcludeClipRect(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1079 | }
|
|---|
| 1080 | //******************************************************************************
|
|---|
| 1081 | //******************************************************************************
|
|---|
| 1082 | HPEN WIN32API ExtCreatePen( DWORD arg1, DWORD arg2, const LOGBRUSH * arg3, DWORD arg4, const DWORD * arg5)
|
|---|
| 1083 | {
|
|---|
| 1084 | dprintf(("GDI32: ExtCreatePen"));
|
|---|
| 1085 | return O32_ExtCreatePen(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1086 | }
|
|---|
| 1087 | //******************************************************************************
|
|---|
| 1088 | //******************************************************************************
|
|---|
| 1089 | HRGN WIN32API ExtCreateRegion( const XFORM * arg1, DWORD arg2, const RGNDATA * arg3)
|
|---|
| 1090 | {
|
|---|
| 1091 | dprintf(("GDI32: ExtCreateRegion"));
|
|---|
| 1092 | return O32_ExtCreateRegion(arg1, arg2, arg3);
|
|---|
| 1093 | }
|
|---|
| 1094 | //******************************************************************************
|
|---|
| 1095 | //******************************************************************************
|
|---|
| 1096 | BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5)
|
|---|
| 1097 | {
|
|---|
| 1098 | dprintf(("GDI32: ExtFloodFill"));
|
|---|
| 1099 | return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1100 | }
|
|---|
| 1101 | //******************************************************************************
|
|---|
| 1102 | //******************************************************************************
|
|---|
| 1103 | int WIN32API ExtSelectClipRgn( HDC arg1, HRGN arg2, int arg3)
|
|---|
| 1104 | {
|
|---|
| 1105 | dprintf(("GDI32: ExtSelectClipRgn"));
|
|---|
| 1106 | return O32_ExtSelectClipRgn(arg1, arg2, arg3);
|
|---|
| 1107 | }
|
|---|
| 1108 | //******************************************************************************
|
|---|
| 1109 | //******************************************************************************
|
|---|
| 1110 | BOOL WIN32API FillPath( HDC arg1)
|
|---|
| 1111 | {
|
|---|
| 1112 | dprintf(("GDI32: FillPath"));
|
|---|
| 1113 | return O32_FillPath(arg1);
|
|---|
| 1114 | }
|
|---|
| 1115 | //******************************************************************************
|
|---|
| 1116 | //******************************************************************************
|
|---|
| 1117 | BOOL WIN32API FillRgn( HDC arg1, HRGN arg2, HBRUSH arg3)
|
|---|
| 1118 | {
|
|---|
| 1119 | dprintf(("GDI32: FillRgn"));
|
|---|
| 1120 | return O32_FillRgn(arg1, arg2, arg3);
|
|---|
| 1121 | }
|
|---|
| 1122 | //******************************************************************************
|
|---|
| 1123 | //******************************************************************************
|
|---|
| 1124 | BOOL WIN32API FlattenPath( HDC arg1)
|
|---|
| 1125 | {
|
|---|
| 1126 | dprintf(("GDI32: FlattenPath"));
|
|---|
| 1127 | return O32_FlattenPath(arg1);
|
|---|
| 1128 | }
|
|---|
| 1129 | //******************************************************************************
|
|---|
| 1130 | //******************************************************************************
|
|---|
| 1131 | BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4)
|
|---|
| 1132 | {
|
|---|
| 1133 | dprintf(("GDI32: FloodFill"));
|
|---|
| 1134 | return O32_FloodFill(arg1, arg2, arg3, arg4);
|
|---|
| 1135 | }
|
|---|
| 1136 | //******************************************************************************
|
|---|
| 1137 | //******************************************************************************
|
|---|
| 1138 | BOOL WIN32API FrameRgn( HDC arg1, HRGN arg2, HBRUSH arg3, int arg4, int arg5)
|
|---|
| 1139 | {
|
|---|
| 1140 | dprintf(("GDI32: FrameRgn"));
|
|---|
| 1141 | return O32_FrameRgn(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1142 | }
|
|---|
| 1143 | //******************************************************************************
|
|---|
| 1144 | //******************************************************************************
|
|---|
| 1145 | int WIN32API GetArcDirection( HDC arg1)
|
|---|
| 1146 | {
|
|---|
| 1147 | dprintf(("GDI32: GetArcDirection"));
|
|---|
| 1148 | return O32_GetArcDirection(arg1);
|
|---|
| 1149 | }
|
|---|
| 1150 | //******************************************************************************
|
|---|
| 1151 | //******************************************************************************
|
|---|
| 1152 | BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2)
|
|---|
| 1153 | {
|
|---|
| 1154 | dprintf(("GDI32: GetAspectRatioFilterEx"));
|
|---|
| 1155 | return O32_GetAspectRatioFilterEx(arg1, arg2);
|
|---|
| 1156 | }
|
|---|
| 1157 | //******************************************************************************
|
|---|
| 1158 | //******************************************************************************
|
|---|
| 1159 | LONG WIN32API GetBitmapBits( HBITMAP arg1, LONG arg2, PVOID arg3)
|
|---|
| 1160 | {
|
|---|
| 1161 | dprintf(("GDI32: GetBitmapBits"));
|
|---|
| 1162 | return O32_GetBitmapBits(arg1, arg2, arg3);
|
|---|
| 1163 | }
|
|---|
| 1164 | //******************************************************************************
|
|---|
| 1165 | //******************************************************************************
|
|---|
| 1166 | BOOL WIN32API GetBitmapDimensionEx( HBITMAP arg1, PSIZE arg2)
|
|---|
| 1167 | {
|
|---|
| 1168 | dprintf(("GDI32: GetBitmapDimensionEx"));
|
|---|
| 1169 | return O32_GetBitmapDimensionEx(arg1, arg2);
|
|---|
| 1170 | }
|
|---|
| 1171 | //******************************************************************************
|
|---|
| 1172 | //******************************************************************************
|
|---|
| 1173 | COLORREF WIN32API GetBkColor( HDC arg1)
|
|---|
| 1174 | {
|
|---|
| 1175 | dprintf(("GDI32: GetBkColor"));
|
|---|
| 1176 | return O32_GetBkColor(arg1);
|
|---|
| 1177 | }
|
|---|
| 1178 | //******************************************************************************
|
|---|
| 1179 | //******************************************************************************
|
|---|
| 1180 | int WIN32API GetBkMode( HDC arg1)
|
|---|
| 1181 | {
|
|---|
| 1182 | dprintf(("GDI32: GetBkMode"));
|
|---|
| 1183 | return O32_GetBkMode(arg1);
|
|---|
| 1184 | }
|
|---|
| 1185 | //******************************************************************************
|
|---|
| 1186 | //******************************************************************************
|
|---|
| 1187 | UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3)
|
|---|
| 1188 | {
|
|---|
| 1189 | dprintf(("GDI32: GetBoundsRect"));
|
|---|
| 1190 | return O32_GetBoundsRect(arg1, arg2, arg3);
|
|---|
| 1191 | }
|
|---|
| 1192 | //******************************************************************************
|
|---|
| 1193 | //******************************************************************************
|
|---|
| 1194 | BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2)
|
|---|
| 1195 | {
|
|---|
| 1196 | dprintf(("GDI32: GetBrushOrgEx"));
|
|---|
| 1197 | return O32_GetBrushOrgEx(arg1, arg2);
|
|---|
| 1198 | }
|
|---|
| 1199 | //******************************************************************************
|
|---|
| 1200 | //******************************************************************************
|
|---|
| 1201 | BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
|
|---|
| 1202 | {
|
|---|
| 1203 | dprintf(("GDI32: GetCharABCWidthsA"));
|
|---|
| 1204 | return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
|
|---|
| 1205 | }
|
|---|
| 1206 | //******************************************************************************
|
|---|
| 1207 | //******************************************************************************
|
|---|
| 1208 | BOOL WIN32API GetCharABCWidthsW( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
|
|---|
| 1209 | {
|
|---|
| 1210 | dprintf(("GDI32: GetCharABCWidthsW not properly implemented."));
|
|---|
| 1211 | // NOTE: This will not work as is (needs UNICODE support)
|
|---|
| 1212 | return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
|
|---|
| 1213 | }
|
|---|
| 1214 | //******************************************************************************
|
|---|
| 1215 | //******************************************************************************
|
|---|
| 1216 | BOOL WIN32API GetCharWidthA( HDC arg1, UINT arg2, UINT arg3, PINT arg4)
|
|---|
| 1217 | {
|
|---|
| 1218 | dprintf(("GDI32: GetCharWidthA"));
|
|---|
| 1219 | return O32_GetCharWidth(arg1, arg2, arg3, arg4);
|
|---|
| 1220 | }
|
|---|
| 1221 | //******************************************************************************
|
|---|
| 1222 | //TODO: Cut off Unicode chars?
|
|---|
| 1223 | //******************************************************************************
|
|---|
| 1224 | BOOL WIN32API GetCharWidthW(HDC arg1, UINT iFirstChar, UINT iLastChar, PINT arg4)
|
|---|
| 1225 | {
|
|---|
| 1226 | dprintf(("GDI32: GetCharWidthW, not properly implemented"));
|
|---|
| 1227 | return O32_GetCharWidth(arg1, iFirstChar, iLastChar, arg4);
|
|---|
| 1228 | }
|
|---|
| 1229 | //******************************************************************************
|
|---|
| 1230 | //******************************************************************************
|
|---|
| 1231 | int WIN32API GetClipBox( HDC arg1, PRECT arg2)
|
|---|
| 1232 | {
|
|---|
| 1233 | int rc;
|
|---|
| 1234 |
|
|---|
| 1235 | rc = O32_GetClipBox(arg1, arg2);
|
|---|
| 1236 | dprintf(("GDI32: GetClipBox of %X returned %d\n", arg1, rc));
|
|---|
| 1237 | return(rc);
|
|---|
| 1238 | }
|
|---|
| 1239 | //******************************************************************************
|
|---|
| 1240 | //******************************************************************************
|
|---|
| 1241 | int WIN32API GetClipRgn( HDC arg1, HRGN arg2)
|
|---|
| 1242 | {
|
|---|
| 1243 | dprintf(("GDI32: GetClipRgn"));
|
|---|
| 1244 | return O32_GetClipRgn(arg1, arg2);
|
|---|
| 1245 | }
|
|---|
| 1246 | //******************************************************************************
|
|---|
| 1247 | //******************************************************************************
|
|---|
| 1248 | HANDLE WIN32API GetCurrentObject( HDC arg1, UINT arg2)
|
|---|
| 1249 | {
|
|---|
| 1250 | dprintf(("GDI32: GetCurrentObject"));
|
|---|
| 1251 | return (HANDLE)O32_GetCurrentObject(arg1, arg2);
|
|---|
| 1252 | }
|
|---|
| 1253 | //******************************************************************************
|
|---|
| 1254 | //******************************************************************************
|
|---|
| 1255 | BOOL WIN32API GetCurrentPositionEx( HDC arg1, PPOINT arg2)
|
|---|
| 1256 | {
|
|---|
| 1257 | dprintf(("GDI32: GetCurrentPositionEx"));
|
|---|
| 1258 | return O32_GetCurrentPositionEx(arg1, arg2);
|
|---|
| 1259 | }
|
|---|
| 1260 | //******************************************************************************
|
|---|
| 1261 | //******************************************************************************
|
|---|
| 1262 | int WIN32API GetDIBits(HDC hdc, HBITMAP hBitmap, UINT uStartScan, UINT cScanLines,
|
|---|
| 1263 | void *lpvBits, PBITMAPINFO lpbi, UINT uUsage)
|
|---|
| 1264 | {
|
|---|
| 1265 | int rc;
|
|---|
| 1266 |
|
|---|
| 1267 | rc = O32_GetDIBits(hdc, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, uUsage);
|
|---|
| 1268 | dprintf(("GDI32: GetDIBits %x %x %d %d %x %x %d returned %d", hdc, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, uUsage, rc));
|
|---|
| 1269 | //SvL: Wrong Open32 return value
|
|---|
| 1270 | return (rc == TRUE) ? cScanLines : 0;
|
|---|
| 1271 | }
|
|---|
| 1272 | //******************************************************************************
|
|---|
| 1273 | //******************************************************************************
|
|---|
| 1274 | int WIN32API GetDeviceCaps(HDC hdc, int nIndex)
|
|---|
| 1275 | {
|
|---|
| 1276 | int rc;
|
|---|
| 1277 |
|
|---|
| 1278 | rc = O32_GetDeviceCaps(hdc, nIndex);
|
|---|
| 1279 | dprintf(("GDI32: GetDeviceCaps %X, %d returned %d\n", hdc, nIndex, rc));
|
|---|
| 1280 | //SvL: 13-9-'98: NT returns -1 when using 16 bits colors, NOT 65536!
|
|---|
| 1281 | if(nIndex == NUMCOLORS && rc > 256)
|
|---|
| 1282 | return -1;
|
|---|
| 1283 | return(rc);
|
|---|
| 1284 | }
|
|---|
| 1285 | //******************************************************************************
|
|---|
| 1286 | //******************************************************************************
|
|---|
| 1287 | HENHMETAFILE WIN32API GetEnhMetaFileA( LPCSTR arg1)
|
|---|
| 1288 | {
|
|---|
| 1289 | dprintf(("GDI32: GetEnhMetaFileA"));
|
|---|
| 1290 | return O32_GetEnhMetaFile(arg1);
|
|---|
| 1291 | }
|
|---|
| 1292 | //******************************************************************************
|
|---|
| 1293 | //******************************************************************************
|
|---|
| 1294 | UINT WIN32API GetEnhMetaFileBits( HENHMETAFILE arg1, UINT arg2, PBYTE arg3)
|
|---|
| 1295 | {
|
|---|
| 1296 | dprintf(("GDI32: GetEnhMetaFileBits"));
|
|---|
| 1297 | return O32_GetEnhMetaFileBits(arg1, arg2, arg3);
|
|---|
| 1298 | }
|
|---|
| 1299 | //******************************************************************************
|
|---|
| 1300 | //******************************************************************************
|
|---|
| 1301 | UINT WIN32API GetEnhMetaFileHeader( HENHMETAFILE arg1, UINT arg2, LPENHMETAHEADER arg3)
|
|---|
| 1302 | {
|
|---|
| 1303 | dprintf(("GDI32: GetEnhMetaFileHeader"));
|
|---|
| 1304 | return O32_GetEnhMetaFileHeader(arg1, arg2, arg3);
|
|---|
| 1305 | }
|
|---|
| 1306 | //******************************************************************************
|
|---|
| 1307 | //******************************************************************************
|
|---|
| 1308 | UINT WIN32API GetEnhMetaFilePaletteEntries( HENHMETAFILE arg1, UINT arg2, PPALETTEENTRY arg3)
|
|---|
| 1309 | {
|
|---|
| 1310 | dprintf(("GDI32: GetEnhMetaFilePaletteEntries"));
|
|---|
| 1311 | return O32_GetEnhMetaFilePaletteEntries(arg1, arg2, arg3);
|
|---|
| 1312 | }
|
|---|
| 1313 | //******************************************************************************
|
|---|
| 1314 | //******************************************************************************
|
|---|
| 1315 | HENHMETAFILE WIN32API GetEnhMetaFileW( LPCWSTR arg1)
|
|---|
| 1316 | {
|
|---|
| 1317 | char *astring = UnicodeToAsciiString((LPWSTR)arg1);
|
|---|
| 1318 | HENHMETAFILE rc;
|
|---|
| 1319 |
|
|---|
| 1320 | dprintf(("GDI32: GetEnhMetaFileW"));
|
|---|
| 1321 | // NOTE: This will not work as is (needs UNICODE support)
|
|---|
| 1322 | rc = O32_GetEnhMetaFile(astring);
|
|---|
| 1323 | FreeAsciiString(astring);
|
|---|
| 1324 | return rc;
|
|---|
| 1325 | }
|
|---|
| 1326 | //******************************************************************************
|
|---|
| 1327 | //******************************************************************************
|
|---|
| 1328 | int WIN32API GetGraphicsMode(HDC arg1)
|
|---|
| 1329 | {
|
|---|
| 1330 | dprintf(("GDI32: GetGraphicsMode"));
|
|---|
| 1331 | return O32_GetGraphicsMode(arg1);
|
|---|
| 1332 | }
|
|---|
| 1333 | //******************************************************************************
|
|---|
| 1334 | //******************************************************************************
|
|---|
| 1335 | DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
|
|---|
| 1336 | {
|
|---|
| 1337 | dprintf(("GDI32: GetKerningPairsA"));
|
|---|
| 1338 | return O32_GetKerningPairs(arg1, arg2, arg3);
|
|---|
| 1339 | }
|
|---|
| 1340 | //******************************************************************************
|
|---|
| 1341 | //******************************************************************************
|
|---|
| 1342 | DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
|
|---|
| 1343 | {
|
|---|
| 1344 | dprintf(("GDI32: GetKerningPairsW"));
|
|---|
| 1345 | // NOTE: This will not work as is (needs UNICODE support)
|
|---|
| 1346 | return O32_GetKerningPairs(arg1, arg2, arg3);
|
|---|
| 1347 | }
|
|---|
| 1348 | //******************************************************************************
|
|---|
| 1349 | //******************************************************************************
|
|---|
| 1350 | int WIN32API GetMapMode( HDC arg1)
|
|---|
| 1351 | {
|
|---|
| 1352 | dprintf(("GDI32: GetMapMode"));
|
|---|
| 1353 | return O32_GetMapMode(arg1);
|
|---|
| 1354 | }
|
|---|
| 1355 | //******************************************************************************
|
|---|
| 1356 | //******************************************************************************
|
|---|
| 1357 | HMETAFILE WIN32API GetMetaFileA( LPCSTR arg1)
|
|---|
| 1358 | {
|
|---|
| 1359 | dprintf(("GDI32: GetMetaFileA"));
|
|---|
| 1360 | return O32_GetMetaFile(arg1);
|
|---|
| 1361 | }
|
|---|
| 1362 | //******************************************************************************
|
|---|
| 1363 | //******************************************************************************
|
|---|
| 1364 | UINT WIN32API GetMetaFileBitsEx( HMETAFILE arg1, UINT arg2, LPVOID arg3)
|
|---|
| 1365 | {
|
|---|
| 1366 | dprintf(("GDI32: GetMetaFileBitsEx"));
|
|---|
| 1367 | return O32_GetMetaFileBitsEx(arg1, arg2, arg3);
|
|---|
| 1368 | }
|
|---|
| 1369 | //******************************************************************************
|
|---|
| 1370 | //******************************************************************************
|
|---|
| 1371 | HMETAFILE WIN32API GetMetaFileW( LPCWSTR arg1)
|
|---|
| 1372 | {
|
|---|
| 1373 | char *astring = UnicodeToAsciiString((LPWSTR)arg1);
|
|---|
| 1374 | HENHMETAFILE rc;
|
|---|
| 1375 |
|
|---|
| 1376 | dprintf(("GDI32: GetMetaFileW"));
|
|---|
| 1377 | rc = O32_GetMetaFile(astring);
|
|---|
| 1378 | FreeAsciiString(astring);
|
|---|
| 1379 | return rc;
|
|---|
| 1380 |
|
|---|
| 1381 | }
|
|---|
| 1382 | //******************************************************************************
|
|---|
| 1383 | //******************************************************************************
|
|---|
| 1384 | BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
|
|---|
| 1385 | {
|
|---|
| 1386 | dprintf(("GDI32: GetMiterLimit"));
|
|---|
| 1387 | return O32_GetMiterLimit(arg1, arg2);
|
|---|
| 1388 | }
|
|---|
| 1389 | //******************************************************************************
|
|---|
| 1390 | //******************************************************************************
|
|---|
| 1391 | COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2)
|
|---|
| 1392 | {
|
|---|
| 1393 | dprintf(("GDI32: GetNearestColor\n"));
|
|---|
| 1394 | return O32_GetNearestColor(arg1, arg2);
|
|---|
| 1395 | }
|
|---|
| 1396 | //******************************************************************************
|
|---|
| 1397 | //******************************************************************************
|
|---|
| 1398 | UINT WIN32API GetNearestPaletteIndex( HPALETTE arg1, COLORREF arg2)
|
|---|
| 1399 | {
|
|---|
| 1400 | UINT rc;
|
|---|
| 1401 | dprintf(("GDI32: GetNearestPaletteIndex (0x%08X ,0x%08X) ",arg1,arg2));
|
|---|
| 1402 | rc = O32_GetNearestPaletteIndex(arg1, arg2);
|
|---|
| 1403 | dprintf(("Returns %d\n",rc));
|
|---|
| 1404 | return rc;
|
|---|
| 1405 | }
|
|---|
| 1406 | //******************************************************************************
|
|---|
| 1407 | //******************************************************************************
|
|---|
| 1408 | UINT WIN32API GetOutlineTextMetricsA( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICA arg3)
|
|---|
| 1409 | {
|
|---|
| 1410 | dprintf(("GDI32: GetOutlineTextMetricsA"));
|
|---|
| 1411 | return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
|
|---|
| 1412 | }
|
|---|
| 1413 | //******************************************************************************
|
|---|
| 1414 | //******************************************************************************
|
|---|
| 1415 | UINT WIN32API GetOutlineTextMetricsW( HDC arg1, UINT arg2, LPOUTLINETEXTMETRICW arg3)
|
|---|
| 1416 | {
|
|---|
| 1417 | dprintf(("GDI32: GetOutlineTextMetricsW STUB"));
|
|---|
| 1418 | // NOTE: This will not work as is (needs UNICODE support)
|
|---|
| 1419 | // return O32_GetOutlineTextMetrics(arg1, arg2, arg3);
|
|---|
| 1420 | return 0;
|
|---|
| 1421 | }
|
|---|
| 1422 | //******************************************************************************
|
|---|
| 1423 | //******************************************************************************
|
|---|
| 1424 | UINT WIN32API GetPaletteEntries( HPALETTE arg1, UINT arg2, UINT arg3, PPALETTEENTRY arg4)
|
|---|
| 1425 | {
|
|---|
| 1426 | dprintf(("GDI32: GetPaletteEntries"));
|
|---|
| 1427 | return O32_GetPaletteEntries(arg1, arg2, arg3, arg4);
|
|---|
| 1428 | }
|
|---|
| 1429 | //******************************************************************************
|
|---|
| 1430 | //******************************************************************************
|
|---|
| 1431 | INT WIN32API GetPath( HDC arg1, PPOINT arg2, PBYTE arg3, int arg4)
|
|---|
| 1432 | {
|
|---|
| 1433 | dprintf(("GDI32: GetPath"));
|
|---|
| 1434 | return O32_GetPath(arg1, arg2, arg3, arg4);
|
|---|
| 1435 | }
|
|---|
| 1436 | //******************************************************************************
|
|---|
| 1437 | //******************************************************************************
|
|---|
| 1438 | int WIN32API GetPolyFillMode( HDC arg1)
|
|---|
| 1439 | {
|
|---|
| 1440 | dprintf(("GDI32: GetPolyFillMode"));
|
|---|
| 1441 | return O32_GetPolyFillMode(arg1);
|
|---|
| 1442 | }
|
|---|
| 1443 | //******************************************************************************
|
|---|
| 1444 | //******************************************************************************
|
|---|
| 1445 | int WIN32API GetROP2( HDC arg1)
|
|---|
| 1446 | {
|
|---|
| 1447 | dprintf(("GDI32: GetROP2"));
|
|---|
| 1448 | return O32_GetROP2(arg1);
|
|---|
| 1449 | }
|
|---|
| 1450 | //******************************************************************************
|
|---|
| 1451 | //******************************************************************************
|
|---|
| 1452 | BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2)
|
|---|
| 1453 | {
|
|---|
| 1454 | dprintf(("GDI32: GetRasterizerCaps"));
|
|---|
| 1455 | return O32_GetRasterizerCaps(arg1, arg2);
|
|---|
| 1456 | }
|
|---|
| 1457 | //******************************************************************************
|
|---|
| 1458 | //******************************************************************************
|
|---|
| 1459 | DWORD WIN32API GetRegionData( HRGN arg1, DWORD arg2, PRGNDATA arg3)
|
|---|
| 1460 | {
|
|---|
| 1461 | dprintf(("GDI32: GetRegionData"));
|
|---|
| 1462 | return O32_GetRegionData(arg1, arg2, arg3);
|
|---|
| 1463 | }
|
|---|
| 1464 | //******************************************************************************
|
|---|
| 1465 | //******************************************************************************
|
|---|
| 1466 | int WIN32API GetRgnBox( HRGN arg1, PRECT arg2)
|
|---|
| 1467 | {
|
|---|
| 1468 | dprintf(("GDI32: GetRgnBox"));
|
|---|
| 1469 | return O32_GetRgnBox(arg1, arg2);
|
|---|
| 1470 | }
|
|---|
| 1471 | //******************************************************************************
|
|---|
| 1472 | //******************************************************************************
|
|---|
| 1473 | int WIN32API GetStretchBltMode( HDC arg1)
|
|---|
| 1474 | {
|
|---|
| 1475 | dprintf(("GDI32: GetStretchBltMode"));
|
|---|
| 1476 | return O32_GetStretchBltMode(arg1);
|
|---|
| 1477 | }
|
|---|
| 1478 | //******************************************************************************
|
|---|
| 1479 | //******************************************************************************
|
|---|
| 1480 | UINT WIN32API GetSystemPaletteEntries( HDC arg1, UINT arg2, UINT arg3, PPALETTEENTRY arg4)
|
|---|
| 1481 | {
|
|---|
| 1482 | UINT rc;
|
|---|
| 1483 |
|
|---|
| 1484 | dprintf(("GDI32: GetSystemPaletteEntries start %d nr %d pal ptr %X", arg2, arg3, arg4));
|
|---|
| 1485 | rc = O32_GetSystemPaletteEntries(arg1, arg2, arg3, arg4);
|
|---|
| 1486 | dprintf((" GetSystemPaletteEntries returned %d", rc));
|
|---|
| 1487 | return(rc);
|
|---|
| 1488 | }
|
|---|
| 1489 | //******************************************************************************
|
|---|
| 1490 | //******************************************************************************
|
|---|
| 1491 | UINT WIN32API GetTextAlign( HDC arg1)
|
|---|
| 1492 | {
|
|---|
| 1493 | dprintf(("GDI32: GetTextAlign"));
|
|---|
| 1494 | return O32_GetTextAlign(arg1);
|
|---|
| 1495 | }
|
|---|
| 1496 | //******************************************************************************
|
|---|
| 1497 | //******************************************************************************
|
|---|
| 1498 | int WIN32API GetTextCharacterExtra( HDC arg1)
|
|---|
| 1499 | {
|
|---|
| 1500 | dprintf(("GDI32: GetTextCharacterExtra"));
|
|---|
| 1501 | return O32_GetTextCharacterExtra(arg1);
|
|---|
| 1502 | }
|
|---|
| 1503 | //******************************************************************************
|
|---|
| 1504 | //******************************************************************************
|
|---|
| 1505 | COLORREF WIN32API GetTextColor( HDC arg1)
|
|---|
| 1506 | {
|
|---|
| 1507 | dprintf(("GDI32: GetTextColor"));
|
|---|
| 1508 | return O32_GetTextColor(arg1);
|
|---|
| 1509 | }
|
|---|
| 1510 | //******************************************************************************
|
|---|
| 1511 | //******************************************************************************
|
|---|
| 1512 | BOOL WIN32API GetTextExtentPoint32A( HDC arg1, LPCSTR arg2, int arg3, PSIZE lpSize)
|
|---|
| 1513 | {
|
|---|
| 1514 | dprintf(("GDI32: GetTextExtentPoint32A"));
|
|---|
| 1515 | lpSize->cx = lpSize->cy = 0;
|
|---|
| 1516 | return O32_GetTextExtentPoint32(arg1, arg2, arg3, lpSize);
|
|---|
| 1517 | }
|
|---|
| 1518 | //******************************************************************************
|
|---|
| 1519 | //******************************************************************************
|
|---|
| 1520 | BOOL WIN32API GetTextExtentPoint32W(HDC arg1, LPCWSTR arg2, int arg3, PSIZE lpSize)
|
|---|
| 1521 | {
|
|---|
| 1522 | char *astring = UnicodeToAsciiString((LPWSTR)arg2);
|
|---|
| 1523 | BOOL rc;
|
|---|
| 1524 |
|
|---|
| 1525 | dprintf(("GDI32: GetTextExtentPoint32W %s\n", astring));
|
|---|
| 1526 | lpSize->cx = lpSize->cy = 0;
|
|---|
| 1527 | rc = O32_GetTextExtentPoint32(arg1, astring, arg3, lpSize);
|
|---|
| 1528 | FreeAsciiString(astring);
|
|---|
| 1529 | return(rc);
|
|---|
| 1530 | }
|
|---|
| 1531 | //******************************************************************************
|
|---|
| 1532 | //******************************************************************************
|
|---|
| 1533 | BOOL WIN32API GetTextExtentPointW(HDC hdc,
|
|---|
| 1534 | LPCWSTR lpString,
|
|---|
| 1535 | int cbString,
|
|---|
| 1536 | PSIZE lpSize)
|
|---|
| 1537 | {
|
|---|
| 1538 | char *astring = UnicodeToAsciiString((LPWSTR)lpString);
|
|---|
| 1539 | BOOL rc;
|
|---|
| 1540 |
|
|---|
| 1541 | lpSize->cx = lpSize->cy = 0;
|
|---|
| 1542 | rc = O32_GetTextExtentPoint(hdc,
|
|---|
| 1543 | astring,
|
|---|
| 1544 | cbString,
|
|---|
| 1545 | lpSize);
|
|---|
| 1546 | dprintf(("GDI32: GetTextExtentPointW %X %s (size %08xh) returned %d\n", hdc, astring, cbString, rc));
|
|---|
| 1547 | dprintf(("GDI32: GetTextExtentPointW (%d,%d)\n", lpSize->cx, lpSize->cy));
|
|---|
| 1548 |
|
|---|
| 1549 | FreeAsciiString(astring);
|
|---|
| 1550 | return(rc);
|
|---|
| 1551 | }
|
|---|
| 1552 | //******************************************************************************
|
|---|
| 1553 | //******************************************************************************
|
|---|
| 1554 | int WIN32API GetTextFaceA( HDC arg1, int arg2, LPSTR arg3)
|
|---|
| 1555 | {
|
|---|
| 1556 | dprintf(("GDI32: GetTextFaceA"));
|
|---|
| 1557 | return O32_GetTextFace(arg1, arg2, arg3);
|
|---|
| 1558 | }
|
|---|
| 1559 | //******************************************************************************
|
|---|
| 1560 | //******************************************************************************
|
|---|
| 1561 | int WIN32API GetTextFaceW( HDC arg1, int arg2, LPWSTR arg3)
|
|---|
| 1562 | {
|
|---|
| 1563 | char *astring = (char *)malloc(arg2+1);
|
|---|
| 1564 | int rc;
|
|---|
| 1565 |
|
|---|
| 1566 | dprintf(("GDI32: GetTextFaceW"));
|
|---|
| 1567 | rc = O32_GetTextFace(arg1, arg2, astring);
|
|---|
| 1568 | AsciiToUnicode(astring, arg3);
|
|---|
| 1569 | free(astring);
|
|---|
| 1570 | return rc;
|
|---|
| 1571 | }
|
|---|
| 1572 | //******************************************************************************
|
|---|
| 1573 | //******************************************************************************
|
|---|
| 1574 | BOOL WIN32API GetTextMetricsA( HDC arg1, LPTEXTMETRICA arg2)
|
|---|
| 1575 | {
|
|---|
| 1576 | BOOL rc;
|
|---|
| 1577 |
|
|---|
| 1578 | rc = O32_GetTextMetrics(arg1, arg2);
|
|---|
| 1579 | dprintf(("GDI32: GetTextMetricsA returned %d\n", rc));
|
|---|
| 1580 | return(rc);
|
|---|
| 1581 | }
|
|---|
| 1582 | //******************************************************************************
|
|---|
| 1583 | //******************************************************************************
|
|---|
| 1584 | BOOL WIN32API GetTextMetricsW( HDC arg1, LPTEXTMETRICW pwtm)
|
|---|
| 1585 | {
|
|---|
| 1586 | BOOL rc;
|
|---|
| 1587 | TEXTMETRICA atm;
|
|---|
| 1588 |
|
|---|
| 1589 | dprintf(("GDI32: GetTextMetricsW"));
|
|---|
| 1590 |
|
|---|
| 1591 | rc = O32_GetTextMetrics(arg1, &atm);
|
|---|
| 1592 | pwtm->tmHeight = atm.tmHeight;
|
|---|
| 1593 | pwtm->tmAscent = atm.tmAscent;
|
|---|
| 1594 | pwtm->tmDescent = atm.tmDescent;
|
|---|
| 1595 | pwtm->tmInternalLeading = atm.tmInternalLeading;
|
|---|
| 1596 | pwtm->tmExternalLeading = atm.tmExternalLeading;
|
|---|
| 1597 | pwtm->tmAveCharWidth = atm.tmAveCharWidth;
|
|---|
| 1598 | pwtm->tmMaxCharWidth = atm.tmMaxCharWidth;
|
|---|
| 1599 | pwtm->tmWeight = atm.tmWeight;
|
|---|
| 1600 | pwtm->tmOverhang = atm.tmOverhang;
|
|---|
| 1601 | pwtm->tmDigitizedAspectX = atm.tmDigitizedAspectX;
|
|---|
| 1602 | pwtm->tmDigitizedAspectY = atm.tmDigitizedAspectY;
|
|---|
| 1603 | pwtm->tmFirstChar = atm.tmFirstChar;
|
|---|
| 1604 | pwtm->tmLastChar = atm.tmLastChar;
|
|---|
| 1605 | pwtm->tmDefaultChar = atm.tmDefaultChar;
|
|---|
| 1606 | pwtm->tmBreakChar = atm.tmBreakChar;
|
|---|
| 1607 | pwtm->tmItalic = atm.tmItalic;
|
|---|
| 1608 | pwtm->tmUnderlined = atm.tmUnderlined;
|
|---|
| 1609 | pwtm->tmStruckOut = atm.tmStruckOut;
|
|---|
| 1610 | pwtm->tmPitchAndFamily = atm.tmPitchAndFamily;
|
|---|
| 1611 | pwtm->tmCharSet = atm.tmCharSet;
|
|---|
| 1612 | return(rc);
|
|---|
| 1613 | }
|
|---|
| 1614 | //******************************************************************************
|
|---|
| 1615 | //******************************************************************************
|
|---|
| 1616 | BOOL WIN32API GetViewportExtEx( HDC arg1, PSIZE arg2)
|
|---|
| 1617 | {
|
|---|
| 1618 | dprintf(("GDI32: GetViewportExtEx"));
|
|---|
| 1619 | return O32_GetViewportExtEx(arg1, arg2);
|
|---|
| 1620 | }
|
|---|
| 1621 | //******************************************************************************
|
|---|
| 1622 | //******************************************************************************
|
|---|
| 1623 | BOOL WIN32API GetViewportOrgEx( HDC arg1, PPOINT arg2)
|
|---|
| 1624 | {
|
|---|
| 1625 | dprintf(("GDI32: GetViewportOrgEx"));
|
|---|
| 1626 | return O32_GetViewportOrgEx(arg1, arg2);
|
|---|
| 1627 | }
|
|---|
| 1628 | //******************************************************************************
|
|---|
| 1629 | //******************************************************************************
|
|---|
| 1630 | UINT WIN32API GetWinMetaFileBits( HENHMETAFILE arg1, UINT arg2, PBYTE arg3, int arg4, HDC arg5)
|
|---|
| 1631 | {
|
|---|
| 1632 | dprintf(("GDI32: GetWinMetaFileBits"));
|
|---|
| 1633 | return O32_GetWinMetaFileBits(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1634 | }
|
|---|
| 1635 | //******************************************************************************
|
|---|
| 1636 | //******************************************************************************
|
|---|
| 1637 | BOOL WIN32API GetWindowOrgEx( HDC arg1, PPOINT arg2)
|
|---|
| 1638 | {
|
|---|
| 1639 | dprintf(("GDI32: GetWindowOrgEx"));
|
|---|
| 1640 | return O32_GetWindowOrgEx(arg1, arg2);
|
|---|
| 1641 | }
|
|---|
| 1642 | //******************************************************************************
|
|---|
| 1643 | //******************************************************************************
|
|---|
| 1644 | BOOL WIN32API GetWorldTransform( HDC arg1, LPXFORM arg2)
|
|---|
| 1645 | {
|
|---|
| 1646 | dprintf(("GDI32: GetWorldTransform"));
|
|---|
| 1647 | return O32_GetWorldTransform(arg1, arg2);
|
|---|
| 1648 | }
|
|---|
| 1649 | //******************************************************************************
|
|---|
| 1650 | //******************************************************************************
|
|---|
| 1651 | int WIN32API IntersectClipRect(HDC arg1, int arg2, int arg3, int arg4, int arg5)
|
|---|
| 1652 | {
|
|---|
| 1653 | int rc;
|
|---|
| 1654 |
|
|---|
| 1655 | rc = O32_IntersectClipRect(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 1656 | dprintf(("GDI32: IntersectClipRect returned %d\n", rc));
|
|---|
| 1657 | return(rc);
|
|---|
| 1658 | }
|
|---|
| 1659 | //******************************************************************************
|
|---|
| 1660 | //******************************************************************************
|
|---|
| 1661 | BOOL WIN32API InvertRgn( HDC arg1, HRGN arg2)
|
|---|
| 1662 | {
|
|---|
| 1663 | dprintf(("GDI32: InvertRgn"));
|
|---|
| 1664 | return O32_InvertRgn(arg1, arg2);
|
|---|
| 1665 | }
|
|---|
| 1666 | //******************************************************************************
|
|---|
| 1667 | //******************************************************************************
|
|---|
| 1668 | BOOL WIN32API LPtoDP( HDC arg1, PPOINT arg2, int arg3)
|
|---|
| 1669 | {
|
|---|
| 1670 | dprintf(("GDI32: LPtoDP"));
|
|---|
| 1671 | return O32_LPtoDP(arg1, arg2, arg3);
|
|---|
| 1672 | }
|
|---|
| 1673 | //******************************************************************************
|
|---|
| 1674 | //******************************************************************************
|
|---|
| 1675 | BOOL WIN32API MaskBlt( HDC arg1, int arg2, int arg3, int arg4, int arg5, HDC arg6, int arg7, int arg8, HBITMAP arg9, int arg10, int arg11, DWORD arg12)
|
|---|
| 1676 | {
|
|---|
| 1677 | dprintf(("GDI32: MaskBlt"));
|
|---|
| 1678 | return O32_MaskBlt(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
|
|---|
| 1679 | }
|
|---|
| 1680 | //******************************************************************************
|
|---|
| 1681 | //******************************************************************************
|
|---|
| 1682 | BOOL WIN32API ModifyWorldTransform( HDC arg1, const XFORM *arg2, DWORD arg3)
|
|---|
| 1683 | {
|
|---|
| 1684 | dprintf(("GDI32: ModifyWorldTransform"));
|
|---|
| 1685 | return O32_ModifyWorldTransform(arg1, (LPXFORM)arg2, arg3);
|
|---|
| 1686 | }
|
|---|
| 1687 | //******************************************************************************
|
|---|
| 1688 | //******************************************************************************
|
|---|
| 1689 | int WIN32API OffsetClipRgn( HDC arg1, int arg2, int arg3)
|
|---|
| 1690 | {
|
|---|
| 1691 | dprintf(("GDI32: OffsetClipRgn"));
|
|---|
| 1692 | return O32_OffsetClipRgn(arg1, arg2, arg3);
|
|---|
| 1693 | }
|
|---|
| 1694 | //******************************************************************************
|
|---|
| 1695 | //******************************************************************************
|
|---|
| 1696 | int WIN32API OffsetRgn( HRGN arg1, int arg2, int arg3)
|
|---|
| 1697 | {
|
|---|
| 1698 | dprintf(("GDI32: OffsetRgn"));
|
|---|
| 1699 | return O32_OffsetRgn(arg1, arg2, arg3);
|
|---|
| 1700 | }
|
|---|
| 1701 | //******************************************************************************
|
|---|
| 1702 | //******************************************************************************
|
|---|
| 1703 | BOOL WIN32API OffsetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
|
|---|
| 1704 | {
|
|---|
| 1705 | dprintf(("GDI32: OffsetViewportOrgEx"));
|
|---|
| 1706 | return O32_OffsetViewportOrgEx(arg1, arg2, arg3, arg4);
|
|---|
| 1707 | }
|
|---|
| 1708 | //******************************************************************************
|
|---|
| 1709 | //******************************************************************************
|
|---|
| 1710 | BOOL WIN32API OffsetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
|
|---|
| 1711 | {
|
|---|
| 1712 | dprintf(("GDI32: OffsetWindowOrgEx"));
|
|---|
| 1713 | return O32_OffsetWindowOrgEx(arg1, arg2, arg3, arg4);
|
|---|
| 1714 | }
|
|---|
| 1715 | //******************************************************************************
|
|---|
| 1716 | //******************************************************************************
|
|---|
| 1717 | BOOL WIN32API PaintRgn( HDC arg1, HRGN arg2)
|
|---|
| 1718 | {
|
|---|
| 1719 | dprintf(("GDI32: PaintRgn"));
|
|---|
| 1720 | return O32_PaintRgn(arg1, arg2);
|
|---|
| 1721 | }
|
|---|
| 1722 | //******************************************************************************
|
|---|
| 1723 | //******************************************************************************
|
|---|
| 1724 | HRGN WIN32API PathToRegion( HDC arg1)
|
|---|
| 1725 | {
|
|---|
| 1726 | dprintf(("GDI32: PathToRegion"));
|
|---|
| 1727 | return O32_PathToRegion(arg1);
|
|---|
| 1728 | }
|
|---|
| 1729 | //******************************************************************************
|
|---|
| 1730 | //******************************************************************************
|
|---|
| 1731 | BOOL WIN32API Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
|
|---|
| 1732 | int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2,
|
|---|
| 1733 | int nYRadial2)
|
|---|
| 1734 | {
|
|---|
| 1735 | dprintf(("GDI32: Pie"));
|
|---|
| 1736 | //CB: bug in O32_Pie
|
|---|
| 1737 | if (nXRadial1 == nXRadial2 && nYRadial1 == nYRadial2)
|
|---|
| 1738 | return O32_Ellipse(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect);
|
|---|
| 1739 | else
|
|---|
| 1740 | return O32_Pie(hdc,nLeftRect,nTopRect,nRightRect,nBottomRect,nXRadial1,nYRadial1,nXRadial2,nYRadial2);
|
|---|
| 1741 | }
|
|---|
| 1742 | //******************************************************************************
|
|---|
| 1743 | //******************************************************************************
|
|---|
| 1744 | BOOL WIN32API PlayEnhMetaFile( HDC arg1, HENHMETAFILE arg2, const RECT * arg3)
|
|---|
| 1745 | {
|
|---|
| 1746 | dprintf(("GDI32: PlayEnhMetaFile"));
|
|---|
| 1747 | return O32_PlayEnhMetaFile(arg1, arg2, arg3);
|
|---|
| 1748 | }
|
|---|
| 1749 | //******************************************************************************
|
|---|
| 1750 | //******************************************************************************
|
|---|
| 1751 | BOOL WIN32API PlayMetaFile( HDC arg1, HMETAFILE arg2)
|
|---|
| 1752 | {
|
|---|
| 1753 | dprintf(("GDI32: PlayMetaFile"));
|
|---|
| 1754 | return O32_PlayMetaFile(arg1, arg2);
|
|---|
| 1755 | }
|
|---|
| 1756 | //******************************************************************************
|
|---|
| 1757 | //******************************************************************************
|
|---|
| 1758 | BOOL WIN32API PlayMetaFileRecord( HDC arg1, LPHANDLETABLE arg2, LPMETARECORD arg3, UINT arg4)
|
|---|
| 1759 | {
|
|---|
| 1760 | dprintf(("GDI32: PlayMetaFileRecord"));
|
|---|
| 1761 | return O32_PlayMetaFileRecord(arg1, arg2, arg3, (int)arg4);
|
|---|
| 1762 | }
|
|---|
| 1763 | //******************************************************************************
|
|---|
| 1764 | //******************************************************************************
|
|---|
| 1765 | BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3)
|
|---|
| 1766 | {
|
|---|
| 1767 | dprintf(("GDI32: PolyBezier"));
|
|---|
| 1768 | return O32_PolyBezier(arg1, arg2, (int)arg3);
|
|---|
| 1769 | }
|
|---|
| 1770 | //******************************************************************************
|
|---|
| 1771 | //******************************************************************************
|
|---|
| 1772 | BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3)
|
|---|
| 1773 | {
|
|---|
| 1774 | dprintf(("GDI32: PolyBezierTo"));
|
|---|
| 1775 | return O32_PolyBezierTo(arg1, arg2, arg3);
|
|---|
| 1776 | }
|
|---|
| 1777 | //******************************************************************************
|
|---|
| 1778 | //******************************************************************************
|
|---|
| 1779 | BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4)
|
|---|
| 1780 | {
|
|---|
| 1781 | dprintf(("GDI32: PolyDraw"));
|
|---|
| 1782 | return O32_PolyDraw(arg1, arg2, arg3, arg4);
|
|---|
| 1783 | }
|
|---|
| 1784 | //******************************************************************************
|
|---|
| 1785 | //******************************************************************************
|
|---|
| 1786 | BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4)
|
|---|
| 1787 | {
|
|---|
| 1788 | dprintf(("GDI32: PolyPolygon"));
|
|---|
| 1789 | return O32_PolyPolygon(arg1, arg2, arg3, arg4);
|
|---|
| 1790 | }
|
|---|
| 1791 | //******************************************************************************
|
|---|
| 1792 | //******************************************************************************
|
|---|
| 1793 | BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
|
|---|
| 1794 | {
|
|---|
| 1795 | dprintf(("GDI32: PolyPolyline"));
|
|---|
| 1796 |
|
|---|
| 1797 | return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
|
|---|
| 1798 | }
|
|---|
| 1799 | //******************************************************************************
|
|---|
| 1800 | //******************************************************************************
|
|---|
| 1801 | BOOL WIN32API Polygon( HDC arg1, const POINT * arg2, int arg3)
|
|---|
| 1802 | {
|
|---|
| 1803 | dprintf(("GDI32: Polygon"));
|
|---|
| 1804 | return O32_Polygon(arg1, arg2, arg3);
|
|---|
| 1805 | }
|
|---|
| 1806 | //******************************************************************************
|
|---|
| 1807 | //******************************************************************************
|
|---|
| 1808 | BOOL WIN32API PtInRegion( HRGN arg1, int arg2, int arg3)
|
|---|
| 1809 | {
|
|---|
| 1810 | dprintf(("GDI32: PtInRegion"));
|
|---|
| 1811 | return O32_PtInRegion(arg1, arg2, arg3);
|
|---|
| 1812 | }
|
|---|
| 1813 | //******************************************************************************
|
|---|
| 1814 | //******************************************************************************
|
|---|
| 1815 | BOOL WIN32API PtVisible( HDC arg1, int arg2, int arg3)
|
|---|
| 1816 | {
|
|---|
| 1817 | dprintf(("GDI32: PtVisible"));
|
|---|
| 1818 | return O32_PtVisible(arg1, arg2, arg3);
|
|---|
| 1819 | }
|
|---|
| 1820 | //******************************************************************************
|
|---|
| 1821 | //******************************************************************************
|
|---|
| 1822 | BOOL WIN32API RectInRegion( HRGN arg1, const RECT * arg2)
|
|---|
| 1823 | {
|
|---|
| 1824 | dprintf(("GDI32: RectInRegion"));
|
|---|
| 1825 | return O32_RectInRegion(arg1, arg2);
|
|---|
| 1826 | }
|
|---|
| 1827 | //******************************************************************************
|
|---|
| 1828 | //******************************************************************************
|
|---|
| 1829 | BOOL WIN32API RectVisible( HDC arg1, const RECT * arg2)
|
|---|
| 1830 | {
|
|---|
| 1831 | dprintf(("GDI32: RectVisible\n"));
|
|---|
| 1832 | return O32_RectVisible(arg1, arg2);
|
|---|
| 1833 | }
|
|---|
| 1834 | //******************************************************************************
|
|---|
| 1835 | //******************************************************************************
|
|---|
| 1836 | HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2)
|
|---|
| 1837 | {
|
|---|
| 1838 | dprintf(("GDI32: ResetDCA\n"));
|
|---|
| 1839 | return (HDC)O32_ResetDC(arg1, arg2);
|
|---|
| 1840 | }
|
|---|
| 1841 | //******************************************************************************
|
|---|
| 1842 | //******************************************************************************
|
|---|
| 1843 | HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2)
|
|---|
| 1844 | {
|
|---|
| 1845 | dprintf(("GDI32: ResetDCW\n"));
|
|---|
| 1846 | // NOTE: This will not work as is (needs UNICODE support)
|
|---|
| 1847 | return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
|
|---|
| 1848 | }
|
|---|
| 1849 | //******************************************************************************
|
|---|
| 1850 | //******************************************************************************
|
|---|
| 1851 | BOOL WIN32API ResizePalette( HPALETTE arg1, UINT arg2)
|
|---|
| 1852 | {
|
|---|
| 1853 | dprintf(("GDI32: ResizePalette\n"));
|
|---|
| 1854 | return O32_ResizePalette(arg1, arg2);
|
|---|
| 1855 | }
|
|---|
| 1856 | //******************************************************************************
|
|---|
| 1857 | //******************************************************************************
|
|---|
| 1858 | BOOL WIN32API RestoreDC( HDC arg1, int arg2)
|
|---|
| 1859 | {
|
|---|
| 1860 | dprintf(("GDI32: RestoreDC\n"));
|
|---|
| 1861 | return O32_RestoreDC(arg1, arg2);
|
|---|
| 1862 | }
|
|---|
| 1863 | //******************************************************************************
|
|---|
| 1864 | //******************************************************************************
|
|---|
| 1865 | BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
|
|---|
| 1866 | {
|
|---|
| 1867 | dprintf(("GDI32: RoundRect"));
|
|---|
| 1868 | return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|---|
| 1869 | }
|
|---|
| 1870 | //******************************************************************************
|
|---|
| 1871 | //******************************************************************************
|
|---|
| 1872 | int WIN32API SaveDC( HDC arg1)
|
|---|
| 1873 | {
|
|---|
| 1874 | dprintf(("GDI32: SaveDC"));
|
|---|
| 1875 | return O32_SaveDC(arg1);
|
|---|
| 1876 | }
|
|---|
| 1877 | //******************************************************************************
|
|---|
| 1878 | //******************************************************************************
|
|---|
| 1879 | BOOL WIN32API ScaleViewportExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
|
|---|
| 1880 | {
|
|---|
| 1881 | dprintf(("GDI32: ScaleViewportExtEx"));
|
|---|
| 1882 | return O32_ScaleViewportExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
|
|---|
| 1883 | }
|
|---|
| 1884 | //******************************************************************************
|
|---|
| 1885 | //******************************************************************************
|
|---|
| 1886 | BOOL WIN32API ScaleWindowExtEx( HDC arg1, int arg2, int arg3, int arg4, int arg5, PSIZE arg6)
|
|---|
| 1887 | {
|
|---|
| 1888 | dprintf(("GDI32: ScaleWindowExtEx"));
|
|---|
| 1889 | return O32_ScaleWindowExtEx(arg1, arg2, arg3, arg4, arg5, arg6);
|
|---|
| 1890 | }
|
|---|
| 1891 | //******************************************************************************
|
|---|
| 1892 | //******************************************************************************
|
|---|
| 1893 | int WIN32API SelectClipRgn( HDC arg1, HRGN arg2)
|
|---|
| 1894 | {
|
|---|
| 1895 | dprintf(("GDI32: SelectClipRgn"));
|
|---|
| 1896 | return O32_SelectClipRgn(arg1, arg2);
|
|---|
| 1897 | }
|
|---|
| 1898 | //******************************************************************************
|
|---|
| 1899 | //******************************************************************************
|
|---|
| 1900 | int WIN32API SetArcDirection( HDC arg1, int arg2)
|
|---|
| 1901 | {
|
|---|
| 1902 | dprintf(("GDI32: SetArcDirection"));
|
|---|
| 1903 | return O32_SetArcDirection(arg1, arg2);
|
|---|
| 1904 | }
|
|---|
| 1905 | //******************************************************************************
|
|---|
| 1906 | //******************************************************************************
|
|---|
| 1907 | LONG WIN32API SetBitmapBits( HBITMAP arg1, LONG arg2, const VOID * arg3)
|
|---|
| 1908 | {
|
|---|
| 1909 | dprintf(("GDI32: SetBitmapBits"));
|
|---|
| 1910 | return O32_SetBitmapBits(arg1, (DWORD)arg2, arg3);
|
|---|
| 1911 | }
|
|---|
| 1912 | //******************************************************************************
|
|---|
| 1913 | //******************************************************************************
|
|---|
| 1914 | BOOL WIN32API SetBitmapDimensionEx( HBITMAP arg1, int arg2, int arg3, PSIZE arg4)
|
|---|
| 1915 | {
|
|---|
| 1916 | dprintf(("GDI32: SetBitmapDimensionEx"));
|
|---|
| 1917 | return O32_SetBitmapDimensionEx(arg1, arg2, arg3, arg4);
|
|---|
| 1918 | }
|
|---|
| 1919 | //******************************************************************************
|
|---|
| 1920 | //******************************************************************************
|
|---|
| 1921 | UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
|
|---|
| 1922 | {
|
|---|
| 1923 | dprintf(("GDI32: SetBoundsRect"));
|
|---|
| 1924 | return O32_SetBoundsRect(arg1, arg2, arg3);
|
|---|
| 1925 | }
|
|---|
| 1926 | //******************************************************************************
|
|---|
| 1927 | //******************************************************************************
|
|---|
| 1928 | BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
|
|---|
| 1929 | {
|
|---|
| 1930 | BOOL rc;
|
|---|
| 1931 |
|
|---|
| 1932 | rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
|
|---|
| 1933 | dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc));
|
|---|
| 1934 | return(rc);
|
|---|
| 1935 | }
|
|---|
| 1936 | //******************************************************************************
|
|---|
| 1937 | //******************************************************************************
|
|---|
| 1938 | int WIN32API SetDIBits( HDC arg1, HBITMAP arg2, UINT arg3, UINT arg4, const VOID * arg5, const BITMAPINFO * arg6, UINT arg7)
|
|---|
| 1939 | {
|
|---|
| 1940 | dprintf(("GDI32: SetDIBits %x %x %x %x %x %x %x\n", arg1, arg2, arg3, arg4, arg5, arg6, arg7));
|
|---|
| 1941 |
|
|---|
| 1942 | if(DIBSection::getSection() != NULL) {
|
|---|
| 1943 | DIBSection *dsect;
|
|---|
| 1944 |
|
|---|
| 1945 | dsect = DIBSection::find((DWORD)arg2);
|
|---|
| 1946 | if(dsect) {
|
|---|
| 1947 | return dsect->SetDIBits(arg1, arg2, arg3, arg4, arg5, (WINBITMAPINFOHEADER *)&arg6->bmiHeader, arg7);
|
|---|
| 1948 | }
|
|---|
| 1949 | }
|
|---|
| 1950 | return O32_SetDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|---|
| 1951 | }
|
|---|
| 1952 | //******************************************************************************
|
|---|
| 1953 | //******************************************************************************
|
|---|
| 1954 | INT WIN32API SetDIBitsToDevice(HDC hdc, INT xDest, INT yDest, DWORD cx,
|
|---|
| 1955 | DWORD cy, INT xSrc, INT ySrc,
|
|---|
| 1956 | UINT startscan, UINT lines, LPCVOID bits,
|
|---|
| 1957 | const BITMAPINFO *info, UINT coloruse)
|
|---|
| 1958 | {
|
|---|
| 1959 | INT result, imgsize, palsize, height, width;
|
|---|
| 1960 | char *ptr;
|
|---|
| 1961 |
|
|---|
| 1962 | SetLastError(0);
|
|---|
| 1963 | if(info == NULL) {
|
|---|
| 1964 | goto invalid_parameter;
|
|---|
| 1965 | }
|
|---|
| 1966 | height = info->bmiHeader.biHeight;
|
|---|
| 1967 | width = info->bmiHeader.biWidth;
|
|---|
| 1968 |
|
|---|
| 1969 | if (height < 0) height = -height;
|
|---|
| 1970 | if (!lines || (startscan >= height)) {
|
|---|
| 1971 | goto invalid_parameter;
|
|---|
| 1972 | }
|
|---|
| 1973 | if (startscan + lines > height) lines = height - startscan;
|
|---|
| 1974 |
|
|---|
| 1975 | if (ySrc < startscan) ySrc = startscan;
|
|---|
| 1976 | else if (ySrc >= startscan + lines) goto invalid_parameter;
|
|---|
| 1977 |
|
|---|
| 1978 | if (xSrc >= width) goto invalid_parameter;
|
|---|
| 1979 |
|
|---|
| 1980 | if (ySrc + cy >= startscan + lines) cy = startscan + lines - ySrc;
|
|---|
| 1981 |
|
|---|
| 1982 | if (xSrc + cx >= width) cx = width - xSrc;
|
|---|
| 1983 |
|
|---|
| 1984 | if (!cx || !cy) goto invalid_parameter;
|
|---|
| 1985 |
|
|---|
| 1986 | // EB: ->>> Crazy. Nobody seen this Open32 bug ?
|
|---|
| 1987 | // Dont't like dirty pointers, but Open32 needs a bit help.
|
|---|
| 1988 | // Only tested with winmine.
|
|---|
| 1989 | palsize = QueryPaletteSize((BITMAPINFOHEADER*)&info->bmiHeader);
|
|---|
| 1990 | imgsize = CalcBitmapSize(info->bmiHeader.biBitCount,
|
|---|
| 1991 | info->bmiHeader.biWidth, info->bmiHeader.biHeight);
|
|---|
| 1992 | ptr = ((char *)info) + palsize + sizeof(BITMAPINFOHEADER);
|
|---|
| 1993 | if(bits >= ptr && bits < ptr + imgsize)
|
|---|
| 1994 | {
|
|---|
| 1995 | bits = (char *)bits - imgsize +
|
|---|
| 1996 | CalcBitmapSize(info->bmiHeader.biBitCount,
|
|---|
| 1997 | info->bmiHeader.biWidth, lines);
|
|---|
| 1998 | }
|
|---|
| 1999 | // EB: <<<-
|
|---|
| 2000 |
|
|---|
| 2001 | // if(xDest == 0 && yDest == 0 && xSrc == 0 && ySrc == 0 && cx == width && cy == height) {
|
|---|
| 2002 | // result = OSLibSetDIBitsToDevice(hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (PVOID) bits, (WINBITMAPINFOHEADER*)info, coloruse);
|
|---|
| 2003 | // }
|
|---|
| 2004 | // else {
|
|---|
| 2005 | result = O32_SetDIBitsToDevice(hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (PVOID) bits, (PBITMAPINFO)info, coloruse);
|
|---|
| 2006 | //SvL: Wrong Open32 return value
|
|---|
| 2007 | result = (result == TRUE) ? lines : 0;
|
|---|
| 2008 | // }
|
|---|
| 2009 |
|
|---|
| 2010 | dprintf(("GDI32: SetDIBitsToDevice hdc:%X xDest:%d yDest:%d, cx:%d, cy:%d, xSrc:%d, ySrc:%d, startscan:%d, lines:%d, bits:%X, info%X, coloruse:%d returned %d",
|
|---|
| 2011 | hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (LPVOID) bits, (PBITMAPINFO)info, coloruse, result));
|
|---|
| 2012 | return result;
|
|---|
| 2013 |
|
|---|
| 2014 | invalid_parameter:
|
|---|
| 2015 | SetLastError(ERROR_INVALID_PARAMETER);
|
|---|
| 2016 | return 0;
|
|---|
| 2017 | }
|
|---|
| 2018 | //******************************************************************************
|
|---|
| 2019 | //******************************************************************************
|
|---|
| 2020 | HENHMETAFILE WIN32API SetEnhMetaFileBits( UINT arg1, const BYTE * arg2)
|
|---|
| 2021 | {
|
|---|
| 2022 | dprintf(("GDI32: SetEnhMetaFileBits"));
|
|---|
| 2023 | return O32_SetEnhMetaFileBits(arg1, arg2);
|
|---|
| 2024 | }
|
|---|
| 2025 | //******************************************************************************
|
|---|
| 2026 | //******************************************************************************
|
|---|
| 2027 | int WIN32API SetGraphicsMode(HDC arg1, int arg2)
|
|---|
| 2028 | {
|
|---|
| 2029 | dprintf(("GDI32: SetGraphicsMode"));
|
|---|
| 2030 | return O32_SetGraphicsMode(arg1, arg2);
|
|---|
| 2031 | }
|
|---|
| 2032 | //******************************************************************************
|
|---|
| 2033 | //******************************************************************************
|
|---|
| 2034 | int WIN32API SetMapMode( HDC arg1, int arg2)
|
|---|
| 2035 | {
|
|---|
| 2036 | dprintf(("GDI32: SetMapMode"));
|
|---|
| 2037 | return O32_SetMapMode(arg1, arg2);
|
|---|
| 2038 | }
|
|---|
| 2039 | //******************************************************************************
|
|---|
| 2040 | //******************************************************************************
|
|---|
| 2041 | DWORD WIN32API SetMapperFlags( HDC arg1, DWORD arg2)
|
|---|
| 2042 | {
|
|---|
| 2043 | dprintf(("GDI32: SetMapperFlags"));
|
|---|
| 2044 | return O32_SetMapperFlags(arg1, arg2);
|
|---|
| 2045 | }
|
|---|
| 2046 | //******************************************************************************
|
|---|
| 2047 | //******************************************************************************
|
|---|
| 2048 | HMETAFILE WIN32API SetMetaFileBitsEx( UINT arg1, const BYTE * arg2)
|
|---|
| 2049 | {
|
|---|
| 2050 | dprintf(("GDI32: SetMetaFileBitsEx"));
|
|---|
| 2051 | return O32_SetMetaFileBitsEx(arg1, (PBYTE)arg2);
|
|---|
| 2052 | }
|
|---|
| 2053 | //******************************************************************************
|
|---|
| 2054 | //******************************************************************************
|
|---|
| 2055 | BOOL WIN32API SetMiterLimit( HDC arg1, float arg2, float * arg3)
|
|---|
| 2056 | {
|
|---|
| 2057 | dprintf(("GDI32: SetMiterLimit"));
|
|---|
| 2058 | return O32_SetMiterLimit(arg1, arg2, arg3);
|
|---|
| 2059 | }
|
|---|
| 2060 | //******************************************************************************
|
|---|
| 2061 | //******************************************************************************
|
|---|
| 2062 | UINT WIN32API SetPaletteEntries( HPALETTE arg1, UINT arg2, UINT arg3, PALETTEENTRY * arg4)
|
|---|
| 2063 | {
|
|---|
| 2064 | dprintf(("GDI32: SetPaletteEntries"));
|
|---|
| 2065 | return O32_SetPaletteEntries(arg1, arg2, arg3, (const PALETTEENTRY *)arg4);
|
|---|
| 2066 | }
|
|---|
| 2067 | //******************************************************************************
|
|---|
| 2068 | //******************************************************************************
|
|---|
| 2069 | int WIN32API SetPolyFillMode( HDC arg1, int arg2)
|
|---|
| 2070 | {
|
|---|
| 2071 | dprintf(("GDI32: SetPolyFillMode"));
|
|---|
| 2072 | return O32_SetPolyFillMode(arg1, arg2);
|
|---|
| 2073 | }
|
|---|
| 2074 | //******************************************************************************
|
|---|
| 2075 | //******************************************************************************
|
|---|
| 2076 | BOOL WIN32API SetRectRgn( HRGN arg1, int arg2, int arg3, int arg4, int arg5)
|
|---|
| 2077 | {
|
|---|
| 2078 | dprintf(("GDI32: SetRectRgn"));
|
|---|
| 2079 | return O32_SetRectRgn(arg1, arg2, arg3, arg4, arg5);
|
|---|
| 2080 | }
|
|---|
| 2081 | //******************************************************************************
|
|---|
| 2082 | //******************************************************************************
|
|---|
| 2083 | UINT WIN32API SetTextAlign( HDC arg1, UINT arg2)
|
|---|
| 2084 | {
|
|---|
| 2085 | dprintf(("GDI32: SetTextAlign"));
|
|---|
| 2086 | return O32_SetTextAlign(arg1, arg2);
|
|---|
| 2087 | }
|
|---|
| 2088 | //******************************************************************************
|
|---|
| 2089 | //******************************************************************************
|
|---|
| 2090 | int WIN32API SetTextCharacterExtra( HDC arg1, int arg2)
|
|---|
| 2091 | {
|
|---|
| 2092 | dprintf(("GDI32: SetTextCharacterExtra"));
|
|---|
| 2093 | return O32_SetTextCharacterExtra(arg1, arg2);
|
|---|
| 2094 | }
|
|---|
| 2095 | //******************************************************************************
|
|---|
| 2096 | //******************************************************************************
|
|---|
| 2097 | BOOL WIN32API SetTextJustification( HDC arg1, int arg2, int arg3)
|
|---|
| 2098 | {
|
|---|
| 2099 | dprintf(("GDI32: SetTextJustification"));
|
|---|
| 2100 | return O32_SetTextJustification(arg1, arg2, arg3);
|
|---|
| 2101 | }
|
|---|
| 2102 | //******************************************************************************
|
|---|
| 2103 | //******************************************************************************
|
|---|
| 2104 | BOOL WIN32API SetViewportExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
|
|---|
| 2105 | {
|
|---|
| 2106 | dprintf(("GDI32: SetViewportExtEx"));
|
|---|
| 2107 | return O32_SetViewportExtEx(arg1, arg2, arg3, arg4);
|
|---|
| 2108 | }
|
|---|
| 2109 | //******************************************************************************
|
|---|
| 2110 | //******************************************************************************
|
|---|
| 2111 | BOOL WIN32API SetViewportOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
|
|---|
| 2112 | {
|
|---|
| 2113 | dprintf(("GDI32: SetViewportOrgEx"));
|
|---|
| 2114 | return O32_SetViewportOrgEx(arg1, arg2, arg3, arg4);
|
|---|
| 2115 | }
|
|---|
| 2116 | //******************************************************************************
|
|---|
| 2117 | //******************************************************************************
|
|---|
| 2118 | HENHMETAFILE WIN32API SetWinMetaFileBits( UINT arg1, const BYTE * arg2, HDC arg3, const METAFILEPICT * arg4)
|
|---|
| 2119 | {
|
|---|
| 2120 | dprintf(("GDI32: SetWinMetaFileBits"));
|
|---|
| 2121 | return O32_SetWinMetaFileBits(arg1, arg2, arg3, arg4);
|
|---|
| 2122 | }
|
|---|
| 2123 | //******************************************************************************
|
|---|
| 2124 | //******************************************************************************
|
|---|
| 2125 | BOOL WIN32API SetWindowExtEx( HDC arg1, int arg2, int arg3, PSIZE arg4)
|
|---|
| 2126 | {
|
|---|
| 2127 | dprintf(("GDI32: SetWindowExtEx"));
|
|---|
| 2128 | return O32_SetWindowExtEx(arg1, arg2, arg3, arg4);
|
|---|
| 2129 | }
|
|---|
| 2130 | //******************************************************************************
|
|---|
| 2131 | //******************************************************************************
|
|---|
| 2132 | BOOL WIN32API SetWindowOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4)
|
|---|
| 2133 | {
|
|---|
| 2134 | dprintf(("GDI32: SetWindowOrgEx"));
|
|---|
| 2135 | return O32_SetWindowOrgEx(arg1, arg2, arg3, arg4);
|
|---|
| 2136 | }
|
|---|
| 2137 | //******************************************************************************
|
|---|
| 2138 | //******************************************************************************
|
|---|
| 2139 | BOOL WIN32API SetWorldTransform( HDC arg1, const XFORM *arg2)
|
|---|
| 2140 | {
|
|---|
| 2141 | dprintf(("GDI32: SetWorldTransform"));
|
|---|
| 2142 | return O32_SetWorldTransform(arg1, (LPXFORM)arg2);
|
|---|
| 2143 | }
|
|---|
| 2144 | //******************************************************************************
|
|---|
| 2145 | //******************************************************************************
|
|---|
| 2146 | INT WIN32API StartDocA( HDC arg1, const DOCINFOA *arg2)
|
|---|
| 2147 | {
|
|---|
| 2148 | dprintf(("GDI32: StartDocA"));
|
|---|
| 2149 | return O32_StartDoc(arg1, (LPDOCINFOA)arg2);
|
|---|
| 2150 | }
|
|---|
| 2151 | //******************************************************************************
|
|---|
| 2152 | //******************************************************************************
|
|---|
| 2153 | INT WIN32API StartDocW( HDC arg1, const DOCINFOW *arg2)
|
|---|
| 2154 | {
|
|---|
| 2155 | dprintf(("GDI32: StartDocW STUB"));
|
|---|
| 2156 | // NOTE: This will not work as is (needs UNICODE support)
|
|---|
| 2157 | // return O32_StartDoc(arg1, arg2);
|
|---|
| 2158 | return 0;
|
|---|
| 2159 | }
|
|---|
| 2160 | //******************************************************************************
|
|---|
| 2161 | //******************************************************************************
|
|---|
| 2162 | int WIN32API StartPage( HDC arg1)
|
|---|
| 2163 | {
|
|---|
| 2164 | dprintf(("GDI32: StartPage"));
|
|---|
| 2165 | return O32_StartPage(arg1);
|
|---|
| 2166 | }
|
|---|
| 2167 | //******************************************************************************
|
|---|
| 2168 | //******************************************************************************
|
|---|
| 2169 | BOOL WIN32API UnrealizeObject( HGDIOBJ arg1)
|
|---|
| 2170 | {
|
|---|
| 2171 | dprintf(("GDI32: UnrealizeObject"));
|
|---|
| 2172 | return O32_UnrealizeObject(arg1);
|
|---|
| 2173 | }
|
|---|
| 2174 | //******************************************************************************
|
|---|
| 2175 | //******************************************************************************
|
|---|
| 2176 | BOOL WIN32API WidenPath( HDC arg1)
|
|---|
| 2177 | {
|
|---|
| 2178 | dprintf(("GDI32: WidenPath"));
|
|---|
| 2179 | return O32_WidenPath(arg1);
|
|---|
| 2180 | }
|
|---|
| 2181 | //******************************************************************************
|
|---|
| 2182 | //CreateDisardableBitmap is obsolete and can be replaced by CreateCompatibleBitmap
|
|---|
| 2183 | //******************************************************************************
|
|---|
| 2184 | HBITMAP WIN32API CreateDiscardableBitmap(HDC hDC, int nWidth, int nHeight)
|
|---|
| 2185 | {
|
|---|
| 2186 | dprintf(("GDI32: CreateDisardableBitmap\n"));
|
|---|
| 2187 | return O32_CreateCompatibleBitmap(hDC, nWidth, nHeight);
|
|---|
| 2188 | }
|
|---|
| 2189 | //******************************************************************************
|
|---|
| 2190 | //TODO: Not implemented
|
|---|
| 2191 | //******************************************************************************
|
|---|
| 2192 | int WIN32API SetAbortProc(HDC hdc, ABORTPROC lpAbortProc)
|
|---|
| 2193 | {
|
|---|
| 2194 | dprintf(("GDI32: SetAbortProc - stub (1)w\n"));
|
|---|
| 2195 | return(1);
|
|---|
| 2196 | }
|
|---|
| 2197 | //******************************************************************************
|
|---|
| 2198 | //Selects the current path as a clipping region for a device context, combining
|
|---|
| 2199 | //any existing clipping region by using the specified mode
|
|---|
| 2200 | //TODO: Can be emulated with SelectClipRegion??
|
|---|
| 2201 | //******************************************************************************
|
|---|
| 2202 | BOOL WIN32API SelectClipPath(HDC hdc, int iMode)
|
|---|
| 2203 | {
|
|---|
| 2204 | dprintf(("GDI32: SelectClipPath, not implemented!(TRUE)\n"));
|
|---|
| 2205 | return(TRUE);
|
|---|
| 2206 | }
|
|---|
| 2207 | //******************************************************************************
|
|---|
| 2208 | //TODO: Sets the color adjustment values for a device context. (used to adjust
|
|---|
| 2209 | // the input color of the src bitmap for calls of StretchBlt & StretchDIBits
|
|---|
| 2210 | // functions when HALFTONE mode is set
|
|---|
| 2211 | //******************************************************************************
|
|---|
| 2212 | BOOL WIN32API SetColorAdjustment(HDC hdc, CONST COLORADJUSTMENT *lpca)
|
|---|
| 2213 | {
|
|---|
| 2214 | dprintf(("GDI32: SetColorAdjustment, not implemented!(TRUE)\n"));
|
|---|
| 2215 | return(TRUE);
|
|---|
| 2216 | }
|
|---|
| 2217 | //******************************************************************************
|
|---|
| 2218 | //WINE: OBJECTS\DIB.C
|
|---|
| 2219 | //*********************************************************************************
|
|---|
| 2220 | HBITMAP WIN32API CreateDIBSection( HDC hdc, BITMAPINFO *pbmi, UINT iUsage,
|
|---|
| 2221 | VOID **ppvBits, HANDLE hSection, DWORD dwOffset)
|
|---|
| 2222 | {
|
|---|
| 2223 | HBITMAP res = 0;
|
|---|
| 2224 | BOOL fFlip = 0;
|
|---|
| 2225 | int iHeight, iWidth;
|
|---|
| 2226 |
|
|---|
| 2227 | dprintf(("GDI32: CreateDIBSection %x %x %x %d", hdc, iUsage, hSection, dwOffset));
|
|---|
| 2228 | if(hSection)
|
|---|
| 2229 | {
|
|---|
| 2230 | dprintf(("GDI32: CreateDIBSection, hSection != NULL, not supported!\n"));
|
|---|
| 2231 | return NULL;
|
|---|
| 2232 | }
|
|---|
| 2233 |
|
|---|
| 2234 | //SvL: 13-9-98: StarCraft uses bitmap with negative height
|
|---|
| 2235 | iWidth = pbmi->bmiHeader.biWidth;
|
|---|
| 2236 | if(pbmi->bmiHeader.biWidth < 0)
|
|---|
| 2237 | {
|
|---|
| 2238 | pbmi->bmiHeader.biWidth = -pbmi->bmiHeader.biWidth;
|
|---|
| 2239 | fFlip = FLIP_HOR;
|
|---|
| 2240 | }
|
|---|
| 2241 | iHeight = pbmi->bmiHeader.biHeight;
|
|---|
| 2242 | if(pbmi->bmiHeader.biHeight < 0)
|
|---|
| 2243 | {
|
|---|
| 2244 | pbmi->bmiHeader.biHeight = -pbmi->bmiHeader.biHeight;
|
|---|
| 2245 | fFlip |= FLIP_VERT;
|
|---|
| 2246 | }
|
|---|
| 2247 |
|
|---|
| 2248 | res = O32_CreateDIBitmap(hdc, &pbmi->bmiHeader, 0, NULL, pbmi, 0);
|
|---|
| 2249 | if (res)
|
|---|
| 2250 | {
|
|---|
| 2251 | ULONG Pal[256];
|
|---|
| 2252 | char PalSize;
|
|---|
| 2253 | LOGPALETTE tmpPal = { 0x300,1,{0,0,0,0}};
|
|---|
| 2254 | HPALETTE hpalCur, hpalTmp;
|
|---|
| 2255 | DIBSection *dsect = new DIBSection((WINBITMAPINFOHEADER *)&pbmi->bmiHeader, (DWORD)res, fFlip);
|
|---|
| 2256 |
|
|---|
| 2257 | if(NULL!=dsect)
|
|---|
| 2258 | {
|
|---|
| 2259 | PalSize = dsect->GetBitCount();
|
|---|
| 2260 | if(PalSize<=8)
|
|---|
| 2261 | {
|
|---|
| 2262 | // Now get the current Palette from the DC
|
|---|
| 2263 | hpalTmp = CreatePalette(&tmpPal);
|
|---|
| 2264 | hpalCur = SelectPalette(hdc, hpalTmp, FALSE);
|
|---|
| 2265 |
|
|---|
| 2266 | // and use it to set the DIBColorTable
|
|---|
| 2267 | GetPaletteEntries( hpalCur, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal);
|
|---|
| 2268 | dsect->SetDIBColorTable(0, 1<< PalSize, (RGBQUAD*)&Pal);
|
|---|
| 2269 |
|
|---|
| 2270 | // Restore the DC Palette
|
|---|
| 2271 | SelectPalette(hdc,hpalCur,FALSE);
|
|---|
| 2272 | DeleteObject(hpalTmp);
|
|---|
| 2273 | }
|
|---|
| 2274 | // Set the hdc in the DIBSection so we can update the palete if a new
|
|---|
| 2275 | // Paletet etc. gets selected into the DC.
|
|---|
| 2276 |
|
|---|
| 2277 | dsect->SelectDIBObject(hdc);
|
|---|
| 2278 |
|
|---|
| 2279 | if(ppvBits!=NULL)
|
|---|
| 2280 | *ppvBits = dsect->GetDIBObject();
|
|---|
| 2281 |
|
|---|
| 2282 | pbmi->bmiHeader.biWidth = iWidth;
|
|---|
| 2283 | pbmi->bmiHeader.biHeight = iHeight;
|
|---|
| 2284 |
|
|---|
| 2285 | dprintf(("GDI32: return %08X\n",res));
|
|---|
| 2286 | return(res);
|
|---|
| 2287 | }
|
|---|
| 2288 | }
|
|---|
| 2289 |
|
|---|
| 2290 | /* Error. */
|
|---|
| 2291 | if (res)
|
|---|
| 2292 | DeleteObject(res);
|
|---|
| 2293 | *ppvBits = NULL;
|
|---|
| 2294 | #ifdef DEBUG
|
|---|
| 2295 | dprintf(("GDI32: CreateDIBSection, error!\n"));
|
|---|
| 2296 | dprintf(("pbmi->biWidth %d", pbmi->bmiHeader.biWidth));
|
|---|
| 2297 | dprintf(("pbmi->biHeight %d", pbmi->bmiHeader.biHeight));
|
|---|
| 2298 | dprintf(("pbmi->biBitCount %d", pbmi->bmiHeader.biBitCount));
|
|---|
| 2299 | #endif
|
|---|
| 2300 |
|
|---|
| 2301 | return 0;
|
|---|
| 2302 | }
|
|---|
| 2303 | //******************************************************************************
|
|---|
| 2304 | //******************************************************************************
|
|---|
| 2305 | UINT WIN32API GetDIBColorTable( HDC hdc, UINT uStartIndex, UINT cEntries,
|
|---|
| 2306 | RGBQUAD *pColors)
|
|---|
| 2307 | {
|
|---|
| 2308 | HPALETTE hpal = O32_GetCurrentObject(hdc, OBJ_PAL);
|
|---|
| 2309 | UINT rc;
|
|---|
| 2310 | int i;
|
|---|
| 2311 |
|
|---|
| 2312 | rc = O32_GetPaletteEntries(hpal,
|
|---|
| 2313 | uStartIndex,
|
|---|
| 2314 | cEntries,
|
|---|
| 2315 | (PALETTEENTRY *)pColors);
|
|---|
| 2316 | for(i=0;
|
|---|
| 2317 | i<cEntries;
|
|---|
| 2318 | i++)
|
|---|
| 2319 | {
|
|---|
| 2320 | BYTE tmp;
|
|---|
| 2321 | tmp = pColors[i].rgbBlue;
|
|---|
| 2322 | pColors[i].rgbBlue = pColors[i].rgbRed;
|
|---|
| 2323 | pColors[i].rgbRed = tmp;
|
|---|
| 2324 | pColors[i].rgbReserved = 0;
|
|---|
| 2325 | }
|
|---|
| 2326 | dprintf(("GDI32: GetDIBColorTable returns %d\n", rc));
|
|---|
| 2327 | return(rc);
|
|---|
| 2328 | }
|
|---|
| 2329 | //******************************************************************************
|
|---|
| 2330 | //******************************************************************************
|
|---|
| 2331 | UINT WIN32API SetDIBColorTable(HDC hdc, UINT uStartIndex, UINT cEntries,
|
|---|
| 2332 | RGBQUAD *pColors)
|
|---|
| 2333 | {
|
|---|
| 2334 | DIBSection *dsect = DIBSection::findHDC(hdc);
|
|---|
| 2335 |
|
|---|
| 2336 | dprintf(("GDI32: SetDIBColorTable\n"));
|
|---|
| 2337 | if(dsect)
|
|---|
| 2338 | {
|
|---|
| 2339 | return(dsect->SetDIBColorTable(uStartIndex, cEntries, pColors));
|
|---|
| 2340 | }
|
|---|
| 2341 | else
|
|---|
| 2342 | return(0);
|
|---|
| 2343 | }
|
|---|
| 2344 | //******************************************************************************
|
|---|
| 2345 | //******************************************************************************
|
|---|
| 2346 | HPALETTE WIN32API CreateHalftonePalette(HDC hdc)
|
|---|
| 2347 | {
|
|---|
| 2348 | dprintf(("GDI32: CreateHalftonePalette, not implemented\n"));
|
|---|
| 2349 | return(NULL);
|
|---|
| 2350 | }
|
|---|
| 2351 | //******************************************************************************
|
|---|
| 2352 | //Maps colors to system palette; faster way to update window (instead of redrawing)
|
|---|
| 2353 | //We just redraw
|
|---|
| 2354 | //******************************************************************************
|
|---|
| 2355 | BOOL WIN32API UpdateColors(HDC hdc)
|
|---|
| 2356 | {
|
|---|
| 2357 | dprintf(("GDI32: UpdateColors\n"));
|
|---|
| 2358 | return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);
|
|---|
| 2359 | }
|
|---|
| 2360 | //******************************************************************************
|
|---|
| 2361 | //******************************************************************************
|
|---|
| 2362 | BOOL WIN32API GdiFlush()
|
|---|
| 2363 | {
|
|---|
| 2364 | dprintf(("GDI32: GdiFlush, not implemented (TRUE)\n"));
|
|---|
| 2365 | return(TRUE);
|
|---|
| 2366 | }
|
|---|
| 2367 | //******************************************************************************
|
|---|
| 2368 | //******************************************************************************
|
|---|
| 2369 | BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData)
|
|---|
| 2370 | {
|
|---|
| 2371 | dprintf(("GDI32: GdiComment, not implemented (TRUE)\n"));
|
|---|
| 2372 | return(TRUE);
|
|---|
| 2373 | }
|
|---|
| 2374 | //******************************************************************************
|
|---|
| 2375 | //******************************************************************************
|
|---|
| 2376 | BOOL WIN32API GetCharWidthFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
|
|---|
| 2377 | {
|
|---|
| 2378 | dprintf(("GDI32: GetCharWidthFloatA, not implemented\n"));
|
|---|
| 2379 | return(FALSE);
|
|---|
| 2380 | }
|
|---|
| 2381 | //******************************************************************************
|
|---|
| 2382 | //******************************************************************************
|
|---|
| 2383 | BOOL WIN32API GetCharWidthFloatW(HDC hdc, UINT iFirstChar, UINT iLastChar, PFLOAT pxBUffer)
|
|---|
| 2384 | {
|
|---|
| 2385 | dprintf(("GDI32: GetCharWidthFloatW, not implemented\n"));
|
|---|
| 2386 | return(FALSE);
|
|---|
| 2387 | }
|
|---|
| 2388 | //******************************************************************************
|
|---|
| 2389 | //******************************************************************************
|
|---|
| 2390 | BOOL WIN32API GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, LPABCFLOAT pxBUffer)
|
|---|
| 2391 | {
|
|---|
| 2392 | dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
|
|---|
| 2393 | return(FALSE);
|
|---|
| 2394 | }
|
|---|
| 2395 | //******************************************************************************
|
|---|
| 2396 | //******************************************************************************
|
|---|
| 2397 | BOOL WIN32API GetCharABCWidthsFloatW(HDC hdc,
|
|---|
| 2398 | UINT iFirstChar,
|
|---|
| 2399 | UINT iLastChar,
|
|---|
| 2400 | LPABCFLOAT pxBUffer)
|
|---|
| 2401 | {
|
|---|
| 2402 | dprintf(("GDI32: GetCharABCWidthsFloatA, not implemented\n"));
|
|---|
| 2403 | return(FALSE);
|
|---|
| 2404 | }
|
|---|
| 2405 | //******************************************************************************
|
|---|
| 2406 | //******************************************************************************
|
|---|
| 2407 | INT WIN32API ExtEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
|
|---|
| 2408 | INT cbOutput, LPSTR lpszOutData)
|
|---|
| 2409 | {
|
|---|
| 2410 | dprintf(("GDI32: ExtEscape, not implemented\n"));
|
|---|
| 2411 | return(0);
|
|---|
| 2412 | }
|
|---|
| 2413 | //******************************************************************************
|
|---|
| 2414 | //******************************************************************************
|
|---|
| 2415 | int WIN32API DrawEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData)
|
|---|
| 2416 | {
|
|---|
| 2417 | dprintf(("GDI32: DrawEscape, not implemented\n"));
|
|---|
| 2418 | return(0);
|
|---|
| 2419 | }
|
|---|
| 2420 | //******************************************************************************
|
|---|
| 2421 | //******************************************************************************
|
|---|
| 2422 | BOOL WIN32API GetColorAdjustment(HDC hdc, COLORADJUSTMENT *lpca)
|
|---|
| 2423 | {
|
|---|
| 2424 | dprintf(("GDI32: GetColorAdjustment, not implemented\n"));
|
|---|
| 2425 | return(FALSE);
|
|---|
| 2426 | }
|
|---|
| 2427 | //******************************************************************************
|
|---|
| 2428 | //******************************************************************************
|
|---|
| 2429 | BOOL WIN32API PlgBlt(HDC hdcDest, CONST POINT *lpPoint, HDC hdcSrc, int nXSrc,
|
|---|
| 2430 | int nYSrc, int nWidth, int nHeight, HBITMAP hbmMask,
|
|---|
| 2431 | int xMast, int yMask)
|
|---|
| 2432 | {
|
|---|
| 2433 | dprintf(("GDI32: PlgBlt, not implemented\n"));
|
|---|
| 2434 | return(FALSE);
|
|---|
| 2435 | }
|
|---|
| 2436 | //******************************************************************************
|
|---|
| 2437 | //******************************************************************************
|
|---|
| 2438 | DWORD WIN32API GetGlyphOutlineA(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
|
|---|
| 2439 | DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
|
|---|
| 2440 | {
|
|---|
| 2441 | dprintf(("GDI32: GetGlyphOutLineA, not implemented (GDI_ERROR)\n"));
|
|---|
| 2442 | return(GDI_ERROR);
|
|---|
| 2443 | }
|
|---|
| 2444 | //******************************************************************************
|
|---|
| 2445 |
|
|---|
| 2446 | //******************************************************************************
|
|---|
| 2447 | /*KSO Thu 21.05.1998*/
|
|---|
| 2448 | DWORD WIN32API GetGlyphOutlineW(HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
|
|---|
| 2449 | DWORD cbBuffer, LPVOID lpvBuffer, CONST MAT2 *lpmat2)
|
|---|
| 2450 | {
|
|---|
| 2451 | dprintf(("GDI32: GetGlyphOutLineW, not implemented\n"));
|
|---|
| 2452 | return(GDI_ERROR);
|
|---|
| 2453 | }
|
|---|
| 2454 | //******************************************************************************
|
|---|
| 2455 |
|
|---|
| 2456 | //******************************************************************************
|
|---|
| 2457 | BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
|
|---|
| 2458 | {
|
|---|
| 2459 | // Here is a guess for a undocumented entry
|
|---|
| 2460 | dprintf(("GDI32: SetObjectOwner - stub (TRUE)\n"));
|
|---|
| 2461 | return TRUE;
|
|---|
| 2462 | }
|
|---|
| 2463 | //******************************************************************************
|
|---|
| 2464 |
|
|---|
| 2465 |
|
|---|
| 2466 | /* Office 97 stubs - KSO Thu 21.05.1998*/
|
|---|
| 2467 | //******************************************************************************
|
|---|
| 2468 | BOOL WIN32API GetTextExtentExPointA(/*KSO Thu 21.05.1998*/
|
|---|
| 2469 | HDC hdc,
|
|---|
| 2470 | LPCSTR str,
|
|---|
| 2471 | int count,
|
|---|
| 2472 | int maxExt,
|
|---|
| 2473 | LPINT lpnFit,
|
|---|
| 2474 | LPINT alpDx,
|
|---|
| 2475 | LPSIZE size)
|
|---|
| 2476 | {
|
|---|
| 2477 | int index, nFit, extent;
|
|---|
| 2478 | SIZE tSize;
|
|---|
| 2479 |
|
|---|
| 2480 | dprintf(("GDI32: GetTextExtendExPointA\n"));
|
|---|
| 2481 |
|
|---|
| 2482 | size->cx = size->cy = nFit = extent = 0;
|
|---|
| 2483 | for(index = 0; index < count; index++)
|
|---|
| 2484 | {
|
|---|
| 2485 | if(!O32_GetTextExtentPoint( hdc, str, 1, &tSize )) return FALSE;
|
|---|
| 2486 | if( extent+tSize.cx < maxExt )
|
|---|
| 2487 | {
|
|---|
| 2488 | extent+=tSize.cx;
|
|---|
| 2489 | nFit++;
|
|---|
| 2490 | str++;
|
|---|
| 2491 | if( alpDx )
|
|---|
| 2492 | alpDx[index] = extent;
|
|---|
| 2493 | if( tSize.cy > size->cy ) size->cy = tSize.cy;
|
|---|
| 2494 | }
|
|---|
| 2495 | else break;
|
|---|
| 2496 | }
|
|---|
| 2497 | size->cx = extent;
|
|---|
| 2498 |
|
|---|
| 2499 | if (lpnFit != NULL) // check if result is desired
|
|---|
| 2500 | *lpnFit = nFit;
|
|---|
| 2501 |
|
|---|
| 2502 | dprintf(("GDI32: GetTextExtendExPointA(%08x '%.*s' %d) returning %d %d %d\n",
|
|---|
| 2503 | hdc,count,str,maxExt,nFit, size->cx,size->cy));
|
|---|
| 2504 | return TRUE;
|
|---|
| 2505 | }
|
|---|
| 2506 | //******************************************************************************
|
|---|
| 2507 | //******************************************************************************
|
|---|
| 2508 | BOOL WIN32API GetTextExtentExPointW( /*KSO Thu 21.05.1998*/
|
|---|
| 2509 | HDC arg1,
|
|---|
| 2510 | LPCWSTR arg2,
|
|---|
| 2511 | int arg3,
|
|---|
| 2512 | int arg4,
|
|---|
| 2513 | LPINT arg5,
|
|---|
| 2514 | LPINT arg6,
|
|---|
| 2515 | LPSIZE arg7
|
|---|
| 2516 | )
|
|---|
| 2517 | {
|
|---|
| 2518 | char *astring = UnicodeToAsciiString((LPWSTR)arg2);
|
|---|
| 2519 | BOOL rc;
|
|---|
| 2520 |
|
|---|
| 2521 | dprintf(("GDI32: GetTextExtendExPointW\n"));
|
|---|
| 2522 | rc = GetTextExtentExPointA(arg1, astring, arg3, arg4, arg5, arg6, arg7);
|
|---|
| 2523 | FreeAsciiString(astring);
|
|---|
| 2524 | return rc;
|
|---|
| 2525 | }
|
|---|
| 2526 | //******************************************************************************
|
|---|
| 2527 | //******************************************************************************
|
|---|
| 2528 | BOOL WIN32API PlayEnhMetaFileRecord( /*KSO Thu 21.05.1998*/
|
|---|
| 2529 | HDC arg1,
|
|---|
| 2530 | LPHANDLETABLE arg2,
|
|---|
| 2531 | CONST ENHMETARECORD *arg3,
|
|---|
| 2532 | UINT arg4
|
|---|
| 2533 | )
|
|---|
| 2534 | {
|
|---|
| 2535 | dprintf(("GDI32: PlayEnhMetaFileRecord - stub\n"));
|
|---|
| 2536 | return FALSE;
|
|---|
| 2537 | }
|
|---|
| 2538 | //******************************************************************************
|
|---|
| 2539 | UINT WIN32API GetEnhMetaFileDescriptionA( /*KSO Thu 21.05.1998*/
|
|---|
| 2540 | HENHMETAFILE arg1,
|
|---|
| 2541 | UINT arg2,
|
|---|
| 2542 | LPSTR arg3
|
|---|
| 2543 | )
|
|---|
| 2544 | {
|
|---|
| 2545 | dprintf(("GDI32: GetEnhMetaFileDescriptionA - stub\n"));
|
|---|
| 2546 | return FALSE;
|
|---|
| 2547 | }
|
|---|
| 2548 | //******************************************************************************
|
|---|
| 2549 | //******************************************************************************
|
|---|
| 2550 | UINT WIN32API GetEnhMetaFileDescriptionW( /*KSO Thu 21.05.1998*/
|
|---|
| 2551 | HENHMETAFILE arg1,
|
|---|
| 2552 | UINT arg2,
|
|---|
| 2553 | LPWSTR arg3
|
|---|
| 2554 | )
|
|---|
| 2555 | {
|
|---|
| 2556 | dprintf(("GDI32: GetEnhMetaFileDescriptionW - stub\n"));
|
|---|
| 2557 | return FALSE;
|
|---|
| 2558 | }
|
|---|
| 2559 | //******************************************************************************
|
|---|
| 2560 | //******************************************************************************
|
|---|
| 2561 | UINT WIN32API DeleteColorSpace( /*KSO Thu 21.05.1998*/
|
|---|
| 2562 | HCOLORSPACE hColorSpace
|
|---|
| 2563 | )
|
|---|
| 2564 | {
|
|---|
| 2565 | dprintf(("GDI32: DeleteColorSpace - stub\n"));
|
|---|
| 2566 | return FALSE;
|
|---|
| 2567 | }
|
|---|
| 2568 | //******************************************************************************
|
|---|
| 2569 | //******************************************************************************
|
|---|
| 2570 | BOOL WIN32API SetColorSpace( /*KSO Thu 21.05.1998*/
|
|---|
| 2571 | HDC hdc,
|
|---|
| 2572 | HCOLORSPACE hColorSpace
|
|---|
| 2573 | )
|
|---|
| 2574 | {
|
|---|
| 2575 | dprintf(("GDI32: SetColorSpace - stub\n"));
|
|---|
| 2576 | return FALSE;
|
|---|
| 2577 | }
|
|---|
| 2578 | //******************************************************************************
|
|---|
| 2579 | //******************************************************************************
|
|---|
| 2580 | HCOLORSPACE WIN32API CreateColorSpaceA( /*KSO Thu 21.05.1998*/
|
|---|
| 2581 | LPLOGCOLORSPACEA lpLogColorSpace
|
|---|
| 2582 | )
|
|---|
| 2583 | {
|
|---|
| 2584 | dprintf(("GDI32: CreateColorSpaceA - stub\n"));
|
|---|
| 2585 | return 0;
|
|---|
| 2586 | }
|
|---|
| 2587 | //******************************************************************************
|
|---|
| 2588 | //******************************************************************************
|
|---|
| 2589 | HCOLORSPACE WIN32API CreateColorSpaceW( /*KSO Thu 21.05.1998*/
|
|---|
| 2590 | LPLOGCOLORSPACEW lpwLogColorSpace
|
|---|
| 2591 | )
|
|---|
| 2592 | {
|
|---|
| 2593 | dprintf(("GDI32: CreateColorSpaceW - stub\n"));
|
|---|
| 2594 | return 0;
|
|---|
| 2595 | }
|
|---|
| 2596 | //******************************************************************************
|
|---|
| 2597 | //******************************************************************************
|
|---|
| 2598 | HANDLE WIN32API GetColorSpace( /*KSO Thu 21.05.1998*/
|
|---|
| 2599 | HDC hdc
|
|---|
| 2600 | )
|
|---|
| 2601 | {
|
|---|
| 2602 | dprintf(("GDI32: GetColorSpace - stub\n"));
|
|---|
| 2603 | return 0;
|
|---|
| 2604 | }
|
|---|
| 2605 | //******************************************************************************
|
|---|
| 2606 | //******************************************************************************
|
|---|
| 2607 | int WIN32API SetICMMode( /*KSO Thu 21.05.1998*/
|
|---|
| 2608 | HDC hdc,
|
|---|
| 2609 | int mode
|
|---|
| 2610 | )
|
|---|
| 2611 | {
|
|---|
| 2612 | dprintf(("GDI32: SetICMMode - stub\n"));
|
|---|
| 2613 | return 0;
|
|---|
| 2614 | }
|
|---|
| 2615 | //******************************************************************************
|
|---|
| 2616 |
|
|---|
| 2617 |
|
|---|
| 2618 |
|
|---|
| 2619 |
|
|---|
| 2620 | /*****************************************************************************
|
|---|
| 2621 | * Name : BOOL CancelDC
|
|---|
| 2622 | * Purpose : The CancelDC function cancels any pending operation on the
|
|---|
| 2623 | * specified device context (DC).
|
|---|
| 2624 | * Parameters: HDC hdc handle of device context
|
|---|
| 2625 | * Variables :
|
|---|
| 2626 | * Result : TRUE / FALSE
|
|---|
| 2627 | * Remark :
|
|---|
| 2628 | * Status : UNTESTED STUB
|
|---|
| 2629 | *
|
|---|
| 2630 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2631 | *****************************************************************************/
|
|---|
| 2632 |
|
|---|
| 2633 | BOOL WIN32API CancelDC(HDC hdc)
|
|---|
| 2634 | {
|
|---|
| 2635 | dprintf(("GDI32: CancelDC(%08xh) not implemented.\n",
|
|---|
| 2636 | hdc));
|
|---|
| 2637 |
|
|---|
| 2638 | return (FALSE);
|
|---|
| 2639 | }
|
|---|
| 2640 |
|
|---|
| 2641 |
|
|---|
| 2642 | /*****************************************************************************
|
|---|
| 2643 | * Name : BOOL CheckColorsInGamut
|
|---|
| 2644 | * Purpose : The CheckColorsInGamut function indicates whether the specified
|
|---|
| 2645 | * color values are within the gamut of the specified device.
|
|---|
| 2646 | * Parameters: HDC hdc handle of device context
|
|---|
| 2647 | * LPVOID lpaRGBQuad
|
|---|
| 2648 | * LPVOID lpResult
|
|---|
| 2649 | * DWORD dwResult
|
|---|
| 2650 | * Variables :
|
|---|
| 2651 | * Result : TRUE / FALSE
|
|---|
| 2652 | * Remark :
|
|---|
| 2653 | * Status : UNTESTED STUB
|
|---|
| 2654 | *
|
|---|
| 2655 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2656 | *****************************************************************************/
|
|---|
| 2657 |
|
|---|
| 2658 | BOOL WIN32API CheckColorsInGamut(HDC hdc,
|
|---|
| 2659 | LPVOID lpaRGBQuad,
|
|---|
| 2660 | LPVOID lpResult,
|
|---|
| 2661 | DWORD dwResult)
|
|---|
| 2662 | {
|
|---|
| 2663 | dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
|---|
| 2664 | hdc,
|
|---|
| 2665 | lpaRGBQuad,
|
|---|
| 2666 | lpResult,
|
|---|
| 2667 | dwResult));
|
|---|
| 2668 |
|
|---|
| 2669 | return (FALSE);
|
|---|
| 2670 | }
|
|---|
| 2671 |
|
|---|
| 2672 |
|
|---|
| 2673 | /*****************************************************************************
|
|---|
| 2674 | * Name : BOOL ColorMatchToTarget
|
|---|
| 2675 | * Purpose : The ColorMatchToTarget function enables or disables preview for
|
|---|
| 2676 | * the specified device context. When preview is enabled, colors
|
|---|
| 2677 | * in subsequent output to the specified device context are
|
|---|
| 2678 | * displayed as they would appear on the target device. This is
|
|---|
| 2679 | * useful for checking how well the target maps the specified
|
|---|
| 2680 | * colors in an image. To enable preview, image color matching
|
|---|
| 2681 | * must be enabled for both the target and the preview device context.
|
|---|
| 2682 | * Parameters: HDC hdc handle of device context
|
|---|
| 2683 | * HDC hdcTarget handle of target device context
|
|---|
| 2684 | * DWORD uiAction
|
|---|
| 2685 | * Variables :
|
|---|
| 2686 | * Result : TRUE / FALSE
|
|---|
| 2687 | * Remark :
|
|---|
| 2688 | * Status : UNTESTED STUB
|
|---|
| 2689 | *
|
|---|
| 2690 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2691 | *****************************************************************************/
|
|---|
| 2692 |
|
|---|
| 2693 | BOOL WIN32API ColorMatchToTarget(HDC hdc,
|
|---|
| 2694 | HDC hdcTarget,
|
|---|
| 2695 | DWORD uiAction)
|
|---|
| 2696 | {
|
|---|
| 2697 | dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
|
|---|
| 2698 | hdc,
|
|---|
| 2699 | hdcTarget,
|
|---|
| 2700 | uiAction));
|
|---|
| 2701 |
|
|---|
| 2702 | return (FALSE);
|
|---|
| 2703 | }
|
|---|
| 2704 |
|
|---|
| 2705 |
|
|---|
| 2706 | /*****************************************************************************
|
|---|
| 2707 | * Name : BOOL CombineTransform
|
|---|
| 2708 | * Purpose : The CombineTransform function concatenates two world-space to
|
|---|
| 2709 | * page-space transformations.
|
|---|
| 2710 | * Parameters: LLPXFORM lLPXFORMResult address of combined transformation
|
|---|
| 2711 | * XFORM *lLPXFORM1 address of 1st transformation
|
|---|
| 2712 | * XFORM *lLPXFORM2 address of 2nd transformation
|
|---|
| 2713 | * Variables :
|
|---|
| 2714 | * Result : TRUE / FALSE
|
|---|
| 2715 | * Remark :
|
|---|
| 2716 | * Status : UNTESTED
|
|---|
| 2717 | *
|
|---|
| 2718 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2719 | * Markus Montkowski [Wen, 1999/01/12 20:18]
|
|---|
| 2720 | *****************************************************************************/
|
|---|
| 2721 |
|
|---|
| 2722 | BOOL WIN32API CombineTransform(LPXFORM lLPXFORMResult,
|
|---|
| 2723 | CONST XFORM *lLPXFORM1,
|
|---|
| 2724 | CONST XFORM *lLPXFORM2)
|
|---|
| 2725 | {
|
|---|
| 2726 | dprintf(("GDI32: CombineTransform(%08xh,%08xh,%08xh).\n",
|
|---|
| 2727 | lLPXFORMResult,
|
|---|
| 2728 | lLPXFORM1,
|
|---|
| 2729 | lLPXFORM2));
|
|---|
| 2730 |
|
|---|
| 2731 | XFORM xfrm;
|
|---|
| 2732 | if( O32_IsBadWritePtr( (void*)lLPXFORMResult, sizeof(XFORM)) ||
|
|---|
| 2733 | O32_IsBadReadPtr( (void*)lLPXFORM1, sizeof(XFORM)) ||
|
|---|
| 2734 | O32_IsBadWritePtr( (void*)lLPXFORM2, sizeof(XFORM)) )
|
|---|
| 2735 | return (FALSE);
|
|---|
| 2736 |
|
|---|
| 2737 | // Add the translations
|
|---|
| 2738 | lLPXFORMResult->eDx = lLPXFORM1->eDx + lLPXFORM2->eDx;
|
|---|
| 2739 | lLPXFORMResult->eDy = lLPXFORM1->eDy + lLPXFORM2->eDy;
|
|---|
| 2740 |
|
|---|
| 2741 | // Multiply the matrixes
|
|---|
| 2742 | xfrm.eM11 = lLPXFORM1->eM11 * lLPXFORM2->eM11 + lLPXFORM1->eM21 * lLPXFORM1->eM12;
|
|---|
| 2743 | xfrm.eM12 = lLPXFORM1->eM11 * lLPXFORM2->eM12 + lLPXFORM1->eM12 * lLPXFORM1->eM22;
|
|---|
| 2744 | xfrm.eM21 = lLPXFORM1->eM21 * lLPXFORM2->eM11 + lLPXFORM1->eM22 * lLPXFORM1->eM21;
|
|---|
| 2745 | xfrm.eM22 = lLPXFORM1->eM21 * lLPXFORM2->eM12 + lLPXFORM1->eM22 * lLPXFORM1->eM22;
|
|---|
| 2746 |
|
|---|
| 2747 | // Now copy to resulting XFROM as the pt must not be distinct
|
|---|
| 2748 | lLPXFORMResult->eM11 = xfrm.eM11;
|
|---|
| 2749 | lLPXFORMResult->eM12 = xfrm.eM12;
|
|---|
| 2750 | lLPXFORMResult->eM21 = xfrm.eM21;
|
|---|
| 2751 | lLPXFORMResult->eM22 = xfrm.eM22;
|
|---|
| 2752 |
|
|---|
| 2753 | return (TRUE);
|
|---|
| 2754 | }
|
|---|
| 2755 |
|
|---|
| 2756 |
|
|---|
| 2757 |
|
|---|
| 2758 | /*****************************************************************************
|
|---|
| 2759 | * Name : HBRUSH CreateDIBPatternBrush
|
|---|
| 2760 | * Purpose : The CreateDIBPatternBrush function creates a logical brush that
|
|---|
| 2761 | * has the pattern specified by the specified device-independent
|
|---|
| 2762 | * bitmap (DIB). The brush can subsequently be selected into any
|
|---|
| 2763 | * device context that is associated with a device that supports
|
|---|
| 2764 | * raster operations.
|
|---|
| 2765 | * This function is provided only for compatibility with applications
|
|---|
| 2766 | * written for versions of Windows earlier than 3.0. For Win32-based
|
|---|
| 2767 | * applications, use the CreateDIBPatternBrushPt function.
|
|---|
| 2768 | * Parameters: HGLOBAL hglbDIBPacked Identifies a global memory object containing
|
|---|
| 2769 | * a packed DIB, which consists of a BITMAPINFO structure immediately
|
|---|
| 2770 | * followed by an array of bytes defining the pixels of the bitmap.
|
|---|
| 2771 | * UINT fuColorSpec color table data
|
|---|
| 2772 | * Variables :
|
|---|
| 2773 | * Result : TRUE / FALSE
|
|---|
| 2774 | * Remark :
|
|---|
| 2775 | * Status : UNTESTED
|
|---|
| 2776 | *
|
|---|
| 2777 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2778 | * Markus Montkowski [Wen, 1999/01/12 20:00]
|
|---|
| 2779 | *****************************************************************************/
|
|---|
| 2780 |
|
|---|
| 2781 | HBRUSH WIN32API CreateDIBPatternBrush( HGLOBAL hglbDIBPacked,
|
|---|
| 2782 | UINT fuColorSpec)
|
|---|
| 2783 | {
|
|---|
| 2784 | LPVOID lpMem;
|
|---|
| 2785 | HBRUSH ret = 0;
|
|---|
| 2786 | dprintf(("GDI32: CreateDIBPatternBrush(%08xh, %08xh) \n",
|
|---|
| 2787 | hglbDIBPacked,
|
|---|
| 2788 | fuColorSpec));
|
|---|
| 2789 |
|
|---|
| 2790 | lpMem = GlobalLock(hglbDIBPacked);
|
|---|
| 2791 | if(NULL!=lpMem)
|
|---|
| 2792 | {
|
|---|
| 2793 |
|
|---|
| 2794 | ret = CreateDIBPatternBrushPt( lpMem,
|
|---|
| 2795 | fuColorSpec);
|
|---|
| 2796 | GlobalUnlock(hglbDIBPacked);
|
|---|
| 2797 | }
|
|---|
| 2798 |
|
|---|
| 2799 | return (ret);
|
|---|
| 2800 | }
|
|---|
| 2801 |
|
|---|
| 2802 |
|
|---|
| 2803 |
|
|---|
| 2804 |
|
|---|
| 2805 | /*****************************************************************************
|
|---|
| 2806 | * Name : int EnumICMProfilesA
|
|---|
| 2807 | * Purpose : The EnumICMProfilesA function enumerates the different color
|
|---|
| 2808 | * profiles that the system supports for the specified device context.
|
|---|
| 2809 | * Parameters: HDC hdc
|
|---|
| 2810 | * ICMENUMPROC lpICMEnumFunc
|
|---|
| 2811 | * LPARAM lParam
|
|---|
| 2812 | * Variables :
|
|---|
| 2813 | * Result : TRUE / FALSE
|
|---|
| 2814 | * Remark :
|
|---|
| 2815 | * Status : UNTESTED STUB
|
|---|
| 2816 | *
|
|---|
| 2817 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2818 | *****************************************************************************/
|
|---|
| 2819 |
|
|---|
| 2820 | int WIN32API EnumICMProfilesA(HDC hdc,
|
|---|
| 2821 | ICMENUMPROCA lpICMEnumProc,
|
|---|
| 2822 | LPARAM lParam)
|
|---|
| 2823 | {
|
|---|
| 2824 | dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
|
|---|
| 2825 | hdc,
|
|---|
| 2826 | lpICMEnumProc,
|
|---|
| 2827 | lParam));
|
|---|
| 2828 |
|
|---|
| 2829 | return (-1);
|
|---|
| 2830 | }
|
|---|
| 2831 |
|
|---|
| 2832 |
|
|---|
| 2833 | /*****************************************************************************
|
|---|
| 2834 | * Name : int EnumICMProfilesW
|
|---|
| 2835 | * Purpose : The EnumICMProfilesW function enumerates the different color
|
|---|
| 2836 | * profiles that the system supports for the specified device context.
|
|---|
| 2837 | * Parameters: HDC hdc
|
|---|
| 2838 | * ICMENUMPROC lpICMEnumFunc
|
|---|
| 2839 | * LPARAM lParam
|
|---|
| 2840 | * Variables :
|
|---|
| 2841 | * Result : TRUE / FALSE
|
|---|
| 2842 | * Remark :
|
|---|
| 2843 | * Status : UNTESTED STUB
|
|---|
| 2844 | *
|
|---|
| 2845 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2846 | *****************************************************************************/
|
|---|
| 2847 |
|
|---|
| 2848 | int WIN32API EnumICMProfilesW(HDC hdc,
|
|---|
| 2849 | ICMENUMPROCW lpICMEnumProc,
|
|---|
| 2850 | LPARAM lParam)
|
|---|
| 2851 | {
|
|---|
| 2852 | dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
|
|---|
| 2853 | hdc,
|
|---|
| 2854 | lpICMEnumProc,
|
|---|
| 2855 | lParam));
|
|---|
| 2856 |
|
|---|
| 2857 | return (-1);
|
|---|
| 2858 | }
|
|---|
| 2859 |
|
|---|
| 2860 |
|
|---|
| 2861 | /*****************************************************************************
|
|---|
| 2862 | * Name : BOOL FixBrushOrgEx
|
|---|
| 2863 | * Purpose : The FixBrushOrgEx function is not implemented in the Win32 API.
|
|---|
| 2864 | * It is provided for compatibility with Win32s. If called, the
|
|---|
| 2865 | * function does nothing, and returns FALSE.
|
|---|
| 2866 | * Parameters: HDC, int, int, LPPOINT
|
|---|
| 2867 | * Variables :
|
|---|
| 2868 | * Result : TRUE / FALSE
|
|---|
| 2869 | * Remark : not implemented in Win32
|
|---|
| 2870 | * Status : UNTESTED STUB
|
|---|
| 2871 | *
|
|---|
| 2872 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2873 | *****************************************************************************/
|
|---|
| 2874 |
|
|---|
| 2875 | BOOL WIN32API FixBrushOrgEx(HDC hdc,
|
|---|
| 2876 | int iDummy1,
|
|---|
| 2877 | int iDummy2,
|
|---|
| 2878 | LPPOINT lpPoint)
|
|---|
| 2879 | {
|
|---|
| 2880 | dprintf(("GDI32: FixBrushOrgEx(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
|---|
| 2881 | hdc,
|
|---|
| 2882 | iDummy1,
|
|---|
| 2883 | iDummy2,
|
|---|
| 2884 | lpPoint));
|
|---|
| 2885 |
|
|---|
| 2886 | return (FALSE);
|
|---|
| 2887 | }
|
|---|
| 2888 |
|
|---|
| 2889 |
|
|---|
| 2890 | /*****************************************************************************
|
|---|
| 2891 | * Name : DWORD GdiGetBatchLimit
|
|---|
| 2892 | * Purpose : The GdiGetBatchLimit function returns the maximum number of
|
|---|
| 2893 | * function calls that can be accumulated in the calling thread's
|
|---|
| 2894 | * current batch. The system flushes the current batch whenever
|
|---|
| 2895 | * this limit is exceeded.
|
|---|
| 2896 | * Parameters:
|
|---|
| 2897 | * Variables :
|
|---|
| 2898 | * Result : 1
|
|---|
| 2899 | * Remark :
|
|---|
| 2900 | * Status : UNTESTED STUB
|
|---|
| 2901 | *
|
|---|
| 2902 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2903 | *****************************************************************************/
|
|---|
| 2904 |
|
|---|
| 2905 | DWORD WIN32API GdiGetBatchLimit(VOID)
|
|---|
| 2906 | {
|
|---|
| 2907 | dprintf(("GDI32: GdiGetBatchLimit() not implemented (1).\n"));
|
|---|
| 2908 |
|
|---|
| 2909 | return (1);
|
|---|
| 2910 | }
|
|---|
| 2911 |
|
|---|
| 2912 |
|
|---|
| 2913 | /*****************************************************************************
|
|---|
| 2914 | * Name : DWORD GdiSetBatchLimit
|
|---|
| 2915 | * Purpose : The GdiSetBatchLimit function sets the maximum number of
|
|---|
| 2916 | * functions that can be accumulated in the calling thread's current
|
|---|
| 2917 | * batch. The system flushes the current batch whenever this limit
|
|---|
| 2918 | * is exceeded.
|
|---|
| 2919 | * Parameters: DWORD dwLimit
|
|---|
| 2920 | * Variables :
|
|---|
| 2921 | * Result :
|
|---|
| 2922 | * Remark :
|
|---|
| 2923 | * Status : UNTESTED STUB
|
|---|
| 2924 | *
|
|---|
| 2925 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2926 | *****************************************************************************/
|
|---|
| 2927 |
|
|---|
| 2928 | DWORD WIN32API GdiSetBatchLimit(DWORD dwLimit)
|
|---|
| 2929 | {
|
|---|
| 2930 | dprintf(("GDI32: GdiSetBatchLimit(%08xh) not implemented (1).\n",
|
|---|
| 2931 | dwLimit));
|
|---|
| 2932 |
|
|---|
| 2933 | return (1);
|
|---|
| 2934 | }
|
|---|
| 2935 |
|
|---|
| 2936 |
|
|---|
| 2937 | /*****************************************************************************
|
|---|
| 2938 | * Name : DWORD GetCharacterPlacementA
|
|---|
| 2939 | * Purpose : The GetCharacterPlacementA function retrieves information about
|
|---|
| 2940 | * a character string, such as character widths, caret positioning,
|
|---|
| 2941 | * ordering within the string, and glyph rendering. The type of
|
|---|
| 2942 | * information returned depends on the dwFlags parameter and is
|
|---|
| 2943 | * based on the currently selected font in the given display context.
|
|---|
| 2944 | * The function copies the information to the specified GCP_RESULTSA
|
|---|
| 2945 | * structure or to one or more arrays specified by the structure.
|
|---|
| 2946 | * Parameters: HDC hdc handle to device context
|
|---|
| 2947 | * LPCSTR lpString pointer to string
|
|---|
| 2948 | * int nCount number of characters in string
|
|---|
| 2949 | * int nMaxExtent maximum extent for displayed string
|
|---|
| 2950 | * LPGCP_RESULTSA *lpResults pointer to buffer for placement result
|
|---|
| 2951 | * DWORD dwFlags placement flags
|
|---|
| 2952 | * Variables :
|
|---|
| 2953 | * Result :
|
|---|
| 2954 | * Remark :
|
|---|
| 2955 | * Status : UNTESTED STUB
|
|---|
| 2956 | *
|
|---|
| 2957 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 2958 | *****************************************************************************/
|
|---|
| 2959 |
|
|---|
| 2960 | DWORD WIN32API GetCharacterPlacementA(HDC hdc,
|
|---|
| 2961 | LPCSTR lpString,
|
|---|
| 2962 | int nCount,
|
|---|
| 2963 | int nMaxExtent,
|
|---|
| 2964 | GCP_RESULTSA * lpResults,
|
|---|
| 2965 | DWORD dwFlags)
|
|---|
| 2966 | {
|
|---|
| 2967 | dprintf(("GDI32: GetCharacterPlacementA(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
|---|
| 2968 | hdc,
|
|---|
| 2969 | lpString,
|
|---|
| 2970 | nCount,
|
|---|
| 2971 | nMaxExtent,
|
|---|
| 2972 | lpResults,
|
|---|
| 2973 | dwFlags));
|
|---|
| 2974 |
|
|---|
| 2975 | return (0);
|
|---|
| 2976 | }
|
|---|
| 2977 |
|
|---|
| 2978 |
|
|---|
| 2979 | /*****************************************************************************
|
|---|
| 2980 | * Name : DWORD GetCharacterPlacementW
|
|---|
| 2981 | * Purpose : The GetCharacterPlacementW function retrieves information about
|
|---|
| 2982 | * a character string, such as character widths, caret positioning,
|
|---|
| 2983 | * ordering within the string, and glyph rendering. The type of
|
|---|
| 2984 | * information returned depends on the dwFlags parameter and is
|
|---|
| 2985 | * based on the currently selected font in the given display context.
|
|---|
| 2986 | * The function copies the information to the specified GCP_RESULTSW
|
|---|
| 2987 | * structure or to one or more arrays specified by the structure.
|
|---|
| 2988 | * Parameters: HDC hdc handle to device context
|
|---|
| 2989 | * LPCSTR lpString pointer to string
|
|---|
| 2990 | * int nCount number of characters in string
|
|---|
| 2991 | * int nMaxExtent maximum extent for displayed string
|
|---|
| 2992 | * GCP_RESULTSW *lpResults pointer to buffer for placement result
|
|---|
| 2993 | * DWORD dwFlags placement flags
|
|---|
| 2994 | * Variables :
|
|---|
| 2995 | * Result :
|
|---|
| 2996 | * Remark :
|
|---|
| 2997 | * Status : UNTESTED STUB
|
|---|
| 2998 | *
|
|---|
| 2999 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3000 | *****************************************************************************/
|
|---|
| 3001 |
|
|---|
| 3002 | DWORD WIN32API GetCharacterPlacementW(HDC hdc,
|
|---|
| 3003 | LPCWSTR lpString,
|
|---|
| 3004 | int nCount,
|
|---|
| 3005 | int nMaxExtent,
|
|---|
| 3006 | GCP_RESULTSW *lpResults,
|
|---|
| 3007 | DWORD dwFlags)
|
|---|
| 3008 | {
|
|---|
| 3009 | dprintf(("GDI32: GetCharacterPlacementW(%08xh,%s,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
|---|
| 3010 | hdc,
|
|---|
| 3011 | lpString,
|
|---|
| 3012 | nCount,
|
|---|
| 3013 | nMaxExtent,
|
|---|
| 3014 | lpResults,
|
|---|
| 3015 | dwFlags));
|
|---|
| 3016 |
|
|---|
| 3017 | return (0);
|
|---|
| 3018 | }
|
|---|
| 3019 |
|
|---|
| 3020 |
|
|---|
| 3021 | /*****************************************************************************
|
|---|
| 3022 | * Name : DWORD GetDeviceGammaRamp
|
|---|
| 3023 | * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
|
|---|
| 3024 | * direct color display boards.
|
|---|
| 3025 | * Parameters: HDC hdc handle to device context
|
|---|
| 3026 | * LPVOID lpRamp Gamma ramp array
|
|---|
| 3027 | * Variables :
|
|---|
| 3028 | * Result :
|
|---|
| 3029 | * Remark :
|
|---|
| 3030 | * Status : UNTESTED STUB
|
|---|
| 3031 | *
|
|---|
| 3032 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3033 | *****************************************************************************/
|
|---|
| 3034 |
|
|---|
| 3035 | DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
|
|---|
| 3036 | LPVOID lpRamp)
|
|---|
| 3037 | {
|
|---|
| 3038 | dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
|
|---|
| 3039 | hdc,
|
|---|
| 3040 | lpRamp));
|
|---|
| 3041 |
|
|---|
| 3042 | return (FALSE);
|
|---|
| 3043 | }
|
|---|
| 3044 |
|
|---|
| 3045 |
|
|---|
| 3046 |
|
|---|
| 3047 |
|
|---|
| 3048 | /*****************************************************************************
|
|---|
| 3049 | * Name : BOOL GetICMProfileA
|
|---|
| 3050 | * Purpose : The GetICMProfileA function retrieves the name of the color
|
|---|
| 3051 | * profile file for the device associated with the specified device
|
|---|
| 3052 | * context.
|
|---|
| 3053 | * Parameters: HDC hdc handle to device context
|
|---|
| 3054 | * DWORD cbName
|
|---|
| 3055 | * LPTSTR lpszFilename
|
|---|
| 3056 | * Variables :
|
|---|
| 3057 | * Result : TRUE / FALSE
|
|---|
| 3058 | * Remark :
|
|---|
| 3059 | * Status : UNTESTED STUB
|
|---|
| 3060 | *
|
|---|
| 3061 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3062 | *****************************************************************************/
|
|---|
| 3063 |
|
|---|
| 3064 | BOOL WIN32API GetICMProfileA(HDC hdc,
|
|---|
| 3065 | DWORD cbName,
|
|---|
| 3066 | LPTSTR lpszFilename)
|
|---|
| 3067 | {
|
|---|
| 3068 | dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
|
|---|
| 3069 | hdc,
|
|---|
| 3070 | cbName,
|
|---|
| 3071 | lpszFilename));
|
|---|
| 3072 |
|
|---|
| 3073 | return (FALSE);
|
|---|
| 3074 | }
|
|---|
| 3075 |
|
|---|
| 3076 |
|
|---|
| 3077 | /*****************************************************************************
|
|---|
| 3078 | * Name : BOOL GetICMProfileW
|
|---|
| 3079 | * Purpose : The GetICMProfileW function retrieves the name of the color
|
|---|
| 3080 | * profile file for the device associated with the specified device
|
|---|
| 3081 | * context.
|
|---|
| 3082 | * Parameters: HDC hdc handle to device context
|
|---|
| 3083 | * DWORD cbName
|
|---|
| 3084 | * LPWSTR lpszFilename
|
|---|
| 3085 | * Variables :
|
|---|
| 3086 | * Result : TRUE / FALSE
|
|---|
| 3087 | * Remark :
|
|---|
| 3088 | * Status : UNTESTED STUB
|
|---|
| 3089 | *
|
|---|
| 3090 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3091 | *****************************************************************************/
|
|---|
| 3092 |
|
|---|
| 3093 | BOOL WIN32API GetICMProfileW(HDC hdc,
|
|---|
| 3094 | DWORD cbName,
|
|---|
| 3095 | LPTSTR lpszFilename)
|
|---|
| 3096 | {
|
|---|
| 3097 | dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
|
|---|
| 3098 | hdc,
|
|---|
| 3099 | cbName,
|
|---|
| 3100 | lpszFilename));
|
|---|
| 3101 |
|
|---|
| 3102 | return (FALSE);
|
|---|
| 3103 | }
|
|---|
| 3104 |
|
|---|
| 3105 |
|
|---|
| 3106 | /*****************************************************************************
|
|---|
| 3107 | * Name : BOOL GetLogColorSpaceA
|
|---|
| 3108 | * Purpose : The GetLogColorSpace function retrieves information about the
|
|---|
| 3109 | * logical color space identified by the specified handle.
|
|---|
| 3110 | * Parameters: HCOLORSPACE hColorSpace
|
|---|
| 3111 | * LPLOGCOLORSPACE lpbuffer
|
|---|
| 3112 | * DWORD nSize
|
|---|
| 3113 | * Variables :
|
|---|
| 3114 | * Result : TRUE / FALSE
|
|---|
| 3115 | * Remark :
|
|---|
| 3116 | * Status : UNTESTED STUB
|
|---|
| 3117 | *
|
|---|
| 3118 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3119 | *****************************************************************************/
|
|---|
| 3120 |
|
|---|
| 3121 | #define LPLOGCOLORSPACE LPVOID
|
|---|
| 3122 | BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
|
|---|
| 3123 | LPLOGCOLORSPACE lpBuffer,
|
|---|
| 3124 | DWORD nSize)
|
|---|
| 3125 | {
|
|---|
| 3126 | dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
|
|---|
| 3127 | hColorSpace,
|
|---|
| 3128 | lpBuffer,
|
|---|
| 3129 | nSize));
|
|---|
| 3130 |
|
|---|
| 3131 | return (FALSE);
|
|---|
| 3132 | }
|
|---|
| 3133 |
|
|---|
| 3134 |
|
|---|
| 3135 | /*****************************************************************************
|
|---|
| 3136 | * Name : BOOL GetLogColorSpaceW
|
|---|
| 3137 | * Purpose : The GetLogColorSpace function retrieves information about the
|
|---|
| 3138 | * logical color space identified by the specified handle.
|
|---|
| 3139 | * Parameters: HCOLORSPACE hColorSpace
|
|---|
| 3140 | * LPLOGCOLORSPACE lpbuffer
|
|---|
| 3141 | * DWORD nSize
|
|---|
| 3142 | * Variables :
|
|---|
| 3143 | * Result : TRUE / FALSE
|
|---|
| 3144 | * Remark :
|
|---|
| 3145 | * Status : UNTESTED STUB
|
|---|
| 3146 | *
|
|---|
| 3147 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3148 | *****************************************************************************/
|
|---|
| 3149 |
|
|---|
| 3150 | BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
|
|---|
| 3151 | LPLOGCOLORSPACE lpBuffer,
|
|---|
| 3152 | DWORD nSize)
|
|---|
| 3153 | {
|
|---|
| 3154 | dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
|
|---|
| 3155 | hColorSpace,
|
|---|
| 3156 | lpBuffer,
|
|---|
| 3157 | nSize));
|
|---|
| 3158 |
|
|---|
| 3159 | return (FALSE);
|
|---|
| 3160 | }
|
|---|
| 3161 |
|
|---|
| 3162 |
|
|---|
| 3163 | /*****************************************************************************
|
|---|
| 3164 | * Name : int GetMetaRgn
|
|---|
| 3165 | * Purpose : The GetMetaRgn function retrieves the current metaregion for
|
|---|
| 3166 | * the specified device context.
|
|---|
| 3167 | * Parameters: HDC hdc handle of device context
|
|---|
| 3168 | * HRGN hrgn handle of region
|
|---|
| 3169 | * Variables :
|
|---|
| 3170 | * Result : 0 / 1
|
|---|
| 3171 | * Remark :
|
|---|
| 3172 | * Status : UNTESTED STUB
|
|---|
| 3173 | *
|
|---|
| 3174 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3175 | *****************************************************************************/
|
|---|
| 3176 |
|
|---|
| 3177 | int WIN32API GetMetaRgn(HDC hdc,
|
|---|
| 3178 | HRGN hrgn)
|
|---|
| 3179 | {
|
|---|
| 3180 | dprintf(("GDI32: GetMetaRgn(%08xh, %08xh) not implemented.\n",
|
|---|
| 3181 | hdc,
|
|---|
| 3182 | hrgn));
|
|---|
| 3183 |
|
|---|
| 3184 | return (0);
|
|---|
| 3185 | }
|
|---|
| 3186 |
|
|---|
| 3187 | /*****************************************************************************
|
|---|
| 3188 | * Name : BOOL SetDeviceGammaRamp
|
|---|
| 3189 | * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
|
|---|
| 3190 | * color display boards.
|
|---|
| 3191 | * Parameters: HDC hdc handle of device context
|
|---|
| 3192 | * LPVOID lpRamp
|
|---|
| 3193 | * Variables :
|
|---|
| 3194 | * Result : TRUE / FALSE
|
|---|
| 3195 | * Remark :
|
|---|
| 3196 | * Status : UNTESTED STUB
|
|---|
| 3197 | *
|
|---|
| 3198 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3199 | *****************************************************************************/
|
|---|
| 3200 |
|
|---|
| 3201 | BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
|
|---|
| 3202 | LPVOID lpRamp)
|
|---|
| 3203 | {
|
|---|
| 3204 | dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
|
|---|
| 3205 | hdc,
|
|---|
| 3206 | lpRamp));
|
|---|
| 3207 |
|
|---|
| 3208 | return (FALSE);
|
|---|
| 3209 | }
|
|---|
| 3210 |
|
|---|
| 3211 |
|
|---|
| 3212 | /*****************************************************************************
|
|---|
| 3213 | * Name : BOOL SetICMProfileA
|
|---|
| 3214 | * Purpose : The SetICMProfileA function sets the color profile for the
|
|---|
| 3215 | * specified device context.
|
|---|
| 3216 | * Parameters: HDC hdc handle of device context
|
|---|
| 3217 | * LPTSTR lpFileName
|
|---|
| 3218 | * Variables :
|
|---|
| 3219 | * Result : TRUE / FALSE
|
|---|
| 3220 | * Remark :
|
|---|
| 3221 | * Status : UNTESTED STUB
|
|---|
| 3222 | *
|
|---|
| 3223 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3224 | *****************************************************************************/
|
|---|
| 3225 |
|
|---|
| 3226 | BOOL WIN32API SetICMProfileA(HDC hdc,
|
|---|
| 3227 | LPTSTR lpFileName)
|
|---|
| 3228 | {
|
|---|
| 3229 | dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
|
|---|
| 3230 | hdc,
|
|---|
| 3231 | lpFileName));
|
|---|
| 3232 |
|
|---|
| 3233 | return (FALSE);
|
|---|
| 3234 | }
|
|---|
| 3235 |
|
|---|
| 3236 |
|
|---|
| 3237 | /*****************************************************************************
|
|---|
| 3238 | * Name : BOOL SetICMProfileW
|
|---|
| 3239 | * Purpose : The SetICMProfileW function sets the color profile for the
|
|---|
| 3240 | * specified device context.
|
|---|
| 3241 | * Parameters: HDC hdc handle of device context
|
|---|
| 3242 | * LPTSTR lpFileName
|
|---|
| 3243 | * Variables :
|
|---|
| 3244 | * Result : TRUE / FALSE
|
|---|
| 3245 | * Remark :
|
|---|
| 3246 | * Status : UNTESTED STUB
|
|---|
| 3247 | *
|
|---|
| 3248 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3249 | *****************************************************************************/
|
|---|
| 3250 |
|
|---|
| 3251 | BOOL WIN32API SetICMProfileW(HDC hdc,
|
|---|
| 3252 | LPWSTR lpFileName)
|
|---|
| 3253 | {
|
|---|
| 3254 | dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
|
|---|
| 3255 | hdc,
|
|---|
| 3256 | lpFileName));
|
|---|
| 3257 |
|
|---|
| 3258 | return (FALSE);
|
|---|
| 3259 | }
|
|---|
| 3260 |
|
|---|
| 3261 |
|
|---|
| 3262 | /*****************************************************************************
|
|---|
| 3263 | * Name : int SetMetaRgn
|
|---|
| 3264 | * Purpose : The SetMetaRgn function intersects the current clipping region
|
|---|
| 3265 | * for the specified device context with the current metaregion
|
|---|
| 3266 | * and saves the combined region as the new metaregion for the
|
|---|
| 3267 | * specified device context. The clipping region is reset to a null region.
|
|---|
| 3268 | * Parameters: HDC hdc handle of device context
|
|---|
| 3269 | * Variables :
|
|---|
| 3270 | * Result : TRUE / FALSE
|
|---|
| 3271 | * Remark :
|
|---|
| 3272 | * Status : UNTESTED STUB
|
|---|
| 3273 | *
|
|---|
| 3274 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3275 | *****************************************************************************/
|
|---|
| 3276 |
|
|---|
| 3277 | BOOL WIN32API SetMetaRgn(HDC hdc)
|
|---|
| 3278 | {
|
|---|
| 3279 | dprintf(("GDI32: SetMetaRgn(%08xh) not implemented.\n",
|
|---|
| 3280 | hdc));
|
|---|
| 3281 |
|
|---|
| 3282 | return (NULLREGION);
|
|---|
| 3283 | }
|
|---|
| 3284 |
|
|---|
| 3285 |
|
|---|
| 3286 | /*****************************************************************************
|
|---|
| 3287 | * Name : BOOL UpdateICMRegKeyA
|
|---|
| 3288 | * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
|
|---|
| 3289 | * registry entries that identify ICC color profiles or color-matching
|
|---|
| 3290 | * DLLs. The function carries out the action specified by the nCommand
|
|---|
| 3291 | * parameter.
|
|---|
| 3292 | * Parameters: DWORD dwReserved
|
|---|
| 3293 | * DWORD CMID
|
|---|
| 3294 | * LPTSTR lpszFileName
|
|---|
| 3295 | * UINT nCommand
|
|---|
| 3296 | * Variables :
|
|---|
| 3297 | * Result : TRUE / FALSE
|
|---|
| 3298 | * Remark :
|
|---|
| 3299 | * Status : UNTESTED STUB
|
|---|
| 3300 | *
|
|---|
| 3301 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3302 | *****************************************************************************/
|
|---|
| 3303 |
|
|---|
| 3304 | BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
|
|---|
| 3305 | DWORD CMID,
|
|---|
| 3306 | LPTSTR lpszFileName,
|
|---|
| 3307 | UINT nCommand)
|
|---|
| 3308 | {
|
|---|
| 3309 | dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
|
|---|
| 3310 | dwReserved,
|
|---|
| 3311 | CMID,
|
|---|
| 3312 | lpszFileName,
|
|---|
| 3313 | nCommand));
|
|---|
| 3314 |
|
|---|
| 3315 | return (FALSE);
|
|---|
| 3316 | }
|
|---|
| 3317 |
|
|---|
| 3318 |
|
|---|
| 3319 | /*****************************************************************************
|
|---|
| 3320 | * Name : BOOL UpdateICMRegKeyW
|
|---|
| 3321 | * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
|
|---|
| 3322 | * registry entries that identify ICC color profiles or color-matching
|
|---|
| 3323 | * DLLs. The function carries out the action specified by the nCommand
|
|---|
| 3324 | * parameter.
|
|---|
| 3325 | * Parameters: DWORD dwReserved
|
|---|
| 3326 | * DWORD CMID
|
|---|
| 3327 | * LPWSTR lpszFileName
|
|---|
| 3328 | * UINT nCommand
|
|---|
| 3329 | * Variables :
|
|---|
| 3330 | * Result : TRUE / FALSE
|
|---|
| 3331 | * Remark :
|
|---|
| 3332 | * Status : UNTESTED STUB
|
|---|
| 3333 | *
|
|---|
| 3334 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
|---|
| 3335 | *****************************************************************************/
|
|---|
| 3336 |
|
|---|
| 3337 | BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
|
|---|
| 3338 | DWORD CMID,
|
|---|
| 3339 | LPWSTR lpszFileName,
|
|---|
| 3340 | UINT nCommand)
|
|---|
| 3341 | {
|
|---|
| 3342 | dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
|
|---|
| 3343 | dwReserved,
|
|---|
| 3344 | CMID,
|
|---|
| 3345 | lpszFileName,
|
|---|
| 3346 | nCommand));
|
|---|
| 3347 |
|
|---|
| 3348 | return (FALSE);
|
|---|
| 3349 | }
|
|---|
| 3350 |
|
|---|
| 3351 |
|
|---|
| 3352 |
|
|---|