X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4e41ce37ac7bcb43663241439cee68ebeff7ffc..c50f92d08cc3633f8127931e7cf5d362ab8ac392:/include/wx/mac/private.h diff --git a/include/wx/mac/private.h b/include/wx/mac/private.h index 2f2c4c6345..7c50c1f2fe 100644 --- a/include/wx/mac/private.h +++ b/include/wx/mac/private.h @@ -33,6 +33,8 @@ #error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/" #endif +#if wxUSE_GUI + #include "wx/window.h" class wxMacPortStateHelper @@ -107,6 +109,8 @@ private: // app.h bool wxMacConvertEventToRecord( EventRef event , EventRecord *rec) ; +#endif // wxUSE_GUI + // filefn.h WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ; WXDLLEXPORT void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) ; @@ -124,6 +128,8 @@ WXDLLEXPORT wxString wxMacFindFolder(short vRefNum, OSType folderType, Boolean createFolder); +#if wxUSE_GUI + GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ; void wxMacDestroyGWorld( GWorldPtr gw ) ; PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL ) ; @@ -143,6 +149,8 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi #define MAC_WXPOINTPTR(a) ((Point*)a) #define MAC_WXHMENU(a) ((MenuHandle)a) +#endif // wxUSE_GUI + //--------------------------------------------------------------------------- // wxMac string conversions //--------------------------------------------------------------------------- @@ -153,10 +161,15 @@ void wxMacCleanupConverters() ; void wxMacStringToPascal( const wxString&from , StringPtr to ) ; wxString wxMacMakeStringFromPascal( ConstStringPtr from ) ; -wxCharBuffer wxMacStringToCString( const wxString &from ) ; -wxWCharBuffer wxMacStringToWString( const wxString &from ) ; -wxString wxMacMakeStringFromCString( const char * from , int len ) ; -wxString wxMacMakeStringFromCString( const char * from ) ; +void wxMacConvertNewlines13To10( char * data ) ; +void wxMacConvertNewlines10To13( char * data ) ; +void wxMacConvertNewlines13To10( wxString *data ) ; +void wxMacConvertNewlines10To13( wxString *data ) ; + +#if wxUSE_UNICODE +void wxMacConvertNewlines13To10( wxChar * data ) ; +void wxMacConvertNewlines10To13( wxChar * data ) ; +#endif #if TARGET_CARBON @@ -219,80 +232,6 @@ private: bool m_release ; } ; -// CFStringRef wxMacStringToCFString( const wxString &str ) ; -// wxString wxMacMakeStringFromCFString( CFStringRef cf ) ; -#endif - -#if 0 - -void wxMacConvertToPC( const char *from , char *to , int len ) ; -void wxMacConvertFromPC( const char *from , char *to , int len ) ; -void wxMacConvertToPC( const char *from , char *to , int len ) ; - -wxString wxMacMakeMacStringFromPC( const wxChar * p ) ; - -wxString wxMacMakePCStringFromMac( const wxChar * p ) ; - - -// converts this c string into a wxString with optional mac 2 pc encoding -wxString wxMacMakeStringFromMacString( const wxChar* from , bool mac2pcEncoding ) ; - -// converts this c string into a wxString with pc 2 mac encoding if s_macDefaultEncodingIsPC -inline wxString wxMacMakeStringFromMacString( const wxChar* from ) - { return wxMacMakeStringFromMacString( from , wxApp::s_macDefaultEncodingIsPC ) ; } - -#if wxUSE_UNICODE - -wxString wxMacMakeMacStringFromPC( const char * p ) ; - -wxString wxMacMakePCStringFromMac( const char * p ) ; - -// converts this c string into a wxString with optional mac 2 pc encoding -wxString wxMacMakeStringFromMacString( const char* from , bool mac2pcEncoding ) ; - -// converts this c string into a wxString with pc 2 mac encoding if s_macDefaultEncodingIsPC -inline wxString wxMacMakeStringFromMacString( const char* from ) - { return wxMacMakeStringFromMacString( from , wxApp::s_macDefaultEncodingIsPC ) ; } - -#endif - -// converts this c string into a wxString with pc 2 mac encoding if s_macDefaultEncodingIsPC -inline wxString wxMacMakeStringFromMacString( const wxString& from ) - { return wxApp::s_macDefaultEncodingIsPC ? - wxMacMakeStringFromMacString( from.c_str() , true ) : from ; } - -// -// Pascal Strings -// - -// converts this string into a pascal with optional pc 2 mac encoding -void wxMacStringToPascal( const wxChar * from , StringPtr to , bool pc2macEncoding ) ; - -// converts this string into a pascal with pc 2 mac encoding if s_macDefaultEncodingIsPC -inline void wxMacStringToPascal( const wxChar * from , StringPtr to ) - { wxMacStringToPascal( from , to , wxApp::s_macDefaultEncodingIsPC ) ; } - -// converts this string into a pascal with optional mac 2 pc encoding -wxString wxMacMakeStringFromPascal( ConstStringPtr from , bool mac2pcEncoding ) ; - -// converts this pascal string into a wxString with pc 2 mac encoding if s_macDefaultEncodingIsPC -inline wxString wxMacMakeStringFromPascal( ConstStringPtr from ) - { return wxMacMakeStringFromPascal( from , wxApp::s_macDefaultEncodingIsPC ) ; } - -// -// CFStringRefs (Carbon only) -// - -#if TARGET_CARBON -// converts this string into a carbon foundation string with optional pc 2 mac encoding -CFStringRef wxMacStringToCFString( const wxString &str , bool pc2macEncoding ) ; - -// converts this string into a carbon foundation string with optional pc 2 mac encoding -inline CFStringRef wxMacStringToCFString( const wxString &str ) - { return wxMacStringToCFString( str , wxApp::s_macDefaultEncodingIsPC ) ; } - -#endif //TARGET_CARBON - #endif #endif