X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89efaf2b6595e59af618556d7e79492cab50c73c..7344108e8a129a3f9b4df5ab0f98a1713db03b89:/include/wx/gtk/region.h diff --git a/include/wx/gtk/region.h b/include/wx/gtk/region.h index e465f0011f..2069305b71 100644 --- a/include/wx/gtk/region.h +++ b/include/wx/gtk/region.h @@ -10,6 +10,10 @@ #ifndef _WX_GTK_REGION_H_ #define _WX_GTK_REGION_H_ +#ifdef __WXGTK3__ +typedef struct _cairo_region cairo_region_t; +#endif + // ---------------------------------------------------------------------------- // wxRegion // ---------------------------------------------------------------------------- @@ -35,7 +39,7 @@ public: InitRect(rect.x, rect.y, rect.width, rect.height); } - wxRegion( size_t n, const wxPoint *points, + wxRegion( size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); #if wxUSE_IMAGE @@ -56,12 +60,12 @@ public: virtual void Clear(); virtual bool IsEmpty() const; -public: - // Init with GdkRegion, set ref count to 2 so that - // the C++ class will not destroy the region! - wxRegion( GdkRegion *region ); - +#ifdef __WXGTK3__ + cairo_region_t* GetRegion() const; +#else + wxRegion(const GdkRegion* region); GdkRegion *GetRegion() const; +#endif protected: virtual wxGDIRefData *CreateGDIRefData() const; @@ -122,13 +126,11 @@ private: void Init(); void CreateRects( const wxRegion& r ); - size_t m_current; wxRegion m_region; - wxRect *m_rects; - size_t m_numRects; + int m_numRects; + int m_current; -private: DECLARE_DYNAMIC_CLASS(wxRegionIterator) };