X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ffecfa5aeb540b54914739dbb8603edbbd4c00a0..74a8f67d96591cec101def2a7d47c64072aff7fd:/src/palmos/bitmap.cpp diff --git a/src/palmos/bitmap.cpp b/src/palmos/bitmap.cpp index 06dff74aa2..9d25528834 100644 --- a/src/palmos/bitmap.cpp +++ b/src/palmos/bitmap.cpp @@ -1,10 +1,10 @@ //////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp +// Name: src/palmos/bitmap.cpp // Purpose: wxBitmap -// Author: William Osborne +// Author: William Osborne - minimal working wxPalmOS port // Modified by: // Created: 10/08/04 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) William Osborne // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "bitmap.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -28,6 +24,8 @@ #pragma hdrstop #endif +#include "wx/bitmap.h" + #ifndef WX_PRECOMP #include @@ -36,23 +34,17 @@ #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/log.h" - #if wxUSE_WXDIB #include "wx/palmos/dib.h" #endif -#include "wx/image.h" #include "wx/xpmdecod.h" -#ifdef wxHAVE_RAW_BITMAP -#include "wx/rawbmp.h" -#endif - // missing from mingw32 header #ifndef CLR_INVALID #define CLR_INVALID ((COLORREF)-1) @@ -85,10 +77,6 @@ public: wxPalette m_bitmapPalette; #endif // wxUSE_PALETTE -#ifdef __WXDEBUG__ - wxDC *m_selectedInto; -#endif // __WXDEBUG__ - #if wxUSE_WXDIB wxDIB *m_dib; #endif @@ -100,7 +88,7 @@ public: private: wxMask *m_bitmapMask; - DECLARE_NO_COPY_CLASS(wxBitmapRefData) + wxDECLARE_NO_COPY_CLASS(wxBitmapRefData); }; // ---------------------------------------------------------------------------- @@ -155,9 +143,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) wxBitmapRefData::wxBitmapRefData() { -#ifdef __WXDEBUG__ - m_selectedInto = NULL; -#endif m_bitmapMask = NULL; m_hBitmap = (WXHBITMAP) NULL; @@ -166,7 +151,7 @@ wxBitmapRefData::wxBitmapRefData() #endif m_isDIB = - m_hasAlpha = FALSE; + m_hasAlpha = false; } void wxBitmapRefData::Free() @@ -187,62 +172,35 @@ wxGDIImageRefData *wxBitmap::CreateData() const return NULL; } -#ifdef __WIN32__ - -bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon) -{ - return FALSE; -} - -#endif // Win32 - bool wxBitmap::CopyFromCursor(const wxCursor& cursor) { - return FALSE; + return false; } bool wxBitmap::CopyFromIcon(const wxIcon& icon) { - return FALSE; + return false; } #ifndef NEVER_USE_DIB bool wxBitmap::CopyFromDIB(const wxDIB& dib) { - return FALSE: + return false: } #endif // NEVER_USE_DIB -wxBitmap::~wxBitmap() -{ -} - wxBitmap::wxBitmap(const char bits[], int width, int height, int depth) { Init(); } -// Create from XPM data -#if wxUSE_IMAGE && wxUSE_XPM -bool wxBitmap::CreateFromXpm(const char **data) -#else -bool wxBitmap::CreateFromXpm(const char **WXUNUSED(data)) -#endif -{ - return FALSE; -} - -wxBitmap::wxBitmap(int w, int h, int d) -{ -} - wxBitmap::wxBitmap(int w, int h, const wxDC& dc) { } -wxBitmap::wxBitmap(void *data, long type, int width, int height, int depth) +wxBitmap::wxBitmap(const void* data, long type, int width, int height, int depth) { } @@ -252,17 +210,17 @@ wxBitmap::wxBitmap(const wxString& filename, wxBitmapType type) bool wxBitmap::Create(int width, int height, int depth) { - return FALSE; + return false; } bool wxBitmap::Create(int width, int height, const wxDC& dc) { - return FALSE; + return false; } bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc) { - return FALSE; + return false; } #if wxUSE_IMAGE @@ -275,17 +233,17 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc) bool wxBitmap::CreateFromImage(const wxImage& image, int depth) { - return FALSE; + return false; } bool wxBitmap::CreateFromImage(const wxImage& image, const wxDC& dc) { - return FALSE; + return false; } bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc) { - return FALSE; + return false; } wxImage wxBitmap::ConvertToImage() const @@ -304,19 +262,19 @@ wxImage wxBitmap::ConvertToImage() const bool wxBitmap::LoadFile(const wxString& filename, long type) { - return FALSE; + return false; } -bool wxBitmap::Create(void *data, long type, int width, int height, int depth) +bool wxBitmap::Create(const void* data, long type, int width, int height, int depth) { - return FALSE; + return false; } bool wxBitmap::SaveFile(const wxString& filename, int type, const wxPalette *palette) { - return FALSE; + return false; } // ---------------------------------------------------------------------------- @@ -336,54 +294,24 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const #if wxUSE_PALETTE wxPalette* wxBitmap::GetPalette() const { - return (wxPalette *) NULL; + return NULL; } #endif wxMask *wxBitmap::GetMask() const { - return (wxMask *) NULL; -} - -#ifdef __WXDEBUG__ - -wxDC *wxBitmap::GetSelectedInto() const -{ - return (wxDC *) NULL; -} - -#endif - -#if WXWIN_COMPATIBILITY_2_4 - -int wxBitmap::GetQuality() const -{ - return 0; -} - -#endif // WXWIN_COMPATIBILITY_2_4 - -void wxBitmap::UseAlpha() -{ + return NULL; } bool wxBitmap::HasAlpha() const { - return FALSE; + return false; } // ---------------------------------------------------------------------------- // wxBitmap setters // ---------------------------------------------------------------------------- -#ifdef __WXDEBUG__ - -void wxBitmap::SetSelectedInto(wxDC *dc) -{ -} - -#endif - #if wxUSE_PALETTE void wxBitmap::SetPalette(const wxPalette& palette) @@ -396,30 +324,10 @@ void wxBitmap::SetMask(wxMask *mask) { } -#if WXWIN_COMPATIBILITY_2_4 - -void wxBitmap::SetQuality(int WXUNUSED(quality)) -{ -} - -#endif // WXWIN_COMPATIBILITY_2_4 - // ---------------------------------------------------------------------------- // raw bitmap access support // ---------------------------------------------------------------------------- -#ifdef wxHAVE_RAW_BITMAP -void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp) -{ - return NULL; -} - -void wxBitmap::UngetRawData(wxPixelDataBase& dataBase) -{ - return; -} -#endif // #ifdef wxHAVE_RAW_BITMAP - // ---------------------------------------------------------------------------- // wxMask // ---------------------------------------------------------------------------- @@ -453,21 +361,21 @@ wxMask::~wxMask() // Create a mask from a mono bitmap (copies the bitmap). bool wxMask::Create(const wxBitmap& bitmap) { - return FALSE; + return false; } // Create a mask from a bitmap and a palette index indicating // the transparent area bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) { - return FALSE; + return false; } // Create a mask from a bitmap and a colour indicating // the transparent area bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) { - return FALSE; + return false; } // ---------------------------------------------------------------------------- @@ -475,11 +383,11 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) // ---------------------------------------------------------------------------- bool wxBitmapHandler::Create(wxGDIImage *image, - void *data, + const void* data, long flags, int width, int height, int depth) { - return FALSE; + return false; } bool wxBitmapHandler::Load(wxGDIImage *image, @@ -487,24 +395,24 @@ bool wxBitmapHandler::Load(wxGDIImage *image, long flags, int width, int height) { - return FALSE; + return false; } bool wxBitmapHandler::Save(wxGDIImage *image, const wxString& name, int type) { - return FALSE; + return false; } bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap), - void *WXUNUSED(data), + const void* WXUNUSED(data), long WXUNUSED(type), int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(depth)) { - return FALSE; + return false; } bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap), @@ -513,7 +421,7 @@ bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap), int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight)) { - return FALSE; + return false; } bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap), @@ -521,5 +429,5 @@ bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap), int WXUNUSED(type), const wxPalette *WXUNUSED(palette)) { - return FALSE; + return false; }