3f66f6a5b3
This keyword is not expanded by Git which means it's not replaced with the correct revision value in the releases made using git-based scripts and it's confusing to have lines with unexpanded "$Id$" in the released files. As expanding them with Git is not that simple (it could be done with git archive and export-subst attribute) and there are not many benefits in having them in the first place, just remove all these lines. If nothing else, this will make an eventual transition to Git simpler. Closes #14487. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
103 lines
2.9 KiB
C++
103 lines
2.9 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/osx/core/cfstring.h
|
|
// Purpose: wxCFStringRef and other string functions
|
|
// Author: Stefan Csomor
|
|
// Modified by:
|
|
// Created: 2004-10-29 (from code in wx/mac/carbon/private.h)
|
|
// Copyright: (c) Stefan Csomor
|
|
// Licence: wxWindows licence
|
|
// Usage: Darwin (base library)
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef __WX_CFSTRINGHOLDER_H__
|
|
#define __WX_CFSTRINGHOLDER_H__
|
|
|
|
#include <CoreFoundation/CFString.h>
|
|
|
|
#include "wx/dlimpexp.h"
|
|
#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 ) ;
|
|
WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( wxString *data ) ;
|
|
|
|
WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( char * data ) ;
|
|
WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( char * data ) ;
|
|
|
|
WXDLLIMPEXP_BASE wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding) ;
|
|
WXDLLIMPEXP_BASE wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) ;
|
|
WXDLLIMPEXP_BASE void wxMacWakeUp() ;
|
|
|
|
class WXDLLIMPEXP_BASE wxCFStringRef : public wxCFRef< CFStringRef >
|
|
{
|
|
public:
|
|
wxCFStringRef()
|
|
{
|
|
}
|
|
|
|
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)
|
|
{
|
|
}
|
|
|
|
wxCFStringRef(const wxCFStringRef& otherRef )
|
|
: wxCFRef< CFStringRef >(otherRef)
|
|
{
|
|
}
|
|
|
|
~wxCFStringRef()
|
|
{
|
|
}
|
|
|
|
wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) const;
|
|
|
|
static wxString AsString( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
|
static wxString AsStringWithNormalizationFormC( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
|
#if wxOSX_USE_COCOA_OR_IPHONE
|
|
static wxString AsString( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
|
static wxString AsStringWithNormalizationFormC( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
|
#endif
|
|
|
|
#if wxOSX_USE_COCOA_OR_IPHONE
|
|
NSString* AsNSString() const { return (NSString*)(CFStringRef) *this; }
|
|
#endif
|
|
private:
|
|
} ;
|
|
|
|
// corresponding class for holding UniChars (native unicode characters)
|
|
|
|
class WXDLLIMPEXP_BASE wxMacUniCharBuffer
|
|
{
|
|
public :
|
|
wxMacUniCharBuffer( const wxString &str ) ;
|
|
|
|
~wxMacUniCharBuffer() ;
|
|
|
|
UniCharPtr GetBuffer() ;
|
|
|
|
UniCharCount GetChars() ;
|
|
|
|
private :
|
|
UniCharPtr m_ubuf ;
|
|
UniCharCount m_chars ;
|
|
};
|
|
#endif //__WXCFSTRINGHOLDER_H__
|