X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f884a0dccd6b642f35c441ac9bfc87a6d5b4d35..033f86db5f422700eda6284ab338e84168bbba44:/include/wx/gtk/region.h?ds=sidebyside diff --git a/include/wx/gtk/region.h b/include/wx/gtk/region.h index 846f1946cf..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,8 @@ public: InitRect(rect.x, rect.y, rect.width, rect.height); } - wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE ); + wxRegion( size_t n, const wxPoint *points, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); #if wxUSE_IMAGE wxRegion( const wxBitmap& bmp) @@ -55,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; @@ -121,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) };