1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/corefoundation/private.h
3 // Purpose: Private declarations: as this header is only included by
4 // wxWidgets itself, it may contain identifiers which don't start
6 // Author: Stefan Csomor
9 // RCS-ID: $Id: private.h 53819 2008-05-29 14:11:45Z SC $
10 // Copyright: (c) Stefan Csomor
11 // Licence: wxWindows licence
12 /////////////////////////////////////////////////////////////////////////////
14 #ifndef _WX_PRIVATE_H_
15 #define _WX_PRIVATE_H_
19 #include <CoreFoundation/CoreFoundation.h>
21 #include "wx/osx/core/cfstring.h"
22 #include "wx/osx/core/cfdataref.h"
26 #include <CoreGraphics/CoreGraphics.h>
28 class WXDLLIMPEXP_CORE wxMacCGContextStateSaver
30 DECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver
)
33 wxMacCGContextStateSaver( CGContextRef cg
)
36 CGContextSaveGState( cg
);
38 ~wxMacCGContextStateSaver()
40 CGContextRestoreGState( m_cg
);
49 WXDLLIMPEXP_CORE CGImageRef
wxMacCreateCGImageFromBitmap( const wxBitmap
& bitmap
);
51 WXDLLIMPEXP_CORE CGDataProviderRef
wxMacCGDataProviderCreateWithCFData( CFDataRef data
);
52 WXDLLIMPEXP_CORE CGDataConsumerRef
wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data
);
53 WXDLLIMPEXP_CORE CGDataProviderRef
wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer
& buf
);
55 CGColorSpaceRef WXDLLIMPEXP_CORE
wxMacGetGenericRGBColorSpace(void);
59 //---------------------------------------------------------------------------
60 // cocoa bridging utilities
61 //---------------------------------------------------------------------------
63 bool wxMacInitCocoa();
65 class WXDLLIMPEXP_CORE wxMacAutoreleasePool
68 wxMacAutoreleasePool();
69 ~wxMacAutoreleasePool();
76 void wxMacCocoaRelease( void* obj
);
77 void wxMacCocoaAutorelease( void* obj
);
78 void wxMacCocoaRetain( void* obj
);