projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed assert which could be provoked by correct code
[wxWidgets.git]
/
src
/
mac
/
cursor.cpp
diff --git
a/src/mac/cursor.cpp
b/src/mac/cursor.cpp
index dee7c92b5f128a56414063d82a3aa8ce27d7c8f1..fa0bbf76b29f7000d68470e8dfcaa34a1372fcbe 100644
(file)
--- a/
src/mac/cursor.cpp
+++ b/
src/mac/cursor.cpp
@@
-16,17
+16,33
@@
#include "wx/cursor.h"
#include "wx/icon.h"
#include "wx/cursor.h"
#include "wx/icon.h"
+#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap)
IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap)
+#endif
const short kwxCursorHandId = 9 ;
const short kwxCursorSizeWEId = 10 ;
const short kwxCursorSizeNSId = 11 ;
const short kwxCursorHandId = 9 ;
const short kwxCursorSizeWEId = 10 ;
const short kwxCursorSizeNSId = 11 ;
+#if !TARGET_CARBON
Cursor* MacArrowCursorPtr = &qd.arrow ;
CursHandle MacArrowCursor = &MacArrowCursorPtr ;
Cursor* MacArrowCursorPtr = &qd.arrow ;
CursHandle MacArrowCursor = &MacArrowCursorPtr ;
+#else
+bool MacArrowInstalled = false ;
+Cursor MacArrow ;
+Cursor* MacArrowCursorPtr = &MacArrow ;
+CursHandle MacArrowCursor = &MacArrowCursorPtr ;
+#endif
CursHandle gMacCurrentCursor = NULL ;
wxCursorRefData::wxCursorRefData()
{
CursHandle gMacCurrentCursor = NULL ;
wxCursorRefData::wxCursorRefData()
{
+#if TARGET_CARBON
+ if ( !MacArrowInstalled )
+ {
+ MacArrowCursorPtr = GetQDGlobalsArrow( &MacArrow ) ;
+ MacArrowInstalled = true ;
+ }
+#endif
m_width = 32;
m_height = 32;
m_hCursor = NULL ;
m_width = 32;
m_height = 32;
m_hCursor = NULL ;
@@
-34,8
+50,8
@@
wxCursorRefData::wxCursorRefData()
wxCursorRefData::~wxCursorRefData()
{
wxCursorRefData::~wxCursorRefData()
{
-
if ( m_hCursor && ( m_hCursor != MacArrowCursor ) )
-
::DisposeHandl
e( (Handle) m_hCursor ) ;
+
//
if ( m_hCursor && ( m_hCursor != MacArrowCursor ) )
+
// ::ReleaseResourc
e( (Handle) m_hCursor ) ;
}
// Cursors
}
// Cursors