]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/cursor.cpp
add -mno-cygwin detection: we should treat cygwin as Windows, not Unix, when it's...
[wxWidgets.git] / src / gtk / cursor.cpp
index c975d3cf0d3474fc696a85eb8bae2cc655a98082..aa71d2490f32355f32e4735bf2251d48a1cff1fb 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/app.h"
     #include "wx/utils.h"
+    #include "wx/image.h"
+    #include "wx/colour.h"
 #endif // WX_PRECOMP
 
 #include "wx/gtk/private.h" //for idle stuff
 
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
-
 //-----------------------------------------------------------------------------
 // wxCursor
 //-----------------------------------------------------------------------------
@@ -31,7 +30,7 @@ class wxCursorRefData: public wxObjectRefData
   public:
 
     wxCursorRefData();
-    ~wxCursorRefData();
+    virtual ~wxCursorRefData();
 
     GdkCursor *m_cursor;
 };
@@ -88,7 +87,7 @@ wxCursor::wxCursor( int cursorId )
         case wxCURSOR_ARROWWAIT:
         case wxCURSOR_WAIT:
         case wxCURSOR_WATCH:            gdk_cur = GDK_WATCH; break;
-        case wxCURSOR_SIZING:           gdk_cur = GDK_SIZING; break;
+        case wxCURSOR_SIZING:           gdk_cur = GDK_FLEUR; break;
         case wxCURSOR_SPRAYCAN:         gdk_cur = GDK_SPRAYCAN; break;
         case wxCURSOR_IBEAM:            gdk_cur = GDK_XTERM; break;
         case wxCURSOR_PENCIL:           gdk_cur = GDK_PENCIL; break;
@@ -147,8 +146,8 @@ wxCursor::wxCursor(const char bits[], int width, int  height,
                  data, mask, fg->GetColor(), bg->GetColor(),
                  hotSpotX, hotSpotY );
 
-    g_object_unref (G_OBJECT (data));
-    g_object_unref (G_OBJECT (mask));
+    g_object_unref (data);
+    g_object_unref (mask);
 }
 
 #if wxUSE_IMAGE
@@ -299,8 +298,8 @@ wxCursor::wxCursor( const wxImage & image )
                                 hotSpotX, hotSpotY
                              );
 
-    g_object_unref (G_OBJECT (data));
-    g_object_unref (G_OBJECT (mask));
+    g_object_unref (data);
+    g_object_unref (mask);
     delete [] bits;
     delete [] maskBits;
 }
@@ -311,17 +310,7 @@ wxCursor::~wxCursor()
 {
 }
 
-bool wxCursor::operator == ( const wxCursor& cursor ) const
-{
-    return m_refData == cursor.m_refData;
-}
-
-bool wxCursor::operator != ( const wxCursor& cursor ) const
-{
-    return m_refData != cursor.m_refData;
-}
-
-bool wxCursor::Ok() const
+bool wxCursor::IsOk() const
 {
     return (m_refData != NULL);
 }