X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57591e0edb8cbaa2b12e4a0da68fe445fa636747..61cca9d24ee3f935f2581e3cfb894e46181290e6:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index b312321562..6723ed2ad4 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -27,6 +27,9 @@ #include #include +#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)