mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
- NtGdiAnimatePalette, NtGdiGe/SetPaletteEntries, NtGdiGetSystemPaletteEntries, NtGdiGet/SetDIBColorTable: rename into IntXxx, remove SEH and remove functions from w32ksvc.db
- implement NtGdiDoPalette calling the Int functions using SEH & ProbeForXxx and add it to w32ksvc.db - change parameters of NtGdiDoPalette: HPALETTE -> HGDIOBJ, as it also accepts HDC, LPPALETTENTRY -> LPVOID as it also accepts RGBQUAD* - implement stub functions in gdi32.dll calling NtGdiDoPalette instead of redirecting to the old NtGdixxx functions - update ntgdibad.h svn path=/trunk/; revision=28459
This commit is contained in:
parent
e2167fe00e
commit
95ba212738
9 changed files with 335 additions and 233 deletions
|
@ -17,7 +17,7 @@ AddFontResourceExW@12
|
|||
AddFontResourceW@4
|
||||
AddFontResourceTracking@8
|
||||
AngleArc@24
|
||||
AnimatePalette@16=NtGdiAnimatePalette@16
|
||||
AnimatePalette@16
|
||||
AnyLinkedFonts@0
|
||||
Arc@36
|
||||
ArcTo@36
|
||||
|
@ -368,7 +368,7 @@ GetCurrentPositionEx@8=NtGdiGetCurrentPositionEx@8
|
|||
GetDCBrushColor@4
|
||||
GetDCOrgEx@8
|
||||
GetDCPenColor@4
|
||||
GetDIBColorTable@16=NtGdiGetDIBColorTable@16
|
||||
GetDIBColorTable@16
|
||||
GetDIBits@28
|
||||
GetDeviceCaps@8=NtGdiGetDeviceCaps@8
|
||||
GetDeviceGammaRamp@8
|
||||
|
@ -417,7 +417,7 @@ GetObjectType@4
|
|||
GetObjectW@12
|
||||
GetOutlineTextMetricsA@12
|
||||
GetOutlineTextMetricsW@12
|
||||
GetPaletteEntries@16=NtGdiGetPaletteEntries@16
|
||||
GetPaletteEntries@16
|
||||
GetPath@16
|
||||
GetPixel@12=NtGdiGetPixel@12
|
||||
GetPixelFormat@4
|
||||
|
@ -432,7 +432,7 @@ GetStockObject@4
|
|||
GetStretchBltMode@4=NtGdiGetStretchBltMode@4
|
||||
GetStringBitmapA@20
|
||||
GetStringBitmapW@20
|
||||
GetSystemPaletteEntries@16=NtGdiGetSystemPaletteEntries@16
|
||||
GetSystemPaletteEntries@16
|
||||
GetSystemPaletteUse@4
|
||||
GetTextAlign@4=NtGdiGetTextAlign@4
|
||||
GetTextCharacterExtra@4
|
||||
|
@ -542,7 +542,7 @@ SetColorAdjustment@8
|
|||
SetColorSpace@8
|
||||
SetDCBrushColor@8
|
||||
SetDCPenColor@8
|
||||
SetDIBColorTable@16=NtGdiSetDIBColorTable@16
|
||||
SetDIBColorTable@16
|
||||
SetDIBits@28=NtGdiSetDIBits@28
|
||||
SetDIBitsToDevice@48
|
||||
SetDeviceGammaRamp@8
|
||||
|
@ -560,7 +560,7 @@ SetMapperFlags@8
|
|||
SetMetaFileBitsEx@8
|
||||
SetMetaRgn@4
|
||||
SetMiterLimit@12
|
||||
SetPaletteEntries@16=NtGdiSetPaletteEntries@16
|
||||
SetPaletteEntries@16
|
||||
SetPixel@16=NtGdiSetPixel@16
|
||||
SetPixelFormat@12
|
||||
SetPixelV@16=NtGdiSetPixelV@16
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<file>linedda.c</file>
|
||||
<file>metafile.c</file>
|
||||
<file>painting.c</file>
|
||||
<file>palette.c</file>
|
||||
<file>pen.c</file>
|
||||
<file>region.c</file>
|
||||
<file>text.c</file>
|
||||
|
|
66
reactos/dll/win32/gdi32/objects/palette.c
Normal file
66
reactos/dll/win32/gdi32/objects/palette.c
Normal file
|
@ -0,0 +1,66 @@
|
|||
#include "precomp.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
AnimatePalette(HPALETTE hpal,
|
||||
UINT iStartIndex,
|
||||
UINT cEntries,
|
||||
const PALETTEENTRY *ppe)
|
||||
{
|
||||
return NtGdiDoPalette(hpal, iStartIndex, cEntries, (PALETTEENTRY*)ppe, GdiPalAnimate, TRUE);
|
||||
}
|
||||
|
||||
UINT
|
||||
WINAPI
|
||||
GetPaletteEntries(HPALETTE hpal,
|
||||
UINT iStartIndex,
|
||||
UINT cEntries,
|
||||
LPPALETTEENTRY ppe)
|
||||
{
|
||||
return NtGdiDoPalette(hpal, iStartIndex, cEntries, ppe, GdiPalGetEntries, FALSE);
|
||||
}
|
||||
|
||||
UINT
|
||||
WINAPI
|
||||
SetPaletteEntries(HPALETTE hpal,
|
||||
UINT iStartIndex,
|
||||
UINT cEntries,
|
||||
const PALETTEENTRY *ppe)
|
||||
{
|
||||
return NtGdiDoPalette(hpal, iStartIndex, cEntries, (PALETTEENTRY*)ppe, GdiPalSetEntries, TRUE);
|
||||
}
|
||||
|
||||
UINT
|
||||
WINAPI
|
||||
GetSystemPaletteEntries(HDC hDC,
|
||||
UINT iStartIndex,
|
||||
UINT cEntries,
|
||||
LPPALETTEENTRY ppe)
|
||||
{
|
||||
return NtGdiDoPalette(hDC, iStartIndex, cEntries, ppe, GdiPalGetSystemEntries, FALSE);
|
||||
}
|
||||
|
||||
UINT
|
||||
WINAPI
|
||||
GetDIBColorTable(HDC hDC,
|
||||
UINT iStartIndex,
|
||||
UINT cEntries,
|
||||
RGBQUAD *pColors)
|
||||
{
|
||||
return NtGdiDoPalette(hDC, iStartIndex, cEntries, pColors, GdiPalGetColorTable, FALSE);
|
||||
}
|
||||
|
||||
UINT
|
||||
WINAPI
|
||||
SetDIBColorTable(HDC hDC,
|
||||
UINT iStartIndex,
|
||||
UINT cEntries,
|
||||
const RGBQUAD *pColors)
|
||||
{
|
||||
return NtGdiDoPalette(hDC, iStartIndex, cEntries, (RGBQUAD*)pColors, GdiPalSetColorTable, TRUE);
|
||||
}
|
||||
|
||||
/* EOF */
|
|
@ -385,10 +385,10 @@ W32KAPI
|
|||
LONG
|
||||
APIENTRY
|
||||
NtGdiDoPalette(
|
||||
IN HPALETTE hpal,
|
||||
IN HGDIOBJ hObj,
|
||||
IN WORD iStart,
|
||||
IN WORD cEntries,
|
||||
IN PALETTEENTRY *pPalEntries,
|
||||
IN LPVOID pEntries,
|
||||
IN DWORD iFunc,
|
||||
IN BOOL bInbound
|
||||
);
|
||||
|
|
|
@ -103,16 +103,6 @@ STDCALL
|
|||
NtGdiAddFontResource(PUNICODE_STRING Filename,
|
||||
DWORD fl);
|
||||
|
||||
/* Use NtGdiDoPalette with GdiPalAnimate */
|
||||
BOOL
|
||||
STDCALL
|
||||
NtGdiAnimatePalette (
|
||||
HPALETTE hpal,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
CONST PPALETTEENTRY ppe
|
||||
);
|
||||
|
||||
/* Metafiles are user mode */
|
||||
HENHMETAFILE
|
||||
STDCALL
|
||||
|
@ -307,16 +297,6 @@ BOOL STDCALL NtGdiGetCurrentPositionEx(HDC hDC, LPPOINT currentPosition);
|
|||
/* Use NtGdiGetDCPoint with GdiGetDCOrg. */
|
||||
BOOL STDCALL NtGdiGetDCOrgEx(HDC hDC, LPPOINT Point);
|
||||
|
||||
/* Use NtGdiDoPalette with GdiPalGetColorTable. */
|
||||
UINT
|
||||
STDCALL
|
||||
NtGdiGetDIBColorTable (
|
||||
HDC hDC,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
RGBQUAD * Colors
|
||||
);
|
||||
|
||||
/* Meta are user-mode. */
|
||||
HENHMETAFILE
|
||||
STDCALL
|
||||
|
@ -394,16 +374,6 @@ NtGdiGetLogColorSpace(HCOLORSPACE hColorSpace,
|
|||
/* Should be done in user-mode using shared GDI Objects. */
|
||||
INT STDCALL NtGdiGetMapMode(HDC hDC);
|
||||
|
||||
/* Use NtGdiDoPalette with GdiPalGetEntries. */
|
||||
UINT
|
||||
STDCALL
|
||||
NtGdiGetPaletteEntries (
|
||||
HPALETTE hpal,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
LPPALETTEENTRY pe
|
||||
);
|
||||
|
||||
/* Should be done in user-mode using shared GDI Objects. */
|
||||
INT
|
||||
STDCALL
|
||||
|
@ -418,16 +388,6 @@ INT STDCALL NtGdiGetROP2(HDC hDC);
|
|||
/* Should be done in user-mode using shared GDI Objects. */
|
||||
INT STDCALL NtGdiGetStretchBltMode(HDC hDC);
|
||||
|
||||
/* Use NtGdiDoPalette with GdiPalSetSystemEntries. */
|
||||
UINT
|
||||
STDCALL
|
||||
NtGdiGetSystemPaletteEntries (
|
||||
HDC hDC,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
LPPALETTEENTRY pe
|
||||
);
|
||||
|
||||
/* Should be done in user-mode using shared GDI Objects. */
|
||||
UINT STDCALL NtGdiGetTextAlign(HDC hDC);
|
||||
|
||||
|
@ -583,16 +543,6 @@ COLORREF STDCALL NtGdiSetBkColor (HDC hDC, COLORREF Color);
|
|||
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
|
||||
INT STDCALL NtGdiSetBkMode(HDC hDC, INT backgroundMode);
|
||||
|
||||
/* Use NtGdiDoPalette with GdiPalSetColorTable, TRUE. */
|
||||
UINT
|
||||
STDCALL
|
||||
NtGdiSetDIBColorTable (
|
||||
HDC hDC,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
CONST RGBQUAD * Colors
|
||||
);
|
||||
|
||||
/* Use SetDIBitsToDevice in gdi32. */
|
||||
INT
|
||||
STDCALL
|
||||
|
@ -634,17 +584,6 @@ STDCALL
|
|||
NtGdiSetMapperFlags(HDC hDC,
|
||||
DWORD Flag);
|
||||
|
||||
|
||||
/* Use NtGdiDoPalette with GdiPalSetEntries, TRUE. */
|
||||
UINT
|
||||
STDCALL
|
||||
NtGdiSetPaletteEntries (
|
||||
HPALETTE hpal,
|
||||
UINT Start,
|
||||
UINT Entries,
|
||||
CONST LPPALETTEENTRY pe
|
||||
);
|
||||
|
||||
/* Use NtGdiSetPixel(hdc, x, y, color) != CLR_INVALID; */
|
||||
BOOL
|
||||
STDCALL
|
||||
|
|
|
@ -271,5 +271,36 @@ LONG STDCALL IntSetBitmapBits(PBITMAPOBJ bmp, DWORD Bytes, IN PBYTE Bits);
|
|||
|
||||
LONG STDCALL IntGetBitmapBits(PBITMAPOBJ bmp, DWORD Bytes, OUT PBYTE Bits);
|
||||
|
||||
UINT STDCALL IntSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Colors);
|
||||
|
||||
UINT STDCALL IntGetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors);
|
||||
|
||||
UINT STDCALL
|
||||
IntAnimatePalette(HPALETTE hPal, UINT StartIndex,
|
||||
UINT NumEntries, CONST PPALETTEENTRY PaletteColors);
|
||||
|
||||
UINT STDCALL
|
||||
IntGetPaletteEntries(HPALETTE hpal,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
LPPALETTEENTRY pe);
|
||||
|
||||
UINT STDCALL
|
||||
IntSetPaletteEntries(HPALETTE hpal,
|
||||
UINT Start,
|
||||
UINT Entries,
|
||||
CONST LPPALETTEENTRY pe);
|
||||
|
||||
UINT STDCALL
|
||||
IntGetSystemPaletteEntries(HDC hDC,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
LPPALETTEENTRY pe);
|
||||
UINT STDCALL
|
||||
IntGetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors);
|
||||
|
||||
UINT STDCALL
|
||||
IntSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Colors);
|
||||
|
||||
#endif /* _WIN32K_INTGDI_H */
|
||||
|
||||
|
|
|
@ -74,9 +74,14 @@ const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate(void)
|
|||
return (const PALETTEENTRY*)&COLOR_sysPalTemplate;
|
||||
}
|
||||
|
||||
BOOL STDCALL NtGdiAnimatePalette(HPALETTE hPal, UINT StartIndex,
|
||||
UINT NumEntries, CONST PPALETTEENTRY PaletteColors)
|
||||
UINT STDCALL
|
||||
IntAnimatePalette(HPALETTE hPal,
|
||||
UINT StartIndex,
|
||||
UINT NumEntries,
|
||||
CONST PPALETTEENTRY PaletteColors)
|
||||
{
|
||||
UINT ret = 0;
|
||||
|
||||
if( hPal != NtGdiGetStockObject(DEFAULT_PALETTE) )
|
||||
{
|
||||
PPALGDI palPtr;
|
||||
|
@ -97,11 +102,14 @@ BOOL STDCALL NtGdiAnimatePalette(HPALETTE hPal, UINT StartIndex,
|
|||
}
|
||||
if (StartIndex+NumEntries > pal_entries) NumEntries = pal_entries - StartIndex;
|
||||
|
||||
for (NumEntries += StartIndex; StartIndex < NumEntries; StartIndex++, pptr++) {
|
||||
for (NumEntries += StartIndex; StartIndex < NumEntries; StartIndex++, pptr++)
|
||||
{
|
||||
/* According to MSDN, only animate PC_RESERVED colours */
|
||||
if (palPtr->IndexedColors[StartIndex].peFlags & PC_RESERVED) {
|
||||
if (palPtr->IndexedColors[StartIndex].peFlags & PC_RESERVED)
|
||||
{
|
||||
memcpy( &palPtr->IndexedColors[StartIndex], pptr,
|
||||
sizeof(PALETTEENTRY) );
|
||||
ret++;
|
||||
PALETTE_ValidateFlags(&palPtr->IndexedColors[StartIndex], 1);
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +132,7 @@ BOOL STDCALL NtGdiAnimatePalette(HPALETTE hPal, UINT StartIndex,
|
|||
}
|
||||
UserReleaseDC(Wnd,hDC, FALSE);
|
||||
}
|
||||
return TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
HPALETTE STDCALL NtGdiCreateHalftonePalette(HDC hDC)
|
||||
|
@ -138,7 +146,7 @@ HPALETTE STDCALL NtGdiCreateHalftonePalette(HDC hDC)
|
|||
|
||||
Palette.Version = 0x300;
|
||||
Palette.NumberOfEntries = 256;
|
||||
if (NtGdiGetSystemPaletteEntries(hDC, 0, 256, Palette.aEntries) == 0)
|
||||
if (IntGetSystemPaletteEntries(hDC, 0, 256, Palette.aEntries) == 0)
|
||||
{
|
||||
/* from wine, more that 256 color math */
|
||||
Palette.NumberOfEntries = 20;
|
||||
|
@ -337,7 +345,8 @@ UINT STDCALL NtGdiGetNearestPaletteIndex(HPALETTE hpal,
|
|||
return index;
|
||||
}
|
||||
|
||||
UINT STDCALL NtGdiGetPaletteEntries(HPALETTE hpal,
|
||||
UINT STDCALL
|
||||
IntGetPaletteEntries(HPALETTE hpal,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
LPPALETTEENTRY pe)
|
||||
|
@ -352,12 +361,12 @@ UINT STDCALL NtGdiGetPaletteEntries(HPALETTE hpal,
|
|||
}
|
||||
|
||||
numEntries = palGDI->NumColors;
|
||||
if (NULL != pe)
|
||||
{
|
||||
if (numEntries < StartIndex + Entries)
|
||||
{
|
||||
Entries = numEntries - StartIndex;
|
||||
}
|
||||
if (NULL != pe)
|
||||
{
|
||||
if (numEntries <= StartIndex)
|
||||
{
|
||||
PALETTE_UnlockPalette(palGDI);
|
||||
|
@ -372,12 +381,17 @@ UINT STDCALL NtGdiGetPaletteEntries(HPALETTE hpal,
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Entries = numEntries;
|
||||
}
|
||||
|
||||
PALETTE_UnlockPalette(palGDI);
|
||||
return Entries;
|
||||
}
|
||||
|
||||
UINT STDCALL NtGdiGetSystemPaletteEntries(HDC hDC,
|
||||
UINT STDCALL
|
||||
IntGetSystemPaletteEntries(HDC hDC,
|
||||
UINT StartIndex,
|
||||
UINT Entries,
|
||||
LPPALETTEENTRY pe)
|
||||
|
@ -393,8 +407,6 @@ UINT STDCALL NtGdiGetSystemPaletteEntries(HDC hDC,
|
|||
return 0;
|
||||
}
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
if (pe != NULL)
|
||||
{
|
||||
EntriesSize = Entries * sizeof(pe[0]);
|
||||
|
@ -402,18 +414,14 @@ UINT STDCALL NtGdiGetSystemPaletteEntries(HDC hDC,
|
|||
{
|
||||
/* Integer overflow! */
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
_SEH_LEAVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ProbeForWrite(pe,
|
||||
EntriesSize,
|
||||
sizeof(UINT));
|
||||
}
|
||||
|
||||
if (!(dc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
_SEH_LEAVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
palGDI = PALETTE_LockPalette(dc->w.hPalette);
|
||||
|
@ -439,12 +447,6 @@ UINT STDCALL NtGdiGetSystemPaletteEntries(HDC hDC,
|
|||
Ret = dc->GDIInfo->ulNumPalReg;
|
||||
}
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
SetLastNtError(_SEH_GetExceptionCode());
|
||||
}
|
||||
_SEH_END;
|
||||
|
||||
if (palGDI != NULL)
|
||||
PALETTE_UnlockPalette(palGDI);
|
||||
|
@ -624,7 +626,8 @@ BOOL STDCALL NtGdiSetColorAdjustment(HDC hDC,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
UINT STDCALL NtGdiSetPaletteEntries(HPALETTE hpal,
|
||||
UINT STDCALL
|
||||
IntSetPaletteEntries(HPALETTE hpal,
|
||||
UINT Start,
|
||||
UINT Entries,
|
||||
CONST LPPALETTEENTRY pe)
|
||||
|
@ -632,6 +635,11 @@ UINT STDCALL NtGdiSetPaletteEntries(HPALETTE hpal,
|
|||
PPALGDI palGDI;
|
||||
WORD numEntries;
|
||||
|
||||
if ((UINT)hpal & GDI_HANDLE_STOCK_MASK)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
palGDI = PALETTE_LockPalette(hpal);
|
||||
if (!palGDI) return 0;
|
||||
|
||||
|
@ -816,4 +824,83 @@ int STDCALL COLOR_PaletteLookupExactIndex( PALETTEENTRY* palPalEntry, int size,
|
|||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
W32KAPI
|
||||
LONG
|
||||
APIENTRY
|
||||
NtGdiDoPalette(
|
||||
IN HGDIOBJ hObj,
|
||||
IN WORD iStart,
|
||||
IN WORD cEntries,
|
||||
IN LPVOID pUnsafeEntries,
|
||||
IN DWORD iFunc,
|
||||
IN BOOL bInbound)
|
||||
{
|
||||
LONG ret;
|
||||
|
||||
/* FIXME: Handle bInbound correctly */
|
||||
|
||||
if (bInbound &&
|
||||
(pUnsafeEntries == NULL || cEntries == 0))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
switch(iFunc)
|
||||
{
|
||||
case GdiPalAnimate:
|
||||
ProbeForRead(pUnsafeEntries, cEntries * sizeof(PALETTEENTRY), 1);
|
||||
ret = IntAnimatePalette((HPALETTE)hObj, iStart, cEntries, pUnsafeEntries);
|
||||
break;
|
||||
|
||||
case GdiPalSetEntries:
|
||||
ProbeForRead(pUnsafeEntries, cEntries * sizeof(PALETTEENTRY), 1);
|
||||
ret = IntSetPaletteEntries((HPALETTE)hObj, iStart, cEntries, pUnsafeEntries);
|
||||
break;
|
||||
|
||||
case GdiPalGetEntries:
|
||||
if (pUnsafeEntries)
|
||||
{
|
||||
ProbeForWrite(pUnsafeEntries, cEntries * sizeof(PALETTEENTRY), 1);
|
||||
}
|
||||
ret = IntGetPaletteEntries((HPALETTE)hObj, iStart, cEntries, pUnsafeEntries);
|
||||
break;
|
||||
|
||||
case GdiPalGetSystemEntries:
|
||||
if (pUnsafeEntries)
|
||||
{
|
||||
ProbeForWrite(pUnsafeEntries, cEntries * sizeof(PALETTEENTRY), 1);
|
||||
}
|
||||
ret = IntGetSystemPaletteEntries((HDC)hObj, iStart, cEntries, pUnsafeEntries);
|
||||
break;
|
||||
|
||||
case GdiPalSetColorTable:
|
||||
ProbeForRead(pUnsafeEntries, cEntries * sizeof(PALETTEENTRY), 1);
|
||||
ret = IntSetDIBColorTable((HDC)hObj, iStart, cEntries, (RGBQUAD*)pUnsafeEntries);
|
||||
break;
|
||||
|
||||
case GdiPalGetColorTable:
|
||||
if (pUnsafeEntries)
|
||||
{
|
||||
ProbeForWrite(pUnsafeEntries, cEntries * sizeof(PALETTEENTRY), 1);
|
||||
}
|
||||
ret = IntGetDIBColorTable((HDC)hObj, iStart, cEntries, (RGBQUAD*)pUnsafeEntries);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
_SEH_END
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <debug.h>
|
||||
|
||||
UINT STDCALL
|
||||
NtGdiSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Colors)
|
||||
IntSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Colors)
|
||||
{
|
||||
PDC dc;
|
||||
PBITMAPOBJ BitmapObj;
|
||||
|
@ -62,8 +62,7 @@ NtGdiSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Col
|
|||
Entries = (1 << BitmapObj->dib->dsBmih.biBitCount) - StartIndex;
|
||||
|
||||
PalGDI = PALETTE_LockPalette(BitmapObj->hDIBPalette);
|
||||
_SEH_TRY
|
||||
{
|
||||
|
||||
for (Index = StartIndex;
|
||||
Index < StartIndex + Entries && Index < PalGDI->NumColors;
|
||||
Index++)
|
||||
|
@ -72,12 +71,6 @@ NtGdiSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Col
|
|||
PalGDI->IndexedColors[Index].peGreen = Colors[Index - StartIndex].rgbGreen;
|
||||
PalGDI->IndexedColors[Index].peBlue = Colors[Index - StartIndex].rgbBlue;
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Entries = 0;
|
||||
}
|
||||
_SEH_END
|
||||
PALETTE_UnlockPalette(PalGDI);
|
||||
}
|
||||
else
|
||||
|
@ -90,7 +83,7 @@ NtGdiSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Col
|
|||
}
|
||||
|
||||
UINT STDCALL
|
||||
NtGdiGetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors)
|
||||
IntGetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors)
|
||||
{
|
||||
PDC dc;
|
||||
PBITMAPOBJ BitmapObj;
|
||||
|
@ -127,8 +120,7 @@ NtGdiGetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors)
|
|||
Entries = (1 << BitmapObj->dib->dsBmih.biBitCount) - StartIndex;
|
||||
|
||||
PalGDI = PALETTE_LockPalette(BitmapObj->hDIBPalette);
|
||||
_SEH_TRY
|
||||
{
|
||||
|
||||
for (Index = StartIndex;
|
||||
Index < StartIndex + Entries && Index < PalGDI->NumColors;
|
||||
Index++)
|
||||
|
@ -137,12 +129,6 @@ NtGdiGetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors)
|
|||
Colors[Index - StartIndex].rgbGreen = PalGDI->IndexedColors[Index].peGreen;
|
||||
Colors[Index - StartIndex].rgbBlue = PalGDI->IndexedColors[Index].peBlue;
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Entries = 0;
|
||||
}
|
||||
_SEH_END
|
||||
PALETTE_UnlockPalette(PalGDI);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -132,7 +132,7 @@ NtGdiDeleteObjectApp 1
|
|||
NtGdiDescribePixelFormat 4
|
||||
# NtGdiGetPerBandInfo 2
|
||||
# NtGdiDoBanding 4
|
||||
# NtGdiDoPalette 6
|
||||
NtGdiDoPalette 6
|
||||
NtGdiDrawEscape 4
|
||||
NtGdiEllipse 5
|
||||
# NtGdiEnableEudc 1
|
||||
|
@ -513,7 +513,7 @@ NtUserSetActiveWindow 1
|
|||
# NtUserSetAppImeLevel 2
|
||||
NtUserSetCapture 1
|
||||
NtUserSetClassLong 4
|
||||
# NtUserSetClassWord 1 Wrong number of param ?
|
||||
NtUserSetClassWord 3
|
||||
NtUserSetClipboardData 3
|
||||
NtUserSetClipboardViewer 1
|
||||
NtUserSetConsoleReserveKeys 2
|
||||
|
@ -558,7 +558,7 @@ NtUserSetWindowsHookAW 3
|
|||
NtUserSetWindowsHookEx 6
|
||||
NtUserSetWindowStationUser 4
|
||||
NtUserSetWindowWord 3
|
||||
# NtUserSetWinEventHook 4 Wrong number of param ?
|
||||
NtUserSetWinEventHook 8
|
||||
NtUserShowCaret 1
|
||||
NtUserShowScrollBar 3
|
||||
NtUserShowWindow 2
|
||||
|
@ -683,9 +683,7 @@ NtUserFindExistingCursorIcon 4
|
|||
NtUserFindWindowEx 4
|
||||
NtUserGetClassInfo 4
|
||||
NtUserInitTask 11
|
||||
NtUserSetClassWord 3
|
||||
NtUserSetCursorIconData 6
|
||||
NtUserSetWinEventHook 8
|
||||
NtUserUnregisterClass 2
|
||||
NtUserValidateHandleSecure 1
|
||||
#
|
||||
|
@ -693,13 +691,11 @@ NtUserValidateHandleSecure 1
|
|||
NtGdiSelectObject 2
|
||||
NtGdiSetBkColor 2
|
||||
NtGdiSetBkMode 2
|
||||
NtGdiSetDIBColorTable 4
|
||||
NtGdiSetDIBits 7
|
||||
NtGdiSetEnhMetaFileBits 2
|
||||
NtGdiSetGraphicsMode 2
|
||||
NtGdiSetICMProfile 2
|
||||
NtGdiSetMapperFlags 2
|
||||
NtGdiSetPaletteEntries 4
|
||||
NtGdiSetPixelV 4
|
||||
NtGdiSetPolyFillMode 2
|
||||
NtGdiSetROP2 2
|
||||
|
@ -751,7 +747,6 @@ NtUserSetCursorIconContents 2
|
|||
NtUserSetScrollBarInfo 3
|
||||
NtUserGetDesktopWindow 0
|
||||
NtGdiAddFontResource 2
|
||||
NtGdiAnimatePalette 4
|
||||
NtGdiCloseEnhMetaFile 1
|
||||
NtGdiColorMatchToTarget 3
|
||||
NtGdiCopyEnhMetaFile 2
|
||||
|
@ -781,7 +776,6 @@ NtGdiGetClipBox 2
|
|||
NtGdiGetColorSpace 1
|
||||
NtGdiGetCurrentObject 2
|
||||
NtGdiGetCurrentPositionEx 2
|
||||
NtGdiGetDIBColorTable 4
|
||||
NtGdiGetEnhMetaFile 1
|
||||
NtGdiGetEnhMetaFileBits 3
|
||||
NtGdiGetEnhMetaFileDescription 3
|
||||
|
@ -794,12 +788,10 @@ NtGdiGetGraphicsMode 1
|
|||
NtGdiGetICMProfile 3
|
||||
NtGdiGetLogColorSpace 3
|
||||
NtGdiGetMapMode 1
|
||||
NtGdiGetPaletteEntries 4
|
||||
NtGdiGetPixelFormat 1
|
||||
NtGdiGetPolyFillMode 1
|
||||
NtGdiGetROP2 1
|
||||
NtGdiGetStretchBltMode 1
|
||||
NtGdiGetSystemPaletteEntries 4
|
||||
NtGdiGetTextAlign 1
|
||||
NtGdiGetTextColor 1
|
||||
NtGdiGetTextExtentPoint32 4
|
||||
|
|
Loading…
Reference in a new issue