X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..a2d3a3d1d38ef64050ddcd9b2754c855167aad1f:/src/mac/carbon/dataobj.cpp diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index bec4f2bd60..234f49899a 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dataobj.h" #endif @@ -27,7 +27,6 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #endif -#include "wx/defs.h" #include "wx/log.h" #include "wx/dataobj.h" @@ -251,7 +250,9 @@ wxBitmapDataObject::wxBitmapDataObject( Init(); if ( m_bitmap.Ok() ) { - m_pictHandle = m_bitmap.GetPict( &m_pictCreated ) ; + /* + m_pictHandle = m_bitmap.GetBitmapData()->GetPict( &m_pictCreated ) ; + */ } } @@ -268,7 +269,9 @@ void wxBitmapDataObject::SetBitmap( wxBitmapDataObjectBase::SetBitmap(rBitmap); if ( m_bitmap.Ok() ) { - m_pictHandle = m_bitmap.GetPict( &m_pictCreated ) ; + /* + m_pictHandle = m_bitmap.GetBitmapData()->GetPict( &m_pictCreated ) ; + */ } } @@ -314,11 +317,13 @@ bool wxBitmapDataObject::SetData( PicHandle picHandle = (PicHandle) NewHandle( nSize ) ; memcpy( *picHandle , pBuf , nSize ) ; m_pictHandle = picHandle ; + // ownership is transferred to the bitmap m_pictCreated = false ; Rect frame = (**picHandle).picFrame ; - - m_bitmap.SetPict( picHandle ) ; + /* + m_bitmap.GetBitmapData()->SetPict( (WXHMETAFILE) picHandle ) ; m_bitmap.SetWidth( frame.right - frame.left ) ; m_bitmap.SetHeight( frame.bottom - frame.top ) ; + */ return m_bitmap.Ok(); }