Commit 4fc5f0ff authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Use NtGdiDoPalette for SetPaletteEntries.

parent ad00037c
......@@ -533,3 +533,12 @@ UINT WINAPI GetPaletteEntries( HPALETTE palette, UINT start, UINT count, PALETTE
{
return NtGdiDoPalette( palette, start, count, entries, NtGdiGetPaletteEntries, TRUE );
}
/***********************************************************************
* SetPaletteEntries (GDI32.@)
*/
UINT WINAPI SetPaletteEntries( HPALETTE palette, UINT start, UINT count,
const PALETTEENTRY *entries )
{
return NtGdiDoPalette( palette, start, count, (void *)entries, NtGdiSetPaletteEntries, FALSE );
}
......@@ -193,20 +193,8 @@ UINT get_palette_entries( HPALETTE hpalette, UINT start, UINT count, PALETTEENTR
}
/***********************************************************************
* SetPaletteEntries [GDI32.@]
*
* Sets color values for range in palette.
*
* RETURNS
* Success: Number of entries that were set
* Failure: 0
*/
UINT WINAPI SetPaletteEntries(
HPALETTE hpalette, /* [in] Handle of logical palette */
UINT start, /* [in] Index of first entry to set */
UINT count, /* [in] Number of entries to set */
const PALETTEENTRY *entries) /* [in] Address of array of structures */
static UINT set_palette_entries( HPALETTE hpalette, UINT start, UINT count,
const PALETTEENTRY *entries )
{
PALETTEOBJ * palPtr;
UINT numEntries;
......@@ -691,6 +679,8 @@ LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entrie
{
switch (func)
{
case NtGdiSetPaletteEntries:
return set_palette_entries( handle, start, count, entries );
case NtGdiGetPaletteEntries:
return get_palette_entries( handle, start, count, entries );
default:
......
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