X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..677dc0ed1a3ff68af15f6246d6d0708d5264b07a:/src/x11/dcscreen.cpp diff --git a/src/x11/dcscreen.cpp b/src/x11/dcscreen.cpp index cd776d963d..58ac7e3a18 100644 --- a/src/x11/dcscreen.cpp +++ b/src/x11/dcscreen.cpp @@ -1,19 +1,26 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp +// Name: src/x11/dcscreen.cpp // Purpose: wxScreenDC class // Author: Julian Smart, Robert Roebling // Modified by: // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart, Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "wx/window.h" -#include "wx/frame.h" +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/dcscreen.h" -#include "wx/utils.h" -#include "wx/app.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/window.h" + #include "wx/frame.h" +#endif + #include "wx/fontutil.h" #include "wx/x11/private.h" @@ -34,16 +41,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) wxScreenDC::wxScreenDC() { - m_ok = FALSE; - + m_ok = false; + m_display = (WXDisplay *) wxGlobalDisplay(); - + int screen = DefaultScreen( (Display*) m_display ); m_cmap = (WXColormap) DefaultColormap( (Display*) m_display, screen ); - + m_window = (WXWindow) RootWindow( (Display*) m_display, screen ); - m_isScreenDC = TRUE; + m_isScreenDC = true; #if wxUSE_UNICODE m_context = wxTheApp->GetPangoContext(); @@ -89,30 +96,15 @@ bool wxScreenDC::StartDrawingOnTop( wxWindow *window ) return StartDrawingOnTop( &rect ); } -bool wxScreenDC::StartDrawingOnTop( wxRect *rectIn ) +bool wxScreenDC::StartDrawingOnTop( wxRect *WXUNUSED(rectIn) ) { // VZ: should we do the same thing that wxMotif wxScreenDC does here? -#if 0 - wxRect rect; - if ( rectIn ) - { - rect = *rectIn; - } - else - { - rect.x = - rect.y = 0; - - DoGetSize(&rect.width, &rect.height); - } -#endif // 0 - - return TRUE; + return true; } bool wxScreenDC::EndDrawingOnTop() { - return TRUE; + return true; } void wxScreenDC::DoGetSize(int *width, int *height) const