completing the removal of PICT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -98,15 +98,10 @@ public:
|
|||||||
// rescaled to 16 x 16
|
// rescaled to 16 x 16
|
||||||
bool HasNativeSize();
|
bool HasNativeSize();
|
||||||
|
|
||||||
|
#ifndef __WXOSX_IPHONE__
|
||||||
// caller should increase ref count if needed longer
|
// caller should increase ref count if needed longer
|
||||||
// than the bitmap exists
|
// than the bitmap exists
|
||||||
IconRef GetIconRef();
|
IconRef GetIconRef();
|
||||||
|
|
||||||
#ifndef __WXOSX_IPHONE__
|
|
||||||
#ifndef __LP64__
|
|
||||||
// returns a Pict from the bitmap content
|
|
||||||
PicHandle GetPictHandle();
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGContextRef GetBitmapContext() const;
|
CGContextRef GetBitmapContext() const;
|
||||||
@@ -127,12 +122,10 @@ public:
|
|||||||
bool m_ok;
|
bool m_ok;
|
||||||
mutable CGImageRef m_cgImageRef;
|
mutable CGImageRef m_cgImageRef;
|
||||||
|
|
||||||
IconRef m_iconRef;
|
|
||||||
#ifndef __WXOSX_IPHONE__
|
#ifndef __WXOSX_IPHONE__
|
||||||
#ifndef __LP64__
|
IconRef m_iconRef;
|
||||||
PicHandle m_pictHandle;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGContextRef m_hBitmap;
|
CGContextRef m_hBitmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -193,13 +186,6 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi
|
|||||||
info->contentType = kControlContentCGImageRef ;
|
info->contentType = kControlContentCGImageRef ;
|
||||||
info->u.imageRef = (CGImageRef) bmap->CreateCGImage() ;
|
info->u.imageRef = (CGImageRef) bmap->CreateCGImage() ;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifndef __LP64__
|
|
||||||
info->contentType = kControlContentPictHandle ;
|
|
||||||
info->u.picture = bmap->GetPictHandle() ;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,9 +237,6 @@ void wxBitmapRefData::Init()
|
|||||||
|
|
||||||
#ifndef __WXOSX_IPHONE__
|
#ifndef __WXOSX_IPHONE__
|
||||||
m_iconRef = NULL ;
|
m_iconRef = NULL ;
|
||||||
#ifndef __LP64__
|
|
||||||
m_pictHandle = NULL ;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
m_hBitmap = NULL ;
|
m_hBitmap = NULL ;
|
||||||
|
|
||||||
@@ -385,10 +368,6 @@ void *wxBitmapRefData::BeginRawAccess()
|
|||||||
wxCHECK_MSG( IsOk(), NULL, wxT("invalid bitmap") ) ;
|
wxCHECK_MSG( IsOk(), NULL, wxT("invalid bitmap") ) ;
|
||||||
wxASSERT( m_rawAccessCount == 0 ) ;
|
wxASSERT( m_rawAccessCount == 0 ) ;
|
||||||
#ifndef __WXOSX_IPHONE__
|
#ifndef __WXOSX_IPHONE__
|
||||||
#ifndef __LP64__
|
|
||||||
wxASSERT_MSG( m_pictHandle == NULL,
|
|
||||||
wxT("Currently, modifing bitmaps that are used in controls already is not supported") ) ;
|
|
||||||
#endif
|
|
||||||
wxASSERT_MSG( m_iconRef == NULL ,
|
wxASSERT_MSG( m_iconRef == NULL ,
|
||||||
wxT("Currently, modifing bitmaps that are used in controls already is not supported") ) ;
|
wxT("Currently, modifing bitmaps that are used in controls already is not supported") ) ;
|
||||||
#endif
|
#endif
|
||||||
@@ -438,8 +417,7 @@ IconRef wxBitmapRefData::GetIconRef()
|
|||||||
OSType dataType = 0 ;
|
OSType dataType = 0 ;
|
||||||
OSType maskType = 0 ;
|
OSType maskType = 0 ;
|
||||||
|
|
||||||
#ifdef __LP64__
|
// since we don't have PICT conversion available, use
|
||||||
// since we don't have PICT conversion available under 64 bit, use
|
|
||||||
// the next larger standard icon size
|
// the next larger standard icon size
|
||||||
// TODO: Use NSImage
|
// TODO: Use NSImage
|
||||||
if (sz <= 16)
|
if (sz <= 16)
|
||||||
@@ -456,7 +434,6 @@ IconRef wxBitmapRefData::GetIconRef()
|
|||||||
sz = 512;
|
sz = 512;
|
||||||
else if ( sz <= 1024)
|
else if ( sz <= 1024)
|
||||||
sz = 1024;
|
sz = 1024;
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (sz)
|
switch (sz)
|
||||||
{
|
{
|
||||||
@@ -624,13 +601,6 @@ IconRef wxBitmapRefData::GetIconRef()
|
|||||||
DisposeHandle( maskdata ) ;
|
DisposeHandle( maskdata ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifndef __LP64__
|
|
||||||
PicHandle pic = GetPictHandle() ;
|
|
||||||
SetIconFamilyData( iconFamily, 'PICT' , (Handle) pic ) ;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
// transform into IconRef
|
// transform into IconRef
|
||||||
|
|
||||||
// cleaner version existing from 10.3 upwards
|
// cleaner version existing from 10.3 upwards
|
||||||
@@ -645,15 +615,6 @@ IconRef wxBitmapRefData::GetIconRef()
|
|||||||
return m_iconRef ;
|
return m_iconRef ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __WXOSX_IPHONE__
|
|
||||||
#ifndef __LP64__
|
|
||||||
PicHandle wxBitmapRefData::GetPictHandle()
|
|
||||||
{
|
|
||||||
return m_pictHandle ;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGImageRef wxBitmapRefData::CreateCGImage() const
|
CGImageRef wxBitmapRefData::CreateCGImage() const
|
||||||
@@ -793,13 +754,6 @@ void wxBitmapRefData::Free()
|
|||||||
ReleaseIconRef( m_iconRef ) ;
|
ReleaseIconRef( m_iconRef ) ;
|
||||||
m_iconRef = NULL ;
|
m_iconRef = NULL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __LP64__
|
|
||||||
if ( m_pictHandle )
|
|
||||||
{
|
|
||||||
m_pictHandle = NULL ;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
if ( m_hBitmap )
|
if ( m_hBitmap )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user