X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c6eb3a84be918dcfed2496d014549e13af0f0e9..86ac84b8ce086e6bbda58f422d41f84268606e35:/include/wx/osx/core/cfstring.h diff --git a/include/wx/osx/core/cfstring.h b/include/wx/osx/core/cfstring.h index c4b1719c4d..30d4319493 100644 --- a/include/wx/osx/core/cfstring.h +++ b/include/wx/osx/core/cfstring.h @@ -17,7 +17,13 @@ #include "wx/dlimpexp.h" #include "wx/fontenc.h" -#include "wx/mac/corefoundation/cfref.h" +#include "wx/osx/core/cfref.h" + +#ifdef WORDS_BIGENDIAN + #define kCFStringEncodingUTF32Native kCFStringEncodingUTF32BE +#else + #define kCFStringEncodingUTF32Native kCFStringEncodingUTF32LE +#endif class WXDLLIMPEXP_FWD_BASE wxString; @@ -41,6 +47,13 @@ public: wxCFStringRef(const wxString &str, wxFontEncoding encoding = wxFONTENCODING_DEFAULT) ; +#if wxOSX_USE_COCOA_OR_IPHONE + wxCFStringRef(NSString* ref) + : wxCFRef< CFStringRef >((CFStringRef) ref) + { + } +#endif + wxCFStringRef(CFStringRef ref) : wxCFRef< CFStringRef >(ref) { @@ -57,6 +70,9 @@ public: wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; +#if wxOSX_USE_COCOA_OR_IPHONE + NSString* AsNSString() const { return (NSString*)(CFStringRef) *this; } +#endif private: } ;