// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
-#include "wx/app.h"
#include "wx/cursor.h"
-#include "wx/icon.h"
-#include "wx/image.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/icon.h"
+ #include "wx/image.h"
+#endif // WX_PRECOMP
+
#include "wx/xpmdecod.h"
#include "wx/mac/private.h"
public:
wxCursorRefData();
- ~wxCursorRefData();
+ virtual ~wxCursorRefData();
protected:
WXHCURSOR m_hCursor;
long m_themeCursor;
};
-#define M_CURSORDATA ((wxCursorRefData *)m_refData)
-#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
+#define M_CURSORDATA wx_static_cast(wxCursorRefData*, m_refData)
const short kwxCursorBullseye = 0;
const short kwxCursorBlank = 1;
{
if ( m_isColorCursor )
{
- ::DisposeCCursor( (CCrsrHandle) m_hCursor ) ;
+#ifndef __LP64__
+ ::DisposeCCursor( (CCrsrHandle) m_hCursor ) ;
+#endif
}
else if ( m_disposeHandle )
{
return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0);
}
-bool wxCursor::Ok() const
+bool wxCursor::IsOk() const
{
return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ;
}
{
m_refData = new wxCursorRefData;
+#ifndef __LP64__
int w = 16;
int h = 16;
HUnlock( (Handle)ch ) ;
M_CURSORDATA->m_hCursor = ch ;
M_CURSORDATA->m_isColorCursor = true ;
+#endif
+
}
#endif //wxUSE_IMAGE
m_refData = new wxCursorRefData;
if ( flags == wxBITMAP_TYPE_MACCURSOR_RESOURCE )
{
+#ifndef __LP64__
Str255 theName ;
wxMacStringToPascal( cursor_file , theName ) ;
M_CURSORDATA->m_releaseHandle = true ;
}
}
+#endif
}
else
{
{
image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX ) ;
image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY ) ;
- delete m_refData ;
+ m_refData->DecRef() ;
+ m_refData = NULL ;
CreateFromImage( image ) ;
}
#endif
}
else if ( m_refData && M_CURSORDATA->m_hCursor )
{
- if ( M_CURSORDATA->m_isColorCursor )
+#ifndef __LP64__
+ if ( M_CURSORDATA->m_isColorCursor )
::SetCCursor( (CCrsrHandle) M_CURSORDATA->m_hCursor ) ;
else
::SetCursor( * (CursHandle) M_CURSORDATA->m_hCursor ) ;
+#endif
}
else
{