// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
-#include "wx/app.h"
#include "wx/cursor.h"
-#include "wx/icon.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/icon.h"
+#endif // WX_PRECOMP
+
#include "wx/image.h"
#include "wx/xpmdecod.h"
CursHandle c = (CursHandle) NewHandle( sizeof(Cursor) ) ;
memcpy( *c, &gMacCursors[number], sizeof(Cursor) ) ;
+#ifndef WORDS_BIGENDIAN
+ short *sptr = (short*) *c ;
+ for ( int i = 0 ; i < 2 * 16 /* image and mask */ ; ++i, ++sptr )
+ {
+ *sptr = CFSwapInt16( *sptr ) ;
+ }
+#endif
return c ;
}
bool wxCursor::CreateFromXpm(const char **bits)
{
#if wxUSE_IMAGE
- wxCHECK_MSG( bits != NULL, false, wxT("invalid cursor data") )
+ wxCHECK_MSG( bits != NULL, false, wxT("invalid cursor data") );
wxXPMDecoder decoder;
wxImage img = decoder.ReadData(bits);
- wxCHECK_MSG( img.Ok(), false, wxT("invalid cursor data") )
+ wxCHECK_MSG( img.Ok(), false, wxT("invalid cursor data") );
CreateFromImage( img ) ;
return true;
#else
*((*(**ch).crsrData) + y * bytesPerRow + x) =
GetCTabIndex( newColors , &col) ;
}
-
+#ifdef WORDS_BIGENDIAN
(**ch).crsr1Data[y] = rowbits ;
(**ch).crsrMask[y] = maskbits ;
+#else
+ (**ch).crsr1Data[y] = CFSwapInt16(rowbits) ;
+ (**ch).crsrMask[y] = CFSwapInt16(maskbits) ;
+#endif
}
if ( !bHasMask )