X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76b49cf49ba9ee9f3eeec9730cb4bc4569ab17f1..0dd9b9e2be1809f484b6447ad9525fa5b404ad95:/src/x11/dcscreen.cpp diff --git a/src/x11/dcscreen.cpp b/src/x11/dcscreen.cpp index 8bcb5f410b..1683688160 100644 --- a/src/x11/dcscreen.cpp +++ b/src/x11/dcscreen.cpp @@ -13,6 +13,7 @@ #include "wx/wxprec.h" #include "wx/dcscreen.h" +#include "wx/x11/dcscreen.h" #ifndef WX_PRECOMP #include "wx/app.h" @@ -25,21 +26,14 @@ #include "wx/x11/private.h" -//----------------------------------------------------------------------------- -// global data initialization -//----------------------------------------------------------------------------- - -WXWindow *wxScreenDC::sm_overlayWindow = (WXWindow*) NULL; -int wxScreenDC::sm_overlayWindowX = 0; -int wxScreenDC::sm_overlayWindowY = 0; - //----------------------------------------------------------------------------- // wxScreenDC //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) +IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl,wxPaintDCImpl) -wxScreenDC::wxScreenDC() +wxScreenDCImpl::wxScreenDCImpl( wxDC* owner ) : + wxPaintDCImpl( owner ) { m_ok = false; @@ -48,7 +42,7 @@ wxScreenDC::wxScreenDC() int screen = DefaultScreen( (Display*) m_display ); m_cmap = (WXColormap) DefaultColormap( (Display*) m_display, screen ); - m_window = (WXWindow) RootWindow( (Display*) m_display, screen ); + m_x11window = (WXWindow) RootWindow( (Display*) m_display, screen ); m_isScreenDC = true; @@ -65,64 +59,11 @@ wxScreenDC::wxScreenDC() XSetSubwindowMode( (Display*) m_display, (GC) m_bgGC, IncludeInferiors ); } -wxScreenDC::~wxScreenDC() +wxScreenDCImpl::~wxScreenDCImpl() { XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, ClipByChildren ); XSetSubwindowMode( (Display*) m_display, (GC) m_brushGC, ClipByChildren ); XSetSubwindowMode( (Display*) m_display, (GC) m_textGC, ClipByChildren ); XSetSubwindowMode( (Display*) m_display, (GC) m_bgGC, ClipByChildren ); - - EndDrawingOnTop(); -} - -bool wxScreenDC::StartDrawingOnTop( wxWindow *window ) -{ - if (!window) return StartDrawingOnTop(); - - int x = 0; - int y = 0; - window->GetPosition( &x, &y ); - int w = 0; - int h = 0; - window->GetSize( &w, &h ); - window->ClientToScreen( &x, &y ); - - wxRect rect; - rect.x = x; - rect.y = y; - rect.width = 0; - rect.height = 0; - - return StartDrawingOnTop( &rect ); } -bool wxScreenDC::StartDrawingOnTop( wxRect *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; -} - -bool wxScreenDC::EndDrawingOnTop() -{ - return true; -} - -void wxScreenDC::DoGetSize(int *width, int *height) const -{ - wxDisplaySize(width, height); -}