]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/dcscreen.cpp
0cf5e2a09781526819003e37090b658c3bab8ffa
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/gtk/dcscreen.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl
, wxWindowDCImpl
)
23 wxScreenDCImpl::wxScreenDCImpl( wxScreenDC
*owner
)
24 : wxWindowDCImpl( owner
)
29 void wxScreenDCImpl::Init()
32 m_cmap
= gdk_colormap_get_system();
33 m_gdkwindow
= gdk_get_default_root_window();
35 m_context
= gdk_pango_context_get();
36 // Note: The Sun customised version of Pango shipping with Solaris 10
37 // crashes if the language is left NULL (see bug 1374114)
38 pango_context_set_language( m_context
, gtk_get_default_language() );
39 m_layout
= pango_layout_new( m_context
);
40 // m_fontdesc = pango_font_description_copy( widget->style->font_desc );
46 gdk_gc_set_subwindow( m_penGC
, GDK_INCLUDE_INFERIORS
);
47 gdk_gc_set_subwindow( m_brushGC
, GDK_INCLUDE_INFERIORS
);
48 gdk_gc_set_subwindow( m_textGC
, GDK_INCLUDE_INFERIORS
);
49 gdk_gc_set_subwindow( m_bgGC
, GDK_INCLUDE_INFERIORS
);
52 wxScreenDCImpl::~wxScreenDCImpl()
54 g_object_unref(m_context
);
56 gdk_gc_set_subwindow( m_penGC
, GDK_CLIP_BY_CHILDREN
);
57 gdk_gc_set_subwindow( m_brushGC
, GDK_CLIP_BY_CHILDREN
);
58 gdk_gc_set_subwindow( m_textGC
, GDK_CLIP_BY_CHILDREN
);
59 gdk_gc_set_subwindow( m_bgGC
, GDK_CLIP_BY_CHILDREN
);
62 void wxScreenDCImpl::DoGetSize(int *width
, int *height
) const
64 wxDisplaySize(width
, height
);