+ 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 ;
+}
+
+#endif // wxUSE_BASE
+
+#if wxUSE_GUI
+
+// Check whether this window wants to process messages, e.g. Stop button
+// in long calculations.
+bool wxCheckForInterrupt(wxWindow *wnd)
+{
+ // TODO
+ return FALSE;
+}
+
+void wxGetMousePosition( int* x, int* y )
+{
+ Point pt ;
+
+ GetMouse( &pt ) ;
+ LocalToGlobal( &pt ) ;
+ *x = pt.h ;
+ *y = pt.v ;
+};
+
+// Return TRUE if we have a colour display
+bool wxColourDisplay()
+{
+ return TRUE;
+}
+
+// Returns depth of screen
+int wxDisplayDepth()
+{
+ Rect globRect ;
+ SetRect(&globRect, -32760, -32760, 32760, 32760);
+ GDHandle theMaxDevice;
+
+ int theDepth = 8;
+ theMaxDevice = GetMaxDevice(&globRect);
+ if (theMaxDevice != nil)
+ theDepth = (**(**theMaxDevice).gdPMap).pixelSize;
+
+ return theDepth ;
+}
+
+// Get size of display
+void wxDisplaySize(int *width, int *height)
+{
+ BitMap screenBits;
+ GetQDGlobalsScreenBits( &screenBits );
+
+ if (width != NULL) {
+ *width = screenBits.bounds.right - screenBits.bounds.left ;
+ }
+ if (height != NULL) {
+ *height = screenBits.bounds.bottom - screenBits.bounds.top ;
+ }
+}
+
+void wxDisplaySizeMM(int *width, int *height)
+{
+ wxDisplaySize(width, height);
+ // on mac 72 is fixed (at least now ;-)
+ float cvPt2Mm = 25.4 / 72;
+
+ if (width != NULL) {
+ *width = int( *width * cvPt2Mm );
+ }
+ if (height != NULL) {
+ *height = int( *height * cvPt2Mm );
+ }
+}
+
+void wxClientDisplayRect(int *x, int *y, int *width, int *height)
+{
+ BitMap screenBits;
+ GetQDGlobalsScreenBits( &screenBits );
+
+ if (x) *x = 0;
+ if (y) *y = 0;
+
+ if (width != NULL) {
+ *width = screenBits.bounds.right - screenBits.bounds.left ;
+ }
+ if (height != NULL) {
+ *height = screenBits.bounds.bottom - screenBits.bounds.top ;
+ }
+
+ SInt16 mheight ;
+#if TARGET_CARBON
+ GetThemeMenuBarHeight( &mheight ) ;
+#else
+ mheight = LMGetMBarHeight() ;
+#endif
+ if (height != NULL) {
+ *height -= mheight ;
+ }
+ if (y)
+ *y = mheight ;
+}
+
+wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
+{
+ return wxGenericFindWindowAtPoint(pt);
+}
+
+#endif // wxUSE_GUI
+
+#if wxUSE_BASE
+
+wxString wxGetOsDescription()
+{
+#ifdef WXWIN_OS_DESCRIPTION
+ // use configure generated description if available
+ return wxString(wxT("MacOS (")) + wxT(WXWIN_OS_DESCRIPTION) + wxString(wxT(")"));
+#else
+ return wxT("MacOS") ; //TODO:define further
+#endif