]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: src/gtk1/dcscreen.cpp | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Copyright: (c) 1998 Robert Roebling | |
6 | // Licence: wxWindows licence | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | // For compilers that support precompilation, includes "wx.h". | |
10 | #include "wx/wxprec.h" | |
11 | ||
12 | #ifndef WX_PRECOMP | |
13 | #include "wx/window.h" | |
14 | #endif | |
15 | ||
16 | #include <gdk/gdk.h> | |
17 | #include <gdk/gdkx.h> | |
18 | #include <gtk/gtk.h> | |
19 | ||
20 | #include "wx/dcscreen.h" | |
21 | #include "wx/gtk1/dcscreen.h" | |
22 | ||
23 | //----------------------------------------------------------------------------- | |
24 | // global data initialization | |
25 | //----------------------------------------------------------------------------- | |
26 | ||
27 | GdkWindow *wxScreenDCImpl::sm_overlayWindow = NULL; | |
28 | int wxScreenDCImpl::sm_overlayWindowX = 0; | |
29 | int wxScreenDCImpl::sm_overlayWindowY = 0; | |
30 | ||
31 | //----------------------------------------------------------------------------- | |
32 | // wxScreenDCImpl | |
33 | //----------------------------------------------------------------------------- | |
34 | ||
35 | IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxPaintDCImpl) | |
36 | ||
37 | wxScreenDCImpl::wxScreenDCImpl(wxScreenDC *owner) | |
38 | : wxPaintDCImpl(owner) | |
39 | { | |
40 | m_ok = false; | |
41 | m_cmap = gdk_colormap_get_system(); | |
42 | m_window = GDK_ROOT_PARENT(); | |
43 | ||
44 | m_isScreenDC = true; | |
45 | ||
46 | SetUpDC(); | |
47 | ||
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 ); | |
52 | } | |
53 | ||
54 | wxScreenDCImpl::~wxScreenDCImpl() | |
55 | { | |
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 ); | |
60 | } | |
61 | ||
62 | void wxScreenDCImpl::DoGetSize(int *width, int *height) const | |
63 | { | |
64 | wxDisplaySize(width, height); | |
65 | } |