]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/dcscreen.cpp
added vendor display name (for consistency with app display name &c) (patch 1831303)
[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
c801d85f 13#include "wx/dcscreen.h"
cdccdfab
WS
14
15#ifndef WX_PRECOMP
16 #include "wx/window.h"
17#endif
dbf858b5 18
071a2d78 19#include <gdk/gdk.h>
5d25c050 20#include <gdk/gdkx.h>
071a2d78 21#include <gtk/gtk.h>
83624f79 22
dbf858b5
RR
23//-----------------------------------------------------------------------------
24// global data initialization
25//-----------------------------------------------------------------------------
26
27GdkWindow *wxScreenDC::sm_overlayWindow = (GdkWindow*) NULL;
72cdf4c9
VZ
28int wxScreenDC::sm_overlayWindowX = 0;
29int wxScreenDC::sm_overlayWindowY = 0;
dbf858b5 30
c801d85f
KB
31//-----------------------------------------------------------------------------
32// wxScreenDC
33//-----------------------------------------------------------------------------
34
35IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC)
36
72cdf4c9 37wxScreenDC::wxScreenDC()
c801d85f 38{
cdccdfab 39 m_ok = false;
4bc67cc5 40 m_cmap = gdk_colormap_get_system();
5d25c050 41 m_window = GDK_ROOT_PARENT();
72cdf4c9 42
cdccdfab 43 m_isScreenDC = true;
e1208c31 44
4bc67cc5 45 SetUpDC();
72cdf4c9 46
4bc67cc5
RR
47 gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
48 gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS );
49 gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS );
50 gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS );
ff7b1510 51}
c801d85f 52
72cdf4c9 53wxScreenDC::~wxScreenDC()
c801d85f 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 );
59
4bc67cc5 60 EndDrawingOnTop();
ff7b1510 61}
c801d85f 62
b3d6b0c9 63bool wxScreenDC::StartDrawingOnTop( wxWindow * )
c801d85f 64{
b3d6b0c9 65 return true;
ff7b1510 66}
c801d85f 67
b3d6b0c9 68bool wxScreenDC::StartDrawingOnTop( wxRect * )
c801d85f 69{
b3d6b0c9 70 return true;
ff7b1510 71}
c801d85f 72
72cdf4c9 73bool wxScreenDC::EndDrawingOnTop()
c801d85f 74{
b3d6b0c9 75 return true;
ff7b1510
RR
76}
77
376aa62a
VZ
78void wxScreenDC::DoGetSize(int *width, int *height) const
79{
80 wxDisplaySize(width, height);
81}