X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..df37f0c65ccd024fb3187cbfad2fe3cd3fc3794d:/src/mac/utils.cpp diff --git a/src/mac/utils.cpp b/src/mac/utils.cpp index 2ab9256cc5..d651da7ca9 100644 --- a/src/mac/utils.cpp +++ b/src/mac/utils.cpp @@ -26,8 +26,12 @@ #include #include -#include "MoreFiles.h" -#include "MoreFilesExtras.h" +#ifdef __DARWIN__ +# include "MoreFilesX.h" +#else +# include "MoreFiles.h" +# include "MoreFilesExtras.h" +#endif #ifndef __DARWIN__ #include @@ -362,19 +366,19 @@ wxString wxMacFindFolder( short vol, OSType folderType, Boolean createFolder) { - short vRefNum ; - long dirID ; - wxString strDir ; - - if ( FindFolder( vol, folderType, createFolder, &vRefNum, &dirID) == noErr) - { - FSSpec file ; - if ( FSMakeFSSpec( vRefNum , dirID , "\p" , &file ) == noErr ) - { - strDir = wxMacFSSpec2MacFilename( &file ) + wxFILE_SEP_PATH ; - } - } - return strDir ; + short vRefNum ; + long dirID ; + wxString strDir ; + + if ( FindFolder( vol, folderType, createFolder, &vRefNum, &dirID) == noErr) + { + FSSpec file ; + if ( FSMakeFSSpec( vRefNum , dirID , "\p" , &file ) == noErr ) + { + strDir = wxMacFSSpec2MacFilename( &file ) + wxFILE_SEP_PATH ; + } + } + return strDir ; } #ifndef __DARWIN__ @@ -479,8 +483,8 @@ void wxDisplaySizeMM(int *width, int *height) void wxClientDisplayRect(int *x, int *y, int *width, int *height) { - BitMap screenBits; - GetQDGlobalsScreenBits( &screenBits ); + BitMap screenBits; + GetQDGlobalsScreenBits( &screenBits ); if (x) *x = 0; if (y) *y = 0; @@ -488,15 +492,15 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height) *width = screenBits.bounds.right - screenBits.bounds.left ; *height = screenBits.bounds.bottom - screenBits.bounds.top ; - SInt16 mheight ; - #if TARGET_CARBON - GetThemeMenuBarHeight( &mheight ) ; - #else + SInt16 mheight ; +#if TARGET_CARBON + GetThemeMenuBarHeight( &mheight ) ; +#else mheight = LMGetMBarHeight() ; - #endif +#endif *height -= mheight ; if ( y ) - *y = mheight ; + *y = mheight ; } wxWindow* wxFindWindowAtPoint(const wxPoint& pt)