/////////////////////////////////////////////////////////////////////////////
-// Name: cursor.cpp
+// Name: src/gtk/cursor.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#include "wx/wxprec.h"
#include "wx/cursor.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif // WX_PRECOMP
+
#include "wx/utils.h"
-#include "wx/app.h"
#include "wx/gtk/private.h" //for idle stuff
wxCursorRefData::~wxCursorRefData()
{
- if (m_cursor) gdk_cursor_destroy( m_cursor );
+ if (m_cursor) gdk_cursor_unref( m_cursor );
}
//-----------------------------------------------------------------------------
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;
data, mask, fg->GetColor(), bg->GetColor(),
hotSpotX, hotSpotY );
- gdk_bitmap_unref( data );
- gdk_bitmap_unref( mask );
+ g_object_unref (G_OBJECT (data));
+ g_object_unref (G_OBJECT (mask));
}
#if wxUSE_IMAGE
hotSpotX, hotSpotY
);
- gdk_bitmap_unref( data );
- gdk_bitmap_unref( mask );
+ g_object_unref (G_OBJECT (data));
+ g_object_unref (G_OBJECT (mask));
delete [] bits;
delete [] maskBits;
}
wxTheApp->ProcessIdle();
}
-void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
+void wxBeginBusyCursor( const wxCursor *WXUNUSED(cursor) )
{
if (gs_busyCount++ > 0)
return;