From 331a0b6b7aeb8b41d4ac27aeedbdca11b6f0b38e Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 13 Aug 2002 20:58:23 +0000 Subject: [PATCH] New code for Update() under GTK 2.0. Added native GdkRegion() constructor to wxRegion. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/region.h | 6 +++++- include/wx/gtk/window.h | 3 +++ include/wx/gtk1/region.h | 6 +++++- include/wx/gtk1/window.h | 3 +++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/wx/gtk/region.h b/include/wx/gtk/region.h index 5adf4edeb9..1b7f06cf85 100644 --- a/include/wx/gtk/region.h +++ b/include/wx/gtk/region.h @@ -53,7 +53,7 @@ class wxRegion : public wxGDIObject { public: wxRegion() { } - + wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) { InitRect(x, y, w, h); @@ -115,6 +115,10 @@ public: wxRegionContain Contains(const wxRect& rect) const; public: + // Init with GdkRegion, set ref count to 2 so that + // the C++ class will not destroy the region! + wxRegion( GdkRegion *region ); + GdkRegion *GetRegion() const; protected: diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index bb882e7e7b..730e840c43 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -201,8 +201,11 @@ public: GdkICAttr *m_icattr; #endif +#ifndef __WXGTK20__ // The area to be cleared (and not just refreshed) + // We cannot make this distinction under GTK 2.0. wxRegion m_clearRegion; +#endif // scrolling stuff GtkAdjustment *m_hAdjust,*m_vAdjust; diff --git a/include/wx/gtk1/region.h b/include/wx/gtk1/region.h index 5adf4edeb9..1b7f06cf85 100644 --- a/include/wx/gtk1/region.h +++ b/include/wx/gtk1/region.h @@ -53,7 +53,7 @@ class wxRegion : public wxGDIObject { public: wxRegion() { } - + wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) { InitRect(x, y, w, h); @@ -115,6 +115,10 @@ public: wxRegionContain Contains(const wxRect& rect) const; public: + // Init with GdkRegion, set ref count to 2 so that + // the C++ class will not destroy the region! + wxRegion( GdkRegion *region ); + GdkRegion *GetRegion() const; protected: diff --git a/include/wx/gtk1/window.h b/include/wx/gtk1/window.h index bb882e7e7b..730e840c43 100644 --- a/include/wx/gtk1/window.h +++ b/include/wx/gtk1/window.h @@ -201,8 +201,11 @@ public: GdkICAttr *m_icattr; #endif +#ifndef __WXGTK20__ // The area to be cleared (and not just refreshed) + // We cannot make this distinction under GTK 2.0. wxRegion m_clearRegion; +#endif // scrolling stuff GtkAdjustment *m_hAdjust,*m_vAdjust; -- 2.47.2