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 ...@@ -533,3 +533,12 @@ UINT WINAPI GetPaletteEntries( HPALETTE palette, UINT start, UINT count, PALETTE
{ {
return NtGdiDoPalette( palette, start, count, entries, NtGdiGetPaletteEntries, TRUE ); 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 ...@@ -193,20 +193,8 @@ UINT get_palette_entries( HPALETTE hpalette, UINT start, UINT count, PALETTEENTR
} }
/*********************************************************************** static UINT set_palette_entries( HPALETTE hpalette, UINT start, UINT count,
* SetPaletteEntries [GDI32.@] const PALETTEENTRY *entries )
*
* 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 */
{ {
PALETTEOBJ * palPtr; PALETTEOBJ * palPtr;
UINT numEntries; UINT numEntries;
...@@ -691,6 +679,8 @@ LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entrie ...@@ -691,6 +679,8 @@ LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entrie
{ {
switch (func) switch (func)
{ {
case NtGdiSetPaletteEntries:
return set_palette_entries( handle, start, count, entries );
case NtGdiGetPaletteEntries: case NtGdiGetPaletteEntries:
return get_palette_entries( handle, start, count, entries ); return get_palette_entries( handle, start, count, entries );
default: 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