X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/732d8c74f805e35cd398711fcd3969c4c668e259..e846dd57d76e7374898bc356eac71483a5a03d5a:/src/osx/core/bitmap.cpp diff --git a/src/osx/core/bitmap.cpp b/src/osx/core/bitmap.cpp index 71b8bda63a..86df441f9d 100644 --- a/src/osx/core/bitmap.cpp +++ b/src/osx/core/bitmap.cpp @@ -496,8 +496,13 @@ IconRef wxBitmapRefData::GetIconRef() } } HUnlock( data ); + OSStatus err = SetIconFamilyData( iconFamily, dataType , data ); - wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ); + if ( err != noErr ) + { + wxFAIL_MSG("Error when adding bitmap"); + } + DisposeHandle( data ); } else @@ -1014,7 +1019,7 @@ IconRef wxBitmap::CreateIconRef() const } #endif -#if wxOSX_USE_COCOA_OR_IPHONE +#if wxOSX_USE_COCOA WX_NSImage wxBitmap::GetNSImage() const { @@ -1024,6 +1029,15 @@ WX_NSImage wxBitmap::GetNSImage() const #endif +#if wxOSX_USE_IPHONE + +WX_UIImage wxBitmap::GetUIImage() const +{ + wxCFRef< CGImageRef > cgimage(CreateCGImage()); + return wxOSXCreateUIImageFromCGImage( cgimage ); +} + +#endif wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const { wxCHECK_MSG( Ok() && @@ -1654,8 +1668,11 @@ public: SetType(wxBITMAP_TYPE_PICT_RESOURCE); }; - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); + virtual bool LoadFile(wxBitmap *bitmap, + const wxString& name, + wxBitmapType type, + int desiredWidth, + int desiredHeight); }; IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler) @@ -1663,7 +1680,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler) bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, - long WXUNUSED(flags), + wxBitmapType WXUNUSED(type), int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight)) {