]>
Commit | Line | Data |
---|---|---|
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 | #include "wx/dcscreen.h" | |
14 | ||
15 | #ifndef WX_PRECOMP | |
16 | #include "wx/window.h" | |
17 | #endif | |
18 | ||
19 | #include <gdk/gdk.h> | |
20 | #include <gdk/gdkx.h> | |
21 | #include <gtk/gtk.h> | |
22 | ||
23 | //----------------------------------------------------------------------------- | |
24 | // global data initialization | |
25 | //----------------------------------------------------------------------------- | |
26 | ||
27 | GdkWindow *wxScreenDC::sm_overlayWindow = (GdkWindow*) NULL; | |
28 | int wxScreenDC::sm_overlayWindowX = 0; | |
29 | int wxScreenDC::sm_overlayWindowY = 0; | |
30 | ||
31 | //----------------------------------------------------------------------------- | |
32 | // wxScreenDC | |
33 | //----------------------------------------------------------------------------- | |
34 | ||
35 | IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) | |
36 | ||
37 | wxScreenDC::wxScreenDC() | |
38 | { | |
39 | m_ok = false; | |
40 | m_cmap = gdk_colormap_get_system(); | |
41 | m_window = GDK_ROOT_PARENT(); | |
42 | ||
43 | m_isScreenDC = true; | |
44 | ||
45 | SetUpDC(); | |
46 | ||
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 ); | |
51 | } | |
52 | ||
53 | wxScreenDC::~wxScreenDC() | |
54 | { | |
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 | ||
60 | EndDrawingOnTop(); | |
61 | } | |
62 | ||
63 | bool wxScreenDC::StartDrawingOnTop( wxWindow * ) | |
64 | { | |
65 | return true; | |
66 | } | |
67 | ||
68 | bool wxScreenDC::StartDrawingOnTop( wxRect * ) | |
69 | { | |
70 | return true; | |
71 | } | |
72 | ||
73 | bool wxScreenDC::EndDrawingOnTop() | |
74 | { | |
75 | return true; | |
76 | } | |
77 | ||
78 | void wxScreenDC::DoGetSize(int *width, int *height) const | |
79 | { | |
80 | wxDisplaySize(width, height); | |
81 | } |