Changeset 4552 for trunk/src/gdi32
- Timestamp:
- Nov 4, 2000, 5:29:24 PM (25 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 6 edited
-
CALLBACK.CPP (modified) (3 diffs)
-
gdi32.cpp (modified) (5 diffs)
-
line.cpp (modified) (14 diffs)
-
makefile (modified) (2 diffs)
-
metafile.cpp (modified) (19 diffs)
-
region.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/CALLBACK.CPP
r4492 r4552 1 /* $Id: CALLBACK.CPP,v 1. 5 2000-10-16 22:26:53 sandervl Exp $ */1 /* $Id: CALLBACK.CPP,v 1.6 2000-11-04 16:29:23 sandervl Exp $ */ 2 2 3 3 /* … … 17 17 #define DBG_LOCALLOG DBG_callback 18 18 #include "dbglocal.h" 19 20 #ifndef STDCALL_ENUMPROCS 19 21 20 22 static VOID OPEN32API Callback(int X, int Y, LPARAM lpData); … … 52 54 //****************************************************************************** 53 55 //****************************************************************************** 56 57 #endif //#ifndef STDCALL_ENUMPROCS -
trunk/src/gdi32/gdi32.cpp
r4533 r4552 1 /* $Id: gdi32.cpp,v 1.5 7 2000-10-26 17:20:29sandervl Exp $ */1 /* $Id: gdi32.cpp,v 1.58 2000-11-04 16:29:23 sandervl Exp $ */ 2 2 3 3 /* … … 43 43 COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor) 44 44 { 45 dprintf(("GDI32: SetBkColor to %X\n", crColor));45 dprintf(("GDI32: SetBkColor %x to %x", hdc, crColor)); 46 46 return(O32_SetBkColor(hdc, crColor)); 47 47 } … … 52 52 COLORREF clr; 53 53 54 dprintf(("GDI32: SetTextColor %x to %x", hdc, crColor)); 54 55 clr = O32_SetTextColor(hdc, crColor); 55 dprintf(("GDI32: SetTextColor from %X to %X\n", clr, crColor));56 56 return(clr); 57 57 } … … 578 578 //****************************************************************************** 579 579 //****************************************************************************** 580 int WIN32API EnumObjects( HDC arg1, int arg2, GOBJENUMPROC arg3, LPARAM arg4) 581 { 580 int WIN32API EnumObjects( HDC hdc, int objType, GOBJENUMPROC objFunc, LPARAM lParam) 581 { 582 #ifdef STDCALL_ENUMPROCS 583 dprintf(("GDI32: EnumObjects %x %d %x %x", hdc, objType, objFunc, lParam)); 584 //should change os2win.h 585 return O32_EnumObjects(hdc, objType, (GOBJENUMPROC_O32)objFunc, lParam); 586 #else 587 //calling convention differences 582 588 dprintf(("GDI32: EnumObjects STUB")); 583 //calling convention differences584 589 // return O32_EnumObjects(arg1, arg2, arg3, arg4); 585 590 return 0; 591 #endif 586 592 } 587 593 //****************************************************************************** … … 1292 1298 { 1293 1299 dprintf(("GDI32: UpdateColors\n")); 1294 return O32_InvalidateRect(O32_WindowFromDC(hdc), NULL, FALSE);1300 return InvalidateRect(WindowFromDC(hdc), NULL, FALSE); 1295 1301 } 1296 1302 //****************************************************************************** -
trunk/src/gdi32/line.cpp
r2802 r4552 1 /* $Id: line.cpp,v 1. 6 2000-02-16 14:18:10sandervl Exp $ */1 /* $Id: line.cpp,v 1.7 2000-11-04 16:29:24 sandervl Exp $ */ 2 2 /* 3 3 * Line API's … … 14 14 #include "callback.h" 15 15 #include "oslibgpi.h" 16 #include <dcdata.h> 16 17 17 18 #define DBG_LOCALLOG DBG_line … … 48 49 } 49 50 50 BOOL drawSingleLinePoint(HDC hdc, PVOIDpHps,PPOINTLOS2 pt)51 BOOL drawSingleLinePoint(HDC hdc,pDCData pHps,PPOINTLOS2 pt) 51 52 { 52 53 LOGPEN penInfo; … … 72 73 BOOL WIN32API MoveToEx( HDC hdc, int X, int Y, LPPOINT lpPoint) 73 74 { 74 PVOID pHps =OSLibGpiQueryDCData(hdc);75 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 75 76 76 77 dprintf(("GDI32: MoveToEx %x (%d,%d)", hdc, X, Y)); … … 79 80 { 80 81 POINTLOS2 newPoint = {X,Y}; 82 83 #ifndef INVERT 84 if(pHps->yInvert > 0) { 85 newPoint.y = pHps->yInvert - newPoint.y; 86 if (lpPoint) { 87 lpPoint->y = pHps->yInvert - lpPoint->y; 88 } 89 } 90 #endif 81 91 82 92 if (lpPoint) … … 105 115 BOOL WIN32API LineTo( HDC hdc, int nXEnd, int nYEnd) 106 116 { 107 PVOID pHps =OSLibGpiQueryDCData(hdc);117 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 108 118 BOOL rc = TRUE; 109 119 … … 114 124 POINTLOS2 oldPoint,newPoint; 115 125 BOOL bWideLine; 126 127 #ifndef INVERT 128 if (pHps->yInvert > 0) { 129 nYEnd = pHps->yInvert - nYEnd; 130 } 131 #endif 116 132 117 133 //CB: add metafile info … … 151 167 { 152 168 BOOL rc; 169 #ifndef STDCALL_ENUMPROCS 153 170 LineDDAProcCallback *callback = new LineDDAProcCallback(lpLineFunc, lpData); 171 #endif 154 172 POINTLOS2 startPt,endPt; 155 173 … … 160 178 toWin32LineEnd(&startPt,nXEnd,nYEnd,&endPt); 161 179 162 rc = O32_LineDDA(startPt.x,startPt.y,endPt.x,endPt.y,callback->GetOS2Callback(),(LPARAM)callback); 180 rc = O32_LineDDA(startPt.x,startPt.y,endPt.x,endPt.y, lpLineFunc, lpData); 181 #else 182 #ifdef STDCALL_ENUMPROCS 183 //should change os2win.h 184 rc = O32_LineDDA(nXStart,nYStart,nXEnd,nYEnd, (LINEDDAPROC_O32)lpLineFunc, lpData); 163 185 #else 164 186 rc = O32_LineDDA(nXStart,nYStart,nXEnd,nYEnd,callback->GetOS2Callback(),(LPARAM)callback); 165 #endif166 187 if(callback) 167 188 delete callback; 189 #endif 190 191 #endif 168 192 return(rc); 169 193 } … … 172 196 BOOL WIN32API Polyline( HDC hdc, const POINT *lppt, int cPoints) 173 197 { 174 PVOID pHps =OSLibGpiQueryDCData(hdc);198 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 175 199 176 200 dprintf(("GDI32: Polyline")); … … 186 210 { 187 211 SetLastError(ERROR_INVALID_PARAMETER); 188 189 212 return FALSE; 190 213 } … … 193 216 { 194 217 drawSingleLinePoint(hdc,pHps,(PPOINTLOS2)lppt); //CB: check metafile recording 195 196 218 return TRUE; 197 219 } … … 211 233 BOOL WIN32API PolylineTo( HDC hdc, const POINT * lppt, DWORD cCount) 212 234 { 213 PVOID pHps =OSLibGpiQueryDCData(hdc);235 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hdc); 214 236 215 237 dprintf(("GDI32: PolylineTo")); … … 228 250 { 229 251 drawSingleLinePoint(hdc,pHps,(PPOINTLOS2)lppt); 230 231 252 return TRUE; 232 253 } -
trunk/src/gdi32/makefile
r3864 r4552 1 # $Id: makefile,v 1.2 7 2000-07-19 19:05:06sandervl Exp $1 # $Id: makefile,v 1.28 2000-11-04 16:29:24 sandervl Exp $ 2 2 3 3 # … … 20 20 # Flag overloads and local macros. 21 21 CLEANEXTRAS = gdi32rsrc.asm 22 23 #CFLAGS = $(CFLAGS) -DSTDCALL_ENUMPROCS -DINVERT 24 #CXXFLAGS = $(CXXFLAGS) -DSTDCALL_ENUMPROCS -DINVERT 25 26 CFLAGS = $(CFLAGS) -DINVERT 27 CXXFLAGS = $(CXXFLAGS) -DINVERT 22 28 23 29 # Object files. All objects should be prefixed with $(OBJDIR)! -
trunk/src/gdi32/metafile.cpp
r2802 r4552 1 /* $Id: metafile.cpp,v 1. 2 2000-02-16 14:18:11sandervl Exp $ */1 /* $Id: metafile.cpp,v 1.3 2000-11-04 16:29:24 sandervl Exp $ */ 2 2 3 3 /* … … 23 23 HENHMETAFILE WIN32API CloseEnhMetaFile( HDC arg1) 24 24 { 25 dprintf(("GDI32: CloseEnhMetaFile")); 26 return O32_CloseEnhMetaFile(arg1); 25 dprintf(("GDI32: CloseEnhMetaFile NOT IMPLEMENTED")); 26 //// return O32_CloseEnhMetaFile(arg1); 27 return 0; 27 28 } 28 29 //****************************************************************************** … … 37 38 HENHMETAFILE WIN32API CopyEnhMetaFileA( HENHMETAFILE arg1, LPCSTR arg2) 38 39 { 39 dprintf(("GDI32: CopyEnhMetaFileA")); 40 return O32_CopyEnhMetaFile(arg1, arg2); 40 dprintf(("GDI32: CopyEnhMetaFileA NOT IMPLEMENTED")); 41 //// return O32_CopyEnhMetaFile(arg1, arg2); 42 return 0; 41 43 } 42 44 //****************************************************************************** … … 48 50 49 51 dprintf(("GDI32: CopyEnhMetaFileW")); 50 rc = O32_CopyEnhMetaFile(arg1, astring);52 rc = CopyEnhMetaFileA(arg1, astring); 51 53 FreeAsciiString(astring); 52 54 return rc; … … 56 58 HENHMETAFILE WIN32API CreateEnhMetaFileA( HDC arg1, LPCSTR arg2, const RECT * arg3, LPCSTR arg4) 57 59 { 58 dprintf(("GDI32: CreateEnhMetaFileA")); 59 return O32_CreateEnhMetaFile(arg1, arg2, arg3, arg4); 60 dprintf(("GDI32: CreateEnhMetaFileA NOT IMPLEMENTED")); 61 //// return O32_CreateEnhMetaFile(arg1, arg2, arg3, arg4); 62 return 0; 60 63 } 61 64 //****************************************************************************** … … 68 71 69 72 dprintf(("GDI32: CreateMetaFileW")); 70 rc = O32_CreateEnhMetaFile(arg1,astring1,arg3,astring2);73 rc = CreateEnhMetaFileA(arg1,astring1,arg3,astring2); 71 74 FreeAsciiString(astring1); 72 75 FreeAsciiString(astring2); … … 96 99 BOOL WIN32API DeleteEnhMetaFile( HENHMETAFILE arg1) 97 100 { 98 dprintf(("GDI32: DeleteEnhMetaFile\n")); 99 return O32_DeleteEnhMetaFile(arg1); 101 dprintf(("GDI32: DeleteEnhMetaFile NOT IMPLEMENTED")); 102 //// return O32_DeleteEnhMetaFile(arg1); 103 return 0; 100 104 } 101 105 //****************************************************************************** … … 128 132 //TODO: Callback 129 133 //****************************************************************************** 130 BOOL WIN32API EnumMetaFile( HDC arg1, HMETAFILE arg2, MFENUMPROC arg3, LPARAM arg4) 131 { 132 dprintf(("GDI32: EnumMetaFile STUB")); 134 BOOL WIN32API EnumMetaFile( HDC hdc, HMETAFILE hMetafile, MFENUMPROC metaProc, LPARAM lParam) 135 { 136 #ifdef STDCALL_ENUMPROCS 137 dprintf(("GDI32: EnumMetaFile %x %x %x %x", hdc, hMetafile, metaProc, lParam)); 138 //should change os2win.h 139 return O32_EnumMetaFile(hdc, hMetafile, (MFENUMPROC_O32)metaProc, lParam); 140 #else 141 dprintf(("GDI32: EnumMetaFile NOT IMPLEMENTED")); 133 142 //calling convention differences 134 143 // return O32_EnumMetaFile(arg1, arg2, arg3, arg4); 135 144 return 0; 145 #endif 136 146 } 137 147 //****************************************************************************** … … 139 149 BOOL WIN32API EnumEnhMetaFile( HDC arg1, HENHMETAFILE arg2, ENHMFENUMPROC arg3, PVOID arg4, const RECT * arg5) 140 150 { 141 dprintf(("GDI32: EnumEnhMetaFile DOESN'T WORK!"));151 dprintf(("GDI32: EnumEnhMetaFile NOT IMPLEMENTED!")); 142 152 // return O32_EnumEnhMetaFile(arg1, arg2, arg3, arg4, arg5); 143 153 return 0; … … 167 177 HENHMETAFILE WIN32API GetEnhMetaFileA( LPCSTR arg1) 168 178 { 169 dprintf(("GDI32: GetEnhMetaFileA")); 170 return O32_GetEnhMetaFile(arg1); 179 dprintf(("GDI32: GetEnhMetaFileA NOT IMPLEMENTED")); 180 //// return O32_GetEnhMetaFile(arg1); 181 return 0; 171 182 } 172 183 //****************************************************************************** … … 179 190 dprintf(("GDI32: GetEnhMetaFileW")); 180 191 // NOTE: This will not work as is (needs UNICODE support) 181 rc = O32_GetEnhMetaFile(astring);192 rc = GetEnhMetaFileA(astring); 182 193 FreeAsciiString(astring); 183 194 return rc; … … 187 198 UINT WIN32API GetEnhMetaFileBits( HENHMETAFILE arg1, UINT arg2, PBYTE arg3) 188 199 { 189 dprintf(("GDI32: GetEnhMetaFileBits")); 190 return O32_GetEnhMetaFileBits(arg1, arg2, arg3); 200 dprintf(("GDI32: GetEnhMetaFileBits NOT IMPLEMENTED")); 201 //// return O32_GetEnhMetaFileBits(arg1, arg2, arg3); 202 return 0; 191 203 } 192 204 //****************************************************************************** … … 201 213 HENHMETAFILE WIN32API SetEnhMetaFileBits( UINT arg1, const BYTE * arg2) 202 214 { 203 dprintf(("GDI32: SetEnhMetaFileBits")); 204 return O32_SetEnhMetaFileBits(arg1, arg2); 215 dprintf(("GDI32: SetEnhMetaFileBits NOT IMPLEMENTED")); 216 //// return O32_SetEnhMetaFileBits(arg1, arg2); 217 return 0; 205 218 } 206 219 //****************************************************************************** … … 215 228 HENHMETAFILE WIN32API SetWinMetaFileBits( UINT arg1, const BYTE * arg2, HDC arg3, const METAFILEPICT * arg4) 216 229 { 217 dprintf(("GDI32: SetWinMetaFileBits")); 218 return O32_SetWinMetaFileBits(arg1, arg2, arg3, arg4); 230 dprintf(("GDI32: SetWinMetaFileBits NOT IMPLEMENTED")); 231 //// return O32_SetWinMetaFileBits(arg1, arg2, arg3, arg4); 232 return 0; 219 233 } 220 234 //****************************************************************************** … … 222 236 UINT WIN32API GetWinMetaFileBits( HENHMETAFILE arg1, UINT arg2, PBYTE arg3, int arg4, HDC arg5) 223 237 { 224 dprintf(("GDI32: GetWinMetaFileBits")); 225 return O32_GetWinMetaFileBits(arg1, arg2, arg3, arg4, arg5); 238 dprintf(("GDI32: GetWinMetaFileBits NOT IMPLEMENTED")); 239 //// return O32_GetWinMetaFileBits(arg1, arg2, arg3, arg4, arg5); 240 return 0; 226 241 } 227 242 //****************************************************************************** … … 229 244 UINT WIN32API GetEnhMetaFileHeader( HENHMETAFILE arg1, UINT arg2, LPENHMETAHEADER arg3) 230 245 { 231 dprintf(("GDI32: GetEnhMetaFileHeader")); 232 return O32_GetEnhMetaFileHeader(arg1, arg2, arg3); 246 dprintf(("GDI32: GetEnhMetaFileHeader NOT IMPLEMENTED")); 247 //// return O32_GetEnhMetaFileHeader(arg1, arg2, arg3); 248 return 0; 233 249 } 234 250 //****************************************************************************** … … 236 252 UINT WIN32API GetEnhMetaFilePaletteEntries( HENHMETAFILE arg1, UINT arg2, PPALETTEENTRY arg3) 237 253 { 238 dprintf(("GDI32: GetEnhMetaFilePaletteEntries")); 239 return O32_GetEnhMetaFilePaletteEntries(arg1, arg2, arg3); 254 dprintf(("GDI32: GetEnhMetaFilePaletteEntries NOT IMPLEMENTED")); 255 //// return O32_GetEnhMetaFilePaletteEntries(arg1, arg2, arg3); 256 return 0; 240 257 } 241 258 //****************************************************************************** … … 243 260 BOOL WIN32API PlayEnhMetaFile( HDC arg1, HENHMETAFILE arg2, const RECT * arg3) 244 261 { 245 dprintf(("GDI32: PlayEnhMetaFile")); 246 return O32_PlayEnhMetaFile(arg1, arg2, arg3); 262 dprintf(("GDI32: PlayEnhMetaFile NOT IMPLEMENTED")); 263 //// return O32_PlayEnhMetaFile(arg1, arg2, arg3); 264 return 0; 247 265 } 248 266 //****************************************************************************** … … 269 287 ) 270 288 { 271 dprintf(("GDI32: PlayEnhMetaFileRecord - stub\n"));289 dprintf(("GDI32: PlayEnhMetaFileRecord - NOT IMPLEMENTED")); 272 290 return FALSE; 273 291 } 274 292 //****************************************************************************** 275 UINT WIN32API GetEnhMetaFileDescriptionA( /*KSO Thu 21.05.1998*/ 276 HENHMETAFILE arg1, 277 UINT arg2, 278 LPSTR arg3 279 ) 280 { 281 dprintf(("GDI32: GetEnhMetaFileDescriptionA - stub\n")); 293 UINT WIN32API GetEnhMetaFileDescriptionA(HENHMETAFILE arg1, 294 UINT arg2, 295 LPSTR arg3) 296 { 297 dprintf(("GDI32: GetEnhMetaFileDescriptionA - NOT IMPLEMENTED")); 282 298 return FALSE; 283 299 } 284 300 //****************************************************************************** 285 301 //****************************************************************************** 286 UINT WIN32API GetEnhMetaFileDescriptionW( /*KSO Thu 21.05.1998*/ 287 HENHMETAFILE arg1, 288 UINT arg2, 289 LPWSTR arg3 290 ) 302 UINT WIN32API GetEnhMetaFileDescriptionW(HENHMETAFILE arg1, 303 UINT arg2, 304 LPWSTR arg3) 291 305 { 292 306 dprintf(("GDI32: GetEnhMetaFileDescriptionW - stub\n")); -
trunk/src/gdi32/region.cpp
r4385 r4552 1 /* $Id: region.cpp,v 1.1 4 2000-10-02 17:43:32sandervl Exp $ */1 /* $Id: region.cpp,v 1.15 2000-11-04 16:29:24 sandervl Exp $ */ 2 2 3 3 /* … … 562 562 } 563 563 else { 564 #ifndef INVERT 565 //Convert coordinates from PM to win32 566 if (pHps->yInvert > 0) { 567 LONG temp = pHps->yInvert - rectl.yBottom; 568 rectl.yBottom = pHps->yInvert - rectl.yTop; 569 rectl.yTop = temp; 570 } 571 #endif 564 572 //Convert including/including to including/excluding 565 573 includeBottomRightPoint(pHps, (PPOINTLOS2)&rectl); … … 567 575 lpRect->left = rectl.xLeft; 568 576 lpRect->right = rectl.xRight; 569 //No conversion required as GpiQueryClipBox is affected by 570 //the y-inversion of the window 571 //NOTE: YINVERSION dependancy 577 572 578 if(rectl.yBottom > rectl.yTop) { 573 579 lpRect->top = rectl.yTop; … … 582 588 } 583 589 } 590 // if(lpRect->left == 0 && lpRect->top == 0 && lpRect->right == 0 && lpRect->bottom == 0) 591 // DebugInt3(); 584 592 dprintf(("GDI32: GetClipBox of %X returned %d; (%d,%d)(%d,%d)", hdc, rc, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom)); 585 593 return rc; … … 650 658 } 651 659 660 #ifndef INVERT 661 if (pHps->yInvert > 0) { 662 LONG temp = pHps->yInvert - rectl.yBottom; 663 rectl.yBottom = pHps->yInvert - rectl.yTop; 664 rectl.yTop = temp; 665 } 666 #endif 667 652 668 dprintf(("ExcludeClipRgn %x (%d,%d)(%d,%d)", hdc, left, top, right, bottom)); 653 669 lComplexity = GpiExcludeClipRectangle(pHps->hps, &rectl); … … 684 700 } 685 701 702 #ifndef INVERT 703 //Convert coordinates from PM to win32 704 if (pHps->yInvert > 0) { 705 LONG temp = pHps->yInvert - rectl.yBottom; 706 rectl.yBottom = pHps->yInvert - rectl.yTop; 707 rectl.yTop = temp; 708 } 709 #endif 710 686 711 dprintf(("IntersectClipRgn %x (%d,%d)(%d,%d)", hdc, left, top, right, bottom)); 687 712 lComplexity = GpiIntersectClipRectangle(pHps->hps, &rectl); … … 708 733 dprintf(("OffsetClipRgn %x (%d,%d)", hdc, nXOffset, nYOffset)); 709 734 POINTL pointl = { nXOffset, nYOffset }; 735 #ifndef INVERT 736 if (pHps->yInvert > 0) { 737 pointl.y = pHps->yInvert - pointl.y; 738 } 739 #endif 740 710 741 lComplexity = GpiOffsetClipRegion(pHps->hps, &pointl); 711 742 … … 1262 1293 GpiOffsetRegion(hpsRegion, hrgn, &ptlOffset); 1263 1294 1295 RECTL rectl[8]; 1264 1296 RGNRECT rgnRect; 1265 1297 rgnRect.ircStart = 1; 1266 rgnRect.crc = 0;1298 rgnRect.crc = 8; 1267 1299 rgnRect.ulDirection = RECTDIR_LFRT_TOPBOT; // doesn't make a difference 1268 if(GpiQueryRegionRects(hpsRegion, hrgn, NULL, &rgnRect, NULL))1300 if(GpiQueryRegionRects(hpsRegion, hrgn, NULL, &rgnRect, &rectl[0])) 1269 1301 { 1270 1302 switch (rgnRect.crcReturned) { … … 1306 1338 height = abs(height); 1307 1339 1308 if(pHps->lastBrush Handle!= (UINT)hBrush)1340 if(pHps->lastBrushKey != (UINT)hBrush) 1309 1341 { 1310 1342 hbrushRestore = SelectObject(hdc, hBrush); … … 1347 1379 } 1348 1380 1349 if(pHps->lastBrush Handle!= (UINT)hBrush)1381 if(pHps->lastBrushKey != (UINT)hBrush) 1350 1382 { 1351 1383 hbrushRestore = SelectObject(hdc, hBrush); … … 1382 1414 } 1383 1415 1384 return FillRgn(hdc, hrgn, (HBRUSH) pHps->lastBrush Handle);1416 return FillRgn(hdc, hrgn, (HBRUSH) pHps->lastBrushKey); 1385 1417 } 1386 1418 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.
