Author: fireball Date: Mon Mar 17 05:59:18 2008 New Revision: 32707
URL: http://svn.reactos.org/svn/reactos?rev=3D32707&view=3Drev Log: - MAINTENANCE: Fix inconsistent new lines.
Modified: trunk/reactos/dll/win32/gdi32/objects/palette.c (contents, props chan= ged)
Modified: trunk/reactos/dll/win32/gdi32/objects/palette.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objec= ts/palette.c?rev=3D32707&r1=3D32706&r2=3D32707&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/reactos/dll/win32/gdi32/objects/palette.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/palette.c Mon Mar 17 05:59:18 2008 @@ -1,94 +1,94 @@ -#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); -} - -HPALETTE -WINAPI -CreatePalette(CONST LOGPALETTE * plpal) -{ - return NtGdiCreatePaletteInternal((LPLOGPALETTE)plpal, plpal->palNumEn= tries); -} - -/* - * @implemented - */ -UINT -WINAPI -GetPaletteEntries(HPALETTE hpal, - UINT iStartIndex, - UINT cEntries, - LPPALETTEENTRY ppe) -{ - return NtGdiDoPalette(hpal, iStartIndex, cEntries, ppe, GdiPalGetEntri= es, 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, GdiPalGetSystem= Entries, FALSE); -} - -UINT -WINAPI -GetDIBColorTable(HDC hDC, - UINT iStartIndex, - UINT cEntries, - RGBQUAD *pColors) -{ - return NtGdiDoPalette(hDC, iStartIndex, cEntries, pColors, GdiPalGetCo= lorTable, 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) !=3D GDI_OBJECT_TYPE_DC) - { - if (GDI_HANDLE_GET_TYPE(hDC) =3D=3D GDI_OBJECT_TYPE_METADC) - return MFDRV_(hDC); - else - { - HPALETTE Pal =3D GetDCObject(hDC, GDI_OBJECT_TYPE_PALETTE); - PLDC pLDC =3D GdiGetLDC((HDC) Pal); - if ( !pLDC ) return FALSE; - if (pLDC->iType =3D=3D LDC_EMFLDC) return EMFDRV_(Pal); - return FALSE; - } - } -#endif - return UserRealizePalette(hDC); -} - +#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); +} + +HPALETTE +WINAPI +CreatePalette(CONST LOGPALETTE * plpal) +{ + return NtGdiCreatePaletteInternal((LPLOGPALETTE)plpal, plpal->palNumEn= tries); +} + +/* + * @implemented + */ +UINT +WINAPI +GetPaletteEntries(HPALETTE hpal, + UINT iStartIndex, + UINT cEntries, + LPPALETTEENTRY ppe) +{ + return NtGdiDoPalette(hpal, iStartIndex, cEntries, ppe, GdiPalGetEntri= es, 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, GdiPalGetSystem= Entries, FALSE); +} + +UINT +WINAPI +GetDIBColorTable(HDC hDC, + UINT iStartIndex, + UINT cEntries, + RGBQUAD *pColors) +{ + return NtGdiDoPalette(hDC, iStartIndex, cEntries, pColors, GdiPalGetCo= lorTable, 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) !=3D GDI_OBJECT_TYPE_DC) + { + if (GDI_HANDLE_GET_TYPE(hDC) =3D=3D GDI_OBJECT_TYPE_METADC) + return MFDRV_(hDC); + else + { + HPALETTE Pal =3D GetDCObject(hDC, GDI_OBJECT_TYPE_PALETTE); + PLDC pLDC =3D GdiGetLDC((HDC) Pal); + if ( !pLDC ) return FALSE; + if (pLDC->iType =3D=3D LDC_EMFLDC) return EMFDRV_(Pal); + return FALSE; + } + } +#endif + return UserRealizePalette(hDC); +} + /* * @implemented */ @@ -99,29 +99,29 @@ 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=3D0; - - if (cEntries) - { - retValue =3D 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=3D0; + + if (cEntries) + { + retValue =3D NtGdiDoPalette(hDC, iStartIndex, cEntries, (RGBQUAD*)= pColors, GdiPalSetColorTable, TRUE); + } + + return retValue; +} + /* * @implemented */ @@ -134,5 +134,5 @@ ((PW32CLIENTINFO)NtCurrentTeb()->Win32ClientInfo)->cSpins =3D 0; return NtGdiUpdateColors(hdc); } - -/* EOF */ + +/* EOF */
Propchange: trunk/reactos/dll/win32/gdi32/objects/palette.c ---------------------------------------------------------------------------= --- svn:eol-style =3D native