]> git.saurik.com Git - wxWidgets.git/blob - src/gtk1/dcscreen.cpp
Call wxApp::ProcessPendingEvents() from wxX11 event loop.
[wxWidgets.git] / src / gtk1 / dcscreen.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk1/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 #ifndef WX_PRECOMP
14 #include "wx/window.h"
15 #endif
16
17 #include <gdk/gdk.h>
18 #include <gdk/gdkx.h>
19 #include <gtk/gtk.h>
20
21 #include "wx/dcscreen.h"
22 #include "wx/gtk1/dcscreen.h"
23
24 //-----------------------------------------------------------------------------
25 // global data initialization
26 //-----------------------------------------------------------------------------
27
28 GdkWindow *wxScreenDCImpl::sm_overlayWindow = NULL;
29 int wxScreenDCImpl::sm_overlayWindowX = 0;
30 int wxScreenDCImpl::sm_overlayWindowY = 0;
31
32 //-----------------------------------------------------------------------------
33 // wxScreenDCImpl
34 //-----------------------------------------------------------------------------
35
36 IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxPaintDCImpl)
37
38 wxScreenDCImpl::wxScreenDCImpl(wxScreenDC *owner)
39 : wxPaintDCImpl(owner)
40 {
41 m_ok = false;
42 m_cmap = gdk_colormap_get_system();
43 m_window = GDK_ROOT_PARENT();
44
45 m_isScreenDC = true;
46
47 SetUpDC();
48
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 );
53 }
54
55 wxScreenDCImpl::~wxScreenDCImpl()
56 {
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 );
61 }
62
63 void wxScreenDCImpl::DoGetSize(int *width, int *height) const
64 {
65 wxDisplaySize(width, height);
66 }