]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/bitmap.cpp
OW 1.4 preparation.
[wxWidgets.git] / src / mac / carbon / bitmap.cpp
index 12ade3f74a12091366aa2b33f4342fe287cf09e4..1e84d4f2c388b4f2aefdff4ae101e1ae74c1b7e0 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "bitmap.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #include "wx/bitmap.h"
@@ -87,7 +83,7 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi
             info->u.iconRef = bmp->GetIconRef() ;
             AcquireIconRef( info->u.iconRef ) ;
         }
-#if wxMAC_USE_CORE_GRAPHICS && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+#if defined( __WXMAC_OSX__ ) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2 
         else if ( forceType == kControlContentCGImageRef )
         {
             info->contentType = kControlContentCGImageRef ;
@@ -116,7 +112,7 @@ void wxMacReleaseBitmapButton( ControlButtonContentInfo*info )
     {
         // owned by the bitmap, no release here
     }
-#if wxMAC_USE_CORE_GRAPHICS && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+#if defined( __WXMAC_OSX__ ) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2 
     else if ( info->contentType == kControlContentCGImageRef )
     {
         CGImageRelease( info->u.imageRef ) ;
@@ -146,7 +142,7 @@ void wxBitmapRefData::Init()
     m_pictHandle = NULL ;
     m_hBitmap = NULL ;
     m_hMaskBitmap = NULL;
-    m_maskBytesPerRow = NULL ;
+    m_maskBytesPerRow = 0 ;
 
     m_rawAccessCount = 0 ;
     m_hasAlpha = false;
@@ -271,9 +267,14 @@ IconRef wxBitmapRefData::GetIconRef()
 
         IconFamilyHandle iconFamily = NULL ;
 
+#ifdef WORDS_BIGENDIAN
         iconFamily = (IconFamilyHandle) NewHandle(8) ;
         (**iconFamily).resourceType = kIconFamilyType ;
         (**iconFamily).resourceSize = sizeof(OSType) + sizeof(Size);
+#else
+        // test this solution on big endian as well
+        iconFamily = (IconFamilyHandle) NewHandle(0) ;
+#endif
 
         int w = GetWidth() ;
         int h = GetHeight() ;
@@ -959,7 +960,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth)
     int width = image.GetWidth();
     int height = image.GetHeight();
 
-    m_refData = new wxBitmapRefData( width , height , depth ) ;;
+    m_refData = new wxBitmapRefData( width , height , depth ) ;
 
     // Create picture