X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/637b7e4f3a0fd1c6bdfc21d28e37bcf760e3b364..f5766910b6731eb03e82371416e9778203396ce7:/src/os2/bitmap.cpp?ds=sidebyside diff --git a/src/os2/bitmap.cpp b/src/os2/bitmap.cpp index 59451cffd2..c1bbb3e002 100644 --- a/src/os2/bitmap.cpp +++ b/src/os2/bitmap.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp +// Name: src/os2/bitmap.cpp // Purpose: wxBitmap // Author: David Webster // Modified by: @@ -12,6 +12,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/bitmap.h" + #ifndef WX_PRECOMP #include @@ -20,15 +22,13 @@ #include "wx/app.h" #include "wx/palette.h" #include "wx/dcmemory.h" - #include "wx/bitmap.h" #include "wx/icon.h" + #include "wx/log.h" + #include "wx/image.h" #endif #include "wx/os2/private.h" -#include "wx/log.h" -//#include "wx/msw/dib.h" -#include "wx/image.h" #include "wx/xpmdecod.h" // ---------------------------------------------------------------------------- @@ -90,9 +90,7 @@ void wxBitmap::Init() // } // end of wxBitmap::Init -bool wxBitmap::CopyFromIconOrCursor( - const wxGDIImage& rIcon -) +bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& rIcon) { HPOINTER hIcon = (HPOINTER)rIcon.GetHandle(); POINTERINFO SIconInfo; @@ -273,7 +271,7 @@ wxBitmap::wxBitmap( } // end of wxBitmap::wxBitmap wxBitmap::wxBitmap( - void* pData + const void* pData , long lType , int nWidth , int nHeight @@ -382,27 +380,6 @@ bool wxBitmap::Create( return Ok(); } // end of wxBitmap::Create -bool wxBitmap::CreateFromXpm( - const char** ppData -) -{ -#if wxUSE_IMAGE && wxUSE_XPM - Init(); - - wxCHECK_MSG(ppData != NULL, false, wxT("invalid bitmap data")); - - wxXPMDecoder vDecoder; - wxImage vImg = vDecoder.ReadData(ppData); - - wxCHECK_MSG(vImg.Ok(), false, wxT("invalid bitmap data")); - - *this = wxBitmap(vImg); - return true; -#else - return false; -#endif -} // end of wxBitmap::CreateFromXpm - bool wxBitmap::LoadFile(const wxString& filename, long type) { UnRef(); @@ -460,7 +437,7 @@ bool wxBitmap::LoadFile( } // end of wxBitmap::LoadFile bool wxBitmap::Create( - void* pData + const void* pData , long lType , int nWidth , int nHeight @@ -1452,7 +1429,7 @@ bool wxMask::Create( // ---------------------------------------------------------------------------- bool wxBitmapHandler::Create( wxGDIImage* pImage, - void* pData, + const void* pData, long WXUNUSED(lFlags), int nWidth, int nHeight, @@ -1508,7 +1485,7 @@ bool wxBitmapHandler::Save( bool wxBitmapHandler::Create( wxBitmap* WXUNUSED(pBitmap) -, void* WXUNUSED(pData) +, const void* WXUNUSED(pData) , long WXUNUSED(lType) , int WXUNUSED(nWidth) , int WXUNUSED(nHeight)