gdi32: Get rid of a few more uses of DC_GetDCPtr.

This commit is contained in:
Alexandre Julliard 2008-02-05 17:35:40 +01:00
parent b962fca75c
commit 67a9edbdf4
3 changed files with 18 additions and 18 deletions

View File

@ -336,7 +336,7 @@ HBRUSH WINAPI CreateSolidBrush( COLORREF color )
*/
BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
{
DC *dc = DC_GetDCPtr( hdc );
DC *dc = get_dc_ptr( hdc );
if (!dc) return FALSE;
if (oldorg)
@ -346,7 +346,7 @@ BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
}
dc->brushOrgX = x;
dc->brushOrgY = y;
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
return TRUE;
}

View File

@ -376,7 +376,7 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
UINT result = 0;
BITMAPOBJ * bitmap;
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if (!(dc = get_dc_ptr( hdc ))) return 0;
if ((bitmap = GDI_GetObjPtr( dc->hBitmap, BITMAP_MAGIC )))
{
@ -396,7 +396,7 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
if (dc->funcs->pSetDIBColorTable)
dc->funcs->pSetDIBColorTable(dc->physDev, startpos, entries, colors);
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
return result;
}
@ -409,7 +409,7 @@ UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *col
DC * dc;
UINT result = 0;
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if (!(dc = get_dc_ptr( hdc ))) return 0;
if (dc->funcs->pGetDIBColorTable)
result = dc->funcs->pGetDIBColorTable(dc->physDev, startpos, entries, colors);
@ -431,7 +431,7 @@ UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *col
GDI_ReleaseObj( dc->hBitmap );
}
}
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
return result;
}
@ -1075,14 +1075,14 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
{
if (init == CBM_INIT) SetDIBits( hdc, handle, 0, height, bits, data, coloruse );
else if (hdc && ((dc = DC_GetDCPtr( hdc )) != NULL) )
else if (hdc && ((dc = get_dc_ptr( hdc )) != NULL) )
{
if (!BITMAP_SetOwnerDC( handle, dc ))
{
DeleteObject( handle );
handle = 0;
}
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
}
}
@ -1323,7 +1323,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
bDesktopDC = TRUE;
}
if (!(dc = DC_GetDCPtr( hdc ))) goto error;
if (!(dc = get_dc_ptr( hdc ))) goto error;
/* create Device Dependent Bitmap and add DIB pointer */
ret = CreateBitmap( dib->dsBm.bmWidth, dib->dsBm.bmHeight, 1,
@ -1347,7 +1347,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
}
}
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
if (bDesktopDC) DeleteDC( hdc );
if (ret && bits) *bits = dib->dsBm.bmBits;
return ret;

View File

@ -1006,10 +1006,10 @@ INT WINAPI EnumFontsW( HDC hDC, LPCWSTR lpName, FONTENUMPROCW efproc,
INT WINAPI GetTextCharacterExtra( HDC hdc )
{
INT ret;
DC *dc = DC_GetDCPtr( hdc );
DC *dc = get_dc_ptr( hdc );
if (!dc) return 0x80000000;
ret = dc->charExtra;
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
return ret;
}
@ -1020,7 +1020,7 @@ INT WINAPI GetTextCharacterExtra( HDC hdc )
INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
{
INT prev;
DC * dc = DC_GetDCPtr( hdc );
DC * dc = get_dc_ptr( hdc );
if (!dc) return 0x80000000;
if (dc->funcs->pSetTextCharacterExtra)
prev = dc->funcs->pSetTextCharacterExtra( dc->physDev, extra );
@ -1029,7 +1029,7 @@ INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
prev = dc->charExtra;
dc->charExtra = extra;
}
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
return prev;
}
@ -1040,7 +1040,7 @@ INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
BOOL WINAPI SetTextJustification( HDC hdc, INT extra, INT breaks )
{
BOOL ret = TRUE;
DC * dc = DC_GetDCPtr( hdc );
DC * dc = get_dc_ptr( hdc );
if (!dc) return FALSE;
if (dc->funcs->pSetTextJustification)
ret = dc->funcs->pSetTextJustification( dc->physDev, extra, breaks );
@ -1059,7 +1059,7 @@ BOOL WINAPI SetTextJustification( HDC hdc, INT extra, INT breaks )
dc->breakRem = 0;
}
}
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
return ret;
}
@ -2425,7 +2425,7 @@ BOOL WINAPI PolyTextOutW( HDC hdc, const POLYTEXTW *pptxt, INT cStrings )
*/
DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
{
DC *dc = DC_GetDCPtr( hDC );
DC *dc = get_dc_ptr( hDC );
DWORD ret = 0;
if(!dc) return 0;
if(dc->funcs->pSetMapperFlags)
@ -2435,7 +2435,7 @@ DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
}
else
FIXME("(%p, 0x%08x): stub - harmless\n", hDC, dwFlag);
DC_ReleaseDCPtr( dc );
release_dc_ptr( dc );
return ret;
}