X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/732d8c74f805e35cd398711fcd3969c4c668e259..ab67e8874db324fab5223cc8d5dff8a8de3e2b77:/include/wx/osx/bitmap.h diff --git a/include/wx/osx/bitmap.h b/include/wx/osx/bitmap.h index 9fd20675fb..c799d9db5d 100644 --- a/include/wx/osx/bitmap.h +++ b/include/wx/osx/bitmap.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.h +// Name: wx/osx/bitmap.h // Purpose: wxBitmap class // Author: Stefan Csomor // Modified by: @@ -100,6 +100,9 @@ public: // Constructor for generalised creation from data wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1); + + // creates an bitmap from the native image format + wxBitmap(CGImageRef image); // If depth is omitted, will create a bitmap compatible with the display wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); } @@ -123,6 +126,8 @@ public: { return Create(sz.GetWidth(), sz.GetHeight(), depth); } virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); + bool Create( CGImageRef image ); + // virtual bool Create( WXHICON icon) ; virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const; @@ -166,9 +171,13 @@ public: // returns a CGImageRef which must released after usage with CGImageRelease CGImageRef CreateCGImage() const ; -#if wxOSX_USE_COCOA_OR_IPHONE +#if wxOSX_USE_COCOA // returns an autoreleased version of the image WX_NSImage GetNSImage() const; +#endif +#if wxOSX_USE_IPHONE + // returns an autoreleased version of the image + WX_UIImage GetUIImage() const; #endif // returns a IconRef which must be retained before and released after usage IconRef GetIconRef() const;