From: Stefan Csomor <csomor@advancedconcepts.ch> Date: Mon, 21 Feb 2005 13:42:35 +0000 (+0000) Subject: moving native format generation into bitmap ref data because of the owner semantics... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6d2c830a3cc66c995ab63be03bbed7e2aae3656b?ds=sidebyside moving native format generation into bitmap ref data because of the owner semantics (we don't know when to release a PicHandle otherwise git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/mac/carbon/private.h b/include/wx/mac/carbon/private.h index d6ec8a1623..4fa8f237da 100644 --- a/include/wx/mac/carbon/private.h +++ b/include/wx/mac/carbon/private.h @@ -378,8 +378,6 @@ CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDep void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ; CTabHandle wxMacCreateColorTable( int numColors ) ; */ -PicHandle wxMacCreatePicHandle( const wxBitmap &bmp ) ; -IconRef wxMacCreateIconRef(const wxBitmap& bmp) ; void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType = 0 ) ; void wxMacReleaseBitmapButton( ControlButtonContentInfo*info ) ; @@ -665,6 +663,20 @@ public: #if wxMAC_USE_CORE_GRAPHICS CGImageRef CGImageCreate() const ; #endif + + // returns true if the bitmap has a size that + // can be natively transferred into a true icon + // if no is returned GetIconRef will still produce + // an icon but it will be generated via a PICT and + // rescaled to 16 x 16 + bool HasNativeSize() ; + + // caller should increase ref count if needed longer + // than the bitmap exists + IconRef GetIconRef() ; + + // returns a Pict from the bitmap content + PicHandle GetPictHandle() ; GWorldPtr GetHBITMAP(GWorldPtr * mask = NULL ) const ; void UpdateAlphaMask() const ; @@ -683,6 +695,8 @@ private : #if wxMAC_USE_CORE_GRAPHICS mutable CGImageRef m_cgImageRef ; #endif + IconRef m_iconRef ; + PicHandle m_pictHandle ; GWorldPtr m_hBitmap; GWorldPtr m_hMaskBitmap ; wxMemoryBuffer m_maskMemBuf ;