From fa200ee0408d227c9f0970323a426d8e733baf1b Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 17 Mar 2008 10:59:18 +0000 Subject: [PATCH] - MAINTENANCE: Fix inconsistent new lines. svn path=/trunk/; revision=32707 --- reactos/dll/win32/gdi32/objects/palette.c | 228 +++++++++++----------- 1 file changed, 114 insertions(+), 114 deletions(-) diff --git a/reactos/dll/win32/gdi32/objects/palette.c b/reactos/dll/win32/gdi32/objects/palette.c index 6a588acc033..ac9ea25ffa0 100644 --- a/reactos/dll/win32/gdi32/objects/palette.c +++ b/reactos/dll/win32/gdi32/objects/palette.c @@ -1,94 +1,94 @@ -#include "precomp.h" - -#define NDEBUG -#include - -BOOL -WINAPI -AnimatePalette(HPALETTE hpal, - UINT iStartIndex, - UINT cEntries, - const PALETTEENTRY *ppe) -{ - return NtGdiDoPalette(hpal, iStartIndex, cEntries, (PALETTEENTRY*)ppe, GdiPalAnimate, TRUE); -} - -HPALETTE -WINAPI -CreatePalette(CONST LOGPALETTE * plpal) -{ - return NtGdiCreatePaletteInternal((LPLOGPALETTE)plpal, plpal->palNumEntries); -} - -/* - * @implemented - */ -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); -} - -/* - * @implemented - */ -UINT -WINAPI -RealizePalette(HDC hDC) /* [in] Handle of device context */ -{ -#if 0 -// Handle something other than a normal dc object. - if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC) - { - if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC) - return MFDRV_(hDC); - else - { - HPALETTE Pal = GetDCObject(hDC, GDI_OBJECT_TYPE_PALETTE); - PLDC pLDC = GdiGetLDC((HDC) Pal); - if ( !pLDC ) return FALSE; - if (pLDC->iType == LDC_EMFLDC) return EMFDRV_(Pal); - return FALSE; - } - } -#endif - return UserRealizePalette(hDC); -} - +#include "precomp.h" + +#define NDEBUG +#include + +BOOL +WINAPI +AnimatePalette(HPALETTE hpal, + UINT iStartIndex, + UINT cEntries, + const PALETTEENTRY *ppe) +{ + return NtGdiDoPalette(hpal, iStartIndex, cEntries, (PALETTEENTRY*)ppe, GdiPalAnimate, TRUE); +} + +HPALETTE +WINAPI +CreatePalette(CONST LOGPALETTE * plpal) +{ + return NtGdiCreatePaletteInternal((LPLOGPALETTE)plpal, plpal->palNumEntries); +} + +/* + * @implemented + */ +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); +} + +/* + * @implemented + */ +UINT +WINAPI +RealizePalette(HDC hDC) /* [in] Handle of device context */ +{ +#if 0 +// Handle something other than a normal dc object. + if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC) + { + if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC) + return MFDRV_(hDC); + else + { + HPALETTE Pal = GetDCObject(hDC, GDI_OBJECT_TYPE_PALETTE); + PLDC pLDC = GdiGetLDC((HDC) Pal); + if ( !pLDC ) return FALSE; + if (pLDC->iType == LDC_EMFLDC) return EMFDRV_(Pal); + return FALSE; + } + } +#endif + return UserRealizePalette(hDC); +} + /* * @implemented */ @@ -99,29 +99,29 @@ ResizePalette( UINT nEntries ) { - return NtGdiResizePalette(hPalette, nEntries); + return NtGdiResizePalette(hPalette, nEntries); +} + +/* + * @implemented + */ +UINT +WINAPI +SetDIBColorTable(HDC hDC, + UINT iStartIndex, + UINT cEntries, + const RGBQUAD *pColors) +{ + UINT retValue=0; + + if (cEntries) + { + retValue = NtGdiDoPalette(hDC, iStartIndex, cEntries, (RGBQUAD*)pColors, GdiPalSetColorTable, TRUE); + } + + return retValue; } -/* - * @implemented - */ -UINT -WINAPI -SetDIBColorTable(HDC hDC, - UINT iStartIndex, - UINT cEntries, - const RGBQUAD *pColors) -{ - UINT retValue=0; - - if (cEntries) - { - retValue = NtGdiDoPalette(hDC, iStartIndex, cEntries, (RGBQUAD*)pColors, GdiPalSetColorTable, TRUE); - } - - return retValue; -} - /* * @implemented */ @@ -134,5 +134,5 @@ UpdateColors( ((PW32CLIENTINFO)NtCurrentTeb()->Win32ClientInfo)->cSpins = 0; return NtGdiUpdateColors(hdc); } - -/* EOF */ + +/* EOF */