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