X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..debdd17e991830c4ced82f5e4672fe2b32a684c2:/src/gtk/palette.cpp diff --git a/src/gtk/palette.cpp b/src/gtk/palette.cpp index 78cdfe5aed..4cdaef3726 100644 --- a/src/gtk/palette.cpp +++ b/src/gtk/palette.cpp @@ -15,6 +15,8 @@ #include "wx/palette.h" +#include "gdk/gdk.h" + //----------------------------------------------------------------------------- // wxPalette //----------------------------------------------------------------------------- @@ -22,19 +24,19 @@ 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 ); }; @@ -45,7 +47,7 @@ wxPaletteRefData::~wxPaletteRefData(void) IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject) -wxPalette::wxPalette(void) +wxPalette::wxPalette() { }; @@ -60,31 +62,25 @@ wxPalette::wxPalette( const wxPalette& palette ) Ref( palette ); }; -wxPalette::wxPalette( const wxPalette* palette ) -{ - UnRef(); - if (palette) Ref( *palette ); -}; - -wxPalette::~wxPalette(void) +wxPalette::~wxPalette() { }; 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 @@ -92,15 +88,32 @@ bool wxPalette::Ok(void) const return (m_refData); }; -bool wxPalette::Create( 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("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("not implemented"); + + return 0; }; -bool wxPalette::GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const +bool wxPalette::GetRGB( int WXUNUSED(pixel), + unsigned char *WXUNUSED(red), + unsigned char *WXUNUSED(green), + unsigned char *WXUNUSED(blue) ) const { + wxFAIL_MSG("not implemented"); + + return 0; };