]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/utils.cpp
Got rid of some wierd VisualAge debug nonsense that had appeared in this after the...
[wxWidgets.git] / src / mac / carbon / utils.cpp
index b312321562d22959b355a7e2acb9cb8f95946c60..6723ed2ad4432cf16167aa1c8660cffc3372523a 100644 (file)
@@ -27,6 +27,9 @@
 #include <string.h>
 #include <stdarg.h>
 
+#ifndef __UNIX__
+// defined in unix/utilsunx.cpp for Mac OS X
+
 // get full hostname (with domain name if possible)
 bool wxGetFullHostName(wxChar *buf, int maxSize)
 {
@@ -47,6 +50,14 @@ bool wxGetUserId(char *buf, int maxSize)
     return FALSE;
 }
 
+const wxChar* wxGetHomeDir(wxString *pstr)
+{
+       *pstr = wxMacFindFolder(  (short) kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder ) ;
+       return pstr->c_str() ;
+}
+
+
+
 // Get user name e.g. AUTHOR
 bool wxGetUserName(char *buf, int maxSize)
 {
@@ -115,6 +126,7 @@ void wxFatalError(const wxString& msg, const wxString& title)
 {
     // TODO
 }
+#endif // !__UNIX__
 
 // Emit a beeeeeep
 void wxBell()
@@ -248,6 +260,7 @@ bool wxIsBusy()
   return (wxBusyCursorCount > 0);
 }    
 
+#ifndef __UNIX__
 wxString wxMacFindFolder( short                                        vol,
                                                                 OSType                                 folderType,
                                                                 Boolean                                createFolder)
@@ -266,12 +279,15 @@ wxString wxMacFindFolder( short                                   vol,
        }
        return strDir ;
 }
+#endif
 
+#ifndef __UNIX__
 char *wxGetUserHome (const wxString& user)
 {
     // TODO
     return NULL;
 }
+#endif
 
 // Check whether this window wants to process messages, e.g. Stop button
 // in long calculations.
@@ -320,13 +336,18 @@ void wxDisplaySize(int *width, int *height)
 
     *width = screenBits.bounds.right - screenBits.bounds.left  ;
     *height = screenBits.bounds.bottom - screenBits.bounds.top ; 
- #if TARGET_CARBON
+#if TARGET_CARBON
        SInt16 mheight ;
        GetThemeMenuBarHeight( &mheight ) ;
      *height -= mheight ;
 #else
      *height -= LMGetMBarHeight() ;
- #endif
+#endif
+}
+
+void wxDisplaySizeMM(int *width, int *height)
+{
+   wxDisplaySize(width, height);
 }
 
 wxWindow* wxFindWindowAtPoint(const wxPoint& pt)