gdi32: GetDIBColorTable doesn't need to be part of the DC driver interface.
This commit is contained in:
parent
e6d9486453
commit
fcfbb46d2e
|
@ -453,16 +453,12 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
|
||||||
UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *colors )
|
UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *colors )
|
||||||
{
|
{
|
||||||
DC * dc;
|
DC * dc;
|
||||||
|
BITMAPOBJ *bitmap;
|
||||||
UINT result = 0;
|
UINT result = 0;
|
||||||
|
|
||||||
if (!(dc = get_dc_ptr( hdc ))) return 0;
|
if (!(dc = get_dc_ptr( hdc ))) return 0;
|
||||||
|
|
||||||
if (dc->funcs->pGetDIBColorTable)
|
if ((bitmap = GDI_GetObjPtr( dc->hBitmap, OBJ_BITMAP )))
|
||||||
result = dc->funcs->pGetDIBColorTable(dc->physDev, startpos, entries, colors);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BITMAPOBJ *bitmap = GDI_GetObjPtr( dc->hBitmap, OBJ_BITMAP );
|
|
||||||
if (bitmap)
|
|
||||||
{
|
{
|
||||||
/* Check if currently selected bitmap is a DIB */
|
/* Check if currently selected bitmap is a DIB */
|
||||||
if (bitmap->color_table)
|
if (bitmap->color_table)
|
||||||
|
@ -476,7 +472,6 @@ UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *col
|
||||||
}
|
}
|
||||||
GDI_ReleaseObj( dc->hBitmap );
|
GDI_ReleaseObj( dc->hBitmap );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,6 @@ static struct graphics_driver *create_driver( HMODULE module )
|
||||||
GET_FUNC(GdiComment);
|
GET_FUNC(GdiComment);
|
||||||
GET_FUNC(GetBitmapBits);
|
GET_FUNC(GetBitmapBits);
|
||||||
GET_FUNC(GetCharWidth);
|
GET_FUNC(GetCharWidth);
|
||||||
GET_FUNC(GetDIBColorTable);
|
|
||||||
GET_FUNC(GetDIBits);
|
GET_FUNC(GetDIBits);
|
||||||
GET_FUNC(GetDeviceCaps);
|
GET_FUNC(GetDeviceCaps);
|
||||||
GET_FUNC(GetDeviceGammaRamp);
|
GET_FUNC(GetDeviceGammaRamp);
|
||||||
|
|
|
@ -72,7 +72,6 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
|
||||||
EMFDRV_GdiComment, /* pGdiComment */
|
EMFDRV_GdiComment, /* pGdiComment */
|
||||||
NULL, /* pGetBitmapBits */
|
NULL, /* pGetBitmapBits */
|
||||||
NULL, /* pGetCharWidth */
|
NULL, /* pGetCharWidth */
|
||||||
NULL, /* pGetDIBColorTable */
|
|
||||||
NULL, /* pGetDIBits */
|
NULL, /* pGetDIBits */
|
||||||
EMFDRV_GetDeviceCaps, /* pGetDeviceCaps */
|
EMFDRV_GetDeviceCaps, /* pGetDeviceCaps */
|
||||||
NULL, /* pGetDeviceGammaRamp */
|
NULL, /* pGetDeviceGammaRamp */
|
||||||
|
|
|
@ -114,7 +114,6 @@ typedef struct tagDC_FUNCS
|
||||||
BOOL (CDECL *pGdiComment)(PHYSDEV,UINT,CONST BYTE*);
|
BOOL (CDECL *pGdiComment)(PHYSDEV,UINT,CONST BYTE*);
|
||||||
LONG (CDECL *pGetBitmapBits)(HBITMAP,void*,LONG);
|
LONG (CDECL *pGetBitmapBits)(HBITMAP,void*,LONG);
|
||||||
BOOL (CDECL *pGetCharWidth)(PHYSDEV,UINT,UINT,LPINT);
|
BOOL (CDECL *pGetCharWidth)(PHYSDEV,UINT,UINT,LPINT);
|
||||||
UINT (CDECL *pGetDIBColorTable)(PHYSDEV,UINT,UINT,RGBQUAD*);
|
|
||||||
INT (CDECL *pGetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPVOID,BITMAPINFO*,UINT);
|
INT (CDECL *pGetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPVOID,BITMAPINFO*,UINT);
|
||||||
INT (CDECL *pGetDeviceCaps)(PHYSDEV,INT);
|
INT (CDECL *pGetDeviceCaps)(PHYSDEV,INT);
|
||||||
BOOL (CDECL *pGetDeviceGammaRamp)(PHYSDEV,LPVOID);
|
BOOL (CDECL *pGetDeviceGammaRamp)(PHYSDEV,LPVOID);
|
||||||
|
|
|
@ -70,7 +70,6 @@ static const DC_FUNCTIONS MFDRV_Funcs =
|
||||||
NULL, /* pGdiComment */
|
NULL, /* pGdiComment */
|
||||||
NULL, /* pGetBitmapBits */
|
NULL, /* pGetBitmapBits */
|
||||||
NULL, /* pGetCharWidth */
|
NULL, /* pGetCharWidth */
|
||||||
NULL, /* pGetDIBColorTable */
|
|
||||||
NULL, /* pGetDIBits */
|
NULL, /* pGetDIBits */
|
||||||
MFDRV_GetDeviceCaps, /* pGetDeviceCaps */
|
MFDRV_GetDeviceCaps, /* pGetDeviceCaps */
|
||||||
NULL, /* pGetDeviceGammaRamp */
|
NULL, /* pGetDeviceGammaRamp */
|
||||||
|
|
Loading…
Reference in New Issue