1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/corefoundation/cfstring.h
3 // Purpose: wxCFStringRef 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 // Usage: Darwin (base library)
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef __WX_CFSTRINGHOLDER_H__
14 #define __WX_CFSTRINGHOLDER_H__
16 #include <CoreFoundation/CFString.h>
18 #include "wx/dlimpexp.h"
19 #include "wx/fontenc.h"
20 #include "wx/mac/corefoundation/cfref.h"
22 class WXDLLIMPEXP_FWD_BASE wxString
;
24 WXDLLIMPEXP_BASE
void wxMacConvertNewlines13To10( wxString
*data
) ;
25 WXDLLIMPEXP_BASE
void wxMacConvertNewlines10To13( wxString
*data
) ;
27 WXDLLIMPEXP_BASE
void wxMacConvertNewlines13To10( char * data
) ;
28 WXDLLIMPEXP_BASE
void wxMacConvertNewlines10To13( char * data
) ;
30 WXDLLIMPEXP_BASE wxUint32
wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding
) ;
31 WXDLLIMPEXP_BASE wxFontEncoding
wxMacGetFontEncFromSystemEnc(wxUint32 encoding
) ;
32 WXDLLIMPEXP_BASE
void wxMacWakeUp() ;
34 class WXDLLIMPEXP_BASE wxCFStringRef
: public wxCFRef
< CFStringRef
>
41 wxCFStringRef(const wxString
&str
,
42 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
) ;
44 wxCFStringRef(CFStringRef ref
)
45 : wxCFRef
< CFStringRef
>(ref
)
49 wxCFStringRef(const wxCFStringRef
& otherRef
)
50 : wxCFRef
< CFStringRef
>(otherRef
)
58 wxString
AsString( wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
) ;
63 // corresponding class for holding UniChars (native unicode characters)
65 class WXDLLIMPEXP_BASE wxMacUniCharBuffer
68 wxMacUniCharBuffer( const wxString
&str
) ;
70 ~wxMacUniCharBuffer() ;
72 UniChar
* GetBuffer() ;
74 UniCharCount
GetChars() ;
78 UniCharCount m_chars
;
80 #endif //__WXCFSTRINGHOLDER_H__