X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89efaf2b6595e59af618556d7e79492cab50c73c..3d777efedc1e05bd6c2a7c34a00a65895b62bb13:/include/wx/gtk/region.h?ds=sidebyside diff --git a/include/wx/gtk/region.h b/include/wx/gtk/region.h index e465f0011f..a2231a1950 100644 --- a/include/wx/gtk/region.h +++ b/include/wx/gtk/region.h @@ -2,7 +2,6 @@ // Name: wx/gtk/region.h // Purpose: // Author: Robert Roebling -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,6 +9,10 @@ #ifndef _WX_GTK_REGION_H_ #define _WX_GTK_REGION_H_ +#ifdef __WXGTK3__ +typedef struct _cairo_region cairo_region_t; +#endif + // ---------------------------------------------------------------------------- // wxRegion // ---------------------------------------------------------------------------- @@ -35,7 +38,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 +59,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 +125,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) };