+ return FALSE;
+ }
+
+ AllocExclusive();
+
+#ifdef __WXGTK20__
+ gdk_region_xor( M_REGIONDATA->m_region, region.GetRegion() );
+#else
+ GdkRegion *reg = gdk_regions_xor( M_REGIONDATA->m_region, region.GetRegion() );
+ gdk_region_destroy( M_REGIONDATA->m_region );
+ M_REGIONDATA->m_region = reg;
+#endif
+
+ return TRUE;
+}
+
+bool wxRegion::Offset( wxCoord x, wxCoord y )
+{
+ if (!m_refData)
+ return FALSE;
+
+ AllocExclusive();
+
+ gdk_region_offset( M_REGIONDATA->m_region, x, y );
+
+ return TRUE;
+}
+
+// ----------------------------------------------------------------------------
+// wxRegion tests
+// ----------------------------------------------------------------------------
+
+void wxRegion::GetBox( wxCoord &x, wxCoord &y, wxCoord &w, wxCoord &h ) const
+{
+ if ( m_refData )
+ {
+ GdkRectangle rect;
+ gdk_region_get_clipbox( M_REGIONDATA->m_region, &rect );
+ x = rect.x;
+ y = rect.y;
+ w = rect.width;
+ h = rect.height;