From: Stefan Csomor Date: Mon, 12 Apr 2010 16:29:35 +0000 (+0000) Subject: name change to correctly reflect the autorelease nature of the methods, removing... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/59d866ad8510b8674e6cc7cdf218c4c0010d3925 name change to correctly reflect the autorelease nature of the methods, removing double release, fixes #11547, fixes #11760 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index dd52324ea9..b8b0e07d31 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -51,7 +51,7 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage( CGContextRef inContext, const CGRect * inBounds, CGImageRef inImage) ; -WX_NSImage WXDLLIMPEXP_CORE wxOSXCreateNSImageFromCGImage( CGImageRef image ); +WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image ); CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage ); #endif diff --git a/include/wx/osx/iphone/private.h b/include/wx/osx/iphone/private.h index 73376eac68..0a698a7bbb 100644 --- a/include/wx/osx/iphone/private.h +++ b/include/wx/osx/iphone/private.h @@ -27,7 +27,7 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage( const CGRect * inBounds, CGImageRef inImage) ; -WX_UIImage WXDLLIMPEXP_CORE wxOSXCreateUIImageFromCGImage( CGImageRef image ); +WX_UIImage WXDLLIMPEXP_CORE wxOSXGetUIImageFromCGImage( CGImageRef image ); class WXDLLIMPEXP_CORE wxWidgetIPhoneImpl : public wxWidgetImpl { diff --git a/src/osx/carbon/utilscocoa.mm b/src/osx/carbon/utilscocoa.mm index c46711cec4..7a306737f3 100644 --- a/src/osx/carbon/utilscocoa.mm +++ b/src/osx/carbon/utilscocoa.mm @@ -283,7 +283,7 @@ WX_UIFont wxFont::OSXCreateUIFont(const wxNativeFontInfo* info) #if wxOSX_USE_IPHONE -WX_UIImage wxOSXCreateUIImageFromCGImage( CGImageRef image ) +WX_UIImage wxOSXGetUIImageFromCGImage( CGImageRef image ) { UIImage *newImage = [UIImage imageWithCGImage:image]; [newImage autorelease]; @@ -295,7 +295,7 @@ WX_UIImage wxOSXCreateUIImageFromCGImage( CGImageRef image ) #if wxOSX_USE_COCOA // From "Cocoa Drawing Guide:Working with Images" -WX_NSImage wxOSXCreateNSImageFromCGImage( CGImageRef image ) +WX_NSImage wxOSXGetNSImageFromCGImage( CGImageRef image ) { NSRect imageRect = NSMakeRect(0.0, 0.0, 0.0, 0.0); @@ -543,11 +543,9 @@ WX_NSCursor wxMacCocoaCreateCursorFromCGImage( CGImageRef cgImageRef, float hot firstTime = NO; } - NSImage *nsImage = wxOSXCreateNSImageFromCGImage( cgImageRef ); + NSImage *nsImage = wxOSXGetNSImageFromCGImage( cgImageRef ); NSCursor *cursor = [[NSCursor alloc] initWithImage:nsImage hotSpot:NSMakePoint( hotSpotX, hotSpotY )]; - [nsImage release]; - return cursor; } diff --git a/src/osx/core/bitmap.cpp b/src/osx/core/bitmap.cpp index 331788487f..ebb6ff260f 100644 --- a/src/osx/core/bitmap.cpp +++ b/src/osx/core/bitmap.cpp @@ -1028,7 +1028,7 @@ IconRef wxBitmap::CreateIconRef() const WX_NSImage wxBitmap::GetNSImage() const { wxCFRef< CGImageRef > cgimage(CreateCGImage()); - return wxOSXCreateNSImageFromCGImage( cgimage ); + return wxOSXGetNSImageFromCGImage( cgimage ); } #endif @@ -1038,7 +1038,7 @@ WX_NSImage wxBitmap::GetNSImage() const WX_UIImage wxBitmap::GetUIImage() const { wxCFRef< CGImageRef > cgimage(CreateCGImage()); - return wxOSXCreateUIImageFromCGImage( cgimage ); + return wxOSXGetUIImageFromCGImage( cgimage ); } #endif