mac cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8361bffa4a
commit
e06b0afba5
@ -9,31 +9,4 @@
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_APPTBASE_H_
|
||||
#define _WX_MAC_APPTBASE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAppTraits: the Mac version adds extra hooks needed by Mac code
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxAppTraits : public wxAppTraitsBase
|
||||
{
|
||||
public:
|
||||
// wxExecute() support methods
|
||||
// ---------------------------
|
||||
|
||||
// TODO
|
||||
|
||||
// wxThread helpers
|
||||
// ----------------
|
||||
|
||||
|
||||
// TODO
|
||||
|
||||
// other miscellaneous helpers
|
||||
// ---------------------------
|
||||
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_APPTBASE_H_
|
||||
|
||||
// TODO REMOVE
|
@ -167,8 +167,12 @@ public:
|
||||
WXHBITMAP GetHBITMAP( WXHBITMAP * mask = NULL ) const;
|
||||
|
||||
// returns a CGImageRef which must released after usage with CGImageRelease
|
||||
WXCGIMAGEREF CGImageCreate() const ;
|
||||
CGImageRef CreateCGImage() const ;
|
||||
|
||||
// returns a IconRef which must be retained before and released after usage
|
||||
IconRef GetIconRef() const;
|
||||
// returns a IconRef which must be released after usage
|
||||
IconRef CreateIconRef() const;
|
||||
// get read only access to the underlying buffer
|
||||
void *GetRawAccess() const ;
|
||||
// brackets to the underlying OS structure for read/write access
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
// Cursor
|
||||
class WXDLLEXPORT wxCursor: public wxBitmap
|
||||
class WXDLLEXPORT wxCursor: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCursor)
|
||||
|
||||
|
@ -1085,105 +1085,6 @@ CGColorSpaceRef wxMacGetGenericRGBColorSpace(void);
|
||||
|
||||
void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t size);
|
||||
|
||||
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
|
||||
{
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxIcon;
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxCursor;
|
||||
public:
|
||||
wxBitmapRefData(int width , int height , int depth);
|
||||
wxBitmapRefData();
|
||||
wxBitmapRefData(const wxBitmapRefData &tocopy);
|
||||
|
||||
virtual ~wxBitmapRefData();
|
||||
|
||||
void Free();
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_ok; }
|
||||
void SetOk( bool isOk) { m_ok = isOk; }
|
||||
|
||||
void SetWidth( int width ) { m_width = width; }
|
||||
void SetHeight( int height ) { m_height = height; }
|
||||
void SetDepth( int depth ) { m_depth = depth; }
|
||||
|
||||
int GetWidth() const { return m_width; }
|
||||
int GetHeight() const { return m_height; }
|
||||
int GetDepth() const { return m_depth; }
|
||||
|
||||
void *GetRawAccess() const;
|
||||
void *BeginRawAccess();
|
||||
void EndRawAccess();
|
||||
|
||||
bool HasAlpha() const { return m_hasAlpha; }
|
||||
void UseAlpha( bool useAlpha );
|
||||
|
||||
public:
|
||||
#if wxUSE_PALETTE
|
||||
wxPalette m_bitmapPalette;
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
wxMask * m_bitmapMask; // Optional mask
|
||||
CGImageRef CGImageCreate() const;
|
||||
|
||||
// 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();
|
||||
|
||||
CGContextRef GetBitmapContext() const;
|
||||
|
||||
int GetBytesPerRow() const { return m_bytesPerRow; }
|
||||
private :
|
||||
bool Create(int width , int height , int depth);
|
||||
void Init();
|
||||
|
||||
int m_width;
|
||||
int m_height;
|
||||
int m_bytesPerRow;
|
||||
int m_depth;
|
||||
bool m_hasAlpha;
|
||||
wxMemoryBuffer m_memBuf;
|
||||
int m_rawAccessCount;
|
||||
bool m_ok;
|
||||
mutable CGImageRef m_cgImageRef;
|
||||
|
||||
IconRef m_iconRef;
|
||||
PicHandle m_pictHandle;
|
||||
|
||||
CGContextRef m_hBitmap;
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxIconRefData : public wxGDIRefData
|
||||
{
|
||||
public:
|
||||
wxIconRefData();
|
||||
wxIconRefData( WXHICON );
|
||||
virtual ~wxIconRefData() { Free(); }
|
||||
|
||||
void Init();
|
||||
virtual void Free();
|
||||
|
||||
void SetWidth( int width ) { m_width = width; }
|
||||
void SetHeight( int height ) { m_height = height; }
|
||||
|
||||
int GetWidth() const { return m_width; }
|
||||
int GetHeight() const { return m_height; }
|
||||
|
||||
WXHICON GetHICON() const { return (WXHICON) m_iconRef; }
|
||||
private :
|
||||
IconRef m_iconRef;
|
||||
int m_width;
|
||||
int m_height;
|
||||
};
|
||||
|
||||
// toplevel.cpp
|
||||
|
||||
class wxMacDeferredWindowDeleter : public wxObject
|
||||
|
Loading…
Reference in New Issue
Block a user