]>
git.saurik.com Git - wxWidgets.git/blob - src/x11/dcscreen.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/x11/dcscreen.cpp
3 // Purpose: wxScreenDC class
4 // Author: Julian Smart, Robert Roebling
8 // Copyright: (c) Julian Smart, Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // for compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
15 #include "wx/dcscreen.h"
16 #include "wx/x11/dcscreen.h"
21 #include "wx/window.h"
25 #include "wx/fontutil.h"
27 #include "wx/x11/private.h"
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl
,wxPaintDCImpl
)
35 wxScreenDCImpl::wxScreenDCImpl( wxDC
* owner
)
36 : wxPaintDCImpl( owner
)
40 m_display
= (WXDisplay
*) wxGlobalDisplay();
42 int screen
= DefaultScreen( (Display
*) m_display
);
43 m_cmap
= (WXColormap
) DefaultColormap( (Display
*) m_display
, screen
);
45 m_x11window
= (WXWindow
) RootWindow( (Display
*) m_display
, screen
);
50 m_context
= wxTheApp
->GetPangoContext();
51 m_fontdesc
= wxNORMAL_FONT
->GetNativeFontInfo()->description
;
56 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_penGC
, IncludeInferiors
);
57 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_brushGC
, IncludeInferiors
);
58 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_textGC
, IncludeInferiors
);
59 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_bgGC
, IncludeInferiors
);
62 wxScreenDCImpl::~wxScreenDCImpl()
64 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_penGC
, ClipByChildren
);
65 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_brushGC
, ClipByChildren
);
66 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_textGC
, ClipByChildren
);
67 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_bgGC
, ClipByChildren
);
70 void wxScreenDCImpl::DoGetSize(int *width
, int *height
) const
72 wxDisplaySize(width
, height
);