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