]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/core/cfstring.h
Removed most of the pre-XDG MIME code from the Unix implementation, many speed-ups...
[wxWidgets.git] / include / wx / osx / core / cfstring.h
CommitLineData
5c6eb3a8
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/mac/corefoundation/cfstring.h
3// Purpose: wxCFStringRef and other string functions
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
10// Usage: Darwin (base library)
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef __WX_CFSTRINGHOLDER_H__
14#define __WX_CFSTRINGHOLDER_H__
15
16#include <CoreFoundation/CFString.h>
17
18#include "wx/dlimpexp.h"
19#include "wx/fontenc.h"
ef0e9220 20#include "wx/osx/core/cfref.h"
5c6eb3a8
SC
21
22class WXDLLIMPEXP_FWD_BASE wxString;
23
24WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( wxString *data ) ;
25WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( wxString *data ) ;
26
27WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( char * data ) ;
28WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( char * data ) ;
29
30WXDLLIMPEXP_BASE wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding) ;
31WXDLLIMPEXP_BASE wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) ;
32WXDLLIMPEXP_BASE void wxMacWakeUp() ;
33
34class WXDLLIMPEXP_BASE wxCFStringRef : public wxCFRef< CFStringRef >
35{
36public:
37 wxCFStringRef()
38 {
39 }
40
41 wxCFStringRef(const wxString &str,
42 wxFontEncoding encoding = wxFONTENCODING_DEFAULT) ;
43
44 wxCFStringRef(CFStringRef ref)
45 : wxCFRef< CFStringRef >(ref)
46 {
47 }
48
49 wxCFStringRef(const wxCFStringRef& otherRef )
50 : wxCFRef< CFStringRef >(otherRef)
51 {
52 }
53
54 ~wxCFStringRef()
55 {
56 }
57
58 wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
59
60private:
61} ;
62
63// corresponding class for holding UniChars (native unicode characters)
64
65class WXDLLIMPEXP_BASE wxMacUniCharBuffer
66{
67public :
68 wxMacUniCharBuffer( const wxString &str ) ;
69
70 ~wxMacUniCharBuffer() ;
71
72 UniCharPtr GetBuffer() ;
73
74 UniCharCount GetChars() ;
75
76private :
77 UniCharPtr m_ubuf ;
78 UniCharCount m_chars ;
79};
80#endif //__WXCFSTRINGHOLDER_H__