X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4611dd06a1c5f016fd5b4c5384bbe4620f8af3e9..63e2147c8b027645682e0e4cd013a3f30bbd3483:/include/wx/gtk1/bitmap.h diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 6ad8ede7d6..c3058826d5 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -25,6 +25,8 @@ typedef struct _GdkPixbuf GdkPixbuf; #endif +class WXDLLEXPORT wxPixelDataBase; + //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- @@ -106,7 +108,7 @@ public: wxPalette *GetColourMap() const { return GetPalette(); }; #endif // wxUSE_PALETTE - static void InitStandardHandlers() { } + static void InitStandardHandlers(); // implementation // -------------- @@ -130,6 +132,14 @@ public: // Basically, this corresponds to Win32 StretchBlt() wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height ); + + // raw bitmap access support functions + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); + + bool HasAlpha() const; + void UseAlpha(); + protected: bool CreateFromXpm(const char **bits); bool CreateFromImage(const wxImage& image, int depth); @@ -153,8 +163,30 @@ private: friend class wxMemoryDC; #endif - + friend class wxBitmapHandler; + +private: DECLARE_DYNAMIC_CLASS(wxBitmap) }; +//----------------------------------------------------------------------------- +// wxBitmapHandler +//----------------------------------------------------------------------------- + +class wxBitmapHandler: public wxBitmapHandlerBase +{ +public: + wxBitmapHandler() { } + virtual ~wxBitmapHandler(); + + virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1); + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, + int desiredWidth, int desiredHeight); + virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); + +private: + DECLARE_DYNAMIC_CLASS(wxBitmapHandler) +}; + + #endif // __GTKBITMAPH__