]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/dcscreen.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk/dcscreen.cpp
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
13 #include "wx/dcscreen.h"
16 #include "wx/window.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
29 IMPLEMENT_ABSTRACT_CLASS(wxGTKScreenImplDC
, wxGTKWindowImplDC
)
31 IMPLEMENT_ABSTRACT_CLASS(wxScreenDC
,wxWindowDC
)
35 wxGTKScreenImplDC::wxGTKScreenImplDC( wxScreenDC
*owner
)
36 : wxGTKWindowImplDC( owner
)
42 wxScreenDC::wxScreenDC()
48 void wxGTKScreenImplDC::Init()
51 m_cmap
= gdk_colormap_get_system();
52 m_window
= gdk_get_default_root_window();
54 m_context
= gdk_pango_context_get();
55 // Note: The Sun customised version of Pango shipping with Solaris 10
56 // crashes if the language is left NULL (see bug 1374114)
57 pango_context_set_language( m_context
, gtk_get_default_language() );
58 m_layout
= pango_layout_new( m_context
);
59 // m_fontdesc = pango_font_description_copy( widget->style->font_desc );
65 gdk_gc_set_subwindow( m_penGC
, GDK_INCLUDE_INFERIORS
);
66 gdk_gc_set_subwindow( m_brushGC
, GDK_INCLUDE_INFERIORS
);
67 gdk_gc_set_subwindow( m_textGC
, GDK_INCLUDE_INFERIORS
);
68 gdk_gc_set_subwindow( m_bgGC
, GDK_INCLUDE_INFERIORS
);
71 wxGTKScreenImplDC::~wxGTKScreenImplDC()
73 gdk_gc_set_subwindow( m_penGC
, GDK_CLIP_BY_CHILDREN
);
74 gdk_gc_set_subwindow( m_brushGC
, GDK_CLIP_BY_CHILDREN
);
75 gdk_gc_set_subwindow( m_textGC
, GDK_CLIP_BY_CHILDREN
);
76 gdk_gc_set_subwindow( m_bgGC
, GDK_CLIP_BY_CHILDREN
);
79 void wxGTKScreenImplDC::DoGetSize(int *width
, int *height
) const
81 wxDisplaySize(width
, height
);