Changing datatransfer implementation from CFPasteboard to NSPasteboard API (#1264)
* changing datatransfer from CFPasteboard to NSPasteboard API * factoring and cleaning up * Switching back naming * missed file * getting wxCFStringRef to be independent of system headers * add unichar include * using wxCFStringRef in header * moving to private headers, change method name * adapting to lesser content in cfstring.h * Removing malloc/free usage * use wxScopedArray throughout * using wxMemoryBuffer instead of char[] * fixing nonprecomp headers * missing forward decl in non-precomp builds
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
#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"
|
||||
@@ -44,7 +42,7 @@ public:
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT) ;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
wxCFStringRef(NSString* ref)
|
||||
wxCFStringRef(WX_NSString ref)
|
||||
: wxCFRef< CFStringRef >((CFStringRef) ref)
|
||||
{
|
||||
}
|
||||
@@ -69,29 +67,12 @@ public:
|
||||
static wxString AsString( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
static wxString AsStringWithNormalizationFormC( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
#ifdef __WXMAC__
|
||||
static wxString AsString( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
static wxString AsStringWithNormalizationFormC( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
static wxString AsString( WX_NSString ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
static wxString AsStringWithNormalizationFormC( WX_NSString ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
|
||||
NSString* AsNSString() const { return (NSString*)(CFStringRef) *this; }
|
||||
WX_NSString AsNSString() const { return (WX_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__
|
||||
|
Reference in New Issue
Block a user