]>
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
7 // Copyright: (c) Julian Smart, Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // for compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
14 #include "wx/dcscreen.h"
15 #include "wx/x11/dcscreen.h"
20 #include "wx/window.h"
24 #include "wx/fontutil.h"
26 #include "wx/x11/private.h"
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl
,wxPaintDCImpl
)
34 wxScreenDCImpl::wxScreenDCImpl( wxDC
* owner
)
35 : wxPaintDCImpl( owner
)
39 m_display
= (WXDisplay
*) wxGlobalDisplay();
41 int screen
= DefaultScreen( (Display
*) m_display
);
42 m_cmap
= (WXColormap
) DefaultColormap( (Display
*) m_display
, screen
);
44 m_x11window
= (WXWindow
) RootWindow( (Display
*) m_display
, screen
);
49 m_context
= wxTheApp
->GetPangoContext();
50 m_fontdesc
= wxNORMAL_FONT
->GetNativeFontInfo()->description
;
55 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_penGC
, IncludeInferiors
);
56 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_brushGC
, IncludeInferiors
);
57 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_textGC
, IncludeInferiors
);
58 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_bgGC
, IncludeInferiors
);
61 wxScreenDCImpl::~wxScreenDCImpl()
63 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_penGC
, ClipByChildren
);
64 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_brushGC
, ClipByChildren
);
65 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_textGC
, ClipByChildren
);
66 XSetSubwindowMode( (Display
*) m_display
, (GC
) m_bgGC
, ClipByChildren
);
69 void wxScreenDCImpl::DoGetSize(int *width
, int *height
) const
71 wxDisplaySize(width
, height
);