+#endif
+
+void wxMacGlobalToLocal( WindowRef window , Point*pt )
+{
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
+ HIPoint p = CGPointMake( pt->h, pt->v );
+ HIViewRef contentView ;
+ // TODO check toolbar offset
+ HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
+ HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceView, contentView );
+ pt->h = p.x;
+ pt->v = p.y;
+#else
+ QDGlobalToLocalPoint( GetWindowPort(window), pt ) ;
+#endif
+}
+
+void wxMacLocalToGlobal( WindowRef window , Point*pt )
+{
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
+ HIPoint p = CGPointMake( pt->h, pt->v );
+ HIViewRef contentView ;
+ // TODO check toolbar offset
+ HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
+ HIPointConvert( &p, kHICoordSpaceView, contentView, kHICoordSpace72DPIGlobal, NULL );
+ pt->h = p.x;
+ pt->v = p.y;
+#else
+ QDLocalToGlobalPoint( GetWindowPort(window), pt ) ;
+#endif
+}