X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4611dd06a1c5f016fd5b4c5384bbe4620f8af3e9..d32e78bd428286561c0db32afda4dea7e262cb84:/include/wx/gtk1/bitmap.h diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 6ad8ede7d6..d33ce22cc1 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -11,10 +11,6 @@ #ifndef __GTKBITMAPH__ #define __GTKBITMAPH__ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface -#endif - #include "wx/defs.h" #include "wx/object.h" #include "wx/string.h" @@ -25,19 +21,21 @@ typedef struct _GdkPixbuf GdkPixbuf; #endif +class WXDLLEXPORT wxPixelDataBase; + //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- -class wxMask; -class wxBitmap; -class wxImage; +class WXDLLIMPEXP_CORE wxMask; +class WXDLLIMPEXP_CORE wxBitmap; +class WXDLLIMPEXP_CORE wxImage; //----------------------------------------------------------------------------- // wxMask //----------------------------------------------------------------------------- -class wxMask: public wxObject +class WXDLLIMPEXP_CORE wxMask: public wxObject { public: wxMask(); @@ -63,7 +61,7 @@ private: // wxBitmap //----------------------------------------------------------------------------- -class wxBitmap: public wxBitmapBase +class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase { public: wxBitmap(); @@ -106,7 +104,7 @@ public: wxPalette *GetColourMap() const { return GetPalette(); }; #endif // wxUSE_PALETTE - static void InitStandardHandlers() { } + static void InitStandardHandlers(); // implementation // -------------- @@ -130,6 +128,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 +159,30 @@ private: friend class wxMemoryDC; #endif - + friend class wxBitmapHandler; + +private: DECLARE_DYNAMIC_CLASS(wxBitmap) }; +//----------------------------------------------------------------------------- +// wxBitmapHandler +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE 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__