- Timestamp:
- Nov 26, 2002, 11:53:12 AM (23 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/blit.cpp
r9355 r9429 1 /* $Id: blit.cpp,v 1.4 0 2002-10-28 12:21:51sandervl Exp $ */1 /* $Id: blit.cpp,v 1.41 2002-11-26 10:53:06 sandervl Exp $ */ 2 2 3 3 /* … … 47 47 rc = dsect->BitBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, 48 48 nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, dwRop); 49 dprintf(("GDI32: StretchBlt returned %d", rc));50 49 return rc; 51 50 } … … 330 329 } 331 330 return rc; 332 333 //SvL: Breaks startup bitmap of Acrobat Reader 4.05334 #if 0335 else336 if(info->bmiHeader.biBitCount == 8 && info->bmiHeader.biCompression == 0 && !(GetDeviceCaps( hdc, RASTERCAPS ) & RC_PALETTE)) {337 INT rc = 0;338 // convert 8bit to 24bit339 340 BITMAPINFO newInfo;341 newInfo.bmiHeader = info->bmiHeader;342 newInfo.bmiHeader.biBitCount = 24;343 long lLineByte24 = ((newInfo.bmiHeader.biWidth * 24 + 31) / 32) * 4;344 long lLineByte8 = ((newInfo.bmiHeader.biWidth * 8 + 31) / 32) * 4;345 long lHeight = newInfo.bmiHeader.biHeight;346 if(lHeight < 0) lHeight = -lHeight;347 348 char *newBits = (char *)malloc( lLineByte24 * lHeight );349 if(newBits) {350 //351 // Get Palette Entries352 //353 PALETTEENTRY aEntries[256];354 LOGPALETTE *pLog = (LOGPALETTE *)malloc( sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * 256 );355 pLog->palVersion = 0x300;356 pLog->palNumEntries = 256;357 358 HPALETTE hPaletteDummy = CreatePalette( pLog );359 free( pLog );360 HPALETTE hPalette = SelectPalette( hdc, hPaletteDummy, FALSE );361 GetPaletteEntries( hPalette, 0, 255, aEntries );362 SelectPalette( hdc, hPalette, FALSE );363 DeleteObject( hPaletteDummy );364 365 //366 // convert 8bit to 24bit367 //368 if(newInfo.bmiHeader.biHeight > 0) {369 unsigned char *pbSrc = (unsigned char *)bits;370 unsigned char *pbDst = (unsigned char *)newBits;371 for(int y = 0; y < lHeight; y++) {372 for(int x = 0; x < newInfo.bmiHeader.biWidth; x++) {373 PALETTEENTRY src = aEntries[pbSrc[x]];374 pbDst[x * 3 + 0] = src.peBlue;375 pbDst[x * 3 + 1] = src.peGreen;376 pbDst[x * 3 + 2] = src.peRed;377 }378 pbDst += lLineByte24;379 pbSrc += lLineByte8;380 }381 } else {382 // upside down383 newInfo.bmiHeader.biHeight = -info->bmiHeader.biHeight;384 unsigned char *pbSrc = (unsigned char *)bits + lLineByte8 * (lHeight - 1);385 unsigned char *pbDst = (unsigned char *)newBits;386 for(int y = 0; y < lHeight; y++) {387 for(int x = 0; x < newInfo.bmiHeader.biWidth; x++) {388 PALETTEENTRY src = aEntries[pbSrc[x]];389 pbDst[x * 3 + 0] = src.peBlue;390 pbDst[x * 3 + 1] = src.peGreen;391 pbDst[x * 3 + 2] = src.peRed;392 }393 pbDst += lLineByte24;394 pbSrc -= lLineByte8;395 }396 }397 rc = SetDIBitsToDevice_( hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (void *)newBits, &newInfo, DIB_RGB_COLORS );398 free( newBits );399 }400 return rc;401 }402 #endif403 331 } 404 332 //****************************************************************************** … … 427 355 } 428 356 } 429 430 dprintf(("GDI32: PatBlt hdc %x (%d,%d) (%d,%d) returned %d\n",hdc, nXLeft,nYLeft,nWidth,nHeight,rc));431 357 return(rc); 432 358 } … … 435 361 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) 436 362 { 437 dprintf(("GDI32: MaskBlt"));438 363 return O32_MaskBlt(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); 439 364 } … … 541 466 xSrc, ySrc)/sizeof(WORD); 542 467 newbits = (WORD *) HeapAlloc(GetProcessHeap(), 0, imgsize); 468 //bugbug (too much) 469 //bugbug 543 470 if(CPUFeatures & CPUID_MMX) { 544 471 RGB555to565MMX(newbits, (WORD *)bits+offset, imgsize/sizeof(WORD)); … … 548 475 bits = newbits; 549 476 } 550 //SvL: Ignore BI_BITFIELDS type (S etDIBitsToDevicefails otherwise)477 //SvL: Ignore BI_BITFIELDS type (StretchDIBits fails otherwise) 551 478 if(info->bmiHeader.biCompression == BI_BITFIELDS) { 552 479 ((BITMAPINFO *)info)->bmiHeader.biCompression = 0; … … 629 556 int WIN32API SetStretchBltMode( HDC arg1, int arg2) 630 557 { 631 dprintf(("GDI32: SetStretchBltMode 0x%08X, 0x%08X\n",arg1, arg2));632 633 558 if(DIBSection::getSection() != NULL) 634 559 { … … 645 570 int WIN32API GetStretchBltMode( HDC arg1) 646 571 { 647 dprintf(("GDI32: GetStretchBltMode"));648 572 return O32_GetStretchBltMode(arg1); 649 573 } -
trunk/src/gdi32/dbglocal.cpp
r8871 r9429 1 /* $Id: dbglocal.cpp,v 1. 8 2002-07-15 10:02:28sandervl Exp $ */1 /* $Id: dbglocal.cpp,v 1.9 2002-11-26 10:53:07 sandervl Exp $ */ 2 2 3 3 /* … … 41 41 "objhandle", 42 42 "transform", 43 "printer" 43 "printer", 44 "icm", 45 "trace" 44 46 }; 45 47 //****************************************************************************** -
trunk/src/gdi32/dbglocal.h
r6375 r9429 1 /* $Id: dbglocal.h,v 1. 7 2001-07-20 15:35:57 sandervl Exp $ */1 /* $Id: dbglocal.h,v 1.8 2002-11-26 10:53:07 sandervl Exp $ */ 2 2 3 3 /* … … 40 40 #define DBG_transform 18 41 41 #define DBG_printer 19 42 #define DBG_MAXFILES 20 42 #define DBG_icm 20 43 #define DBG_trace 21 44 #define DBG_MAXFILES 22 43 45 44 46 extern USHORT DbgEnabledGDI32[DBG_MAXFILES]; -
trunk/src/gdi32/dibitmap.cpp
r9359 r9429 1 /* $Id: dibitmap.cpp,v 1.3 4 2002-10-28 13:24:44sandervl Exp $ */1 /* $Id: dibitmap.cpp,v 1.35 2002-11-26 10:53:07 sandervl Exp $ */ 2 2 3 3 /* … … 159 159 160 160 hBitmap = O32_CreateCompatibleBitmap(hdc, nWidth, nHeight); 161 dprintf(("GDI32: CreateCompatibleBitmap %x (%d,%d) returned %x", hdc, nWidth, nHeight, hBitmap));162 161 if(hBitmap) { 163 162 STATS_CreateCompatibleBitmap(hBitmap,hdc, nWidth, nHeight); … … 186 185 187 186 hBitmap = O32_CreateBitmap(nWidth, nHeight, cPlanes, cBitsPerPel, lpvBits); 188 dprintf(("GDI32: CreateBitmap (%d,%d) bps %d returned %x", nWidth, nHeight, cBitsPerPel, hBitmap));189 187 if(hBitmap) STATS_CreateBitmap(hBitmap,nWidth, nHeight, cPlanes, cBitsPerPel, lpvBits); 190 191 188 return(hBitmap); 192 189 } … … 200 197 hBitmap = O32_CreateBitmapIndirect(pBitmap); 201 198 if(hBitmap) STATS_CreateBitmapIndirect(hBitmap, pBitmap); 202 203 dprintf(("GDI32: CreateBitmapIndirect returned %x", hBitmap));204 199 return hBitmap; 205 200 } … … 374 369 { 375 370 int nrlines; 371 pDCData pHps; 372 HDC hdcMem; 376 373 377 374 dprintf(("GDI32: GetDIBits %x %x %d %d %x %x (biBitCount %d) %d", hdc, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, lpbi->bmiHeader.biBitCount, uUsage)); 378 375 379 376 //SvL: WGSS screws up the DC if it's a memory DC 380 // TODO: Fix in WGSS 381 HDC hdcMem = CreateCompatibleDC(0); 377 // TODO: Fix in WGSS (tries to select another bitmap in the DC which fails) 378 pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); 379 if(!pHps) 380 { 381 SetLastError(ERROR_INVALID_HANDLE); 382 return 0; 383 } 384 if(pHps->isMemoryPS) { 385 hdcMem = CreateCompatibleDC(0); 386 } 387 else hdcMem = hdc; 382 388 383 389 if(lpbi->bmiHeader.biHeight < 0) { … … 394 400 } 395 401 396 DeleteDC(hdcMem); 402 if(pHps->isMemoryPS) 403 DeleteDC(hdcMem); 397 404 398 405 if(lpvBits) { … … 447 454 nrlines = cScanLines; 448 455 } 449 dprintf(("GDI32: GetDIBits returned %d", nrlines));450 456 return nrlines; 451 457 } -
trunk/src/gdi32/font.cpp
r8871 r9429 1 /* $Id: font.cpp,v 1.2 6 2002-07-15 10:02:28 sandervl Exp $ */1 /* $Id: font.cpp,v 1.27 2002-11-26 10:53:08 sandervl Exp $ */ 2 2 3 3 /* … … 147 147 //****************************************************************************** 148 148 //****************************************************************************** 149 ODINFUNCTIONNODBG14(HFONT, CreateFontA, int,nHeight,150 int,nWidth,151 int,nEscapement,152 int,nOrientation,153 int,fnWeight,154 DWORD,fdwItalic,155 DWORD,fdwUnderline,156 DWORD,fdwStrikeOut,157 DWORD,fdwCharSet,158 DWORD,fdwOutputPrecision,159 DWORD,fdwClipPrecision,160 DWORD,fdwQuality,161 DWORD,fdwPitchAndFamily,162 LPCSTR,lpszFace)149 HFONT WIN32API CreateFontA(int nHeight, 150 int nWidth, 151 int nEscapement, 152 int nOrientation, 153 int fnWeight, 154 DWORD fdwItalic, 155 DWORD fdwUnderline, 156 DWORD fdwStrikeOut, 157 DWORD fdwCharSet, 158 DWORD fdwOutputPrecision, 159 DWORD fdwClipPrecision, 160 DWORD fdwQuality, 161 DWORD fdwPitchAndFamily, 162 LPCSTR lpszFace) 163 163 { 164 164 CHAR lpstrFaceNew[LF_FACESIZE]; … … 201 201 //****************************************************************************** 202 202 //****************************************************************************** 203 ODINFUNCTIONNODBG14(HFONT, CreateFontW, 204 int, nHeight, 205 int, nWidth, 206 int, nEscapement, 207 int, nOrientation, 208 int, fnWeight, 209 DWORD, fdwItalic, 210 DWORD, fdwUnderline, 211 DWORD, fdwStrikeOut, 212 DWORD, fdwCharSet, 213 DWORD, fdwOutputPrecision, 214 DWORD, fdwClipPrecision, 215 DWORD, fdwQuality, 216 DWORD, fdwPitchAndFamily, 217 LPCWSTR,lpszFace) 203 HFONT WIN32API CreateFontW(int nHeight, 204 int nWidth, 205 int nEscapement, 206 int nOrientation, 207 int fnWeight, 208 DWORD fdwItalic, 209 DWORD fdwUnderline, 210 DWORD fdwStrikeOut, 211 DWORD fdwCharSet, 212 DWORD fdwOutputPrecision, 213 DWORD fdwClipPrecision, 214 DWORD fdwQuality, 215 DWORD fdwPitchAndFamily, 216 LPCWSTR lpszFace) 218 217 { 219 218 char *astring; … … 249 248 //****************************************************************************** 250 249 //****************************************************************************** 251 ODINFUNCTION1(HFONT,CreateFontIndirectA,const LOGFONTA*,lplf)250 HFONT WIN32API CreateFontIndirectA(const LOGFONTA* lplf) 252 251 { 253 252 HFONT hFont; … … 284 283 //****************************************************************************** 285 284 //****************************************************************************** 286 ODINFUNCTION1(HFONT, CreateFontIndirectW,const LOGFONTW *,lplf)285 HFONT WIN32API CreateFontIndirectW(const LOGFONTW * lplf) 287 286 { 288 287 LOGFONTA afont; … … 433 432 //****************************************************************************** 434 433 //****************************************************************************** 435 ODINFUNCTION4(int, EnumFontsA, 436 HDC, hdc, 437 LPCSTR, arg2, 438 FONTENUMPROCA, arg3, 439 LPARAM, arg4) 434 int WIN32API EnumFontsA(HDC hdc, 435 LPCSTR arg2, 436 FONTENUMPROCA arg3, 437 LPARAM arg4) 440 438 { 441 439 //@@@PH shouldn't this rather be O32_EnumFonts ? … … 444 442 //****************************************************************************** 445 443 //****************************************************************************** 446 ODINFUNCTION4(int, EnumFontsW, 447 HDC, hdc, 448 LPCWSTR, arg2, 449 FONTENUMPROCW, arg3, 450 LPARAM, arg4) 444 int WIN32API EnumFontsW(HDC hdc, 445 LPCWSTR arg2, 446 FONTENUMPROCW arg3, 447 LPARAM arg4) 451 448 { 452 449 //@@@PH shouldn't this rather be O32_EnumFonts ? … … 455 452 //****************************************************************************** 456 453 //****************************************************************************** 457 ODINFUNCTION4(int, EnumFontFamiliesA, 458 HDC, hdc, 459 LPCSTR, lpszFontFamily, 460 FONTENUMPROCA, arg3, 461 LPARAM, arg4) 454 int WIN32API EnumFontFamiliesA(HDC hdc, 455 LPCSTR lpszFontFamily, 456 FONTENUMPROCA arg3, 457 LPARAM arg4) 462 458 { 463 459 ENUMUSERDATA enumData; … … 478 474 //****************************************************************************** 479 475 //****************************************************************************** 480 ODINFUNCTION4(int, EnumFontFamiliesW, 481 HDC, hdc, 482 LPCWSTR, lpszFontFamilyW, 483 FONTENUMPROCW, arg3, 484 LPARAM, arg4) 476 int WIN32API EnumFontFamiliesW(HDC hdc, 477 LPCWSTR lpszFontFamilyW, 478 FONTENUMPROCW arg3, 479 LPARAM arg4) 485 480 { 486 481 CHAR lpstrFamilyNew[LF_FACESIZE] = ""; … … 503 498 //****************************************************************************** 504 499 //****************************************************************************** 505 ODINFUNCTION5(INT, EnumFontFamiliesExA, 506 HDC, hdc, 507 LPLOGFONTA, arg2, 508 FONTENUMPROCEXA, arg3, 509 LPARAM, arg4, 510 DWORD, dwFlags) 500 INT WIN32API EnumFontFamiliesExA(HDC hdc, 501 LPLOGFONTA arg2, 502 FONTENUMPROCEXA arg3, 503 LPARAM arg4, 504 DWORD dwFlags) 511 505 { 512 506 ENUMUSERDATA enumData; … … 525 519 //****************************************************************************** 526 520 //****************************************************************************** 527 ODINFUNCTION5(INT, EnumFontFamiliesExW, 528 HDC, hdc, 529 LPLOGFONTW, arg2, 530 FONTENUMPROCEXW, arg3, 531 LPARAM, arg4, 532 DWORD, dwFlags) 521 INT WIN32API EnumFontFamiliesExW(HDC hdc, 522 LPLOGFONTW arg2, 523 FONTENUMPROCEXW arg3, 524 LPARAM arg4, 525 DWORD dwFlags) 533 526 { 534 527 ENUMUSERDATA enumData; … … 549 542 //****************************************************************************** 550 543 //****************************************************************************** 551 ODINFUNCTION5(DWORD, GetFontData, 552 HDC, hdc, 553 DWORD, dwTable, 554 DWORD, dwOffset, 555 LPVOID, lpvBuffer, 556 DWORD, dbData) 544 DWORD WIN32API GetFontData(HDC hdc, DWORD dwTable, 545 DWORD dwOffset, 546 LPVOID lpvBuffer, 547 DWORD dbData) 557 548 { 558 549 dprintf(("GDI32: GetFontData, not implemented (GDI_ERROR)\n")); … … 563 554 //****************************************************************************** 564 555 //****************************************************************************** 565 ODINFUNCTION1(int, AddFontResourceA, 566 LPCSTR, szFont) 556 int WIN32API AddFontResourceA(LPCSTR szFont) 567 557 { 568 558 HINSTANCE hInstance; … … 579 569 //****************************************************************************** 580 570 //****************************************************************************** 581 ODINFUNCTION1(int, AddFontResourceW, 582 LPCWSTR, szFont) 571 int WIN32API AddFontResourceW(LPCWSTR szFont) 583 572 { 584 573 char *astring = UnicodeToAsciiString((LPWSTR)szFont); … … 593 582 //****************************************************************************** 594 583 //****************************************************************************** 595 ODINFUNCTION1(BOOL, RemoveFontResourceA, 596 LPCSTR, arg1) 584 BOOL WIN32API RemoveFontResourceA(LPCSTR arg1) 597 585 { 598 586 dprintf(("GDI32: RemoveFontResourceA %s\n", arg1)); … … 601 589 //****************************************************************************** 602 590 //****************************************************************************** 603 ODINFUNCTION1(BOOL, RemoveFontResourceW, 604 LPCWSTR, szFont) 591 BOOL WIN32API RemoveFontResourceW(LPCWSTR szFont) 605 592 { 606 593 char *astring = UnicodeToAsciiString((LPWSTR)szFont); … … 628 615 *****************************************************************************/ 629 616 630 ODINFUNCTION4(BOOL, CreateScalableFontResourceA, 631 DWORD, fdwHidden, 632 LPCSTR, lpszFontRes, 633 LPCSTR, lpszFontFile, 634 LPCSTR, lpszCurrentPath) 617 BOOL WIN32API CreateScalableFontResourceA(DWORD fdwHidden, 618 LPCSTR lpszFontRes, 619 LPCSTR lpszFontFile, 620 LPCSTR lpszCurrentPath) 635 621 { 636 622 dprintf(("GDI32: CreateScalableFontResourceA not implemented.\n")); … … 656 642 *****************************************************************************/ 657 643 658 ODINFUNCTION4(BOOL, CreateScalableFontResourceW, 659 DWORD, fdwHidden, 660 LPCWSTR, lpszFontRes, 661 LPCWSTR, lpszFontFile, 662 LPCWSTR, lpszCurrentPath) 644 BOOL WIN32API CreateScalableFontResourceW(DWORD fdwHidden, 645 LPCWSTR lpszFontRes, 646 LPCWSTR lpszFontFile, 647 LPCWSTR lpszCurrentPath) 663 648 { 664 649 dprintf(("GDI32: CreateScalableFontResourceW not implemented.\n")); … … 683 668 *****************************************************************************/ 684 669 685 ODINFUNCTION1(DWORD, GetFontLanguageInfo, 686 HDC, hdc) 670 DWORD WIN32API GetFontLanguageInfo(HDC hdc) 687 671 { 688 672 dprintf(("GDI32: GetFontLanguageInfo(%08xh) not implemented.\n", … … 714 698 * DWORD flags determines interpretation of lpSrc 715 699 */ 716 ODINFUNCTION3(BOOL, TranslateCharsetInfo, 717 LPDWORD, lpSrc, 718 LPCHARSETINFO, lpCs, 719 DWORD, flags) 700 BOOL WIN32API TranslateCharsetInfo(LPDWORD lpSrc, LPCHARSETINFO lpCs, 701 DWORD flags) 720 702 { 721 703 int index = 0; -
trunk/src/gdi32/gdi32.cpp
r9385 r9429 1 /* $Id: gdi32.cpp,v 1.8 4 2002-11-04 13:30:36sandervl Exp $ */1 /* $Id: gdi32.cpp,v 1.85 2002-11-26 10:53:08 sandervl Exp $ */ 2 2 3 3 /* … … 39 39 COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor) 40 40 { 41 dprintf(("GDI32: SetBkColor %x to %x", hdc, crColor));42 41 return(O32_SetBkColor(hdc, crColor)); 43 42 } … … 46 45 COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor) 47 46 { 48 COLORREF clr; 49 50 dprintf(("GDI32: SetTextColor %x to %x", hdc, crColor)); 51 clr = O32_SetTextColor(hdc, crColor); 52 return(clr); 47 return O32_SetTextColor(hdc, crColor); 53 48 } 54 49 //****************************************************************************** … … 77 72 break; 78 73 } 79 dprintf(("GDI32: GetStockObject %d returned %X\n", arg1, obj));80 74 return(obj); 81 75 } 82 76 //****************************************************************************** 83 77 //****************************************************************************** 84 ODINFUNCTION3(HPEN, CreatePen, int, fnPenStyle, int, nWidth, COLORREF,crColor)78 HPEN WIN32API CreatePen(int fnPenStyle, int nWidth, COLORREF crColor) 85 79 { 86 80 HPEN hPen; … … 100 94 HPEN hPen; 101 95 102 dprintf(("GDI32: CreatePenIndirect %x", lplgpn));103 96 hPen = O32_CreatePenIndirect(lplgpn); 104 97 if(hPen) STATS_CreatePenIndirect(hPen, lplgpn); … … 113 106 114 107 hPen = O32_ExtCreatePen(dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle); 115 dprintf(("GDI32: ExtCreatePen %x %x %x %x %x returned %x", dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle, hPen));116 108 if(hPen) STATS_ExtCreatePen(hPen, dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle); 117 109 return hPen; … … 125 117 hBrush = O32_CreatePatternBrush(hBitmap); 126 118 if(hBrush) STATS_CreatePatternBrush(hBrush, hBitmap); 127 128 dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", hBitmap, hBrush));129 119 return(hBrush); 130 120 } 131 121 //****************************************************************************** 132 122 //****************************************************************************** 133 ODINFUNCTION1(HBRUSH, CreateSolidBrush, COLORREF,color)123 HBRUSH WIN32API CreateSolidBrush(COLORREF color) 134 124 { 135 125 HBRUSH hBrush; … … 143 133 HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH *pLogBrush) 144 134 { 145 HBRUSH hBrush;135 HBRUSH hBrush; 146 136 147 137 hBrush = O32_CreateBrushIndirect((LPLOGBRUSH)pLogBrush); … … 156 146 HBRUSH hBrush; 157 147 158 dprintf(("GDI32: CreateHatchBrush %x %x", fnStyle, clrref));159 148 hBrush = O32_CreateHatchBrush(fnStyle, clrref); 160 149 if(hBrush) STATS_CreateHatchBrush(hBrush, fnStyle, clrref); … … 167 156 HBRUSH hBrush; 168 157 169 dprintf(("GDI32: CreateDIBPatternBrushPt %x %x", buffer, usage));170 158 hBrush = O32_CreateDIBPatternBrushPt(buffer, usage); 171 159 if(hBrush) STATS_CreateDIBPatternBrushPt(hBrush, buffer, usage); … … 234 222 //PF Open32 seems not to move coordinates to 0,0 in newHdc 235 223 MoveToEx(newHdc, 0, 0 , NULL); 236 dprintf(("CreateCompatibleDC %X returned %x", hdc, newHdc)); 224 237 225 return newHdc; 238 226 } 239 227 //****************************************************************************** 240 228 //****************************************************************************** 241 ODINFUNCTION1(BOOL, DeleteDC, HDC,hdc)229 BOOL WIN32API DeleteDC(HDC hdc) 242 230 { 243 231 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); … … 270 258 BOOL WIN32API StrokeAndFillPath(HDC hdc) 271 259 { 272 dprintf(("GDI32: StrokeAndFillPath %x", hdc));273 260 return O32_StrokeAndFillPath(hdc); 274 261 } … … 277 264 BOOL WIN32API StrokePath(HDC hdc) 278 265 { 279 dprintf(("GDI32: StrokePath %x", hdc));280 266 return O32_StrokePath(hdc); 281 267 } … … 284 270 int WIN32API SetBkMode( HDC hdc, int mode) 285 271 { 286 dprintf(("GDI32: SetBkMode %x %d (old %d)", hdc, mode, O32_GetBkMode(hdc)));287 272 return O32_SetBkMode(hdc, mode); 288 273 } … … 291 276 COLORREF WIN32API GetPixel( HDC hdc, int x, int y) 292 277 { 293 COLORREF color; 294 295 color = O32_GetPixel(hdc, x, y); 296 dprintf2(("GDI32: GetPixel %x (%d,%d) -> %x", hdc, x, y, color)); 297 return color; 278 return O32_GetPixel(hdc, x, y); 298 279 } 299 280 //****************************************************************************** … … 301 282 COLORREF WIN32API SetPixel( HDC hdc, int x, int y, COLORREF color) 302 283 { 303 dprintf2(("GDI32: SetPixel %x (%d,%d) %x", hdc, x, y, color));304 284 return O32_SetPixel(hdc, x, y, color); 305 285 } … … 312 292 COLORREF rc; 313 293 314 //// dprintf(("GDI32: SetPixelV\n"));315 294 rc = O32_SetPixel(arg1, arg2, arg3, arg4); 316 295 if(rc == GDI_ERROR) // || rc == COLOR_INVALID) … … 326 305 return FALSE; 327 306 } 328 dprintf(("GDI32: GetDCOrgEx %x (%d,%d)", hdc, lpPoint));329 307 return O32_GetDCOrgEx(hdc, lpPoint); 330 308 } … … 333 311 BOOL WIN32API AbortPath(HDC hdc) 334 312 { 335 dprintf(("GDI32: AbortPath %x", hdc));336 313 return O32_AbortPath(hdc); 337 314 } … … 340 317 BOOL WIN32API AngleArc( HDC arg1, int arg2, int arg3, DWORD arg4, float arg5, float arg6) 341 318 { 342 dprintf(("GDI32: AngleArc"));343 319 return O32_AngleArc(arg1, arg2, arg3, arg4, arg5, arg6); 344 320 } … … 347 323 BOOL WIN32API Arc( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) 348 324 { 349 dprintf(("GDI32: Arc"));350 325 return O32_Arc(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); 351 326 } … … 354 329 BOOL WIN32API ArcTo( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) 355 330 { 356 dprintf(("GDI32: ArcTo"));357 331 return O32_ArcTo(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); 358 332 } … … 361 335 BOOL WIN32API BeginPath(HDC hdc) 362 336 { 363 dprintf(("GDI32: BeginPath $x", hdc));364 337 return O32_BeginPath(hdc); 365 338 } … … 368 341 BOOL WIN32API Chord( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) 369 342 { 370 dprintf(("GDI32: Chord"));371 343 return O32_Chord(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); 372 344 } … … 375 347 BOOL WIN32API CloseFigure(HDC hdc) 376 348 { 377 dprintf(("GDI32: CloseFigure %x", hdc));378 349 return O32_CloseFigure(hdc); 379 350 } … … 423 394 HDC rc; 424 395 DEVMODEA devmode; 425 426 dprintf(("GDI32: CreateDCW"));427 396 428 397 if(arg4) … … 486 455 HDC hdc; 487 456 488 dprintf(("GDI32: CreateICA"));489 457 //SvL: Open32 tests for "DISPLAY" 490 458 if(lpszDriver && !strcmp(lpszDriver, "display")) { … … 516 484 HDC rc; 517 485 DEVMODEA devmode; 518 519 dprintf(("GDI32: CreateICW"));520 486 521 487 if(arg4) … … 583 549 BOOL WIN32API EndPath( HDC hdc) 584 550 { 585 dprintf(("GDI32: EndPath %x", hdc));586 551 return O32_EndPath(hdc); 587 552 } 588 553 //****************************************************************************** 589 554 //****************************************************************************** 590 ODINFUNCTION5(BOOL, Rectangle, HDC, hdc, int, left, int, top, int, right, int,bottom)555 BOOL WIN32API Rectangle(HDC hdc, int left, int top, int right, int bottom) 591 556 { 592 557 return O32_Rectangle(hdc, left, top, right, bottom); … … 594 559 //****************************************************************************** 595 560 //****************************************************************************** 561 #ifdef DEBUG 596 562 VOID dumpROP2(INT rop2) 597 563 { … … 660 626 break; 661 627 628 case R2_NOTXORPEN: 629 name = "R2_NOTXORPEN"; 630 break; 631 662 632 default: 663 633 name = "unknown mode!!!"; … … 667 637 dprintf((" ROP2 mode = %s",name)); 668 638 } 639 #endif 669 640 //****************************************************************************** 670 641 //****************************************************************************** 671 642 int WIN32API SetROP2( HDC hdc, int rop2) 672 643 { 673 dprintf(("GDI32: SetROP2 %x %x", hdc, rop2));674 644 #ifdef DEBUG 675 645 dumpROP2(rop2); … … 695 665 BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT arg5) 696 666 { 697 dprintf(("GDI32: ExtFloodFill"));698 667 return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5); 699 668 } … … 702 671 BOOL WIN32API FillPath( HDC arg1) 703 672 { 704 dprintf(("GDI32: FillPath"));705 673 return O32_FillPath(arg1); 706 674 } … … 709 677 BOOL WIN32API FlattenPath( HDC arg1) 710 678 { 711 dprintf(("GDI32: FlattenPath"));712 679 return O32_FlattenPath(arg1); 713 680 } … … 716 683 BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF arg4) 717 684 { 718 dprintf(("GDI32: FloodFill"));719 685 return O32_FloodFill(arg1, arg2, arg3, arg4); 720 686 } … … 723 689 int WIN32API GetArcDirection( HDC arg1) 724 690 { 725 dprintf(("GDI32: GetArcDirection"));726 691 return O32_GetArcDirection(arg1); 727 692 } … … 730 695 BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE arg2) 731 696 { 732 dprintf(("GDI32: GetAspectRatioFilterEx"));733 697 return O32_GetAspectRatioFilterEx(arg1, arg2); 734 698 } … … 737 701 COLORREF WIN32API GetBkColor(HDC hdc) 738 702 { 739 COLORREF color; 740 741 color = O32_GetBkColor(hdc); 742 dprintf(("GDI32: GetBkColor %x returned %x", hdc, color)); 743 return color; 703 return O32_GetBkColor(hdc); 744 704 } 745 705 //****************************************************************************** … … 747 707 int WIN32API GetBkMode(HDC hdc) 748 708 { 749 int bkmode; 750 751 bkmode = O32_GetBkMode(hdc); 752 dprintf(("GDI32: GetBkMode %x returned %d", hdc, bkmode)); 753 return bkmode; 709 return O32_GetBkMode(hdc); 754 710 } 755 711 //****************************************************************************** … … 757 713 UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT arg3) 758 714 { 759 dprintf(("GDI32: GetBoundsRect"));760 715 return O32_GetBoundsRect(arg1, arg2, arg3); 761 716 } … … 764 719 BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT arg2) 765 720 { 766 dprintf(("GDI32: GetBrushOrgEx"));767 721 return O32_GetBrushOrgEx(arg1, arg2); 768 722 } … … 771 725 BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4) 772 726 { 773 dprintf(("GDI32: GetCharABCWidthsA"));774 727 return O32_GetCharABCWidths(arg1, arg2, arg3, arg4); 775 728 } … … 817 770 BOOL rc; 818 771 819 dprintf(("GDI32: GetCurrentPositionEx %x", hdc));820 772 rc = O32_GetCurrentPositionEx(hdc, lpPoint); 821 773 dprintf(("GDI32: GetCurrentPositionEx returned %d (%d,%d)", rc, lpPoint->x, lpPoint->y)); … … 840 792 DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3) 841 793 { 842 dprintf(("GDI32: GetKerningPairsA"));843 794 return O32_GetKerningPairs(arg1, arg2, arg3); 844 795 } … … 847 798 DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR arg3) 848 799 { 849 dprintf(("GDI32: GetKerningPairsW "));800 dprintf(("GDI32: GetKerningPairsW; might not work")); 850 801 // NOTE: This will not work as is (needs UNICODE support) 851 802 return O32_GetKerningPairs(arg1, arg2, arg3); … … 855 806 BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2) 856 807 { 857 dprintf(("GDI32: GetMiterLimit"));858 808 return O32_GetMiterLimit(arg1, arg2); 859 809 } … … 862 812 COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF arg2) 863 813 { 864 dprintf(("GDI32: GetNearestColor\n"));865 814 return O32_GetNearestColor(arg1, arg2); 866 815 } … … 869 818 INT WIN32API GetPath( HDC hdc, PPOINT arg2, PBYTE arg3, int arg4) 870 819 { 871 dprintf(("GDI32: GetPath %x", hdc));872 820 return O32_GetPath(hdc, arg2, arg3, arg4); 873 821 } … … 876 824 int WIN32API GetPolyFillMode( HDC hdc) 877 825 { 878 dprintf(("GDI32: GetPolyFillMode", hdc));879 826 return O32_GetPolyFillMode(hdc); 880 827 } … … 883 830 int WIN32API GetROP2( HDC hdc) 884 831 { 885 dprintf(("GDI32: GetROP2 %x", hdc));886 832 return O32_GetROP2(hdc); 887 833 } … … 890 836 BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT arg2) 891 837 { 892 dprintf(("GDI32: GetRasterizerCaps"));893 838 return O32_GetRasterizerCaps(arg1, arg2); 894 839 } … … 897 842 UINT WIN32API GetTextAlign( HDC hdc) 898 843 { 899 dprintf(("GDI32: GetTextAlign %x", hdc));900 844 return O32_GetTextAlign(hdc); 901 845 } … … 904 848 int WIN32API GetTextCharacterExtra( HDC hdc) 905 849 { 906 dprintf(("GDI32: GetTextCharacterExtra", hdc));907 850 return O32_GetTextCharacterExtra(hdc); 908 851 } … … 911 854 COLORREF WIN32API GetTextColor( HDC hdc) 912 855 { 913 COLORREF color; 914 915 color = O32_GetTextColor(hdc); 916 dprintf(("GDI32: GetTextColor %x -> %x", hdc, color)); 917 return color; 856 return O32_GetTextColor(hdc); 918 857 } 919 858 //****************************************************************************** … … 936 875 BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD arg3) 937 876 { 938 dprintf(("GDI32: PolyBezier"));939 877 return O32_PolyBezier(arg1, arg2, (int)arg3); 940 878 } … … 943 881 BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD arg3) 944 882 { 945 dprintf(("GDI32: PolyBezierTo"));946 883 return O32_PolyBezierTo(arg1, arg2, arg3); 947 884 } … … 950 887 BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD arg4) 951 888 { 952 dprintf(("GDI32: PolyDraw"));953 889 return O32_PolyDraw(arg1, arg2, arg3, arg4); 954 890 } … … 957 893 BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT arg4) 958 894 { 959 dprintf(("GDI32: PolyPolygon"));960 895 return O32_PolyPolygon(arg1, arg2, arg3, arg4); 961 896 } … … 964 899 BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount) 965 900 { 966 dprintf(("GDI32: PolyPolyline %x %x %x %d", hdc, lppt, lpdwPolyPoints, cCount));967 968 901 return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount); 969 902 } … … 972 905 BOOL WIN32API Polygon( HDC hdc, const POINT *lpPoints, int count) 973 906 { 974 dprintf(("GDI32: Polygon %x %x %d", hdc, lpPoints, count));975 907 return O32_Polygon(hdc, lpPoints, count); 976 908 } … … 997 929 HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA * arg2) 998 930 { 999 dprintf(("GDI32: ResetDCA\n"));1000 931 return (HDC)O32_ResetDC(arg1, arg2); 1001 932 } … … 1004 935 HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW * arg2) 1005 936 { 1006 dprintf(("GDI32: ResetDCW\n")); 937 dprintf(("GDI32: ResetDCW: not properly implemented")); 938 DebugInt3(); 1007 939 // NOTE: This will not work as is (needs UNICODE support) 1008 940 return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2); … … 1013 945 { 1014 946 BOOL ret; 1015 1016 dprintf(("GDI32: RestoreDC %x %d", hdc, id));1017 947 1018 948 ret = O32_RestoreDC(hdc, id); … … 1026 956 BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7) 1027 957 { 1028 dprintf(("GDI32: RoundRect"));1029 958 return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7); 1030 959 } … … 1035 964 int id; 1036 965 1037 dprintf(("GDI32: SaveDC %x", hdc));1038 966 id = O32_SaveDC(hdc); 1039 967 if(id == 0) { … … 1047 975 int WIN32API SetArcDirection( HDC arg1, int arg2) 1048 976 { 1049 dprintf(("GDI32: SetArcDirection"));1050 977 return O32_SetArcDirection(arg1, arg2); 1051 978 } … … 1054 981 UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3) 1055 982 { 1056 dprintf(("GDI32: SetBoundsRect"));1057 983 return O32_SetBoundsRect(arg1, arg2, arg3); 1058 984 } … … 1061 987 BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT arg4) 1062 988 { 1063 BOOL rc; 1064 1065 rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4); 1066 dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc)); 1067 return(rc); 1068 } 1069 //****************************************************************************** 1070 //****************************************************************************** 1071 ODINFUNCTION2(DWORD, SetMapperFlags, HDC, hdc, DWORD, dwFlag) 989 return O32_SetBrushOrgEx(arg1, arg2, arg3, arg4); 990 } 991 //****************************************************************************** 992 //****************************************************************************** 993 DWORD WIN32API SetMapperFlags(HDC hdc, DWORD dwFlag) 1072 994 { 1073 995 return O32_SetMapperFlags(hdc, dwFlag); … … 1075 997 //****************************************************************************** 1076 998 //****************************************************************************** 1077 ODINFUNCTION3(BOOL, SetMiterLimit, HDC, hdc, float, eNewLimit, float* ,peOldLimit)999 BOOL WIN32API SetMiterLimit(HDC hdc, float eNewLimit, float* peOldLimit) 1078 1000 { 1079 1001 return O32_SetMiterLimit(hdc, eNewLimit, peOldLimit); … … 1081 1003 //****************************************************************************** 1082 1004 //****************************************************************************** 1083 ODINFUNCTION2(int, SetPolyFillMode, HDC, hdc, int,iPolyFillMode)1005 int WIN32API SetPolyFillMode(HDC hdc, int iPolyFillMode) 1084 1006 { 1085 1007 return O32_SetPolyFillMode(hdc, iPolyFillMode); … … 1087 1009 //****************************************************************************** 1088 1010 //****************************************************************************** 1089 ODINFUNCTION2(UINT, SetTextAlign, HDC, hdc, UINT,fMode)1011 UINT WIN32API SetTextAlign(HDC hdc, UINT fMode) 1090 1012 { 1091 1013 return O32_SetTextAlign(hdc, fMode); … … 1093 1015 //****************************************************************************** 1094 1016 //****************************************************************************** 1095 ODINFUNCTION2(int, SetTextCharacterExtra, HDC, hdc, int,nCharExtra)1017 int WIN32API SetTextCharacterExtra(HDC hdc, int nCharExtra) 1096 1018 { 1097 1019 return O32_SetTextCharacterExtra(hdc, nCharExtra); … … 1099 1021 //****************************************************************************** 1100 1022 //****************************************************************************** 1101 ODINFUNCTION3(BOOL, SetTextJustification, HDC, hdc, int, nBreakExtra, int,nBreakCount)1023 BOOL WIN32API SetTextJustification(HDC hdc, int nBreakExtra, int nBreakCount) 1102 1024 { 1103 1025 return O32_SetTextJustification(hdc, nBreakExtra, nBreakCount); … … 1107 1029 BOOL WIN32API WidenPath( HDC hdc) 1108 1030 { 1109 dprintf(("GDI32: WidenPath %x", hdc));1110 1031 return O32_WidenPath(hdc); 1111 1032 } … … 1136 1057 BOOL WIN32API UpdateColors(HDC hdc) 1137 1058 { 1138 dprintf(("GDI32: UpdateColors\n"));1139 1059 return InvalidateRect(WindowFromDC(hdc), NULL, FALSE); 1140 1060 } … … 1321 1241 return (FALSE); 1322 1242 } 1323 1324 1243 1325 1244 /***************************************************************************** -
trunk/src/gdi32/gdistats.cpp
r9251 r9429 40 40 { 41 41 for(int i=0;i<STATS_MAX_OBJECTS;i++) { 42 if( pdwObjects[i] == hObject) {42 if(LOWORD(pdwObjects[i]) == LOWORD(hObject)) { 43 43 pdwObjects[i] = 0; 44 44 break; -
trunk/src/gdi32/icm.cpp
r6684 r9429 1 /* $Id: icm.cpp,v 1. 2 2001-09-09 12:24:13sandervl Exp $ */1 /* $Id: icm.cpp,v 1.3 2002-11-26 10:53:09 sandervl Exp $ */ 2 2 3 3 /* … … 24 24 #include <winuser32.h> 25 25 26 #define DBG_LOCALLOG DBG_ gdi3226 #define DBG_LOCALLOG DBG_icm 27 27 #include "dbglocal.h" 28 28 -
trunk/src/gdi32/line.cpp
r7366 r9429 1 /* $Id: line.cpp,v 1.1 2 2001-11-16 16:27:54sandervl Exp $ */1 /* $Id: line.cpp,v 1.13 2002-11-26 10:53:10 sandervl Exp $ */ 2 2 /* 3 3 * Line API's … … 170 170 POINTLOS2 startPt,endPt; 171 171 172 dprintf(("GDI32: LineDDA\n"));173 172 #if 0 //CB: the Open32 function is ok -> to check 174 173 startPt.x = nXStart; … … 190 189 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 191 190 192 dprintf(("GDI32: Polyline %x %x %d", hdc, lppt, cPoints));193 194 191 if (!pHps) 195 192 { … … 226 223 { 227 224 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 228 229 dprintf(("GDI32: PolylineTo"));230 225 231 226 if (!pHps) -
trunk/src/gdi32/makefile
r7635 r9429 1 # $Id: makefile,v 1.4 1 2001-12-15 18:50:27sandervl Exp $1 # $Id: makefile,v 1.42 2002-11-26 10:53:10 sandervl Exp $ 2 2 3 3 # … … 7 7 # 8 8 9 10 !if "$(DEBUG)" == "1" 11 DEFFILE = gdi32dbg.def 12 ORGDEFFILE = gdi32.def 13 !endif 9 14 10 15 # … … 53 58 $(OBJDIR)\gdistats.obj \ 54 59 $(OBJDIR)\dbglocal.obj \ 60 !ifdef DEBUG 61 $(OBJDIR)\dbgwrap.obj \ 62 !endif 55 63 $(OBJDIR)\gdi32rsrc.obj 56 64 -
trunk/src/gdi32/objhandle.cpp
r9415 r9429 1 /* $Id: objhandle.cpp,v 1.3 0 2002-11-18 15:45:31sandervl Exp $ */1 /* $Id: objhandle.cpp,v 1.31 2002-11-26 10:53:10 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Handle Management Code for OS/2 … … 249 249 { 250 250 int rc; 251 252 dprintf(("GDI32: GetObject %X %X %X\n", hObject, size, lpBuffer)); 253 251 254 252 if(lpBuffer == NULL) 255 253 { //return required size if buffer pointer == NULL … … 309 307 int ret, objtype; 310 308 311 dprintf(("GDI32: GetObjectW %X, %d %X", hObject, size, lpBuffer));312 313 309 objtype = GetObjectType(hObject); 314 310 … … 415 411 } 416 412 } 417 dprintf2(("GDI32: SelectObject %x %x returned %x", hdc, hObj, rc));418 419 413 return(rc); 420 414 } … … 494 488 DWORD objflags; 495 489 496 dprintf(("GDI32: DeleteObject %x", hObj));497 490 //hack alert 498 491 if(HIWORD(hObj) == 0x100) … … 536 529 HANDLE WIN32API GetCurrentObject( HDC hdc, UINT arg2) 537 530 { 538 dprintf(("GDI32: GetCurrentObject %x %x", hdc, arg2));539 531 return (HANDLE)O32_GetCurrentObject(hdc, arg2); 540 532 } … … 551 543 BOOL WIN32API UnrealizeObject( HGDIOBJ hObject) 552 544 { 553 dprintf(("GDI32: UnrealizeObject %x", hObject));554 545 return O32_UnrealizeObject(hObject); 555 546 } -
trunk/src/gdi32/opengl.cpp
r2802 r9429 1 /* $Id: opengl.cpp,v 1. 8 2000-02-16 14:18:11 sandervl Exp $ */1 /* $Id: opengl.cpp,v 1.9 2002-11-26 10:53:11 sandervl Exp $ */ 2 2 3 3 /* … … 119 119 *****************************************************************************/ 120 120 121 ODINFUNCTION2(int,ChoosePixelFormat,HDC, hdc, 122 CONST PIXELFORMATDESCRIPTOR*,pformat) 121 int WIN32API ChoosePixelFormat(HDC hdc, CONST PIXELFORMATDESCRIPTOR* pformat) 123 122 { 124 123 if (glChoosePixelFormat == NULL) … … 129 128 } 130 129 131 ODINFUNCTION4(int,DescribePixelFormat,HDC,hdc, 132 int,iFormat, 133 UINT,nBytes, 134 LPPIXELFORMATDESCRIPTOR,pformat) 130 int WIN32API DescribePixelFormat(HDC hdc, int iFormat, UINT nBytes, 131 LPPIXELFORMATDESCRIPTOR pformat) 135 132 { 136 133 if (glDescribePixelFormat == NULL) … … 141 138 } 142 139 143 ODINFUNCTION1(int,GetPixelFormat,HDC,hdc)140 int WIN32API GetPixelFormat(HDC hdc) 144 141 { 145 142 if (glGetPixelFormat == NULL) … … 162 159 *****************************************************************************/ 163 160 164 ODINFUNCTION3(BOOL,SetPixelFormat,HDC, hdc, 165 int, whatever, 166 CONST PIXELFORMATDESCRIPTOR*, pformat) 161 BOOL WIN32API SetPixelFormat(HDC hdc, int whatever, 162 CONST PIXELFORMATDESCRIPTOR *pformat) 167 163 { 168 164 if (glSetPixelFormat == NULL) … … 186 182 *****************************************************************************/ 187 183 188 ODINFUNCTION1(BOOL,SwapBuffers,HDC,hdc)184 BOOL WIN32API SwapBuffers(HDC hdc) 189 185 { 190 186 if (glSwapBuffers == NULL) -
trunk/src/gdi32/region.cpp
r9388 r9429 1 /* $Id: region.cpp,v 1. 29 2002-11-05 14:33:32 sandervl Exp $ */1 /* $Id: region.cpp,v 1.30 2002-11-26 10:53:12 sandervl Exp $ */ 2 2 3 3 /* … … 13 13 * 14 14 */ 15 16 // Note: profiling currently not supported for this file17 #undef PROFILE18 #include <odinwrap.h>19 15 20 16 #define INCL_GPI … … 38 34 #define DBG_LOCALLOG DBG_region 39 35 #include "dbglocal.h" 40 41 42 ODINDEBUGCHANNEL(GDI32-REGION)43 44 36 45 37 typedef enum … … 377 369 int WIN32API GetRgnBox( HRGN hrgn, PRECT pRect); 378 370 //****************************************************************************** 379 ODINFUNCTIONNODBG2(int, SelectClipRgn, HDC, hdc, HRGN,hrgn)371 int WIN32API SelectClipRgn(HDC hdc, HRGN hrgn) 380 372 { 381 373 LONG lComplexity = RGN_NULL; … … 394 386 } 395 387 396 dprintf(("SelectClipRgn: %x %x", hdc, hrgn));397 388 if(hrgn) 398 389 { … … 447 438 //****************************************************************************** 448 439 //****************************************************************************** 449 ODINFUNCTIONNODBG3(int, ExtSelectClipRgn, HDC, hdc, HRGN, hrgn, int,mode)440 int WIN32API ExtSelectClipRgn(HDC hdc, HRGN hrgn, int mode) 450 441 { 451 442 #ifdef DEBUG 452 HRGN hrgn1 = hrgn;443 HRGN hrgn1 = hrgn; 453 444 #endif 454 445 … … 497 488 } 498 489 499 dprintf(("ExtSelectRgn %x %x %d", hdc, hrgn1, mode));500 490 //TODO: metafile recording 501 491 if(hrgn) … … 559 549 //****************************************************************************** 560 550 //****************************************************************************** 561 ODINFUNCTIONNODBG2(int, GetClipBox, HDC, hdc, PRECT,lpRect)551 int WIN32API GetClipBox(HDC hdc, PRECT lpRect) 562 552 { 563 553 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); … … 628 618 //****************************************************************************** 629 619 //****************************************************************************** 630 ODINFUNCTIONNODBG2(int, GetClipRgn, HDC, hdc, HRGN,hrgn)620 int WIN32API GetClipRgn(HDC hdc, HRGN hrgn) 631 621 { 632 622 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); … … 635 625 HRGN hrgnClip = NULL, hrgnTemp; 636 626 #ifdef DEBUG 637 HRGN 627 HRGN hrgn1 = hrgn; 638 628 #endif 639 629 … … 666 656 else lComplexity = RGN_NULL; 667 657 668 dprintf(("GetClipRgn %x %x returned %d", hdc, hrgn1, lComplexity != RGN_NULL));669 658 SetLastError(ERROR_SUCCESS_W); 670 659 if(lComplexity == RGN_NULL) … … 674 663 //****************************************************************************** 675 664 //****************************************************************************** 676 ODINFUNCTIONNODBG5(int, ExcludeClipRect, HDC, hdc, int, left, int, top, int, right, int,bottom)665 int WIN32API ExcludeClipRect(HDC hdc, int left, int top, int right, int bottom) 677 666 { 678 667 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); … … 716 705 //****************************************************************************** 717 706 //****************************************************************************** 718 ODINFUNCTIONNODBG5(int, IntersectClipRect, HDC, hdc, int, left, int, top, int, right, int,bottom)707 int WIN32API IntersectClipRect(HDC hdc, int left, int top, int right, int bottom) 719 708 { 720 709 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); … … 755 744 //****************************************************************************** 756 745 //****************************************************************************** 757 ODINFUNCTIONNODBG3(int, OffsetClipRgn, HDC, hdc, int, nXOffset, int,nYOffset )758 { 759 BOOL 760 pDCData 761 LONG 746 int WIN32API OffsetClipRgn(HDC hdc, int nXOffset, int nYOffset ) 747 { 748 BOOL success; 749 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); 750 LONG lComplexity; 762 751 763 752 if(!pHps) { … … 784 773 //****************************************************************************** 785 774 //****************************************************************************** 786 ODINFUNCTIONNODBG4(HRGN, CreatePolyPolygonRgn, const POINT * , lppt, const int *, pPolyCount, int, nCount, int, fnPolyFillMode) 775 HRGN WIN32API CreatePolyPolygonRgn(const POINT *lppt, const int *pPolyCount, 776 int nCount, int fnPolyFillMode) 787 777 { 788 778 LONG flMode; … … 845 835 //****************************************************************************** 846 836 //****************************************************************************** 847 ODINFUNCTIONNODBG4(HRGN, CreateRectRgn, int, left, int, top, int, right, int,bottom)837 HRGN WIN32API CreateRectRgn(int left, int top, int right, int bottom) 848 838 { 849 839 HRGN hrgn; … … 870 860 //****************************************************************************** 871 861 //****************************************************************************** 872 ODINFUNCTIONNODBG1(HRGN, CreateRectRgnIndirect, const RECT *,lprc)862 HRGN WIN32API CreateRectRgnIndirect( const RECT * lprc) 873 863 { 874 864 return CreateRectRgn(lprc->left, lprc->top, lprc->right, lprc->bottom); … … 876 866 //****************************************************************************** 877 867 //****************************************************************************** 878 ODINFUNCTIONNODBG6(HRGN, CreateRoundRectRgn, int, left, int, top, int, right, int, bottom, int, nWidthEllipse, int,nHeightEllipse)868 HRGN WIN32API CreateRoundRectRgn(int left, int top, int right, int bottom, int nWidthEllipse, int nHeightEllipse) 879 869 { 880 870 HRGN hrgn; … … 905 895 //****************************************************************************** 906 896 //****************************************************************************** 907 ODINFUNCTIONNODBG3(HRGN, ExtCreateRegion, const XFORM_W *, pXform, DWORD, count, const RGNDATA *, pData) 897 HRGN WIN32API ExtCreateRegion(const XFORM_W * pXform, DWORD count, 898 const RGNDATA * pData) 908 899 { 909 900 HRGN hrgn; … … 1016 1007 //****************************************************************************** 1017 1008 //****************************************************************************** 1018 ODINFUNCTIONNODBG4(HRGN, CreateEllipticRgn, int, left, int, top, int, right, int,bottom)1009 HRGN WIN32API CreateEllipticRgn(int left, int top, int right, int bottom) 1019 1010 { 1020 1011 HRGN hrgn; … … 1039 1030 //****************************************************************************** 1040 1031 //****************************************************************************** 1041 ODINFUNCTIONNODBG1(HRGN, CreateEllipticRgnIndirect, const RECT *,pRect)1032 HRGN WIN32API CreateEllipticRgnIndirect(const RECT *pRect) 1042 1033 { 1043 1034 return CreateEllipticRgn(pRect->left, pRect->top, pRect->right, pRect->bottom); … … 1045 1036 //****************************************************************************** 1046 1037 //****************************************************************************** 1047 ODINFUNCTIONNODBG3(HRGN, CreatePolygonRgn, const POINT *, lppt, int, cPoints, int,fnPolyFillMode)1038 HRGN WIN32API CreatePolygonRgn(const POINT * lppt, int cPoints, int fnPolyFillMode) 1048 1039 { 1049 1040 HRGN hrgn; … … 1089 1080 //****************************************************************************** 1090 1081 //****************************************************************************** 1091 ODINFUNCTIONNODBG4(int, CombineRgn, HRGN, hrgnDest, HRGN, hrgnSrc1, HRGN, hrgnSrc2, int,combineMode)1082 int WIN32API CombineRgn(HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2, int combineMode) 1092 1083 { 1093 1084 ULONG lComplexity; … … 1136 1127 return ERROR_W; 1137 1128 } 1138 dprintf(("CombineRgn %x %x %x %d", hrgn1, hrgn2, hrgn3, mode));1139 1129 SetLastError(ERROR_SUCCESS_W); 1140 1130 return lComplexity; … … 1142 1132 //****************************************************************************** 1143 1133 //****************************************************************************** 1144 ODINFUNCTIONNODBG2(BOOL, EqualRgn, HRGN, hrgn1, HRGN,hrgn2)1134 BOOL WIN32API EqualRgn(HRGN hrgn1, HRGN hrgn2) 1145 1135 { 1146 1136 LONG lEquality; … … 1173 1163 //****************************************************************************** 1174 1164 //****************************************************************************** 1175 ODINFUNCTIONNODBG5(BOOL, SetRectRgn, HRGN, hrgn, int, left, int, top, int, right, int,bottom)1165 BOOL WIN32API SetRectRgn(HRGN hrgn, int left, int top, int right, int bottom) 1176 1166 { 1177 1167 BOOL result = FALSE; … … 1197 1187 //NOTE: depends on hps inversion 1198 1188 //****************************************************************************** 1199 ODINFUNCTIONNODBG3(ULONG, GetRegionData, HRGN, hrgn, ULONG, count, PRGNDATA,pData)1189 ULONG WIN32API GetRegionData( HRGN hrgn, ULONG count, PRGNDATA pData) 1200 1190 { 1201 1191 #ifdef DEBUG … … 1262 1252 //****************************************************************************** 1263 1253 //****************************************************************************** 1264 ODINFUNCTIONNODBG2(int, GetRgnBox, HRGN, hrgn, PRECT,pRect)1254 int WIN32API GetRgnBox( HRGN hrgn, PRECT pRect) 1265 1255 { 1266 1256 BOOL success; … … 1299 1289 //****************************************************************************** 1300 1290 //****************************************************************************** 1301 ODINFUNCTIONNODBG2(BOOL, InvertRgn, HDC, hdc, HRGN,hrgn)1291 BOOL WIN32API InvertRgn( HDC hdc, HRGN hrgn) 1302 1292 { 1303 1293 #ifdef DEBUG … … 1323 1313 RECTL boundingRect; // this gets a rectangle in world cordinates! 1324 1314 1325 lComplexity = GpiQueryRegionBox(pHps->hps, pHps->hrgnHDC, &boundingRect);1315 lComplexity = GpiQueryRegionBox(pHps->hps, pHps->hrgnHDC, &boundingRect); 1326 1316 if(lComplexity != RGN_ERROR) 1327 1317 { 1328 lComplexity = GpiSetClipRegion(pHps->hps, pHps->hrgnHDC, &hrgnOld);1318 lComplexity = GpiSetClipRegion(pHps->hps, pHps->hrgnHDC, &hrgnOld); 1329 1319 if(lComplexity != RGN_ERROR) 1330 1320 { … … 1350 1340 //****************************************************************************** 1351 1341 //****************************************************************************** 1352 ODINFUNCTIONNODBG3(int, OffsetRgn, HRGN, hrgn, int, xOffset, int,yOffset)1342 int WIN32API OffsetRgn( HRGN hrgn, int xOffset, int yOffset) 1353 1343 { 1354 1344 LONG lComplexity; … … 1398 1388 //****************************************************************************** 1399 1389 //****************************************************************************** 1400 ODINFUNCTIONNODBG5(BOOL, FrameRgn, HDC, hdc, HRGN, hrgn, HBRUSH, hBrush, int, width, int,height)1390 BOOL WIN32API FrameRgn(HDC hdc, HRGN hrgn, HBRUSH hBrush, int width, int height) 1401 1391 { 1402 1392 HBRUSH hbrushRestore = 0; … … 1430 1420 1431 1421 SIZEL thickness = { width, height }; 1432 LONG lHits = GpiFrameRegion(pHps->hps, pHps->hrgnHDC, &thickness);1422 LONG lHits = GpiFrameRegion(pHps->hps, pHps->hrgnHDC, &thickness); 1433 1423 1434 1424 SetLastError(ERROR_SUCCESS_W); … … 1443 1433 //****************************************************************************** 1444 1434 //****************************************************************************** 1445 ODINFUNCTIONNODBG3(BOOL, FillRgn, HDC, hdc, HRGN, hrgn, HBRUSH,hBrush)1435 BOOL WIN32API FillRgn(HDC hdc, HRGN hrgn, HBRUSH hBrush) 1446 1436 { 1447 1437 BOOL success; … … 1498 1488 //****************************************************************************** 1499 1489 //****************************************************************************** 1500 ODINFUNCTIONNODBG2(BOOL, PaintRgn, HDC, hdc, HRGN,hrgn)1490 BOOL WIN32API PaintRgn( HDC hdc, HRGN hrgn) 1501 1491 { 1502 1492 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); … … 1511 1501 //****************************************************************************** 1512 1502 //****************************************************************************** 1513 ODINFUNCTIONNODBG3(BOOL, PtInRegion, HRGN, hrgn, int, x, int,y)1503 BOOL WIN32API PtInRegion( HRGN hrgn, int x, int y) 1514 1504 { 1515 1505 BOOL success; … … 1544 1534 //****************************************************************************** 1545 1535 //****************************************************************************** 1546 ODINFUNCTIONNODBG2(BOOL, RectInRegion, HRGN, hrgn, const RECT *,pRect)1536 BOOL WIN32API RectInRegion( HRGN hrgn, const RECT * pRect) 1547 1537 { 1548 1538 BOOL success; … … 1589 1579 //Returned region in device coordinates (undocumented behaviour) 1590 1580 //****************************************************************************** 1591 ODINFUNCTIONNODBG1(HRGN, PathToRegion, HDC,hdc)1581 HRGN WIN32API PathToRegion( HDC hdc) 1592 1582 { 1593 1583 pDCData pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc); … … 1632 1622 //Needs wrapper as this file includes os2.h!! 1633 1623 //****************************************************************************** 1634 ODINFUNCTIONNODBG1(BOOL, OSLibDeleteRegion, HANDLE,hRegion)1624 BOOL WIN32API OSLibDeleteRegion(HANDLE hRegion) 1635 1625 { 1636 1626 if(GpiDestroyRegion(hpsRegion, hRegion) == FALSE) { … … 1653 1643 *****************************************************************************/ 1654 1644 1655 ODINFUNCTIONNODBG2(int, GetMetaRgn, HDC, hdc, HRGN,hrgn)1645 int WIN32API GetMetaRgn( HDC hdc, HRGN hrgn) 1656 1646 { 1657 1647 dprintf(("GDI32: GetMetaRgn(%08xh, %08xh) not implemented.\n", … … 1677 1667 *****************************************************************************/ 1678 1668 1679 ODINFUNCTIONNODBG1(BOOL, SetMetaRgn, HDC,hdc)1669 BOOL WIN32API SetMetaRgn( HDC hdc) 1680 1670 { 1681 1671 dprintf(("GDI32: SetMetaRgn(%08xh) not implemented.\n", -
trunk/src/gdi32/transform.cpp
r6692 r9429 1 /* $Id: transform.cpp,v 1. 7 2001-09-10 11:02:41sandervl Exp $ */1 /* $Id: transform.cpp,v 1.8 2002-11-26 10:53:12 sandervl Exp $ */ 2 2 3 3 /* … … 708 708 //****************************************************************************** 709 709 //****************************************************************************** 710
Note:
See TracChangeset
for help on using the changeset viewer.