#include "wx/fontenc.h"
#include "wx/osx/core/cfref.h"
+#ifdef WORDS_BIGENDIAN
+ #define kCFStringEncodingUTF32Native kCFStringEncodingUTF32BE
+#else
+ #define kCFStringEncodingUTF32Native kCFStringEncodingUTF32LE
+#endif
+
class WXDLLIMPEXP_FWD_BASE wxString;
WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( wxString *data ) ;
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)
+ : wxCFRef< CFStringRef >(ref)
{
}
wxCFStringRef(const wxCFStringRef& otherRef )
- : wxCFRef< CFStringRef >(otherRef)
+ : wxCFRef< CFStringRef >(otherRef)
{
}
{
}
- 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; }
+#endif
private:
} ;