]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/dcscreen.cpp
don't compare invalid iterators/node pointers
[wxWidgets.git] / src / gtk1 / dcscreen.cpp
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcscreen.cpp
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
c801d85f
KB
13#include "wx/dcscreen.h"
14#include "wx/window.h"
dbf858b5 15
071a2d78 16#include <gdk/gdk.h>
5d25c050 17#include <gdk/gdkx.h>
071a2d78 18#include <gtk/gtk.h>
83624f79 19
dbf858b5
RR
20//-----------------------------------------------------------------------------
21// global data initialization
22//-----------------------------------------------------------------------------
23
24GdkWindow *wxScreenDC::sm_overlayWindow = (GdkWindow*) NULL;
72cdf4c9
VZ
25int wxScreenDC::sm_overlayWindowX = 0;
26int wxScreenDC::sm_overlayWindowY = 0;
dbf858b5 27
c801d85f
KB
28//-----------------------------------------------------------------------------
29// wxScreenDC
30//-----------------------------------------------------------------------------
31
32IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC)
33
72cdf4c9 34wxScreenDC::wxScreenDC()
c801d85f 35{
4bc67cc5 36 m_ok = FALSE;
4bc67cc5 37 m_cmap = gdk_colormap_get_system();
5d25c050 38 m_window = GDK_ROOT_PARENT();
72cdf4c9 39
e1208c31
RR
40 m_isScreenDC = TRUE;
41
4bc67cc5 42 SetUpDC();
72cdf4c9 43
4bc67cc5
RR
44 gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
45 gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS );
46 gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS );
47 gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS );
ff7b1510 48}
c801d85f 49
72cdf4c9 50wxScreenDC::~wxScreenDC()
c801d85f 51{
5d25c050
RR
52 gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
53 gdk_gc_set_subwindow( m_brushGC, GDK_CLIP_BY_CHILDREN );
54 gdk_gc_set_subwindow( m_textGC, GDK_CLIP_BY_CHILDREN );
55 gdk_gc_set_subwindow( m_bgGC, GDK_CLIP_BY_CHILDREN );
56
4bc67cc5 57 EndDrawingOnTop();
ff7b1510 58}
c801d85f 59
b3d6b0c9 60bool wxScreenDC::StartDrawingOnTop( wxWindow * )
c801d85f 61{
b3d6b0c9 62 return true;
ff7b1510 63}
c801d85f 64
b3d6b0c9 65bool wxScreenDC::StartDrawingOnTop( wxRect * )
c801d85f 66{
b3d6b0c9 67 return true;
ff7b1510 68}
c801d85f 69
72cdf4c9 70bool wxScreenDC::EndDrawingOnTop()
c801d85f 71{
b3d6b0c9 72 return true;
ff7b1510
RR
73}
74
376aa62a
VZ
75void wxScreenDC::DoGetSize(int *width, int *height) const
76{
77 wxDisplaySize(width, height);
78}