Commit c230071d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Use NtGdiDoPalette for GetDIBColorTable and SetDIBColorTable.

parent 1c270965
......@@ -910,10 +910,7 @@ INT WINAPI NtGdiSetDIBitsToDeviceInternal( HDC hdc, INT xDest, INT yDest, DWORD
return ret;
}
/***********************************************************************
* SetDIBColorTable (GDI32.@)
*/
UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, const RGBQUAD *colors )
UINT set_dib_dc_color_table( HDC hdc, UINT startpos, UINT entries, const RGBQUAD *colors )
{
DC * dc;
UINT i, result = 0;
......@@ -949,10 +946,7 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, const RGBQUA
}
/***********************************************************************
* GetDIBColorTable (GDI32.@)
*/
UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *colors )
UINT get_dib_dc_color_table( HDC hdc, UINT startpos, UINT entries, RGBQUAD *colors )
{
DC * dc;
BITMAPOBJ *bitmap;
......
......@@ -241,6 +241,10 @@ extern DWORD get_image_from_bitmap( BITMAPOBJ *bmp, BITMAPINFO *info,
extern DWORD put_image_into_bitmap( BITMAPOBJ *bmp, HRGN clip, BITMAPINFO *info,
const struct gdi_image_bits *bits, struct bitblt_coords *src,
struct bitblt_coords *dst ) DECLSPEC_HIDDEN;
extern UINT get_dib_dc_color_table( HDC hdc, UINT startpos, UINT entries,
RGBQUAD *colors ) DECLSPEC_HIDDEN;
extern UINT set_dib_dc_color_table( HDC hdc, UINT startpos, UINT entries,
const RGBQUAD *colors ) DECLSPEC_HIDDEN;
extern void dibdrv_set_window_surface( DC *dc, struct window_surface *surface ) DECLSPEC_HIDDEN;
extern NTSTATUS init_opengl_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out ) DECLSPEC_HIDDEN;
......
......@@ -594,3 +594,19 @@ UINT WINAPI GetSystemPaletteEntries( HDC hdc, UINT start, UINT count, PALETTEENT
return 0;
}
/***********************************************************************
* GetDIBColorTable (GDI32.@)
*/
UINT WINAPI GetDIBColorTable( HDC hdc, UINT start, UINT count, RGBQUAD *colors )
{
return NtGdiDoPalette( hdc, start, count, colors, NtGdiGetDIBColorTable, TRUE );
}
/***********************************************************************
* SetDIBColorTable (GDI32.@)
*/
UINT WINAPI SetDIBColorTable( HDC hdc, UINT start, UINT count, const RGBQUAD *colors )
{
return NtGdiDoPalette( hdc, start, count, (void *)colors, NtGdiSetDIBColorTable, FALSE );
}
......@@ -635,6 +635,10 @@ LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entrie
return get_palette_entries( handle, start, count, entries );
case NtGdiGetSystemPaletteEntries:
return get_system_palette_entries( handle, start, count, entries );
case NtGdiSetDIBColorTable:
return set_dib_dc_color_table( handle, start, count, entries );
case NtGdiGetDIBColorTable:
return get_dib_dc_color_table( handle, start, count, entries );
default:
WARN( "invalid func %u\n", func );
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment