]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/corefoundation/cfstring.h
correct misleading OnSize() comment
[wxWidgets.git] / include / wx / mac / corefoundation / cfstring.h
CommitLineData
5185263f
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/mac/corefoundation/cfstring.h
f35e4634 3// Purpose: wxCFStringRef and other string functions
5185263f
DE
4// Author: Stefan Csomor
5// Modified by:
6// Created: 2004-10-29 (from code in wx/mac/carbon/private.h)
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
afc605b2 10// Usage: Darwin (base library)
5185263f
DE
11/////////////////////////////////////////////////////////////////////////////
12
ac7f7b51
RN
13#ifndef __WX_CFSTRINGHOLDER_H__
14#define __WX_CFSTRINGHOLDER_H__
15
f35e4634 16#include <CoreFoundation/CFString.h>
5185263f 17
e17206f7 18#include "wx/dlimpexp.h"
dd0d56f5 19#include "wx/fontenc.h"
f35e4634 20#include "wx/mac/corefoundation/cfref.h"
dd0d56f5 21
b5dbe15d 22class WXDLLIMPEXP_FWD_BASE wxString;
dd0d56f5 23
e17206f7
VS
24WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( wxString *data ) ;
25WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( wxString *data ) ;
5185263f 26
e17206f7
VS
27WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( char * data ) ;
28WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( char * data ) ;
5185263f 29
e17206f7
VS
30WXDLLIMPEXP_BASE wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding) ;
31WXDLLIMPEXP_BASE wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) ;
32WXDLLIMPEXP_BASE void wxMacWakeUp() ;
5185263f 33
f35e4634 34class WXDLLIMPEXP_BASE wxCFStringRef : public wxCFRef< CFStringRef >
5185263f
DE
35{
36public:
f35e4634 37 wxCFStringRef()
5185263f 38 {
5185263f
DE
39 }
40
f35e4634
SC
41 wxCFStringRef(const wxString &str,
42 wxFontEncoding encoding = wxFONTENCODING_DEFAULT) ;
5185263f 43
f35e4634
SC
44 wxCFStringRef(CFStringRef ref)
45 : wxCFRef< CFStringRef >(ref)
5185263f 46 {
5185263f
DE
47 }
48
f35e4634
SC
49 wxCFStringRef(const wxCFStringRef& otherRef )
50 : wxCFRef< CFStringRef >(otherRef)
5185263f 51 {
5185263f
DE
52 }
53
f35e4634 54 ~wxCFStringRef()
5185263f 55 {
5185263f
DE
56 }
57
5185263f
DE
58 wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
59
60private:
5185263f
DE
61} ;
62
dfd468aa
SC
63// corresponding class for holding UniChars (native unicode characters)
64
e17206f7 65class WXDLLIMPEXP_BASE wxMacUniCharBuffer
dfd468aa
SC
66{
67public :
68 wxMacUniCharBuffer( const wxString &str ) ;
a8d69700 69
dfd468aa 70 ~wxMacUniCharBuffer() ;
a8d69700 71
dfd468aa 72 UniChar* GetBuffer() ;
a8d69700 73
dfd468aa 74 UniCharCount GetChars() ;
a8d69700 75
dfd468aa
SC
76private :
77 UniChar* m_ubuf ;
78 UniCharCount m_chars ;
79};
ac7f7b51 80#endif //__WXCFSTRINGHOLDER_H__