]> git.saurik.com Git - wxWidgets.git/blame - src/gtk/dcscreen.cpp
Remove wxT from prototype
[wxWidgets.git] / src / gtk / dcscreen.cpp
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
cdccdfab 2// Name: src/gtk/dcscreen.cpp
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
14f355c2
VS
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
888dde65 13#include "wx/gtk/dcscreen.h"
cdccdfab 14
071a2d78 15#include <gtk/gtk.h>
83624f79 16
c801d85f 17//-----------------------------------------------------------------------------
888dde65 18// wxScreenDCImpl
c801d85f
KB
19//-----------------------------------------------------------------------------
20
888dde65 21IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl)
ab171e95 22
03647350 23wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner )
888dde65 24 : wxWindowDCImpl( owner )
03647350
VZ
25{
26 Init();
ab171e95 27}
c801d85f 28
888dde65 29void wxScreenDCImpl::Init()
c801d85f 30{
cdccdfab 31 m_ok = false;
4bc67cc5 32 m_cmap = gdk_colormap_get_system();
888dde65 33 m_gdkwindow = gdk_get_default_root_window();
72cdf4c9 34
3e3b7e75 35 m_context = gdk_pango_context_get();
e90d93d1
MW
36 // Note: The Sun customised version of Pango shipping with Solaris 10
37 // crashes if the language is left NULL (see bug 1374114)
203b65dd 38 pango_context_set_language( m_context, gtk_get_default_language() );
3e3b7e75
RD
39 m_layout = pango_layout_new( m_context );
40// m_fontdesc = pango_font_description_copy( widget->style->font_desc );
3e3b7e75 41
cdccdfab 42 m_isScreenDC = true;
e1208c31 43
4bc67cc5 44 SetUpDC();
72cdf4c9 45
4bc67cc5
RR
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 );
ff7b1510 50}
c801d85f 51
888dde65 52wxScreenDCImpl::~wxScreenDCImpl()
c801d85f 53{
769c3372
PC
54 g_object_unref(m_context);
55
5d25c050
RR
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 );
ff7b1510
RR
60}
61
888dde65 62void wxScreenDCImpl::DoGetSize(int *width, int *height) const
376aa62a
VZ
63{
64 wxDisplaySize(width, height);
65}