#include "wx/graphics.h"
#include "wx/rawbmp.h"
-#include "wx/mac/private.h"
+#include "wx/osx/private.h"
+#include "wx/osx/dcclient.h"
//-----------------------------------------------------------------------------
// wxWindowDCImpl
m_release = false;
}
+
wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window )
: wxGCDCImpl( owner )
{
m_window = window;
- WindowRef rootwindow = (WindowRef) window->MacGetTopLevelWindowRef() ;
- if (!rootwindow)
- return;
-
m_ok = true ;
m_window->GetSize( &m_width , &m_height);
if ( !m_window->IsShownOnScreen() )
m_width = m_height = 0;
+
CGContextRef cg = (CGContextRef) window->MacGetCGContextRef();
+
m_release = false;
if ( cg == NULL )
{
*height = m_height;
}
+#if wxOSX_USE_CARBON
wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const
{
// wxScreenDC is derived from wxWindowDC, so a screen dc will
if (!m_window)
return wxNullBitmap;
-#ifdef __LP64__
- return wxNullBitmap;
-#else
ControlRef handle = (ControlRef) m_window->GetHandle();
if ( !handle )
return wxNullBitmap;
CGContextRestoreGState(context);
return bmp;
-#endif
}
+#endif
/*
* wxClientDCImpl