]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/mac/carbon/private.h
Added wxWindows licence to match other files
[wxWidgets.git] / include / wx / mac / carbon / private.h
index 0d84f0ee92071ca754826a9a2e11a8d9636fcdbf..d8775399ab75c0b50f95258a7d956b197a9b12f8 100644 (file)
     #define MAC_OS_X_VERSION_10_3 1030
 #endif
 
+#ifdef __WXMAC_CARBON__
+#include "wx/mac/corefoundation/cfstring.h"
+#endif
+
 #if wxUSE_GUI
 
 #include "wx/window.h"
@@ -155,15 +159,7 @@ bool wxMacConvertEventToRecord( EventRef event , EventRecord *rec) ;
 
 // filefn.h
 WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ;
-WXDLLEXPORT void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) ;
-WXDLLEXPORT void wxMacFilename2FSSpec( const wxChar *path , FSSpec *spec ) ;
-#  ifndef __DARWIN__
-// Mac file names are POSIX (Unix style) under Darwin, so these are not needed
-WXDLLEXPORT wxString wxMacFSSpec2UnixFilename( const FSSpec *spec ) ;
-WXDLLEXPORT void wxUnixFilename2FSSpec( const char *path , FSSpec *spec ) ;
-WXDLLEXPORT wxString wxMac2UnixFilename( const char *s) ;
-WXDLLEXPORT wxString wxUnix2MacFilename( const char *s);
-#  endif
+WXDLLEXPORT void wxMacFilename2FSSpec( const wxString &path , FSSpec *spec ) ;
 
 // utils.h
 WXDLLEXPORT wxString wxMacFindFolder(short vRefNum,
@@ -407,6 +403,7 @@ public :
     virtual void Flash( ControlPartCode part , UInt32 ticks = 8 ) ;
     virtual void VisibilityChanged( bool shown ) ;
     virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle ) ;
+    virtual void SetBackground( const wxBrush &brush ) ;
     virtual ControlPartCode HandleKey(  SInt16 keyCode,  SInt16 charCode, EventModifiers modifiers ) ;
     void SetActionProc( ControlActionUPP   actionProc ) ;
     void SetViewSize( SInt32 viewSize ) ;
@@ -460,6 +457,7 @@ public :
     virtual OSStatus RevealItem( DataBrowserItemID item,
             DataBrowserPropertyID propertyID,
             DataBrowserRevealOptions options ) ;
+    virtual OSStatus GetSelectionAnchor( DataBrowserItemID * first, DataBrowserItemID * last ) ;
     virtual bool IsItemSelected( DataBrowserItemID item ) ;
     virtual OSStatus SetSelectedItems(UInt32 numItems,
             const DataBrowserItemID * items,
@@ -486,82 +484,15 @@ void wxMacCleanupConverters() ;
 void wxMacStringToPascal( const wxString&from , StringPtr to ) ;
 wxString wxMacMakeStringFromPascal( ConstStringPtr 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
-
-class wxMacCFStringHolder                                                             
-{                                                                           
-public:      
-       wxMacCFStringHolder()
-       {
-       m_cfs = NULL ;
-       m_release = false ;                                                                 
-       }
-                                                                      
-    wxMacCFStringHolder(const wxString &str , wxFontEncoding encoding )                                          
-    {      
-       m_cfs = NULL ;
-       m_release = false ;  
-       Assign( str , encoding ) ;
-    }                                                                       
-                                                                            
-    wxMacCFStringHolder(CFStringRef ref , bool release = true )                                                   
-    {                                                                       
-        m_cfs = ref ;
-        m_release = release ;                                           
-    }                                                                       
-                                                                            
-    ~wxMacCFStringHolder() 
-    { 
-       Release() ;
-    }                                           
-
-    CFStringRef Detach()
-    {
-       CFStringRef retval = m_cfs ;
-       m_release = false ;
-       m_cfs = NULL ;
-       return retval ;
-    }         
-                                                                   
-    void Release()
-    {
-       if ( m_release && m_cfs)
-               CFRelease( m_cfs ) ;
-       m_cfs = NULL ;
-    }         
-
-       void Assign( const wxString &str , wxFontEncoding encoding ) ;
-
-    operator CFStringRef () { return m_cfs; }   
-    wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
-             
-private:             
-                                                              
-    CFStringRef m_cfs;
-    bool m_release ;                                                        
-} ;
-
-#endif
-
-// utils.cpp
-
-wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding) ;
-wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) ;
-void wxMacWakeUp() ;
-
 // toplevel.cpp
 
 ControlRef wxMacFindControlUnderMouse( Point location , WindowRef window , ControlPartCode *outPart ) ;
 
+// filefn.cpp
+
+wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent = NULL ) ;
+OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef ) ;
+wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname ) ;
+
 #endif
     // _WX_PRIVATE_H_