Deprecate Set{Height,Width,Depth} for other platforms as well

Fixes GTK build with --disable-compat30
See https://github.com/wxWidgets/wxWidgets/pull/925
This commit is contained in:
Paul Cornett
2018-09-23 20:02:21 -07:00
parent 6bc086747e
commit 7872b9fd38
8 changed files with 28 additions and 15 deletions

View File

@@ -75,9 +75,11 @@ public:
bool HasAlpha() const; bool HasAlpha() const;
// implementation: // implementation:
virtual void SetHeight(int height); #if WXWIN_COMPATIBILITY_3_0
virtual void SetWidth(int width); wxDEPRECATED(virtual void SetHeight(int height));
virtual void SetDepth(int depth); wxDEPRECATED(virtual void SetWidth(int width));
wxDEPRECATED(virtual void SetDepth(int depth));
#endif
// get underlying native representation: // get underlying native representation:
wxIDirectFBSurfacePtr GetDirectFBSurface() const; wxIDirectFBSurfacePtr GetDirectFBSurface() const;

View File

@@ -126,9 +126,11 @@ public:
// implementation // implementation
// -------------- // --------------
void SetHeight( int height ) wxOVERRIDE; #if WXWIN_COMPATIBILITY_3_0
void SetWidth( int width ) wxOVERRIDE; wxDEPRECATED(void SetHeight( int height ) wxOVERRIDE);
void SetDepth( int depth ) wxOVERRIDE; wxDEPRECATED(void SetWidth( int width ) wxOVERRIDE);
wxDEPRECATED(void SetDepth( int depth ) wxOVERRIDE);
#endif
#ifdef __WXGTK3__ #ifdef __WXGTK3__
GdkPixbuf* GetPixbufNoMask() const; GdkPixbuf* GetPixbufNoMask() const;

View File

@@ -66,9 +66,11 @@ public:
virtual bool CopyFromIcon(const wxIcon& icon); virtual bool CopyFromIcon(const wxIcon& icon);
// implementation: // implementation:
virtual void SetHeight(int height); #if WXWIN_COMPATIBILITY_3_0
virtual void SetWidth(int width); wxDEPRECATED(virtual void SetHeight(int height));
virtual void SetDepth(int depth); wxDEPRECATED(virtual void SetWidth(int width));
wxDEPRECATED(virtual void SetDepth(int depth));
#endif
void *GetRawData(wxPixelDataBase& data, int bpp); void *GetRawData(wxPixelDataBase& data, int bpp);
void UngetRawData(wxPixelDataBase& data); void UngetRawData(wxPixelDataBase& data);

View File

@@ -124,9 +124,11 @@ public:
// implementation // implementation
// -------------- // --------------
void SetHeight( int height ); #if WXWIN_COMPATIBILITY_3_0
void SetWidth( int width ); wxDEPRECATED(void SetHeight( int height ));
void SetDepth( int depth ); wxDEPRECATED(void SetWidth( int width ));
wxDEPRECATED(void SetDepth( int depth ));
#endif
void SetPixmap( WXPixmap pixmap ); void SetPixmap( WXPixmap pixmap );
void SetBitmap( WXPixmap bitmap ); void SetBitmap( WXPixmap bitmap );

View File

@@ -703,6 +703,7 @@ void wxBitmap::SetPalette(const wxPalette& palette)
} }
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
#if WXWIN_COMPATIBILITY_3_0
void wxBitmap::SetHeight(int height) void wxBitmap::SetHeight(int height)
{ {
AllocExclusive(); AllocExclusive();
@@ -737,6 +738,7 @@ void wxBitmap::SetDepth(int depth)
M_BITMAP->m_surface = s; M_BITMAP->m_surface = s;
} }
#endif // WXWIN_COMPATIBILITY_3_0
wxIDirectFBSurfacePtr wxBitmap::GetDirectFBSurface() const wxIDirectFBSurfacePtr wxBitmap::GetDirectFBSurface() const
{ {

View File

@@ -1139,6 +1139,7 @@ void wxBitmap::SetPalette(const wxPalette& WXUNUSED(palette))
} }
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
#if WXWIN_COMPATIBILITY_3_0
void wxBitmap::SetHeight( int height ) void wxBitmap::SetHeight( int height )
{ {
AllocExclusive(); AllocExclusive();
@@ -1156,6 +1157,7 @@ void wxBitmap::SetDepth( int depth )
AllocExclusive(); AllocExclusive();
M_BMPDATA->m_bpp = depth; M_BMPDATA->m_bpp = depth;
} }
#endif
#ifndef __WXGTK3__ #ifndef __WXGTK3__
void wxBitmap::SetPixmap( GdkPixmap *pixmap ) void wxBitmap::SetPixmap( GdkPixmap *pixmap )

View File

@@ -386,8 +386,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
return IsOk(); return IsOk();
} }
#if WXWIN_COMPATIBILITY_3_0
// implementation:
void wxBitmap::SetHeight(int height) void wxBitmap::SetHeight(int height)
{ {
M_PIXDATA = QPixmap(GetWidth(), height); M_PIXDATA = QPixmap(GetWidth(), height);
@@ -405,7 +404,7 @@ void wxBitmap::SetDepth(int depth)
else else
M_PIXDATA = QPixmap(GetWidth(), GetHeight()); M_PIXDATA = QPixmap(GetWidth(), GetHeight());
} }
#endif
void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp) void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp)
{ {

View File

@@ -1109,6 +1109,7 @@ wxPalette *wxBitmap::GetPalette() const
return M_BMPDATA->m_palette; return M_BMPDATA->m_palette;
} }
#if WXWIN_COMPATIBILITY_3_0
void wxBitmap::SetHeight( int height ) void wxBitmap::SetHeight( int height )
{ {
AllocExclusive(); AllocExclusive();
@@ -1129,6 +1130,7 @@ void wxBitmap::SetDepth( int depth )
M_BMPDATA->m_bpp = depth; M_BMPDATA->m_bpp = depth;
} }
#endif
void wxBitmap::SetPixmap( WXPixmap pixmap ) void wxBitmap::SetPixmap( WXPixmap pixmap )
{ {