From ce7c8a9751e918a0eabd132c417a6ea5b019ba70 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 19 Feb 2009 17:28:37 +0000 Subject: [PATCH] better fix for aCC and rawbmp.h git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/features.h | 6 +++++- include/wx/rawbmp.h | 5 +++++ src/gtk/bitmap.cpp | 9 +++------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/include/wx/features.h b/include/wx/features.h index 1b9847304f..22276fae0e 100644 --- a/include/wx/features.h +++ b/include/wx/features.h @@ -87,7 +87,11 @@ /* Direct access to bitmap data is not implemented in all ports yet */ #if defined(__WXGTK20__) || defined(__WXMAC__) || defined(__WXDFB__) || \ (defined(__WXMSW__) && !defined(__WATCOMC__)) - #define wxHAS_RAW_BITMAP + + // HP aCC for PA-RISC can't compile rawbmp.h + #if !defined(__HP_aCC) || !defined(__hppa) + #define wxHAS_RAW_BITMAP + #endif #endif /* also define deprecated synonym which exists for compatibility only */ diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index d636d586e5..0f25a78252 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -12,6 +12,10 @@ #ifndef _WX_RAWBMP_H_ #define _WX_RAWBMP_H_ +#include "wx/defs.h" + +#ifdef wxHAS_RAW_BITMAP + #include "wx/image.h" #include "wx/bitmap.h" @@ -749,4 +753,5 @@ struct wxPixelIterator : public wxPixelData::Iterator { }; +#endif // wxHAS_RAW_BITMAP #endif // _WX_RAWBMP_H_ diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 7811f87e54..8a2785bbd8 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -21,10 +21,7 @@ #include "wx/colour.h" #endif -// HP aCC for PA-RISC can't compile rawbmp.h -#if !defined(__HP_aCC) || !defined(__hppa) - #include "wx/rawbmp.h" -#endif +#include "wx/rawbmp.h" #include "wx/gtk/private/object.h" @@ -859,7 +856,7 @@ void wxBitmap::PurgeOtherRepresentations(wxBitmap::Representation keep) } } -#if !defined(__HP_aCC) || !defined(__hppa) +#ifdef wxHAS_RAW_BITMAP void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp) { void* bits = NULL; @@ -880,7 +877,7 @@ void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp) void wxBitmap::UngetRawData(wxPixelDataBase& WXUNUSED(data)) { } -#endif +#endif // wxHAS_RAW_BITMAP bool wxBitmap::HasAlpha() const { -- 2.45.2