-#ifndef __LP64__
- SysBeep(30);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ if ( AudioServicesPlayAlertSound )
+ AudioServicesPlayAlertSound(kUserPreferredAlert);
+ else
+#endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
+ SysBeep(30);
+#else
+ {
+ }
-#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
+ char data[128];
+ struct utsname name;
+ uname(&name);
+ return wxString::Format(_T("Mac OS X (%s %s %s)"),
+ wxString::FromAscii(name.sysname).c_str(),
+ wxString::FromAscii(name.release).c_str(),
+ wxString::FromAscii(name.machine).c_str());
flush = kHIThemeTextHorizontalFlushRight;
HIViewSetTextFont( m_controlRef , part , (CTFontRef) font.MacGetCTFont() );
HIViewSetTextHorizontalFlush( m_controlRef, part, flush );
flush = kHIThemeTextHorizontalFlushRight;
HIViewSetTextFont( m_controlRef , part , (CTFontRef) font.MacGetCTFont() );
HIViewSetTextHorizontalFlush( m_controlRef, part, flush );
fontStyle.flags = kControlUseForeColorMask;
::SetControlFontStyle( m_controlRef , &fontStyle );
}
fontStyle.flags = kControlUseForeColorMask;
::SetControlFontStyle( m_controlRef , &fontStyle );
}
void wxMacControl::GetRectInWindowCoords( Rect *r )
{
GetControlBounds( m_controlRef , r ) ;
void wxMacControl::GetRectInWindowCoords( Rect *r )
{
GetControlBounds( m_controlRef , r ) ;
if ( linetop < top || linebottom > (top + rect.bottom - rect.top ) )
SetScrollPosition( wxMax( n-2, 0 ) * ((UInt32)height) , left ) ;
if ( linetop < top || linebottom > (top + rect.bottom - rect.top ) )
SetScrollPosition( wxMax( n-2, 0 ) * ((UInt32)height) , left ) ;
+static inline void PointFromHIPoint(const HIPoint& p, Point *pt)
+{
+ pt->h = wx_static_cast(short, p.x);
+ pt->v = wx_static_cast(short, p.y);
+}
+
void wxMacGlobalToLocal( WindowRef window , Point*pt )
{
HIPoint p = CGPointMake( pt->h, pt->v );
void wxMacGlobalToLocal( WindowRef window , Point*pt )
{
HIPoint p = CGPointMake( pt->h, pt->v );
// TODO check toolbar offset
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceView, contentView );
// TODO check toolbar offset
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceView, contentView );
// TODO check toolbar offset
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
HIPointConvert( &p, kHICoordSpaceView, contentView, kHICoordSpace72DPIGlobal, NULL );
// TODO check toolbar offset
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
HIPointConvert( &p, kHICoordSpaceView, contentView, kHICoordSpace72DPIGlobal, NULL );