]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dcscreen.cpp
rename g_openDialogs to wxOpenModalDialogsCount and define it in toplevel.cpp to...
[wxWidgets.git] / src / mac / carbon / dcscreen.cpp
index 2468ce77dbb7b7d9dc2699f13eb8e945bba95266..95bfe9dc359c628349b402a4c63a4fc2eb1f006b 100644 (file)
 #include "wx/dcscreen.h"
 
 #include "wx/mac/uma.h"
+#include "wx/graphics.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
 
+// TODO : for the Screenshot use case, which doesn't work in Quartz
+// we should do a GetAsBitmap using something like
+// http://www.cocoabuilder.com/archive/message/cocoa/2005/8/13/144256
+
 // Create a DC representing the whole screen
 wxScreenDC::wxScreenDC()
 {
@@ -42,8 +47,8 @@ wxScreenDC::wxScreenDC()
     Point pt = { 0,0 } ;
     LocalToGlobal( &pt ) ;
     SetPort( port ) ;
-    m_macLocalOrigin.x = -pt.h ;
-    m_macLocalOrigin.y = -pt.v ;
+    m_deviceLocalOriginX = -pt.h ;
+    m_deviceLocalOriginY = -pt.v ;
 
     BitMap screenBits;
     GetQDGlobalsScreenBits( &screenBits );
@@ -57,7 +62,7 @@ wxScreenDC::wxScreenDC()
     m_maxY = screenBits.bounds.bottom ;
 
     MacSetRectRgn( (RgnHandle) m_macBoundaryClipRgn , m_minX , m_minY , m_maxX , m_maxY ) ;
-    OffsetRgn( (RgnHandle) m_macBoundaryClipRgn , m_macLocalOrigin.x , m_macLocalOrigin.y ) ;
+    OffsetRgn( (RgnHandle) m_macBoundaryClipRgn , m_deviceLocalOriginX , m_deviceLocalOriginY ) ;
     CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
 #endif
     m_ok = true ;