X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6670f56440ae9209b3e2e51e06acf3bc5aaf1905..1cd9779fce63b081d875de7a901c8eb6120d0b8a:/src/os2/palette.cpp diff --git a/src/os2/palette.cpp b/src/os2/palette.cpp index dd48397fc9..a579c53803 100644 --- a/src/os2/palette.cpp +++ b/src/os2/palette.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: palette.cpp +// Name: src/os2/palette.cpp // Purpose: wxPalette // Author: AUTHOR // Modified by: @@ -13,13 +13,11 @@ #include "wx/wxprec.h" #ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/setup.h" -#include "wx/string.h" -#include "wx/os2/private.h" -#include "wx/palette.h" -#include "wx/app.h" + #include + #include "wx/string.h" + #include "wx/os2/private.h" + #include "wx/palette.h" + #include "wx/app.h" #endif #define INCL_PM @@ -106,22 +104,20 @@ bool wxPalette::Create( int n, return true; } // end of wxPalette::Create -int wxPalette::GetPixel( - const unsigned char cRed -, const unsigned char cGreen -, const unsigned char cBlue -) const +int wxPalette::GetPixel( unsigned char cRed, + unsigned char cGreen, + unsigned char cBlue) const { - bool bFound = FALSE; - PULONG pualTable = NULL; - ULONG ulNumEntries; - ULONG ulRGB = (PC_RESERVED * 16777216) + - ((int)cRed * 65536) + - ((int)cGreen * 256) + - (int)cBlue; + bool bFound = false; + PULONG pualTable = NULL; + ULONG ulNumEntries; + ULONG ulRGB = (PC_RESERVED * 16777216) + + ((int)cRed * 65536) + + ((int)cGreen * 256) + + (int)cBlue; if (!m_refData) - return FALSE; + return wxNOT_FOUND; // // Get number of entries first @@ -159,26 +155,24 @@ int wxPalette::GetPixel( } } if (!bFound) - return 0; + return wxNOT_FOUND; return (i + 1); } // end of wxPalette::GetPixel -bool wxPalette::GetRGB( - int nIndex -, unsigned char* pRed -, unsigned char* pGreen -, unsigned char* pBlue -) const +bool wxPalette::GetRGB( int nIndex, + unsigned char* pRed, + unsigned char* pGreen, + unsigned char* pBlue) const { PULONG pualTable = NULL; RGB2 vRGB; ULONG ulNumEntries; if (!m_refData) - return FALSE; + return false; if (nIndex < 0 || nIndex > 255) - return FALSE; + return false; // // Get number of entries first // @@ -207,7 +201,7 @@ bool wxPalette::GetRGB( *pBlue = vRGB.bBlue; *pGreen = vRGB.bGreen; *pRed = vRGB.bRed; - return TRUE; + return true; } // end of wxPalette::GetRGB void wxPalette::SetHPALETTE(