]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/core/private.h
osx regrouping
[wxWidgets.git] / include / wx / osx / core / private.h
CommitLineData
5c6eb3a8
SC
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
5// with "wx".
6// Author: Stefan Csomor
7// Modified by:
8// Created: 1998-01-01
9// RCS-ID: $Id: private.h 53819 2008-05-29 14:11:45Z SC $
10// Copyright: (c) Stefan Csomor
11// Licence: wxWindows licence
12/////////////////////////////////////////////////////////////////////////////
13
14#ifndef _WX_PRIVATE_H_
15#define _WX_PRIVATE_H_
16
17#include "wx/defs.h"
18
19#include <CoreFoundation/CoreFoundation.h>
20
ef0e9220
SC
21#include "wx/osx/core/cfstring.h"
22#include "wx/osx/core/cfdataref.h"
5c6eb3a8
SC
23
24#if wxUSE_GUI
25
26#include <CoreGraphics/CoreGraphics.h>
27
28class WXDLLIMPEXP_CORE wxMacCGContextStateSaver
29{
30 DECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver)
31
32public:
33 wxMacCGContextStateSaver( CGContextRef cg )
34 {
35 m_cg = cg;
36 CGContextSaveGState( cg );
37 }
38 ~wxMacCGContextStateSaver()
39 {
40 CGContextRestoreGState( m_cg );
41 }
42private:
43 CGContextRef m_cg;
44};
45
46
47// Quartz
48
49WXDLLIMPEXP_CORE CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap );
50
51WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithCFData( CFDataRef data );
52WXDLLIMPEXP_CORE CGDataConsumerRef wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data );
53WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf );
54
55CGColorSpaceRef WXDLLIMPEXP_CORE wxMacGetGenericRGBColorSpace(void);
56
57#endif // wxUSE_GUI
58
59//---------------------------------------------------------------------------
60// cocoa bridging utilities
61//---------------------------------------------------------------------------
62
63bool wxMacInitCocoa();
64
65class WXDLLIMPEXP_CORE wxMacAutoreleasePool
66{
67public :
68 wxMacAutoreleasePool();
69 ~wxMacAutoreleasePool();
70private :
71 void* m_pool;
72};
73
74// NSObject
75
76void wxMacCocoaRelease( void* obj );
77void wxMacCocoaAutorelease( void* obj );
78void wxMacCocoaRetain( void* obj );
79
80
81#endif
82 // _WX_PRIVATE_H_