projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(blind) wxUniv compilation fix: define the method using wxWindow out of line, i.e...
[wxWidgets.git]
/
src
/
gtk1
/
colour.cpp
diff --git
a/src/gtk1/colour.cpp
b/src/gtk1/colour.cpp
index bf2fa2a34297e58e6c07ad86ea91a0bd7616bac7..60735789ebf5aa0454b50134af65711de57b3a2a 100644
(file)
--- a/
src/gtk1/colour.cpp
+++ b/
src/gtk1/colour.cpp
@@
-15,8
+15,8
@@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/gdicmn.h"
#include "wx/colour.h"
#include "wx/colour.h"
+#include "wx/gdicmn.h"
#include "wx/gtk/private.h"
#include <gdk/gdk.h>
#include "wx/gtk/private.h"
#include <gdk/gdk.h>
@@
-37,7
+37,7
@@
public:
m_color.blue = 0;
m_color.pixel = 0;
m_colormap = (GdkColormap *) NULL;
m_color.blue = 0;
m_color.pixel = 0;
m_colormap = (GdkColormap *) NULL;
- m_hasPixel =
FALSE
;
+ m_hasPixel =
false
;
}
wxColourRefData(const wxColourRefData& data)
}
wxColourRefData(const wxColourRefData& data)
@@
-146,7
+146,8
@@
void wxColourRefData::AllocColour( GdkColormap *cmap )
#define M_COLDATA ((wxColourRefData *)m_refData)
#define M_COLDATA ((wxColourRefData *)m_refData)
-#define SHIFT (8*(sizeof(short int)-sizeof(char)))
+// GDK's values are in 0..65535 range, our are in 0..255
+#define SHIFT 8
IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject)
IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject)
@@
-207,10
+208,10
@@
wxColour::~wxColour()
bool wxColour::operator == ( const wxColour& col ) const
{
if (m_refData == col.m_refData)
bool wxColour::operator == ( const wxColour& col ) const
{
if (m_refData == col.m_refData)
- return
TRUE
;
+ return
true
;
if (!m_refData || !col.m_refData)
if (!m_refData || !col.m_refData)
- return
FALSE
;
+ return
false
;
GdkColor *own = &(((wxColourRefData*)m_refData)->m_color);
GdkColor *other = &(((wxColourRefData*)col.m_refData)->m_color);
GdkColor *own = &(((wxColourRefData*)m_refData)->m_color);
GdkColor *other = &(((wxColourRefData*)col.m_refData)->m_color);
@@
-239,7
+240,7
@@
void wxColour::Set( unsigned char red, unsigned char green, unsigned char blue )
M_COLDATA->m_color.pixel = 0;
M_COLDATA->m_colormap = (GdkColormap*) NULL;
M_COLDATA->m_color.pixel = 0;
M_COLDATA->m_colormap = (GdkColormap*) NULL;
- M_COLDATA->m_hasPixel =
FALSE
;
+ M_COLDATA->m_hasPixel =
false
;
}
unsigned char wxColour::Red() const
}
unsigned char wxColour::Red() const