]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/gtk1/dcscreen.cpp
don't compare invalid iterators/node pointers
[wxWidgets.git] / src / gtk1 / dcscreen.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcscreen.cpp
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
13#include "wx/dcscreen.h"
14#include "wx/window.h"
15
16#include <gdk/gdk.h>
17#include <gdk/gdkx.h>
18#include <gtk/gtk.h>
19
20//-----------------------------------------------------------------------------
21// global data initialization
22//-----------------------------------------------------------------------------
23
24GdkWindow *wxScreenDC::sm_overlayWindow = (GdkWindow*) NULL;
25int wxScreenDC::sm_overlayWindowX = 0;
26int wxScreenDC::sm_overlayWindowY = 0;
27
28//-----------------------------------------------------------------------------
29// wxScreenDC
30//-----------------------------------------------------------------------------
31
32IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC)
33
34wxScreenDC::wxScreenDC()
35{
36 m_ok = FALSE;
37 m_cmap = gdk_colormap_get_system();
38 m_window = GDK_ROOT_PARENT();
39
40 m_isScreenDC = TRUE;
41
42 SetUpDC();
43
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 );
48}
49
50wxScreenDC::~wxScreenDC()
51{
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
57 EndDrawingOnTop();
58}
59
60bool wxScreenDC::StartDrawingOnTop( wxWindow * )
61{
62 return true;
63}
64
65bool wxScreenDC::StartDrawingOnTop( wxRect * )
66{
67 return true;
68}
69
70bool wxScreenDC::EndDrawingOnTop()
71{
72 return true;
73}
74
75void wxScreenDC::DoGetSize(int *width, int *height) const
76{
77 wxDisplaySize(width, height);
78}