X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..47678105333557b1a5f225fe57e4ae27fa4b8706:/src/gtk1/palette.cpp?ds=sidebyside diff --git a/src/gtk1/palette.cpp b/src/gtk1/palette.cpp index 162fb0effe..b0e114a6b7 100644 --- a/src/gtk1/palette.cpp +++ b/src/gtk1/palette.cpp @@ -15,6 +15,8 @@ #include "wx/palette.h" +#include + //----------------------------------------------------------------------------- // wxPalette //----------------------------------------------------------------------------- @@ -22,22 +24,22 @@ class wxPaletteRefData: public wxObjectRefData { public: - + wxPaletteRefData(void); ~wxPaletteRefData(void); - + GdkColormap *m_colormap; }; -wxPaletteRefData::wxPaletteRefData(void) +wxPaletteRefData::wxPaletteRefData() { - m_colormap = NULL; -}; + m_colormap = (GdkColormap *) NULL; +} -wxPaletteRefData::~wxPaletteRefData(void) +wxPaletteRefData::~wxPaletteRefData() { - if (m_colormap) gdk_colormap_unref( m_colormap ); -}; + if (m_colormap) gdk_colormap_unref( m_colormap ); +} //----------------------------------------------------------------------------- @@ -45,62 +47,73 @@ wxPaletteRefData::~wxPaletteRefData(void) IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject) -wxPalette::wxPalette(void) +wxPalette::wxPalette() { -}; +} -wxPalette::wxPalette( const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) +wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) { - m_refData = new wxPaletteRefData(); - Create( n, red, green, blue ); -}; + m_refData = new wxPaletteRefData(); + Create( n, red, green, blue ); +} wxPalette::wxPalette( const wxPalette& palette ) { - Ref( palette ); -}; + Ref( palette ); +} -wxPalette::wxPalette( const wxPalette* palette ) +wxPalette::~wxPalette() { - UnRef(); - if (palette) Ref( *palette ); -}; - -wxPalette::~wxPalette(void) -{ -}; +} wxPalette& wxPalette::operator = ( const wxPalette& palette ) { - if (*this == palette) return (*this); - Ref( palette ); - return *this; -}; + if (*this == palette) return (*this); + Ref( palette ); + return *this; +} bool wxPalette::operator == ( const wxPalette& palette ) { - return m_refData == palette.m_refData; -}; + return m_refData == palette.m_refData; +} bool wxPalette::operator != ( const wxPalette& palette ) { - return m_refData != palette.m_refData; -}; + return m_refData != palette.m_refData; +} bool wxPalette::Ok(void) const { - return (m_refData); -}; + return (m_refData != NULL); +} -bool wxPalette::Create( const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) +bool wxPalette::Create( int WXUNUSED(n), + const unsigned char *WXUNUSED(red), + const unsigned char *WXUNUSED(green), + const unsigned char *WXUNUSED(blue) ) { -}; + wxFAIL_MSG(wxT("not implemented")); + + return FALSE; +} -int wxPalette::GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const +int wxPalette::GetPixel( const unsigned char WXUNUSED(red), + const unsigned char WXUNUSED(green), + const unsigned char WXUNUSED(blue) ) const { -}; + wxFAIL_MSG(wxT("not implemented")); -bool wxPalette::GetRGB( const int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const + return 0; +} + +bool wxPalette::GetRGB( int WXUNUSED(pixel), + unsigned char *WXUNUSED(red), + unsigned char *WXUNUSED(green), + unsigned char *WXUNUSED(blue) ) const { -}; + wxFAIL_MSG(wxT("not implemented")); + + return 0; +}