X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5af73080abf2b01f4bbd7c0a27773b49f995932..0cebbfc2bd3a22ee50f789fca623d9037660e495:/src/gtk/cursor.cpp diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 2d237ec192..a175daaa6e 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: cursor.cpp +// Name: src/gtk/cursor.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -11,13 +11,15 @@ #include "wx/wxprec.h" #include "wx/cursor.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/gtk/private.h" //for idle stuff +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/image.h" + #include "wx/colour.h" +#endif // WX_PRECOMP -#include -#include +#include "wx/gtk/private.h" //for idle stuff //----------------------------------------------------------------------------- // wxCursor @@ -28,7 +30,7 @@ class wxCursorRefData: public wxObjectRefData public: wxCursorRefData(); - ~wxCursorRefData(); + virtual ~wxCursorRefData(); GdkCursor *m_cursor; }; @@ -40,7 +42,7 @@ wxCursorRefData::wxCursorRefData() wxCursorRefData::~wxCursorRefData() { - if (m_cursor) gdk_cursor_destroy( m_cursor ); + if (m_cursor) gdk_cursor_unref( m_cursor ); } //----------------------------------------------------------------------------- @@ -85,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; @@ -123,7 +125,7 @@ extern GtkWidget *wxGetRootWindow(); wxCursor::wxCursor(const char bits[], int width, int height, int hotSpotX, int hotSpotY, - const char maskBits[], wxColour *fg, wxColour *bg) + const char maskBits[], const wxColour *fg, const wxColour *bg) { if (!maskBits) maskBits = bits; @@ -144,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 @@ -296,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; } @@ -359,7 +361,7 @@ void wxEndBusyCursor() wxTheApp->ProcessIdle(); } -void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) +void wxBeginBusyCursor( const wxCursor *WXUNUSED(cursor) ) { if (gs_busyCount++ > 0) return;