#include "wx/gdicmn.h"
#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
//-----------------------------------------------------------------------------
GdkColormap *m_colormap;
bool m_hasPixel;
- friend wxColour;
+ friend class wxColour;
};
wxColourRefData::wxColourRefData()
if (!gdk_color_parse( colourName.mb_str(), &M_COLDATA->m_color ))
{
wxFAIL_MSG( wxT("wxColour: couldn't find colour") );
- wxPrintf( wxT("Colourname %s.\n"), WXSTRINGCAST colourName );
delete m_refData;
m_refData = (wxObjectRefData *) NULL;
bool wxColour::operator != ( const wxColour& col) const
{
- return m_refData != col.m_refData;
+ return !(*this == col);
}
void wxColour::Set( unsigned char red, unsigned char green, unsigned char blue )
M_COLDATA->FreeColour();
+#ifdef __WXGTK20__
+ if ((cmap->visual->type == GDK_VISUAL_GRAYSCALE) ||
+ (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR))
+#else
GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap;
if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||
(private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR))
+#endif
{
GdkColor *colors = cmap->colors;
int max = 3 * (65536);