From 16bf3190407e402c8c40d3eed43c42f52f297684 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 11 Jun 2008 16:05:46 +0000 Subject: [PATCH] common private decls git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/corefoundation/private.h | 82 +++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 include/wx/mac/corefoundation/private.h diff --git a/include/wx/mac/corefoundation/private.h b/include/wx/mac/corefoundation/private.h new file mode 100644 index 0000000000..9d70b22c7a --- /dev/null +++ b/include/wx/mac/corefoundation/private.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/mac/corefoundation/private.h +// Purpose: Private declarations: as this header is only included by +// wxWidgets itself, it may contain identifiers which don't start +// with "wx". +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// RCS-ID: $Id: private.h 53819 2008-05-29 14:11:45Z SC $ +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_H_ +#define _WX_PRIVATE_H_ + +#include "wx/defs.h" + +#include + +#include "wx/mac/corefoundation/cfstring.h" +#include "wx/mac/corefoundation/cfdataref.h" + +#if wxUSE_GUI + +#include + +class WXDLLIMPEXP_CORE wxMacCGContextStateSaver +{ + DECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver) + +public: + wxMacCGContextStateSaver( CGContextRef cg ) + { + m_cg = cg; + CGContextSaveGState( cg ); + } + ~wxMacCGContextStateSaver() + { + CGContextRestoreGState( m_cg ); + } +private: + CGContextRef m_cg; +}; + + +// Quartz + +WXDLLIMPEXP_CORE CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap ); + +WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithCFData( CFDataRef data ); +WXDLLIMPEXP_CORE CGDataConsumerRef wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data ); +WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf ); + +CGColorSpaceRef WXDLLIMPEXP_CORE wxMacGetGenericRGBColorSpace(void); + +#endif // wxUSE_GUI + +//--------------------------------------------------------------------------- +// cocoa bridging utilities +//--------------------------------------------------------------------------- + +bool wxMacInitCocoa(); + +class WXDLLIMPEXP_CORE wxMacAutoreleasePool +{ +public : + wxMacAutoreleasePool(); + ~wxMacAutoreleasePool(); +private : + void* m_pool; +}; + +// NSObject + +void wxMacCocoaRelease( void* obj ); +void wxMacCocoaAutorelease( void* obj ); +void wxMacCocoaRetain( void* obj ); + + +#endif + // _WX_PRIVATE_H_