projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
missing reversed orientation assignments
[wxWidgets.git]
/
src
/
gtk
/
cursor.cpp
diff --git
a/src/gtk/cursor.cpp
b/src/gtk/cursor.cpp
index cac9e5aabaf90133d213c87801704288c94ca4e4..aa71d2490f32355f32e4735bf2251d48a1cff1fb 100644
(file)
--- 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$
// Purpose:
// Author: Robert Roebling
// Id: $Id$
@@
-11,18
+11,15
@@
#include "wx/wxprec.h"
#include "wx/cursor.h"
#include "wx/wxprec.h"
#include "wx/cursor.h"
-#include "wx/utils.h"
-#include "wx/app.h"
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/utils.h"
+ #include "wx/image.h"
+ #include "wx/colour.h"
+#endif // WX_PRECOMP
-//-----------------------------------------------------------------------------
-// idle system
-//-----------------------------------------------------------------------------
-
-extern void wxapp_install_idle_handler();
-extern bool g_isIdle;
+#include "wx/gtk/private.h" //for idle stuff
//-----------------------------------------------------------------------------
// wxCursor
//-----------------------------------------------------------------------------
// wxCursor
@@
-33,7
+30,7
@@
class wxCursorRefData: public wxObjectRefData
public:
wxCursorRefData();
public:
wxCursorRefData();
- ~wxCursorRefData();
+
virtual
~wxCursorRefData();
GdkCursor *m_cursor;
};
GdkCursor *m_cursor;
};
@@
-45,7
+42,7
@@
wxCursorRefData::wxCursorRefData()
wxCursorRefData::~wxCursorRefData()
{
wxCursorRefData::~wxCursorRefData()
{
- if (m_cursor) gdk_cursor_
destroy
( m_cursor );
+ if (m_cursor) gdk_cursor_
unref
( m_cursor );
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
@@
-90,7
+87,7
@@
wxCursor::wxCursor( int cursorId )
case wxCURSOR_ARROWWAIT:
case wxCURSOR_WAIT:
case wxCURSOR_WATCH: gdk_cur = GDK_WATCH; break;
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;
case wxCURSOR_SPRAYCAN: gdk_cur = GDK_SPRAYCAN; break;
case wxCURSOR_IBEAM: gdk_cur = GDK_XTERM; break;
case wxCURSOR_PENCIL: gdk_cur = GDK_PENCIL; break;
@@
-128,7
+125,7
@@
extern GtkWidget *wxGetRootWindow();
wxCursor::wxCursor(const char bits[], int width, int height,
int hotSpotX, int hotSpotY,
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;
{
if (!maskBits)
maskBits = bits;
@@
-149,8
+146,8
@@
wxCursor::wxCursor(const char bits[], int width, int height,
data, mask, fg->GetColor(), bg->GetColor(),
hotSpotX, hotSpotY );
data, mask, fg->GetColor(), bg->GetColor(),
hotSpotX, hotSpotY );
- g
dk_bitmap_unref( data
);
- g
dk_bitmap_unref( mask
);
+ g
_object_unref (data
);
+ g
_object_unref (mask
);
}
#if wxUSE_IMAGE
}
#if wxUSE_IMAGE
@@
-301,8
+298,8
@@
wxCursor::wxCursor( const wxImage & image )
hotSpotX, hotSpotY
);
hotSpotX, hotSpotY
);
- g
dk_bitmap_unref( data
);
- g
dk_bitmap_unref( mask
);
+ g
_object_unref (data
);
+ g
_object_unref (mask
);
delete [] bits;
delete [] maskBits;
}
delete [] bits;
delete [] maskBits;
}
@@
-313,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);
}
{
return (m_refData != NULL);
}
@@
-364,7
+351,7
@@
void wxEndBusyCursor()
wxTheApp->ProcessIdle();
}
wxTheApp->ProcessIdle();
}
-void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
+void wxBeginBusyCursor(
const
wxCursor *WXUNUSED(cursor) )
{
if (gs_busyCount++ > 0)
return;
{
if (gs_busyCount++ > 0)
return;