gdi32: Add null driver entry points for the DIB functions.
This commit is contained in:
parent
b48efd098f
commit
ac5a180278
|
@ -382,26 +382,19 @@ INT WINAPI SetDIBitsToDevice(HDC hdc, INT xDest, INT yDest, DWORD cx,
|
||||||
UINT lines, LPCVOID bits, const BITMAPINFO *info,
|
UINT lines, LPCVOID bits, const BITMAPINFO *info,
|
||||||
UINT coloruse )
|
UINT coloruse )
|
||||||
{
|
{
|
||||||
INT ret;
|
INT ret = 0;
|
||||||
DC *dc;
|
DC *dc;
|
||||||
|
|
||||||
if (!bits) return 0;
|
if (!bits) return 0;
|
||||||
|
|
||||||
if (!(dc = get_dc_ptr( hdc ))) return 0;
|
if ((dc = get_dc_ptr( hdc )))
|
||||||
|
|
||||||
if(dc->funcs->pSetDIBitsToDevice)
|
|
||||||
{
|
{
|
||||||
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetDIBitsToDevice );
|
||||||
update_dc( dc );
|
update_dc( dc );
|
||||||
ret = dc->funcs->pSetDIBitsToDevice( dc->physDev, xDest, yDest, cx, cy, xSrc,
|
ret = physdev->funcs->pSetDIBitsToDevice( physdev, xDest, yDest, cx, cy, xSrc,
|
||||||
ySrc, startscan, lines, bits,
|
ySrc, startscan, lines, bits, info, coloruse );
|
||||||
info, coloruse );
|
release_dc_ptr( dc );
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
FIXME("unimplemented on hdc %p\n", hdc);
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
release_dc_ptr( dc );
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,6 +411,8 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
|
||||||
|
|
||||||
if ((bitmap = GDI_GetObjPtr( dc->hBitmap, OBJ_BITMAP )))
|
if ((bitmap = GDI_GetObjPtr( dc->hBitmap, OBJ_BITMAP )))
|
||||||
{
|
{
|
||||||
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetDIBColorTable );
|
||||||
|
|
||||||
/* Check if currently selected bitmap is a DIB */
|
/* Check if currently selected bitmap is a DIB */
|
||||||
if (bitmap->color_table)
|
if (bitmap->color_table)
|
||||||
{
|
{
|
||||||
|
@ -429,11 +424,8 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GDI_ReleaseObj( dc->hBitmap );
|
GDI_ReleaseObj( dc->hBitmap );
|
||||||
|
physdev->funcs->pSetDIBColorTable( physdev, startpos, entries, colors );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dc->funcs->pSetDIBColorTable)
|
|
||||||
dc->funcs->pSetDIBColorTable(dc->physDev, startpos, entries, colors);
|
|
||||||
|
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1361,19 +1353,17 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
|
||||||
|
|
||||||
if (ret && ((bmp = GDI_GetObjPtr(ret, OBJ_BITMAP))))
|
if (ret && ((bmp = GDI_GetObjPtr(ret, OBJ_BITMAP))))
|
||||||
{
|
{
|
||||||
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pCreateDIBSection );
|
||||||
bmp->dib = dib;
|
bmp->dib = dib;
|
||||||
bmp->funcs = dc->funcs;
|
bmp->funcs = physdev->funcs;
|
||||||
/* create local copy of DIB palette */
|
/* create local copy of DIB palette */
|
||||||
if (bpp <= 8) DIB_CopyColorTable( dc, bmp, usage, bmi );
|
if (bpp <= 8) DIB_CopyColorTable( dc, bmp, usage, bmi );
|
||||||
GDI_ReleaseObj( ret );
|
GDI_ReleaseObj( ret );
|
||||||
|
|
||||||
if (dc->funcs->pCreateDIBSection)
|
if (!physdev->funcs->pCreateDIBSection( physdev, ret, bmi, usage ))
|
||||||
{
|
{
|
||||||
if (!dc->funcs->pCreateDIBSection(dc->physDev, ret, bmi, usage))
|
DeleteObject( ret );
|
||||||
{
|
ret = 0;
|
||||||
DeleteObject( ret );
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -339,6 +339,12 @@ static BOOL CDECL nulldrv_CreateBitmap( PHYSDEV dev, HBITMAP bitmap, LPVOID bits
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static HBITMAP CDECL nulldrv_CreateDIBSection( PHYSDEV dev, HBITMAP bitmap,
|
||||||
|
const BITMAPINFO *info, UINT usage )
|
||||||
|
{
|
||||||
|
return bitmap;
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL CDECL nulldrv_DeleteBitmap( HBITMAP bitmap )
|
static BOOL CDECL nulldrv_DeleteBitmap( HBITMAP bitmap )
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -576,6 +582,18 @@ static COLORREF CDECL nulldrv_SetDCPenColor( PHYSDEV dev, COLORREF color )
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static UINT CDECL nulldrv_SetDIBColorTable( PHYSDEV dev, UINT pos, UINT count, const RGBQUAD *colors )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static INT CDECL nulldrv_SetDIBitsToDevice( PHYSDEV dev, INT x_dst, INT y_dst, DWORD width, DWORD height,
|
||||||
|
INT x_src, INT y_src, UINT start, UINT lines,
|
||||||
|
const void *bits, const BITMAPINFO *info, UINT coloruse )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void CDECL nulldrv_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn )
|
static void CDECL nulldrv_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -736,7 +754,7 @@ const DC_FUNCTIONS null_driver =
|
||||||
nulldrv_CloseFigure, /* pCloseFigure */
|
nulldrv_CloseFigure, /* pCloseFigure */
|
||||||
nulldrv_CreateBitmap, /* pCreateBitmap */
|
nulldrv_CreateBitmap, /* pCreateBitmap */
|
||||||
NULL, /* pCreateDC */
|
NULL, /* pCreateDC */
|
||||||
NULL, /* pCreateDIBSection */
|
nulldrv_CreateDIBSection, /* pCreateDIBSection */
|
||||||
nulldrv_DeleteBitmap, /* pDeleteBitmap */
|
nulldrv_DeleteBitmap, /* pDeleteBitmap */
|
||||||
NULL, /* pDeleteDC */
|
NULL, /* pDeleteDC */
|
||||||
nulldrv_DeleteObject, /* pDeleteObject */
|
nulldrv_DeleteObject, /* pDeleteObject */
|
||||||
|
@ -811,9 +829,9 @@ const DC_FUNCTIONS null_driver =
|
||||||
nulldrv_SetBkMode, /* pSetBkMode */
|
nulldrv_SetBkMode, /* pSetBkMode */
|
||||||
nulldrv_SetDCBrushColor, /* pSetDCBrushColor */
|
nulldrv_SetDCBrushColor, /* pSetDCBrushColor */
|
||||||
nulldrv_SetDCPenColor, /* pSetDCPenColor */
|
nulldrv_SetDCPenColor, /* pSetDCPenColor */
|
||||||
NULL, /* pSetDIBColorTable */
|
nulldrv_SetDIBColorTable, /* pSetDIBColorTable */
|
||||||
nulldrv_SetDIBits, /* pSetDIBits */
|
nulldrv_SetDIBits, /* pSetDIBits */
|
||||||
NULL, /* pSetDIBitsToDevice */
|
nulldrv_SetDIBitsToDevice, /* pSetDIBitsToDevice */
|
||||||
nulldrv_SetDeviceClipping, /* pSetDeviceClipping */
|
nulldrv_SetDeviceClipping, /* pSetDeviceClipping */
|
||||||
nulldrv_SetDeviceGammaRamp, /* pSetDeviceGammaRamp */
|
nulldrv_SetDeviceGammaRamp, /* pSetDeviceGammaRamp */
|
||||||
nulldrv_SetLayout, /* pSetLayout */
|
nulldrv_SetLayout, /* pSetLayout */
|
||||||
|
|
Loading…
Reference in New Issue