]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/dcscreen.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk/dcscreen.cpp
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 // For compilers that support precompilation, includes "wx.h".
10 #include "wx/wxprec.h"
12 #include "wx/gtk/dcscreen.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl
, wxWindowDCImpl
)
22 wxScreenDCImpl::wxScreenDCImpl( wxScreenDC
*owner
)
23 : wxWindowDCImpl( owner
)
28 void wxScreenDCImpl::Init()
31 m_cmap
= gdk_colormap_get_system();
32 m_gdkwindow
= gdk_get_default_root_window();
34 m_context
= gdk_pango_context_get();
35 // Note: The Sun customised version of Pango shipping with Solaris 10
36 // crashes if the language is left NULL (see bug 1374114)
37 pango_context_set_language( m_context
, gtk_get_default_language() );
38 m_layout
= pango_layout_new( m_context
);
39 // m_fontdesc = pango_font_description_copy( widget->style->font_desc );
45 gdk_gc_set_subwindow( m_penGC
, GDK_INCLUDE_INFERIORS
);
46 gdk_gc_set_subwindow( m_brushGC
, GDK_INCLUDE_INFERIORS
);
47 gdk_gc_set_subwindow( m_textGC
, GDK_INCLUDE_INFERIORS
);
48 gdk_gc_set_subwindow( m_bgGC
, GDK_INCLUDE_INFERIORS
);
51 wxScreenDCImpl::~wxScreenDCImpl()
53 g_object_unref(m_context
);
55 gdk_gc_set_subwindow( m_penGC
, GDK_CLIP_BY_CHILDREN
);
56 gdk_gc_set_subwindow( m_brushGC
, GDK_CLIP_BY_CHILDREN
);
57 gdk_gc_set_subwindow( m_textGC
, GDK_CLIP_BY_CHILDREN
);
58 gdk_gc_set_subwindow( m_bgGC
, GDK_CLIP_BY_CHILDREN
);
61 void wxScreenDCImpl::DoGetSize(int *width
, int *height
) const
63 wxDisplaySize(width
, height
);