]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/cursor.mm
Allow wx parents a chance to handle events fired by non-wx children. (i.e. wxActiveX...
[wxWidgets.git] / src / cocoa / cursor.mm
index c7535c4d0a8b2413a1c132182819718e451d4247..14499cfff595c56e4ec3aaf38d0ff3ce12e11e16 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:    wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "cursor.h"
-#endif
-
 #include "wx/wxprec.h"
 #ifndef WX_PRECOMP
     #include "wx/icon.h"
 
 #import <AppKit/NSCursor.h>
 #import <AppKit/NSImage.h>
-#include <wx/cocoa/string.h>
+#include "wx/cocoa/string.h"
 
-#if !USE_SHARED_LIBRARIES
 IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap)
-#endif
 
 typedef struct tagClassicCursor
 {
     wxUint16 bits[16];
     wxUint16 mask[16];
-    wxUint16 hotspot[2];
+    wxInt16 hotspot[2];
 }ClassicCursor;
 
 const short kwxCursorBullseye = 0 ;
@@ -216,8 +210,8 @@ NSCursor* wxGetStockCursor( short sIndex )
         //do the rest of those bits and alphas :)
         for (int shift = 0; shift < 32; ++shift)
         {
-            data[i] |= (!!(pCursor->bits[i] & (1 << (shift >> 1) ))) << shift;
-            data[i] |= (!(pCursor->mask[i] & (1 << (shift >> 1) ))) << ++shift;
+            data[i] |= ( !!( (pCursor->mask[i] & (1 << (shift >> 1) )) ) ) << shift;
+            data[i] |= ( !( (pCursor->bits[i] & (1 << (shift >> 1) )) ) ) << ++shift;
         }
     }
 
@@ -226,7 +220,7 @@ NSCursor* wxGetStockCursor( short sIndex )
     
     //create the new cursor
     NSCursor* theCursor =  [[NSCursor alloc]   initWithImage:theImage 
-                                    hotSpot:NSMakePoint(pCursor->hotspot[0], pCursor->hotspot[1])
+                                    hotSpot:NSMakePoint(pCursor->hotspot[1], pCursor->hotspot[0])
                             ];
     
     //do the usual cleanups