-// Check whether this window wants to process messages, e.g. Stop button
-// in long calculations.
-bool wxCheckForInterrupt(wxWindow *WXUNUSED(wnd))
-{
- // TODO
- return false;
-}
-
-// Return true if we have a colour display
-bool wxColourDisplay()
-{
- return true;
-}
-
-#if wxOSX_USE_COCOA_OR_CARBON
-// Returns depth of screen
-int wxDisplayDepth()
-{
- int theDepth = (int) CGDisplayBitsPerPixel(CGMainDisplayID());
- return theDepth;
-}
-
-// Get size of display
-void wxDisplaySize(int *width, int *height)
-{
- // TODO adapt for multi-displays
- CGRect bounds = CGDisplayBounds(CGMainDisplayID());
- if ( width )
- *width = (int)bounds.size.width ;
- if ( height )
- *height = (int)bounds.size.height;
-}
-#endif
-
-void wxDisplaySizeMM(int *width, int *height)
-{
- wxDisplaySize(width, height);
- // on mac 72 is fixed (at least now;-)
- double cvPt2Mm = 25.4 / 72;
-
- if (width != NULL)
- *width = int( *width * cvPt2Mm );
-
- if (height != NULL)
- *height = int( *height * cvPt2Mm );
-}
-
-
-wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
-{
- // We suppose that toolkit version is the same as OS version under Mac
- wxGetOsVersion(verMaj, verMin);
-
- return wxPORT_OSX;
-}
-
-wxEventLoopBase* wxGUIAppTraits::CreateEventLoop()
-{
- return new wxEventLoop;
-}
-
-wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
-{
- return wxGenericFindWindowAtPoint(pt);
-}
-
-/*
- Return the generic RGB color space. This is a 'get' function and the caller should
- not release the returned value unless the caller retains it first. Usually callers
- of this routine will immediately use the returned colorspace with CoreGraphics
- so they typically do not need to retain it themselves.
-
- This function creates the generic RGB color space once and hangs onto it so it can
- return it whenever this function is called.
-*/
-
-CGColorSpaceRef wxMacGetGenericRGBColorSpace()
-{
- static wxCFRef<CGColorSpaceRef> genericRGBColorSpace;
-
- if (genericRGBColorSpace == NULL)
- {
-#if wxOSX_USE_IPHONE
- genericRGBColorSpace.reset( CGColorSpaceCreateDeviceRGB() );
-#else
- genericRGBColorSpace.reset( CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB ) );
-#endif
- }
-
- return genericRGBColorSpace;
-}
-
-#if wxOSX_USE_COCOA_OR_CARBON
-
-CGColorRef wxMacCreateCGColorFromHITheme( ThemeBrush brush )
-{
- CGColorRef color ;
- HIThemeBrushCreateCGColor( brush, &color );
- return color;
-}
-
-#endif // wxOSX_USE_COCOA_OR_CARBON
-
-IMPLEMENT_ABSTRACT_CLASS( wxWidgetImpl , wxObject )
-
-wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , bool isRootControl )
-{
- Init();
- m_isRootControl = isRootControl;
- m_wxPeer = peer;
-}
-
-wxWidgetImpl::wxWidgetImpl()
-{
- Init();
-}
-
-wxWidgetImpl::~wxWidgetImpl()
-{
-}
-
-void wxWidgetImpl::Init()
-{
- m_isRootControl = false;
- m_wxPeer = NULL;
- m_needsFocusRect = false;
-}
-
-void wxWidgetImpl::Destroy()
-{
-}
-
-void wxWidgetImpl::SetNeedsFocusRect( bool needs )
-{
- m_needsFocusRect = needs;
-}
-
-bool wxWidgetImpl::NeedsFocusRect() const
-{
- return m_needsFocusRect;
-}
-
-#endif // wxUSE_GUI
-
-//
-// TODO END move to utils_osx.cpp
-//
-
-//
-// carbon version
-//
-
-#if wxOSX_USE_CARBON
-
-#if wxUSE_BASE
-