X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5f172485bf36ac1025395efc8073c1592c30c08..94734b4e51431d4d4d5bccaf011b28e82515091e:/include/wx/osx/core/cfstring.h diff --git a/include/wx/osx/core/cfstring.h b/include/wx/osx/core/cfstring.h index 1368aeb0b6..66a86760da 100644 --- a/include/wx/osx/core/cfstring.h +++ b/include/wx/osx/core/cfstring.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/mac/corefoundation/cfstring.h +// Name: wx/osx/core/cfstring.h // Purpose: wxCFStringRef and other string functions // Author: Stefan Csomor // Modified by: @@ -19,7 +19,7 @@ #include "wx/fontenc.h" #include "wx/osx/core/cfref.h" -#if WORDS_BIGENDIAN +#ifdef WORDS_BIGENDIAN #define kCFStringEncodingUTF32Native kCFStringEncodingUTF32BE #else #define kCFStringEncodingUTF32Native kCFStringEncodingUTF32LE @@ -49,18 +49,18 @@ public: #if wxOSX_USE_COCOA_OR_IPHONE wxCFStringRef(NSString* ref) - : wxCFRef< CFStringRef >((CFStringRef) ref) + : wxCFRef< CFStringRef >((CFStringRef) ref) { } #endif wxCFStringRef(CFStringRef ref) - : wxCFRef< CFStringRef >(ref) + : wxCFRef< CFStringRef >(ref) { } wxCFStringRef(const wxCFStringRef& otherRef ) - : wxCFRef< CFStringRef >(otherRef) + : wxCFRef< CFStringRef >(otherRef) { } @@ -68,7 +68,12 @@ public: { } - wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; + wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) const; + + static wxString AsString( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; +#if wxOSX_USE_COCOA_OR_IPHONE + static wxString AsString( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; +#endif #if wxOSX_USE_COCOA_OR_IPHONE NSString* AsNSString() const { return (NSString*)(CFStringRef) *this; }