]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dcscreen.cpp
suppress harmless gcc warning about not handling all enum values in a switch
[wxWidgets.git] / src / os2 / dcscreen.cpp
index e03bbac0c80d8fbfbb86a792919de9e65948729c..3681c889e4c70c94e518b93328021c9cf0922248 100644 (file)
@@ -1,32 +1,44 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        dcscreen.cpp
+// Name:        src/os2/dcscreen.cpp
 // Purpose:     wxScreenDC class
-// Author:      AUTHOR
+// Author:      David Webster
 // Modified by:
-// Created:     ??/??/98
+// Created:     10/14/99
 // RCS-ID:      $Id$
-// Copyright:   (c) AUTHOR
-// Licence:    wxWindows licence
+// Copyright:   (c) David Webster
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "dcscreen.h"
-#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
 
-#include "wx/dcscreen.h"
+#include "wx/os2/dcscreen.h"
 
-#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
+#ifndef WX_PRECOMP
+    #include "wx/string.h"
+    #include "wx/window.h"
 #endif
 
+#include "wx/os2/private.h"
+
+IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxPMDCImpl)
+
 // Create a DC representing the whole screen
-wxScreenDC::wxScreenDC()
+wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner ) :
+    wxPMDCImpl( owner )
 {
-    // TODO
-}
+    m_hDC = ::WinOpenWindowDC(HWND_DESKTOP);
+    m_hPS = ::WinGetScreenPS(HWND_DESKTOP);
+    ::GpiSetBackMix(m_hPS, BM_LEAVEALONE);
+} // end of wxScreenDC::wxScreenDC()
 
-wxScreenDC::~wxScreenDC()
+void wxScreenDCImpl::DoGetSize( int* pnWidth,
+                                int* pnHeight ) const
 {
-    // TODO
-}
+    //
+    // Skip wxWindowDC version because it doesn't work without a valid m_canvas
+    // (which we don't have)
+    //
+    wxPMDCImpl::DoGetSize( pnWidth, pnHeight );
 
+} // end of wxScreenDC::DoGetSize