- Timestamp:
- Mar 27, 2001, 10:47:53 PM (24 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibitmap.cpp
r4947 r5390 1 /* $Id: dibitmap.cpp,v 1.1 4 2001-01-14 17:17:45sandervl Exp $ */1 /* $Id: dibitmap.cpp,v 1.15 2001-03-27 20:47:52 sandervl Exp $ */ 2 2 3 3 /* … … 307 307 DIBSection *dsect; 308 308 309 dsect = DIBSection::find ((DWORD)hBitmap);309 dsect = DIBSection::findObj(hBitmap); 310 310 if(dsect) { 311 311 return dsect->SetDIBits(hdc, hBitmap, startscan, numlines, pBits, (BITMAPINFOHEADER_W *)&pBitmapInfo->bmiHeader, usage); -
trunk/src/gdi32/dibsect.cpp
r5346 r5390 1 /* $Id: dibsect.cpp,v 1.4 7 2001-03-21 12:31:36sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.48 2001-03-27 20:47:52 sandervl Exp $ */ 2 2 3 3 /* … … 39 39 //****************************************************************************** 40 40 DIBSection::DIBSection(BITMAPINFOHEADER_W *pbmi, char *pColors, DWORD iUsage, DWORD hSection, DWORD dwOffset, DWORD handle, int fFlip) 41 : bmpBits(NULL), pOS2bmp(NULL), next(NULL), bmpBitsDblBuffer(NULL) 41 : bmpBits(NULL), pOS2bmp(NULL), next(NULL), bmpBitsDblBuffer(NULL), 42 hdc(0), hwndParent(0) 42 43 { 43 44 int palsize=0; … … 723 724 //****************************************************************************** 724 725 //****************************************************************************** 725 DIBSection *DIBSection::find (DWORDhandle)726 DIBSection *DIBSection::findObj(HANDLE handle) 726 727 { 727 728 DIBSection *dsect = section; … … 759 760 //****************************************************************************** 760 761 //****************************************************************************** 761 void DIBSection::deleteSection( DWORDhandle)762 { 763 DIBSection *dsect = find (handle);762 void DIBSection::deleteSection(HANDLE handle) 763 { 764 DIBSection *dsect = findObj(handle); 764 765 765 766 if(dsect) -
trunk/src/gdi32/dibsect.h
r5333 r5390 1 /* $Id: dibsect.h,v 1.2 3 2001-03-19 19:27:53sandervl Exp $ */1 /* $Id: dibsect.h,v 1.24 2001-03-27 20:47:52 sandervl Exp $ */ 2 2 3 3 /* … … 109 109 110 110 static DIBSection *getSection() { return section; } ; 111 static DIBSection *find (DWORDhandle);111 static DIBSection *findObj(HANDLE handle); 112 112 static DIBSection *findHDC(HDC hdc); 113 static void deleteSection( DWORDhandle);113 static void deleteSection(HANDLE handle); 114 114 protected: 115 115 -
trunk/src/gdi32/gdi32.DEF
r4899 r5390 1 ; $Id: gdi32.DEF,v 1.1 5 2001-01-09 18:12:58sandervl Exp $1 ; $Id: gdi32.DEF,v 1.16 2001-03-27 20:47:52 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 373 373 _setWinDeviceRegionFromPMDeviceRegion@16 @1211 NONAME 374 374 375 376 375 _UnselectGDIObjects@4 @1212 NONAME 376 -
trunk/src/gdi32/gdi32.cpp
r5044 r5390 1 /* $Id: gdi32.cpp,v 1.6 6 2001-02-01 18:01:52sandervl Exp $ */1 /* $Id: gdi32.cpp,v 1.67 2001-03-27 20:47:53 sandervl Exp $ */ 2 2 3 3 /* … … 184 184 } 185 185 SetLastError(ERROR_SUCCESS); 186 187 DIBSection *dsect = DIBSection::findHDC(hdc); 188 if(dsect) 189 { 190 //remove previously selected dibsection 191 dprintf(("DeleteDC %x, unselect DIB section %x", hdc, dsect->GetBitmapHandle())); 192 dsect->UnSelectDIBObject(); 193 } 194 186 195 //Must call ReleaseDC for window dcs 187 196 if(pHps->hdcType == TYPE_1) { … … 1247 1256 BOOL WIN32API GdiComment(HDC hdc, UINT cbSize, CONST BYTE *lpData) 1248 1257 { 1249 dprintf(("GDI32: GdiComment, not implemented (TRUE)\n")); 1250 return(TRUE); 1258 dprintf(("GDI32: GdiComment %x %d %x NOT IMPLEMENTED", hdc, cbSize, lpData)); 1259 // return O32_GdiComment(hdc, cbSize, lpData); 1260 return TRUE; 1251 1261 } 1252 1262 //****************************************************************************** -
trunk/src/gdi32/objhandle.cpp
r4963 r5390 1 /* $Id: objhandle.cpp,v 1.1 1 2001-01-18 18:13:18sandervl Exp $ */1 /* $Id: objhandle.cpp,v 1.12 2001-03-27 20:47:53 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Handle Management Code for OS/2 … … 177 177 if(DIBSection::getSection() != NULL) 178 178 { 179 DIBSection *dsect = DIBSection::find (hObject);179 DIBSection *dsect = DIBSection::findObj(hObject); 180 180 if(dsect) 181 181 { … … 236 236 { 237 237 HGDIOBJ rc; 238 239 dprintf2(("GDI32: SelectObject %x %x", hdc, hObj)); 240 241 if(ObjGetHandleType(hObj) == GDIOBJ_REGION) { 238 DWORD handleType = GetObjectType(hObj); 239 240 dprintf2(("GDI32: SelectObject %x %x type %x", hdc, hObj, handleType)); 241 242 if(handleType == GDIOBJ_REGION) { 242 243 //Return complexity here; not previously selected clip region 243 244 return (HGDIOBJ)SelectClipRgn(hdc, hObj); 244 245 } 245 246 246 if( DIBSection::getSection() != NULL)247 if(handleType == OBJ_BITMAP && DIBSection::getSection() != NULL) 247 248 { 248 249 DIBSection *dsect; 249 250 250 dsect = DIBSection::find (hdc);251 dsect = DIBSection::findHDC(hdc); 251 252 if(dsect) 252 253 { … … 254 255 dsect->UnSelectDIBObject(); 255 256 } 256 dsect = DIBSection::find ((DWORD)hObj);257 dsect = DIBSection::findObj(hObj); 257 258 if(dsect) 258 259 { … … 261 262 } 262 263 rc = O32_SelectObject(hdc, hObj); 263 if(rc != 0 && DIBSection::getSection != NULL)264 { 265 DIBSection *dsect = DIBSection::find ((DWORD)rc);264 if(rc != 0 && GetObjectType(rc) == OBJ_BITMAP && DIBSection::getSection != NULL) 265 { 266 DIBSection *dsect = DIBSection::findObj(rc); 266 267 if(dsect) 267 268 { … … 270 271 } 271 272 #ifdef USING_OPEN32 272 if( O32_GetObjectType(hObj)== OBJ_BITMAP)273 if(handleType == OBJ_BITMAP) 273 274 { 274 275 //SvL: Open32 messes up the height of the hdc (for windows) … … 286 287 } 287 288 //****************************************************************************** 289 //Called from user32 ReleaseDC (for non CS_OWNDC hdcs) 290 //****************************************************************************** 291 VOID WIN32API UnselectGDIObjects(HDC hdc) 292 { 293 DIBSection *dsect; 294 295 dsect = DIBSection::findHDC(hdc); 296 if(dsect) 297 { 298 //remove previously selected dibsection 299 dsect->UnSelectDIBObject(); 300 } 301 } 302 //****************************************************************************** 288 303 //****************************************************************************** 289 304 DWORD WIN32API GetObjectType( HGDIOBJ hObj) -
trunk/src/user32/dc.cpp
r5314 r5390 1 /* $Id: dc.cpp,v 1.9 5 2001-03-14 15:55:43sandervl Exp $ */1 /* $Id: dc.cpp,v 1.96 2001-03-27 20:47:22 sandervl Exp $ */ 2 2 3 3 /* … … 35 35 #include <dcdata.h> 36 36 #include <codepage.h> 37 #include <wingdi32.h> 37 38 38 39 #define INCLUDED_BY_DC … … 966 967 } 967 968 else { 969 UnselectGDIObjects(hdc); 968 970 rc = O32_ReleaseDC (0, hdc); 969 971 }
Note:
See TracChangeset
for help on using the changeset viewer.