X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/917be7ed065337e8a7a67615969ecaade9eea809..deb0c40261cfc5e4ac3f84782da48eaad40cc5d2:/src/x11/palette.cpp diff --git a/src/x11/palette.cpp b/src/x11/palette.cpp index 9da4df9aa4..79f2767556 100644 --- a/src/x11/palette.cpp +++ b/src/x11/palette.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: palette.cpp +// Name: src/x11/palette.cpp // Purpose: wxPalette // Author: Julian Smart // Modified by: @@ -34,14 +34,16 @@ recommended; only the window manager should do this... Also, it is not the functionality that wxPalette::Create() aims to provide. */ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "palette.h" -#endif +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #include "wx/palette.h" -#include "wx/window.h" -#include "wx/app.h" -#include "wx/utils.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/window.h" +#endif #ifdef __VMS__ #pragma message disable nosimpint @@ -168,13 +170,25 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre return true; } -int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const +wxGDIRefData *wxPalette::CreateGDIRefData() const +{ + return new wxPaletteRefData; +} + +wxGDIRefData *wxPalette::CloneGDIRefData(const wxGDIRefData *data) const +{ + return new wxPaletteRefData(*wx_static_cast(const wxPaletteRefData *, data)); +} + +int wxPalette::GetPixel(unsigned char WXUNUSED(red), + unsigned char WXUNUSED(green), + unsigned char WXUNUSED(blue)) const { if ( !m_refData ) - return FALSE; + return wxNOT_FOUND; // TODO - return FALSE; + return wxNOT_FOUND; } bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *WXUNUSED(green), unsigned char *WXUNUSED(blue)) const @@ -355,4 +369,3 @@ void wxPalette::PutXColormap(WXDisplay* display, WXColormap cm, bool dp) M_PALETTEDATA->m_palettes.Append(c); } -