]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/dcscreen.cpp
fix the definition of many static functions marked as 'const' or functions which...
[wxWidgets.git] / src / gtk1 / dcscreen.cpp
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
cdccdfab 2// Name: src/gtk1/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
cdccdfab
WS
13#ifndef WX_PRECOMP
14 #include "wx/window.h"
15#endif
dbf858b5 16
071a2d78 17#include <gdk/gdk.h>
5d25c050 18#include <gdk/gdkx.h>
071a2d78 19#include <gtk/gtk.h>
83624f79 20
76c32e7b 21#include "wx/dcscreen.h"
10d30222
VZ
22#include "wx/gtk1/dcscreen.h"
23
dbf858b5
RR
24//-----------------------------------------------------------------------------
25// global data initialization
26//-----------------------------------------------------------------------------
27
10d30222
VZ
28GdkWindow *wxScreenDCImpl::sm_overlayWindow = (GdkWindow*) NULL;
29int wxScreenDCImpl::sm_overlayWindowX = 0;
30int wxScreenDCImpl::sm_overlayWindowY = 0;
dbf858b5 31
c801d85f 32//-----------------------------------------------------------------------------
10d30222 33// wxScreenDCImpl
c801d85f
KB
34//-----------------------------------------------------------------------------
35
10d30222 36IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxPaintDCImpl)
c801d85f 37
10d30222
VZ
38wxScreenDCImpl::wxScreenDCImpl(wxScreenDC *owner)
39 : wxPaintDCImpl(owner)
c801d85f 40{
cdccdfab 41 m_ok = false;
4bc67cc5 42 m_cmap = gdk_colormap_get_system();
5d25c050 43 m_window = GDK_ROOT_PARENT();
72cdf4c9 44
cdccdfab 45 m_isScreenDC = true;
e1208c31 46
4bc67cc5 47 SetUpDC();
72cdf4c9 48
4bc67cc5
RR
49 gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
50 gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS );
51 gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS );
52 gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS );
ff7b1510 53}
c801d85f 54
10d30222 55wxScreenDCImpl::~wxScreenDCImpl()
c801d85f 56{
5d25c050
RR
57 gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
58 gdk_gc_set_subwindow( m_brushGC, GDK_CLIP_BY_CHILDREN );
59 gdk_gc_set_subwindow( m_textGC, GDK_CLIP_BY_CHILDREN );
60 gdk_gc_set_subwindow( m_bgGC, GDK_CLIP_BY_CHILDREN );
ff7b1510
RR
61}
62
10d30222 63void wxScreenDCImpl::DoGetSize(int *width, int *height) const
376aa62a
VZ
64{
65 wxDisplaySize(width, height);
66}