]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/corefoundation/cfstring.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/corefoundation/cfstring.h
3 // Purpose: wxMacCFStringHolder and other string functions
4 // Author: Stefan Csomor
6 // Created: 2004-10-29 (from code in wx/mac/carbon/private.h)
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #include <CoreFoundation/CFString.h>
18 void wxMacConvertNewlines13To10( char * data
) ;
19 void wxMacConvertNewlines10To13( char * data
) ;
20 void wxMacConvertNewlines13To10( wxString
*data
) ;
21 void wxMacConvertNewlines10To13( wxString
*data
) ;
24 void wxMacConvertNewlines13To10( wxChar
* data
) ;
25 void wxMacConvertNewlines10To13( wxChar
* data
) ;
28 wxUint32
wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding
) ;
29 wxFontEncoding
wxMacGetFontEncFromSystemEnc(wxUint32 encoding
) ;
32 class wxMacCFStringHolder
36 : m_cfs(NULL
) , m_release(false)
40 wxMacCFStringHolder(const wxString
&str
, wxFontEncoding encoding
)
41 : m_cfs(NULL
) , m_release(false)
43 Assign( str
, encoding
) ;
46 wxMacCFStringHolder(CFStringRef ref
, bool release
= true )
47 : m_cfs(ref
) , m_release(release
)
51 ~wxMacCFStringHolder()
58 CFStringRef retval
= m_cfs
;
66 if ( m_release
&& m_cfs
)
71 void Assign( const wxString
&str
, wxFontEncoding encoding
) ;
73 operator CFStringRef () { return m_cfs
; }
74 wxString
AsString( wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
) ;
81 DECLARE_NO_COPY_CLASS( wxMacCFStringHolder
)